diff options
author | Determinant <[email protected]> | 2020-07-02 01:36:18 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2020-07-02 01:36:18 -0400 |
commit | ca6847998d867dc5d66e76a03bda9c72ae8d287b (patch) | |
tree | c6eb50a6e8c2d441d77468492c797c6c59885c46 /examples/multicoin/mc_test.sol | |
parent | 2d396b3c69a26e4096ccb376c012911d299c68c7 (diff) |
make MultiCoin.transfer work
Diffstat (limited to 'examples/multicoin/mc_test.sol')
-rw-r--r-- | examples/multicoin/mc_test.sol | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/multicoin/mc_test.sol b/examples/multicoin/mc_test.sol index a7d468e..bfd42a5 100644 --- a/examples/multicoin/mc_test.sol +++ b/examples/multicoin/mc_test.sol @@ -16,4 +16,12 @@ contract MCTest { } function deposit() public payable {} + + function withdraw(uint256 amount, uint256 coinid, uint256 amount2) public { + (bool success,) = MultiCoin.delegatecall( + abi.encodeWithSignature("transfer(address,uint256,uint256,uint256)", + msg.sender, amount, coinid, amount2)); + + require(success); + } } |