aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-11-28 01:24:59 +0800
committerChristian <c@ethdev.com>2014-11-28 01:24:59 +0800
commit3e32ce5d4f56c6babdaaa16c211b0a685fffb21c (patch)
tree630c39887f89ca2be9e06326d05b441ae56b611b
parentc4a43c64c2878dea08dd2366ae6954173c4372cc (diff)
downloaddexon-solidity-3e32ce5d4f56c6babdaaa16c211b0a685fffb21c.tar
dexon-solidity-3e32ce5d4f56c6babdaaa16c211b0a685fffb21c.tar.gz
dexon-solidity-3e32ce5d4f56c6babdaaa16c211b0a685fffb21c.tar.bz2
dexon-solidity-3e32ce5d4f56c6babdaaa16c211b0a685fffb21c.tar.lz
dexon-solidity-3e32ce5d4f56c6babdaaa16c211b0a685fffb21c.tar.xz
dexon-solidity-3e32ce5d4f56c6babdaaa16c211b0a685fffb21c.tar.zst
dexon-solidity-3e32ce5d4f56c6babdaaa16c211b0a685fffb21c.zip
Minor changes to magic variables.
gas moves to "msg", ripemd160 returns hash160.
-rw-r--r--GlobalContext.cpp2
-rw-r--r--Types.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/GlobalContext.cpp b/GlobalContext.cpp
index e958352f..d8b63707 100644
--- a/GlobalContext.cpp
+++ b/GlobalContext.cpp
@@ -58,7 +58,7 @@ GlobalContext::GlobalContext():
FunctionType::Location::ECRECOVER)),
make_shared<MagicVariableDeclaration>("ripemd160",
make_shared<FunctionType>(TypePointers({std::make_shared<IntegerType>(256, IntegerType::Modifier::HASH)}),
- TypePointers({std::make_shared<IntegerType>(256, IntegerType::Modifier::HASH)}),
+ TypePointers({std::make_shared<IntegerType>(160, IntegerType::Modifier::HASH)}),
FunctionType::Location::RIPEMD160))}
{
}
diff --git a/Types.cpp b/Types.cpp
index 4ab53bf8..b81fbbe3 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -397,11 +397,11 @@ MagicType::MagicType(MagicType::Kind _kind):
break;
case Kind::MSG:
m_members = MemberList({{"sender", make_shared<IntegerType const>(0, IntegerType::Modifier::ADDRESS)},
+ {"gas", make_shared<IntegerType const>(256)},
{"value", make_shared<IntegerType const>(256)}});
break;
case Kind::TX:
m_members = MemberList({{"origin", make_shared<IntegerType const>(0, IntegerType::Modifier::ADDRESS)},
- {"gas", make_shared<IntegerType const>(256)},
{"gasprice", make_shared<IntegerType const>(256)}});
break;
default: