diff options
author | Gav Wood <i@gavwood.com> | 2015-01-26 09:01:34 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2015-01-26 09:01:34 +0800 |
commit | 570e49c03ab9e09d538218839696fc6159b0a2f1 (patch) | |
tree | c53a5417c51911ea838de518800c1dd1b44b13c0 /CompilerStack.cpp | |
parent | 3343d408e1d521d429454bce68a06986675975a3 (diff) | |
download | dexon-solidity-570e49c03ab9e09d538218839696fc6159b0a2f1.tar dexon-solidity-570e49c03ab9e09d538218839696fc6159b0a2f1.tar.gz dexon-solidity-570e49c03ab9e09d538218839696fc6159b0a2f1.tar.bz2 dexon-solidity-570e49c03ab9e09d538218839696fc6159b0a2f1.tar.lz dexon-solidity-570e49c03ab9e09d538218839696fc6159b0a2f1.tar.xz dexon-solidity-570e49c03ab9e09d538218839696fc6159b0a2f1.tar.zst dexon-solidity-570e49c03ab9e09d538218839696fc6159b0a2f1.zip |
Add coins reg to standard services.
Upgrade AZ display for new API.
Upgrade requires in Sol.
Diffstat (limited to 'CompilerStack.cpp')
-rw-r--r-- | CompilerStack.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/CompilerStack.cpp b/CompilerStack.cpp index 229afe54..8caaec08 100644 --- a/CompilerStack.cpp +++ b/CompilerStack.cpp @@ -130,7 +130,7 @@ const map<string, string> StandardSources = map<string, string>{ { "owned", "contract owned{function owned(){owner = msg.sender;}address owner;}" }, { "mortal", "import \"owned\";\ncontract mortal is owned {function kill() { if (msg.sender == owner) suicide(owner); }}" }, { "NameReg", "contract NameReg{function register(string32 name){}function addressOf(string32 name)constant returns(address addr){}function unregister(){}function nameOf(address addr)constant returns(string32 name){}}" }, - { "named", "import \"Config\";\nimport \"NameReg\";\ncontract named is mortal, owned {function named(string32 name) {NameReg(Config().lookup(1)).register(name);}}" }, + { "named", "import \"Config\";\nimport \"NameReg\";\ncontract named {function named(string32 name) {NameReg(Config().lookup(1)).register(name);}}" }, { "std", "import \"owned\";\nimport \"mortal\";\nimport \"Config\";\nimport \"NameReg\";\nimport \"named\";\n" }, */}; @@ -141,10 +141,11 @@ string CompilerStack::expanded(string const& _sourceCode) { const map<string, string> c_standardSources = map<string, string>{ { "Config", "contract Config{function lookup(uint256 service)constant returns(address a){}function kill(){}function unregister(uint256 id){}function register(uint256 id,address service){}}" }, + { "service", "#require Config\ncontract service{function service(uint _n){Config().register(_n, this);}}" }, { "owned", "contract owned{function owned(){owner = msg.sender;}address owner;}" }, { "mortal", "#require owned\ncontract mortal is owned {function kill() { if (msg.sender == owner) suicide(owner); }}" }, { "NameReg", "contract NameReg{function register(string32 name){}function addressOf(string32 name)constant returns(address addr){}function unregister(){}function nameOf(address addr)constant returns(string32 name){}}" }, - { "named", "#require Config NameReg\ncontract named is mortal, owned {function named(string32 name) {NameReg(Config().lookup(1)).register(name);}}" }, + { "named", "#require Config NameReg\ncontract named {function named(string32 name) {NameReg(Config().lookup(1)).register(name);}}" }, { "std", "#require owned mortal Config NameReg named" }, }; |