diff options
author | Jacob Evans <dekz@dekz.net> | 2018-04-12 08:20:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-12 08:20:52 +0800 |
commit | be73084e04264d44cfbd7cf6b8ba3a993368133d (patch) | |
tree | 68fc540971871fd99d0977957ac20132d6efed60 /packages/metacoin/contracts/Metacoin.sol | |
parent | 63b941fbaf08167234cf7871e874c1a96e4347fa (diff) | |
parent | 5eb90697c824f1c98467cdb6cd71dbb94ff70805 (diff) | |
download | dexon-sol-tools-be73084e04264d44cfbd7cf6b8ba3a993368133d.tar dexon-sol-tools-be73084e04264d44cfbd7cf6b8ba3a993368133d.tar.gz dexon-sol-tools-be73084e04264d44cfbd7cf6b8ba3a993368133d.tar.bz2 dexon-sol-tools-be73084e04264d44cfbd7cf6b8ba3a993368133d.tar.lz dexon-sol-tools-be73084e04264d44cfbd7cf6b8ba3a993368133d.tar.xz dexon-sol-tools-be73084e04264d44cfbd7cf6b8ba3a993368133d.tar.zst dexon-sol-tools-be73084e04264d44cfbd7cf6b8ba3a993368133d.zip |
Merge branch 'development' into feature/subproviders/mnemonic-wallet-subprovider
Diffstat (limited to 'packages/metacoin/contracts/Metacoin.sol')
-rw-r--r-- | packages/metacoin/contracts/Metacoin.sol | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/metacoin/contracts/Metacoin.sol b/packages/metacoin/contracts/Metacoin.sol index 6b6814b21..ac212b32e 100644 --- a/packages/metacoin/contracts/Metacoin.sol +++ b/packages/metacoin/contracts/Metacoin.sol @@ -11,6 +11,11 @@ contract Metacoin { uint256 amount; } + struct NestedTransferData { + TransferData transferData; + uint32 callback; + } + function Metacoin() public { balances[msg.sender] = 10000; } @@ -22,4 +27,14 @@ contract Metacoin { Transfer(msg.sender, transferData.to, transferData.amount); return true; } + + function transfer(TransferData transferData, uint32 callback) public returns (int) { + transfer(transferData); + return callback; + } + + function transfer(NestedTransferData nestedTransferData) public returns (int) { + return transfer(nestedTransferData.transferData, nestedTransferData.callback); + } + } |