Hi
How (if), can I make this possible? Or do I need to call this approval directly from the ERC20 contract using web3?
myERC20.approve(address(this), 2000);
Hi
How (if), can I make this possible? Or do I need to call this approval directly from the ERC20 contract using web3?
myERC20.approve(address(this), 2000);
That code is not right. Can you post the relevant code.
Is the staking contract part of original erc20 contract or separate one ?
Staking contract is it's own contract, the staking token (ERC20) is it's own contract, and the reward token (ERC20) is it's own contract.
I need to approve the stakingContract as spender of an external erc20 stakingToken in order to allow the a transferFrom my ERC20 stakingToken to my stakingContract
"my ERC20 stakingToken " If this is EOA, then it needs to call approve of ERC20 staking Token with spender as stakingContract through web3.