aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2015-01-27 02:28:15 +0800
committerGav Wood <i@gavwood.com>2015-01-27 02:28:15 +0800
commit32853fbc70e44cfaef25f53891734840340d6fe8 (patch)
treea3863f8d9f34291d088a17da1b95e55637d28cb0
parent570e49c03ab9e09d538218839696fc6159b0a2f1 (diff)
downloaddexon-solidity-32853fbc70e44cfaef25f53891734840340d6fe8.tar
dexon-solidity-32853fbc70e44cfaef25f53891734840340d6fe8.tar.gz
dexon-solidity-32853fbc70e44cfaef25f53891734840340d6fe8.tar.bz2
dexon-solidity-32853fbc70e44cfaef25f53891734840340d6fe8.tar.lz
dexon-solidity-32853fbc70e44cfaef25f53891734840340d6fe8.tar.xz
dexon-solidity-32853fbc70e44cfaef25f53891734840340d6fe8.tar.zst
dexon-solidity-32853fbc70e44cfaef25f53891734840340d6fe8.zip
Fixed spurious whisper watches firing.
Additional standard APIs. Refinement of standard.js.
-rw-r--r--CompilerStack.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/CompilerStack.cpp b/CompilerStack.cpp
index 8caaec08..a8ba037f 100644
--- a/CompilerStack.cpp
+++ b/CompilerStack.cpp
@@ -141,6 +141,9 @@ 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){}}" },
+ { "Coin", "contract Coin{function isApprovedFor(address _target,address _proxy)constant returns(bool _r){}function isApproved(address _proxy)constant returns(bool _r){}function sendCoinFrom(address _from,uint256 _val,address _to){}function coinBalanceOf(address _a)constant returns(uint256 _r){}function sendCoin(uint256 _val,address _to){}function coinBalance()constant returns(uint256 _r){}function approve(address _a){}}"},
+ { "CoinReg", "contract CoinReg{function count()constant returns(uint256 r){}function info(uint256 i)constant returns(address addr,string3 name,uint256 denom){}function register(string3 name,uint256 denom){}function unregister(){}}" },
+ { "coin", "#require CoinReg\ncontract coin {function coin(string3 name, uint denom) {CoinReg(Config().lookup(3)).register(name, denom);}}" },
{ "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); }}" },