diff options
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); + } } |