From 570e49c03ab9e09d538218839696fc6159b0a2f1 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 25 Jan 2015 17:01:34 -0800 Subject: Add coins reg to standard services. Upgrade AZ display for new API. Upgrade requires in Sol. --- CompilerStack.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'CompilerStack.cpp') diff --git a/CompilerStack.cpp b/CompilerStack.cpp index 229afe54..8caaec08 100644 --- a/CompilerStack.cpp +++ b/CompilerStack.cpp @@ -130,7 +130,7 @@ const map StandardSources = map{ { "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 c_standardSources = map{ { "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" }, }; -- cgit v1.2.3