aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-03-14 00:36:00 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-03-16 19:59:56 +0800
commitd7ffba150458f947c03741f1b528d45eb6c8771a (patch)
treef4142709379a19c8ffd18531c075c94ee0309b2e /Types.cpp
parent039b133c180b15863ee3104637c97822d815d932 (diff)
downloaddexon-solidity-d7ffba150458f947c03741f1b528d45eb6c8771a.tar.gz
dexon-solidity-d7ffba150458f947c03741f1b528d45eb6c8771a.tar.zst
dexon-solidity-d7ffba150458f947c03741f1b528d45eb6c8771a.zip
Adding msg.sig Solidity Magic type
msg.sig will return a bytes4 with the function signature located in CALLDATALOAD
Diffstat (limited to 'Types.cpp')
-rw-r--r--Types.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Types.cpp b/Types.cpp
index bd55e2a8..70cbec5d 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -1160,7 +1160,8 @@ MagicType::MagicType(MagicType::Kind _kind):
m_members = MemberList({{"sender", make_shared<IntegerType>(0, IntegerType::Modifier::Address)},
{"gas", make_shared<IntegerType>(256)},
{"value", make_shared<IntegerType>(256)},
- {"data", make_shared<ArrayType>(ArrayType::Location::CallData)}});
+ {"data", make_shared<ArrayType>(ArrayType::Location::CallData)},
+ {"sig", make_shared<FixedBytesType>(4)}});
break;
case Kind::Transaction:
m_members = MemberList({{"origin", make_shared<IntegerType>(0, IntegerType::Modifier::Address)},