0

I have two ERC20 tokens in my Metamask wallet, say TOKEN_1 and TOKEN_2. How do I send TOKEN_1 programmatically to another wallet?

1

1 Answer 1

0

For each token, there is a transfer function that allows you to transfer the token from one account to another. I use brownie, and this is what it would look like.

if the contract was maybe transferring some DAI to another address.

tx = dai.transfer(addressOfReceiver,amountInWei,{"from":yourAccount})
tx.wait(1)

You can check the link below if you know a bit about brownie. https://eth-brownie.readthedocs.io/en/stable/core-contracts.html

But otherwise, for each token, there is a transfer function that allows you to transfer a token from one account to another.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.