3.How to do token transfer
Install dotenv, then make a .env file under your project src folder.
RPC_URL=HTTP://127.0.0.1:7545
MNEMONIC= # fill your nmemonic

Transfer Native Token example

const dotenv = require('dotenv');
dotenv.config();
const w = require('../utils/wallet');
const Transaction = require('../utils/transfer');
const TokenERC20 = require('../utils/tokenERC20');
const IERC20 = require('../abi/IERC20.json');
const RPC_URL = process.env.RPC_URL;
const MNEMONIC = process.env.MNEMONIC;
const ERC20_ABI = process.env.ERC20_ABI;
console.log(`Your RPC_URL is ${RPC_URL}`);
console.log(`Your MNEMONIC is ${MNEMONIC}`);
const erc20 = JSON.parse(ERC20_ABI)
w.importAccountFromMnemonic(MNEMONIC);
console.log(`Your PrivateKey is ${w.getSelectedAccountPrivateKey()}`);
var transaction = new Transaction(RPC_URL, w.getSelectedAccountPrivateKey());
const test_send = async () => {
const tx = await transaction.send("0xd0c17D06dBC69c43D752EAeeFd1b3EDCA5a21d15",0.01)
console.log(tx);
}
test_send()

Transfer BEP20 Token

var tokenERC20 = new TokenERC20(RPC_URL, w.getSelectedAccountPrivateKey(), IERC20.abi, "0x2f01C1d3a504d1bEA1a2C19E7B49D862b8D2cA5a");
const test_getBalance = async () => {
const balance = await transaction.getBalance(transaction.getAddress());
console.log(balance);
}
test_getBalance()