aboutsummaryrefslogtreecommitdiffstats
path: root/GlobalContext.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-11-24 20:23:58 +0800
committerChristian <c@ethdev.com>2014-11-24 20:24:03 +0800
commit6e6b85b58a478a7e2bc0f8bee976df97f9861b91 (patch)
tree19902870438bb0cdb76e161bd5f26319676c4600 /GlobalContext.cpp
parent5d75263ff15aadfcacd35334cbab396cce65d260 (diff)
downloaddexon-solidity-6e6b85b58a478a7e2bc0f8bee976df97f9861b91.tar
dexon-solidity-6e6b85b58a478a7e2bc0f8bee976df97f9861b91.tar.gz
dexon-solidity-6e6b85b58a478a7e2bc0f8bee976df97f9861b91.tar.bz2
dexon-solidity-6e6b85b58a478a7e2bc0f8bee976df97f9861b91.tar.lz
dexon-solidity-6e6b85b58a478a7e2bc0f8bee976df97f9861b91.tar.xz
dexon-solidity-6e6b85b58a478a7e2bc0f8bee976df97f9861b91.tar.zst
dexon-solidity-6e6b85b58a478a7e2bc0f8bee976df97f9861b91.zip
Access to blockchain data.
Diffstat (limited to 'GlobalContext.cpp')
-rw-r--r--GlobalContext.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/GlobalContext.cpp b/GlobalContext.cpp
index f2e6d9ce..4120dae5 100644
--- a/GlobalContext.cpp
+++ b/GlobalContext.cpp
@@ -32,15 +32,17 @@ namespace dev
namespace solidity
{
-GlobalContext::GlobalContext()
+GlobalContext::GlobalContext():
+ m_magicVariables{make_shared<MagicVariableDeclaration>(MagicVariableDeclaration::VariableKind::BLOCK,
+ "block",
+ make_shared<MagicType>(MagicType::Kind::BLOCK)),
+ make_shared<MagicVariableDeclaration>(MagicVariableDeclaration::VariableKind::MSG,
+ "msg",
+ make_shared<MagicType>(MagicType::Kind::MSG)),
+ make_shared<MagicVariableDeclaration>(MagicVariableDeclaration::VariableKind::TX,
+ "tx",
+ make_shared<MagicType>(MagicType::Kind::TX))}
{
- // CurrentContract this; // @todo type depends on context -> switch prior to entering contract
- // Message msg;
- // Transaction tx;
- // Block block;
-
- //@todo type will be a custom complex type, maybe the same type class for msg tx and block.
- //addVariable("msg", );
}
void GlobalContext::setCurrentContract(ContractDefinition const& _contract)