diff options
author | chriseth <chris@ethereum.org> | 2018-03-06 03:11:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-06 03:11:37 +0800 |
commit | 3793aa405b9326c7269ed001344d721ae05629e8 (patch) | |
tree | 2657e731bf0f2a6c608ffefcdb3d5731b3e77fe0 /libsolidity/analysis | |
parent | f190b274313131bbc939815a00d49dcd2c3de10d (diff) | |
parent | 2213f9946b34a6e8f5604a6b821d31788dcee08b (diff) | |
download | dexon-solidity-3793aa405b9326c7269ed001344d721ae05629e8.tar.gz dexon-solidity-3793aa405b9326c7269ed001344d721ae05629e8.tar.zst dexon-solidity-3793aa405b9326c7269ed001344d721ae05629e8.zip |
Merge pull request #3643 from ethereum/gasleft
Move msg.gas to global function gasleft(). Closes #2971.
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/GlobalContext.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libsolidity/analysis/GlobalContext.cpp b/libsolidity/analysis/GlobalContext.cpp index fd39d860..34cb61d8 100644 --- a/libsolidity/analysis/GlobalContext.cpp +++ b/libsolidity/analysis/GlobalContext.cpp @@ -39,6 +39,7 @@ m_magicVariables(vector<shared_ptr<MagicVariableDeclaration const>>{ make_shared<MagicVariableDeclaration>("assert", make_shared<FunctionType>(strings{"bool"}, strings{}, FunctionType::Kind::Assert, false, StateMutability::Pure)), make_shared<MagicVariableDeclaration>("block", make_shared<MagicType>(MagicType::Kind::Block)), make_shared<MagicVariableDeclaration>("ecrecover", make_shared<FunctionType>(strings{"bytes32", "uint8", "bytes32", "bytes32"}, strings{"address"}, FunctionType::Kind::ECRecover, false, StateMutability::Pure)), + make_shared<MagicVariableDeclaration>("gasleft", make_shared<FunctionType>(strings(), strings{"uint256"}, FunctionType::Kind::GasLeft, false, StateMutability::View)), make_shared<MagicVariableDeclaration>("keccak256", make_shared<FunctionType>(strings(), strings{"bytes32"}, FunctionType::Kind::SHA3, true, StateMutability::Pure)), make_shared<MagicVariableDeclaration>("log0", make_shared<FunctionType>(strings{"bytes32"}, strings{}, FunctionType::Kind::Log0)), make_shared<MagicVariableDeclaration>("log1", make_shared<FunctionType>(strings{"bytes32", "bytes32"}, strings{}, FunctionType::Kind::Log1)), |