erc20-meta-token icon indicating copy to clipboard operation
erc20-meta-token copied to clipboard

Example for this project

Open damianlluch opened this issue 4 years ago • 3 comments

Do you have an example of implementation of this contract? In the readme there is only an example of a function call. If you can share a complete example.

Thanks

damianlluch avatar Nov 11 '21 15:11 damianlluch

The example refers to this contract which does not exist in the repository:

'import '@0xsequence/erc20-meta-token/contracts/interfaces/IMetaERC20Wrapper.sol';

Where is this contract?

thanks

damianlluch avatar Nov 12 '21 09:11 damianlluch

I was able to compile the basic example by modifying the contract in this way... It would be interesting if someone could confirm that this modification is well done.

pragma solidity ^0.7.4;

import '@0xsequence/erc20-meta-token/contracts/interfaces/IERC20Wrapper.sol';

contract ERC20Wrapper {
    function f(address payable wrapperAddress, address ERC20tokenAddress, uint256 amount) public {
        IERC20Wrapper(wrapperAddress).deposit(ERC20tokenAddress, msg.sender, amount);
    }
}

damianlluch avatar Nov 12 '21 11:11 damianlluch

That’s what I’m saying; I just don’t want lose everything over nothing, if this can’t be validated.

That1bull-BK avatar Nov 03 '22 02:11 That1bull-BK