I am trying to transfer ERC20 tokens from one address to another address with no ether via OpenZeppelin GSN.
I’m following the tutorial here: https://docs.openzeppelin.com/sdk/2.5/gsn-dapp. And I have successfully done everything required (though locally on Ganache). But i’m facing a problem. I am building an ERC20 compliant smart contract. And i need to call
approve() before calling
transferFrom() but if I call the
approve() function it returns "Error: Could not get relay hub address from recipient at ". And i guess the reason is because the ERC20 token is not configured to accept relayed calls. But i can’t call the
transferFrom() function because it will revert. Please, how do i go about this problem with GSN?
Note: For now (development phase), i am developing both the ERC20 token and contract transferring the token. But in production, i would use ERC20 tokens already deployed.
Code to reproduce
Implement ERC20 compliant smart contract that transfers tokens from an address to another address with