aboutsummaryrefslogtreecommitdiff
path: root/examples/multicoin/mc_test.sol
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2020-07-02 01:36:18 -0400
committerDeterminant <[email protected]>2020-07-02 01:36:18 -0400
commitca6847998d867dc5d66e76a03bda9c72ae8d287b (patch)
treec6eb50a6e8c2d441d77468492c797c6c59885c46 /examples/multicoin/mc_test.sol
parent2d396b3c69a26e4096ccb376c012911d299c68c7 (diff)
make MultiCoin.transfer work
Diffstat (limited to 'examples/multicoin/mc_test.sol')
-rw-r--r--examples/multicoin/mc_test.sol8
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);
+ }
}