aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-02-06 04:21:14 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-02-24 08:17:45 +0800
commit4264625c69a30c4534e977ce3ca709bb95103dad (patch)
tree0cf10fe14784484d2f8ec3acc2d177d303d06067 /libsolidity/ast
parent0177d964b1cf0f7a238f11aa9b617d26dddf7caf (diff)
downloaddexon-solidity-4264625c69a30c4534e977ce3ca709bb95103dad.tar.gz
dexon-solidity-4264625c69a30c4534e977ce3ca709bb95103dad.tar.zst
dexon-solidity-4264625c69a30c4534e977ce3ca709bb95103dad.zip
Implement address.transfer()
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/Types.cpp4
-rw-r--r--libsolidity/ast/Types.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index 96b3ed17..7fccccbc 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -464,7 +464,8 @@ MemberList::MemberMap IntegerType::nativeMembers(ContractDefinition const*) cons
{"call", make_shared<FunctionType>(strings(), strings{"bool"}, FunctionType::Location::Bare, true, false, true)},
{"callcode", make_shared<FunctionType>(strings(), strings{"bool"}, FunctionType::Location::BareCallCode, true, false, true)},
{"delegatecall", make_shared<FunctionType>(strings(), strings{"bool"}, FunctionType::Location::BareDelegateCall, true)},
- {"send", make_shared<FunctionType>(strings{"uint"}, strings{"bool"}, FunctionType::Location::Send)}
+ {"send", make_shared<FunctionType>(strings{"uint"}, strings{"bool"}, FunctionType::Location::Send)},
+ {"transfer", make_shared<FunctionType>(strings{"uint"}, strings(), FunctionType::Location::Transfer)}
};
else
return MemberList::MemberMap();
@@ -2097,6 +2098,7 @@ string FunctionType::identifier() const
case Location::BareDelegateCall: id += "baredelegatecall"; break;
case Location::Creation: id += "creation"; break;
case Location::Send: id += "send"; break;
+ case Location::Transfer: id += "transfer"; break;
case Location::SHA3: id += "sha3"; break;
case Location::Selfdestruct: id += "selfdestruct"; break;
case Location::Revert: id += "revert"; break;
diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h
index 3546e522..022b67c4 100644
--- a/libsolidity/ast/Types.h
+++ b/libsolidity/ast/Types.h
@@ -826,6 +826,7 @@ public:
BareDelegateCall, ///< DELEGATECALL without function hash
Creation, ///< external call using CREATE
Send, ///< CALL, but without data and gas
+ Transfer, ///< CALL, but without data and throws on error
SHA3, ///< SHA3
Selfdestruct, ///< SELFDESTRUCT
Revert, ///< REVERT