Transfer ERC20 Tokens

Last updated

Last updated
const txApi = new Tx(wallet, provider);
// Native Transactions
const nativeTx = await txApi.createNativeTx(wallet.address, receiver_wallet_address, amount);
const txHash = await txApi.signAndBroadcastTx(nativeTx);
// ERC20 Transactions
const nativeTx = await txApi.createERC20Tx(
wallet.address,
receiver_wallet_address,
amount,
erc20_token_contract_address,
);
const txHash = await txApi.signAndBroadcastTx(nativeTx);