Facing transfer amount exceeds balance when I call method transferFrom
I am using HDwallet provider to sign my transactions
I am using ERC20 by openzeppelin itself while creating the contract
What I want to achieve is basically send tokens from account_2 to account_3 and make account_1 that is the master account holding all the tokens to pay for gas/mining fees. Is that possible? I am new to solidity and smart contracts (blockchain in general) thanks for understanding.
I am not sure what do you want to do exactly.
There are three accounts: from:account_address_1, from:account_address_2, from:account_address_3, so I assume that you want to transfer token from from:account_address_1 to from:account_address_3, so in this case, the right step should be
Hi @Skyge , thanks for the quick reply.
What I want to achieve is basically send tokens from account_2 to account_3 and make account_1 that is the master account holding all the tokens to pay for gas/mining fees. Is that possible? I am new to solidity and smart contracts (blockchain in general) thanks for understanding.
Maybe account1 can pay for the mining fee, but for gas fee, in your case, the caller will pay for the gas fee. If you want the account1 to pay for the gas fee, maybe you can have a look at this pattern: Gas Station Network (GSN) - OpenZeppelin Docs