aboutsummaryrefslogtreecommitdiffstats
path: root/packages/metacoin/contracts
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-04-04 08:39:55 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-04-10 08:22:58 +0800
commit61fc3346c2fe2adc33dfe84aa50780d61e10efdf (patch)
tree1f5ab2cddf7093db8f8fb419ef70da66a9997c7b /packages/metacoin/contracts
parent073bf738ddb271b6b4158798baf4cac3cb0608e9 (diff)
downloaddexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar.gz
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar.bz2
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar.lz
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar.xz
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.tar.zst
dexon-sol-tools-61fc3346c2fe2adc33dfe84aa50780d61e10efdf.zip
Updated deployer to accept a list of contract directories as input. Contract directories are namespaced to a void clashes. Also in this commit is a fix for overloading contract functions.
Diffstat (limited to 'packages/metacoin/contracts')
-rw-r--r--packages/metacoin/contracts/Metacoin.sol15
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);
+ }
+
}