├── .github └── FUNDING.yml ├── .gitignore ├── Dockerfile ├── LICENSE.txt ├── Readme.md ├── app ├── basic-blockProcessor-example.php ├── composer.json ├── event-handling-example.php ├── fromNowOn-blockProcessor-example.php ├── infinite-blockProcessor-example.php ├── persistent-blockProcessor-example.php ├── persistent-event-handling-example.php ├── reverse-blockProcessor-example.php ├── single-blockProcessor-example.php ├── src │ ├── BlockProcessor.php │ └── ContractEventProcessor.php └── truffle │ ├── build │ └── contracts │ │ └── CallableEvents.json │ └── contracts │ └── CallableEvents.sol └── docker-run.sh /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: digitaldonkey 4 | patreon: digitaldonkey 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.2-cli 2 | 3 | # Prepare basic deps 4 | RUN apt-get update && apt-get install -y apt-utils wget curl build-essential libevent-dev libssl-dev libzmq3-dev 5 | 6 | # Install PHP5.6 7 | RUN pecl config-set preferred_state beta 8 | RUN docker-php-ext-install sockets bcmath 9 | 10 | # allow manipulation with ENV variables 11 | RUN touch /usr/local/etc/php/php.ini 12 | 13 | # Install PHP Libevent 14 | ENV EVENT_VERSION 2.4.0 15 | # export EVENT_VERSION=2.4.0 16 | RUN cd /usr/local/src && \ 17 | wget https://pecl.php.net/get/event-$EVENT_VERSION.tgz && tar -xvzf event-$EVENT_VERSION.tgz && rm event-$EVENT_VERSION.tgz && \ 18 | cd event-$EVENT_VERSION && /usr/local/bin/phpize && ./configure && make && make install && \ 19 | printf "\n" | pecl install event && echo "extension=event.so" > /usr/local/etc/php/conf.d/event.ini 20 | 21 | ## Install ZeroMQ 22 | RUN pecl install zmq-beta && echo "extension=zmq.so" > /usr/local/etc/php/conf.d/zeromq.ini 23 | 24 | ##Install PHP Zlib 25 | ENV ZLIB_VERSION 1.2.11 26 | RUN cd /usr/local/src && wget http://zlib.net/zlib-$ZLIB_VERSION.tar.gz && tar -xvzf zlib-$ZLIB_VERSION.tar.gz && rm *.gz && cd zlib-$ZLIB_VERSION && ./configure && make && make install && docker-php-ext-install zip 27 | 28 | RUN curl -sS http://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer 29 | 30 | ADD docker-run.sh /opt/local/bin/docker-run.sh 31 | 32 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Thorsten Krug 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # Ethereum-php Listener and Indexer 2 | 3 | **TL;DR** 4 | 5 | When developing dapps you might need some Backend process to react data of the latest block or on on-chain Events (Solidity Events). You might fill up some database by indexing all blocks or set up a daemon process to do something every time a new Block is created. 6 | 7 | -------------------------------- 8 | 9 | As much as we want real decentralization, the reality is actually different. 10 | Mots Dapp's require a Backend process. Sometimes for additional data which is too expensive to store (semi decentralized apps) or at least for monitoring what is happening at on chain. 11 | 12 | 13 | You can do this in PHP very easily. E.g Indexing a chain from block 0 to the latest at script start time: 14 | 15 | ```php 16 | $web3 = new Ethereum('http://192.168.99.100:8545'); 17 | // Block 0 -> last block. 18 | new BlockProcessor($web3, function (Block $block) { 19 | 20 | // This will be run on every Block. 21 | print "\n\n#### BLOCK NUMBER " . $block->number->val() . " ####\n"; 22 | 23 | // Add to database... 24 | print_r($block->toArray()); 25 | } 26 | ); 27 | 28 | ``` 29 | 30 | Run the script. E.g: 31 | 32 | ```bash 33 | php app/basic-blockProcessor-example.php 34 | ``` 35 | 36 | You need to run `composer install` in the app directory to load the dependencies. 37 | 38 | ## Integration with Truffle and Contract Events 39 | 40 | If you are using [Truffle](http://truffleframework.com/) to develop you Dapp you can easily set up a monitoring system for your smart contracts: 41 | 42 | ```php 43 | // Extend a \Ethereum\SmartContract with EventHandlers 44 | class CallableEvents extends SmartContract { 45 | public function onCalledTrigger1 (EthEvent $event) { 46 | echo '### ' . substr(__FUNCTION__, 2) . "(\Ethereum\EmittedEvent)\n"; 47 | var_dump($event); 48 | } 49 | public function onCalledTrigger2 (EthEvent $event) { 50 | echo '### ' . substr(__FUNCTION__, 2) . "(\Ethereum\EmittedEvent)\n"; 51 | var_dump($event); 52 | } 53 | } 54 | 55 | $web3 = new Ethereum('http://192.168.99.100:8545'); 56 | $networkId = '5777'; 57 | 58 | // Contract Classes must have same name as the solidity classes for this to work. 59 | $contracts = SmartContract::createFromTruffleBuildDirectory( 60 | 'YOUR/truffle/build/contracts', 61 | $web3, 62 | $networkId 63 | ); 64 | 65 | // process any Transaction from current Block to the future. 66 | new ContractEventProcessor( 67 | $web3, 68 | $contracts, 69 | 'latest', 70 | 'latest' 71 | ); 72 | 73 | ``` 74 | 75 | ## Background 76 | 77 | The Loop script is based on [reactphp](https://github.com/reactphp/react) which is actually older that Javascript React. 78 | 79 | The Ethereum part is based on [Ethereum-php](https://github.com/digitaldonkey/ethereum-php) library. 80 | 81 | You might use [ganache-cli-docker-compose](https://github.com/digitaldonkey/ganache-cli-docker-compose) for testing. 82 | 83 | You may use the indexer with [Infura](https://infura.io) Ethereum as a Service, as it doesn't rely on filters, which Infura does not support. 84 | 85 | I used a very simple [DAPP](https://github.com/digitaldonkey/react-box-event-handling) to interact with the CallableEvents smart contract used as a example here. 86 | 87 | 88 | ##Docker 89 | 90 | ```bash 91 | # Build 92 | docker build -t ethereum-php-event-handler . 93 | 94 | # Login 95 | docker run -v $(pwd)/app:/opt/local/php-ethereum-listener -it ethereum-php-event-handler bash 96 | 97 | # Deamon 98 | docker run -v $(pwd)/app:/opt/local/php-ethereum-listener -it ethereum-php-event-handler bash -c '/opt/local/bin/docker-run.sh' 99 | ``` 100 | -------------------------------------------------------------------------------- /app/basic-blockProcessor-example.php: -------------------------------------------------------------------------------- 1 | last block. 40 | new BlockProcessor($web3, function (Block $block) { 41 | 42 | // This will be run on every Block. 43 | print "\n\n#### BLOCK NUMBER " . $block->number->val() . " ####\n"; 44 | #print_r($block->toArray()); 45 | } 46 | ); 47 | 48 | } 49 | catch (\Exception $exception) { 50 | throw new $exception; 51 | } 52 | 53 | -------------------------------------------------------------------------------- /app/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "digitaldonkey/ethereum-php-event-handler", 3 | "description": "ReactPHP based indexer. You may use to index a whole Ethereum blockchain or continuously react on smart contract events using PHP.", 4 | "minimum-stability":"dev", 5 | "autoload": { 6 | "psr-4": { 7 | "Ethereum\\": "src/" 8 | } 9 | }, 10 | "require": { 11 | "react/event-loop": "^1.0", 12 | "react/stream": "^1.0", 13 | "digitaldonkey/ethereum-php": "dev-master" 14 | }, 15 | "repositories": [ 16 | { 17 | "type": "git", 18 | "url": "https://github.com/digitaldonkey/ethereum-php.git" 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /app/event-handling-example.php: -------------------------------------------------------------------------------- 1 | build/contracts/CallableEvents.json 58 | * 59 | * @see https://github.com/digitaldonkey/ethereum-php/tree/dev/tests/TestEthClient/test_contracts 60 | * @see: https://truffleframework.com 61 | */ 62 | try { 63 | 64 | $web3 = new Ethereum('http://192.168.99.100:8545'); 65 | $networkId = '5777'; 66 | 67 | $contracts = SmartContract::createFromTruffleBuildDirectory(__DIR__ . '/truffle/build/contracts', $web3, $networkId); 68 | 69 | // By default ContractEventProcessor 70 | // process any Transaction from Block-0 to latest Block (at script run time). 71 | new ContractEventProcessor($web3, $contracts); 72 | } 73 | catch (\Exception $exception) { 74 | throw new $exception; 75 | } 76 | 77 | -------------------------------------------------------------------------------- /app/fromNowOn-blockProcessor-example.php: -------------------------------------------------------------------------------- 1 | number->val() . " ####\n"; 47 | #print_r($block->toArray()); 48 | }, 49 | 'latest', 50 | 'latest' 51 | ); 52 | 53 | } 54 | catch (\Exception $exception) { 55 | throw new $exception; 56 | } 57 | 58 | -------------------------------------------------------------------------------- /app/infinite-blockProcessor-example.php: -------------------------------------------------------------------------------- 1 | 'latest' -> infinite listening for latest block 41 | new BlockProcessor( 42 | $web3, 43 | function (Block $block) { 44 | 45 | // This will be run on every Block. 46 | print "\n\n#### BLOCK NUMBER " . $block->number->val() . " ####\n"; 47 | # print_r($block->toArray()); 48 | }, 49 | null, 50 | 'latest' 51 | ); 52 | 53 | } 54 | catch (\Exception $exception) { 55 | throw new $exception; 56 | } 57 | 58 | -------------------------------------------------------------------------------- /app/persistent-blockProcessor-example.php: -------------------------------------------------------------------------------- 1 | number->val() . " ####\n"; 49 | #print_r($block->toArray()); 50 | }, 51 | 0, 52 | null, 53 | true 54 | ); 55 | 56 | } 57 | catch (\Exception $exception) { 58 | throw new $exception; 59 | } 60 | 61 | -------------------------------------------------------------------------------- /app/persistent-event-handling-example.php: -------------------------------------------------------------------------------- 1 | build/contracts/CallableEvents.json 58 | * 59 | * @see https://github.com/digitaldonkey/ethereum-php/tree/dev/tests/TestEthClient/test_contracts 60 | * @see: https://truffleframework.com 61 | */ 62 | try { 63 | 64 | $web3 = new Ethereum('http://192.168.99.100:8545'); 65 | $networkId = '5777'; 66 | 67 | $contracts = SmartContract::createFromTruffleBuildDirectory(__DIR__ . '/truffle/build/contracts', $web3, $networkId); 68 | 69 | // process any Transaction from Block-0 to the future. 70 | new ContractEventProcessor( 71 | $web3, 72 | $contracts, 73 | 0, 74 | 'latest', 75 | true 76 | ); 77 | } 78 | catch (\Exception $exception) { 79 | throw new $exception; 80 | } 81 | 82 | -------------------------------------------------------------------------------- /app/reverse-blockProcessor-example.php: -------------------------------------------------------------------------------- 1 | Block 0 --> decrement blocks 41 | new BlockProcessor( 42 | $web3, 43 | function (Block $block) { 44 | 45 | // This will be run on every Block. 46 | print "\n\n#### BLOCK NUMBER " . $block->number->val() . " ####\n"; 47 | #print_r($block->toArray()); 48 | }, 49 | 14, 50 | 0 51 | ); 52 | 53 | } 54 | catch (\Exception $exception) { 55 | throw new $exception; 56 | } 57 | 58 | -------------------------------------------------------------------------------- /app/single-blockProcessor-example.php: -------------------------------------------------------------------------------- 1 | number->val() . " ####\n"; 48 | #print_r($block->toArray()); 49 | }, 50 | 0, 51 | 0 52 | ); 53 | 54 | } 55 | catch (\Exception $exception) { 56 | throw new $exception; 57 | } 58 | 59 | -------------------------------------------------------------------------------- /app/src/BlockProcessor.php: -------------------------------------------------------------------------------- 1 | web3 = $web3; 57 | 58 | // Int || 'latest' 59 | $this->isInfinite = self::isInfinite($toBlockNumber); 60 | 61 | // $fromBlockNumber integer || null --> Block 0 || 'latest' -> current block 62 | $fromBlockNumber = $this->startBlock($fromBlockNumber); 63 | 64 | $this->toBlockNumber = $this->endBlock($toBlockNumber); 65 | 66 | $this->increment = $this->upOrDown($fromBlockNumber); 67 | 68 | if ($persistent) { 69 | $fromBlockNumber = $this->checkPersistency($fromBlockNumber); 70 | } 71 | 72 | $this->fromBlockNumber = $fromBlockNumber; 73 | 74 | 75 | $this->timePerLoop = $timePerLoop; 76 | 77 | $this->isPersistent = $persistent; 78 | 79 | 80 | // Validate input. 81 | self::verifyCountLogic(); 82 | $this->runLoop($callback); 83 | 84 | } 85 | 86 | 87 | /** 88 | * Run the Loop. 89 | * 90 | * @param callable $callback 91 | */ 92 | private function runLoop (callable $callback) { 93 | $this->loop = EventLoopFactory::create(); 94 | 95 | $nextBlock = $this->fromBlockNumber; 96 | $updateCounter = array($this, 'updateCounter'); 97 | 98 | $this->loop->addPeriodicTimer($this->timePerLoop , function() use (&$nextBlock, &$callback, &$updateCounter) { 99 | 100 | // @see https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getblockbynumber 101 | $block = $this->web3->eth_getBlockByNumber( 102 | new EthBlockParam($nextBlock), 103 | new EthB(true) // Request TX data. 104 | ); 105 | if (!is_null($block)) { 106 | call_user_func($callback, $block); 107 | $nextBlock = call_user_func($updateCounter, $block->number->val()); 108 | } 109 | 110 | if ($nextBlock === FALSE) { 111 | $this->loop->stop(); 112 | } 113 | }); 114 | $this->loop->run(); 115 | } 116 | 117 | 118 | /** 119 | * @throws \Exception 120 | */ 121 | protected function verifyCountLogic() { 122 | // Ensure this can work. 123 | if ($this->isInfinite) { 124 | return; 125 | } 126 | if ( 127 | ($this->increment && $this->fromBlockNumber <= $this->toBlockNumber) || 128 | (!$this->increment && $this->fromBlockNumber >= $this->toBlockNumber) 129 | ) { 130 | return; 131 | } 132 | throw new \Exception('Check your counting logic.'); 133 | } 134 | 135 | 136 | /** 137 | * @param string|int|null $lastBlock 138 | * @return bool 139 | * @throws \Exception 140 | */ 141 | private static function isInfinite($lastBlock) { 142 | if (!is_null($lastBlock) && $lastBlock === 'latest') { 143 | return true; 144 | } 145 | return false; 146 | } 147 | 148 | 149 | /** 150 | * @param $fromBlockNumber 151 | * @param $default 152 | * @return mixed 153 | */ 154 | private function startBlock($fromBlockNumber, $default = 0) { 155 | if (is_null($fromBlockNumber)) { 156 | return $default; 157 | } 158 | if ($fromBlockNumber === 'latest') { 159 | return $this->web3->eth_blockNumber()->val(); 160 | } 161 | return $fromBlockNumber; 162 | } 163 | 164 | 165 | /** 166 | * @param $fromBlockNumber 167 | * @return bool 168 | */ 169 | private function upOrDown($fromBlockNumber) { 170 | if ($this->isInfinite) { 171 | // $this->toBlockNumber == 'latest' 172 | return true; 173 | } 174 | return ($fromBlockNumber < $this->toBlockNumber); 175 | 176 | } 177 | 178 | 179 | /** 180 | * @param $toBlockNumber 181 | * @return mixed 182 | */ 183 | private function endBlock($toBlockNumber) { 184 | if (is_null($toBlockNumber)) { 185 | return $this->web3->eth_blockNumber()->val(); 186 | } 187 | return $toBlockNumber; 188 | } 189 | 190 | 191 | /** 192 | * @param $fromBlockNumber 193 | * @return bool|string 194 | * @throws \Exception 195 | */ 196 | protected function checkPersistency($fromBlockNumber) 197 | { 198 | $file = self::persistenceFile(); 199 | if (file_exists($file)) { 200 | $value = file_get_contents($file); 201 | if ($value === false) { 202 | throw new \Exception('Can not read temp file.'); 203 | } 204 | return $this->nextBock($value); 205 | } 206 | return $fromBlockNumber; 207 | } 208 | 209 | /** 210 | * @param string $blockNumber 211 | * @throws \Exception 212 | */ 213 | protected function setLastBlock(string $blockNumber) 214 | { 215 | $file = self::persistenceFile(); 216 | if ( 217 | (file_exists($file) && !is_writable($file)) || 218 | file_put_contents($file, (string) $blockNumber) === FALSE 219 | ) { 220 | throw new \Exception('Can not write temp file.'); 221 | } 222 | } 223 | 224 | protected function persistenceDone() { 225 | unlink(self::persistenceFile()); 226 | } 227 | 228 | /** 229 | * @return string FilePath. 230 | */ 231 | protected static function persistenceFile() { 232 | return sys_get_temp_dir() . '/' . md5(__DIR__ . __FILE__ . __CLASS__); 233 | } 234 | 235 | 236 | /** 237 | * @param $blockNumber 238 | * @return int|null 239 | * @throws \Exception 240 | */ 241 | protected function updateCounter($blockNumber) { 242 | $nextBlock = null; 243 | if ($this->isPersistent) { 244 | $this->setLastBlock((string) $blockNumber); 245 | } 246 | 247 | // Update counter 248 | $nextBlock = $this->nextBock($blockNumber); 249 | 250 | if ($this->isInfinite) { 251 | // Check if there is a next block > this one before going on. 252 | $latestBlockNumber = $this->web3->eth_blockNumber()->val(); 253 | if ($nextBlock <= $latestBlockNumber) { 254 | return $nextBlock; 255 | } 256 | else { 257 | while ($nextBlock > $latestBlockNumber) { 258 | sleep(1); 259 | $latestBlockNumber = $this->web3->eth_blockNumber()->val(); 260 | } 261 | return $latestBlockNumber; 262 | } 263 | } 264 | else { 265 | if ( 266 | ($this->increment && $nextBlock > $this->toBlockNumber) || 267 | (!$this->increment && $nextBlock < $this->toBlockNumber) 268 | ) { 269 | $nextBlock = FALSE; // Will end the loop. 270 | if ($this->isPersistent) { 271 | self::persistenceDone(); 272 | } 273 | } 274 | return $nextBlock; 275 | } 276 | } 277 | 278 | 279 | /** 280 | * @param $currentBlock 281 | * @return int 282 | */ 283 | private function nextBock($currentBlock) { 284 | return $this->increment ? $currentBlock + 1 : $currentBlock - 1; 285 | } 286 | } 287 | -------------------------------------------------------------------------------- /app/src/ContractEventProcessor.php: -------------------------------------------------------------------------------- 1 | contracts = self::addressifyKeys($contracts); 46 | $args = func_get_args(); 47 | $args[1] = array($this, 'processBlock'); 48 | parent::__construct(...$args); 49 | } 50 | 51 | 52 | /** 53 | * @param \Ethereum\DataType\Block $block 54 | * @throws \Exception 55 | */ 56 | protected function processBlock(?Block $block) { 57 | 58 | #echo '### Block number ' . $block->number->val() . PHP_EOL; 59 | 60 | if (count($block->transactions)) { 61 | foreach ($block->transactions as $tx) { 62 | 63 | if (is_object($tx->to) && isset($this->contracts[$tx->to->hexVal()])) { 64 | 65 | $contract = $this->contracts[$tx->to->hexVal()]; 66 | $receipt = $this->web3->eth_getTransactionReceipt($tx->hash); 67 | 68 | if (count($receipt->logs)) { 69 | foreach ($receipt->logs as $filterChange) { 70 | $event = $contract->processLog($filterChange); 71 | if ($event->hasData() && method_exists($contract, $event->getHandler())) { 72 | call_user_func(array($contract, $event->getHandler()), $event); 73 | } 74 | } 75 | } 76 | } 77 | } 78 | } 79 | 80 | } 81 | 82 | /** 83 | * @param $contracts 84 | * @return \Ethereum\SmartContract[] 85 | */ 86 | private static function addressifyKeys($contracts){ 87 | 88 | foreach ($contracts as $i => $c) { 89 | /* @var \Ethereum\SmartContract $c */ 90 | $contracts[$c->getAddress()] = $c; 91 | unset($contracts[$i]); 92 | } 93 | return $contracts; 94 | } 95 | 96 | } 97 | -------------------------------------------------------------------------------- /app/truffle/build/contracts/CallableEvents.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractName": "CallableEvents", 3 | "abi": [ 4 | { 5 | "inputs": [], 6 | "payable": false, 7 | "stateMutability": "nonpayable", 8 | "type": "constructor" 9 | }, 10 | { 11 | "payable": true, 12 | "stateMutability": "payable", 13 | "type": "fallback" 14 | }, 15 | { 16 | "anonymous": false, 17 | "inputs": [ 18 | { 19 | "indexed": true, 20 | "name": "from", 21 | "type": "address" 22 | } 23 | ], 24 | "name": "CalledTrigger1", 25 | "type": "event" 26 | }, 27 | { 28 | "anonymous": false, 29 | "inputs": [ 30 | { 31 | "indexed": true, 32 | "name": "from", 33 | "type": "address" 34 | }, 35 | { 36 | "indexed": false, 37 | "name": "value", 38 | "type": "uint256" 39 | } 40 | ], 41 | "name": "CalledTrigger2", 42 | "type": "event" 43 | }, 44 | { 45 | "anonymous": false, 46 | "inputs": [ 47 | { 48 | "indexed": true, 49 | "name": "from", 50 | "type": "address" 51 | }, 52 | { 53 | "indexed": false, 54 | "name": "val1", 55 | "type": "uint256" 56 | }, 57 | { 58 | "indexed": false, 59 | "name": "val2", 60 | "type": "uint256" 61 | } 62 | ], 63 | "name": "CalledTrigger3", 64 | "type": "event" 65 | }, 66 | { 67 | "anonymous": false, 68 | "inputs": [ 69 | { 70 | "indexed": false, 71 | "name": "val1", 72 | "type": "uint256" 73 | }, 74 | { 75 | "indexed": false, 76 | "name": "val2", 77 | "type": "uint256" 78 | } 79 | ], 80 | "name": "CalledTrigger4", 81 | "type": "event" 82 | }, 83 | { 84 | "anonymous": false, 85 | "inputs": [ 86 | { 87 | "indexed": true, 88 | "name": "val1", 89 | "type": "uint256" 90 | }, 91 | { 92 | "indexed": true, 93 | "name": "val2", 94 | "type": "uint256" 95 | } 96 | ], 97 | "name": "CalledTrigger5", 98 | "type": "event" 99 | }, 100 | { 101 | "anonymous": false, 102 | "inputs": [ 103 | { 104 | "indexed": false, 105 | "name": "from", 106 | "type": "address" 107 | }, 108 | { 109 | "indexed": false, 110 | "name": "timestamp", 111 | "type": "uint256" 112 | }, 113 | { 114 | "indexed": false, 115 | "name": "blockNumber", 116 | "type": "uint256" 117 | } 118 | ], 119 | "name": "CalledTrigger6", 120 | "type": "event" 121 | }, 122 | { 123 | "anonymous": false, 124 | "inputs": [ 125 | { 126 | "indexed": true, 127 | "name": "from", 128 | "type": "address" 129 | }, 130 | { 131 | "indexed": false, 132 | "name": "value", 133 | "type": "uint256" 134 | } 135 | ], 136 | "name": "MoneyReceived", 137 | "type": "event" 138 | }, 139 | { 140 | "constant": true, 141 | "inputs": [], 142 | "name": "contractExists", 143 | "outputs": [ 144 | { 145 | "name": "result", 146 | "type": "bool" 147 | } 148 | ], 149 | "payable": false, 150 | "stateMutability": "pure", 151 | "type": "function" 152 | }, 153 | { 154 | "constant": false, 155 | "inputs": [], 156 | "name": "triggerEvent1", 157 | "outputs": [], 158 | "payable": false, 159 | "stateMutability": "nonpayable", 160 | "type": "function" 161 | }, 162 | { 163 | "constant": false, 164 | "inputs": [], 165 | "name": "triggerEvent2", 166 | "outputs": [], 167 | "payable": false, 168 | "stateMutability": "nonpayable", 169 | "type": "function" 170 | }, 171 | { 172 | "constant": false, 173 | "inputs": [], 174 | "name": "triggerEvent3", 175 | "outputs": [], 176 | "payable": false, 177 | "stateMutability": "nonpayable", 178 | "type": "function" 179 | }, 180 | { 181 | "constant": false, 182 | "inputs": [], 183 | "name": "triggerEvent4", 184 | "outputs": [], 185 | "payable": false, 186 | "stateMutability": "nonpayable", 187 | "type": "function" 188 | }, 189 | { 190 | "constant": false, 191 | "inputs": [], 192 | "name": "triggerEvent5", 193 | "outputs": [], 194 | "payable": false, 195 | "stateMutability": "nonpayable", 196 | "type": "function" 197 | }, 198 | { 199 | "constant": false, 200 | "inputs": [], 201 | "name": "triggerEvent6", 202 | "outputs": [], 203 | "payable": false, 204 | "stateMutability": "nonpayable", 205 | "type": "function" 206 | }, 207 | { 208 | "constant": false, 209 | "inputs": [], 210 | "name": "adminDeleteRegistry", 211 | "outputs": [], 212 | "payable": false, 213 | "stateMutability": "nonpayable", 214 | "type": "function" 215 | } 216 | ], 217 | "bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610476806100606000396000f30060806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306ae9483146100de5780633af41dc21461010d57806344a873db146101245780634ac82f301461013b578063876652af14610152578063985feed8146101695780639a7f111914610180578063e6146ef214610197575b3373ffffffffffffffffffffffffffffffffffffffff167f27b15ed4cf832749ed39f33a64e4707ed60a761485e41ffec7343ecaddc0c02a346040518082815260200191505060405180910390a2005b3480156100ea57600080fd5b506100f36101ae565b604051808215151515815260200191505060405180910390f35b34801561011957600080fd5b506101226101b7565b005b34801561013057600080fd5b50610139610248565b005b34801561014757600080fd5b5061015061028d565b005b34801561015e57600080fd5b506101676102ed565b005b34801561017557600080fd5b5061017e610336565b005b34801561018c57600080fd5b5061019561036e565b005b3480156101a357600080fd5b506101ac6103c6565b005b60006001905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610246576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b565b3373ffffffffffffffffffffffffffffffffffffffff167ff1bcc9b38e5032bb337b23b2b8aeec7c9892fdcea5957297e659dbe2c99e16e360405160405180910390a2565b600061270f90503373ffffffffffffffffffffffffffffffffffffffff167fd320a9ab3e25a9129a0f94cd03a17b8ee0705e6d135041c069e7515e7788a3258283604051808381526020018281526020019250505060405180910390a250565b600061270f90507fe8dd66fef5701b72851ca2c0bc6859fc1b15968ba8be5c4075c2330231b38ea38182604051808381526020018281526020019250505060405180910390a150565b600061270f905080817f1713a546df5ad374a19e3792551f4bd595019648e5d4f360e86d530f8ee2fbce60405160405180910390a350565b600061270f90503373ffffffffffffffffffffffffffffffffffffffff167fea677e60e8b8b74e6ac7fc18830a7fe4300f1d020f0229ddc728dab0942a6cca826040518082815260200191505060405180910390a250565b7fd574453bc7514229ed2aa4f0e20aadfa6df86e63b21bf7e78aae08f008740c48336103f0610442565b43604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1565b6000429050905600a165627a7a72305820e5218280a94ba595061bbbd9ef4a376f5b49059985d02ed0e8278ae59b5688360029", 218 | "deployedBytecode": "0x60806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306ae9483146100de5780633af41dc21461010d57806344a873db146101245780634ac82f301461013b578063876652af14610152578063985feed8146101695780639a7f111914610180578063e6146ef214610197575b3373ffffffffffffffffffffffffffffffffffffffff167f27b15ed4cf832749ed39f33a64e4707ed60a761485e41ffec7343ecaddc0c02a346040518082815260200191505060405180910390a2005b3480156100ea57600080fd5b506100f36101ae565b604051808215151515815260200191505060405180910390f35b34801561011957600080fd5b506101226101b7565b005b34801561013057600080fd5b50610139610248565b005b34801561014757600080fd5b5061015061028d565b005b34801561015e57600080fd5b506101676102ed565b005b34801561017557600080fd5b5061017e610336565b005b34801561018c57600080fd5b5061019561036e565b005b3480156101a357600080fd5b506101ac6103c6565b005b60006001905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610246576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b565b3373ffffffffffffffffffffffffffffffffffffffff167ff1bcc9b38e5032bb337b23b2b8aeec7c9892fdcea5957297e659dbe2c99e16e360405160405180910390a2565b600061270f90503373ffffffffffffffffffffffffffffffffffffffff167fd320a9ab3e25a9129a0f94cd03a17b8ee0705e6d135041c069e7515e7788a3258283604051808381526020018281526020019250505060405180910390a250565b600061270f90507fe8dd66fef5701b72851ca2c0bc6859fc1b15968ba8be5c4075c2330231b38ea38182604051808381526020018281526020019250505060405180910390a150565b600061270f905080817f1713a546df5ad374a19e3792551f4bd595019648e5d4f360e86d530f8ee2fbce60405160405180910390a350565b600061270f90503373ffffffffffffffffffffffffffffffffffffffff167fea677e60e8b8b74e6ac7fc18830a7fe4300f1d020f0229ddc728dab0942a6cca826040518082815260200191505060405180910390a250565b7fd574453bc7514229ed2aa4f0e20aadfa6df86e63b21bf7e78aae08f008740c48336103f0610442565b43604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1565b6000429050905600a165627a7a72305820e5218280a94ba595061bbbd9ef4a376f5b49059985d02ed0e8278ae59b5688360029", 219 | "sourceMap": "26:2148:0:-;;;723:55;8:9:-1;5:2;;;30:1;27;20:12;5:2;723:55:0;761:10;752:6;;:19;;;;;;;;;;;;;;;;;;26:2148;;;;;;", 220 | "deployedSourceMap": "26:2148:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1691:10;1677:36;;;1703:9;1677:36;;;;;;;;;;;;;;;;;;26:2148;601:88;;8:9:-1;5:2;;;30:1;27;20:12;5:2;601:88:0;;;;;;;;;;;;;;;;;;;;;;;;;;;2048:123;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2048:123:0;;;;;;784:80;;8:9:-1;5:2;;;30:1;27;20:12;5:2;784:80:0;;;;;;991:122;;8:9:-1;5:2;;;30:1;27;20:12;5:2;991:122:0;;;;;;1119:110;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1119:110:0;;;;;;1235;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1235:110:0;;;;;;870:115;;8:9:-1;5:2;;;30:1;27;20:12;5:2;870:115:0;;;;;;1524:105;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1524:105:0;;;;;;601:88;649:11;678:4;671:11;;601:88;:::o;2048:123::-;2114:6;;;;;;;;;;;2100:20;;:10;:20;;;2096:69;;;2147:6;;;;;;;;;;;2134:20;;;2096:69;2048:123::o;784:80::-;846:10;831:26;;;;;;;;;;;;784:80::o;991:122::-;1032:13;1048:4;1032:20;;1081:10;1066:40;;;1093:5;1100;1066:40;;;;;;;;;;;;;;;;;;;;;;;;991:122;:::o;1119:110::-;1160:13;1176:4;1160:20;;1194:28;1209:5;1216;1194:28;;;;;;;;;;;;;;;;;;;;;;;;1119:110;:::o;1235:::-;1276:13;1292:4;1276:20;;1332:5;1325;1310:28;;;;;;;;;;1235:110;:::o;870:115::-;911:13;927:4;911:20;;960:10;945:33;;;972:5;945:33;;;;;;;;;;;;;;;;;;870:115;:::o;1524:105::-;1570:52;1585:10;1597;:8;:10::i;:::-;1609:12;1570:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1524:105::o;1814:78::-;1857:7;1882:3;1875:10;;1814:78;:::o", 221 | "source": "pragma solidity ^0.4.24;\n\ncontract CallableEvents {\n\n address _owner;\n\n // Event allowing listening to newly signed Accounts (?)\n event CalledTrigger1 (address indexed from);\n event CalledTrigger2 (address indexed from, uint256 value);\n event CalledTrigger3 (address indexed from, uint256 val1, uint256 val2);\n event CalledTrigger4 (uint256 val1, uint256 val2);\n event CalledTrigger5 (uint256 indexed val1, uint256 indexed val2);\n event CalledTrigger6 (address from, uint256 timestamp, uint256 blockNumber);\n event MoneyReceived (address indexed from, uint256 value);\n\n function contractExists () public pure returns (bool result){\n return true;\n }\n\n // Administrative below\n constructor() public {\n _owner = msg.sender;\n }\n\n function triggerEvent1() public {\n emit CalledTrigger1(msg.sender);\n }\n\n function triggerEvent2() public {\n uint256 myVal = 9999;\n emit CalledTrigger2(msg.sender, myVal);\n }\n\n function triggerEvent3() public {\n uint256 myVal = 9999;\n emit CalledTrigger3(msg.sender, myVal, myVal);\n }\n\n function triggerEvent4() public {\n uint256 myVal = 9999;\n emit CalledTrigger4(myVal, myVal);\n }\n\n function triggerEvent5() public {\n uint256 myVal = 9999;\n emit CalledTrigger5(myVal, myVal);\n }\n\n // Timestamp could be modified by miner.\n // For time critical events you should only rely on block number.\n // See: https://ethereum.stackexchange.com/a/9859/852\n function triggerEvent6() public {\n emit CalledTrigger6(msg.sender, unixTime(), block.number);\n }\n\n function () public payable {\n emit MoneyReceived(msg.sender, msg.value);\n }\n\n /**\n * Returns Unix Timestamp\n * E.g: https://www.unixtimestamp.com\n */\n function unixTime() internal view returns (uint256){\n return now;\n }\n\n\n// function getTheMoney() public {\n// if (msg.sender == _owner) {\n// _owner.transfer(address(this).balance);\n// }\n// }\n\n function adminDeleteRegistry() public {\n if (msg.sender == _owner) {\n selfdestruct(_owner);\n }\n }\n\n}\n", 222 | "sourcePath": "/Users/tho/htdocs/ConsenSys/DrupalEthereum/EventHandlingPHP/vendor/digitaldonkey/ethereum-php/tests/TestEthClient/test_contracts/contracts/CallableEvents.sol", 223 | "ast": { 224 | "absolutePath": "/Users/tho/htdocs/ConsenSys/DrupalEthereum/EventHandlingPHP/vendor/digitaldonkey/ethereum-php/tests/TestEthClient/test_contracts/contracts/CallableEvents.sol", 225 | "exportedSymbols": { 226 | "CallableEvents": [ 227 | 175 228 | ] 229 | }, 230 | "id": 176, 231 | "nodeType": "SourceUnit", 232 | "nodes": [ 233 | { 234 | "id": 1, 235 | "literals": [ 236 | "solidity", 237 | "^", 238 | "0.4", 239 | ".24" 240 | ], 241 | "nodeType": "PragmaDirective", 242 | "src": "0:24:0" 243 | }, 244 | { 245 | "baseContracts": [], 246 | "contractDependencies": [], 247 | "contractKind": "contract", 248 | "documentation": null, 249 | "fullyImplemented": true, 250 | "id": 175, 251 | "linearizedBaseContracts": [ 252 | 175 253 | ], 254 | "name": "CallableEvents", 255 | "nodeType": "ContractDefinition", 256 | "nodes": [ 257 | { 258 | "constant": false, 259 | "id": 3, 260 | "name": "_owner", 261 | "nodeType": "VariableDeclaration", 262 | "scope": 175, 263 | "src": "57:14:0", 264 | "stateVariable": true, 265 | "storageLocation": "default", 266 | "typeDescriptions": { 267 | "typeIdentifier": "t_address", 268 | "typeString": "address" 269 | }, 270 | "typeName": { 271 | "id": 2, 272 | "name": "address", 273 | "nodeType": "ElementaryTypeName", 274 | "src": "57:7:0", 275 | "typeDescriptions": { 276 | "typeIdentifier": "t_address", 277 | "typeString": "address" 278 | } 279 | }, 280 | "value": null, 281 | "visibility": "internal" 282 | }, 283 | { 284 | "anonymous": false, 285 | "documentation": null, 286 | "id": 7, 287 | "name": "CalledTrigger1", 288 | "nodeType": "EventDefinition", 289 | "parameters": { 290 | "id": 6, 291 | "nodeType": "ParameterList", 292 | "parameters": [ 293 | { 294 | "constant": false, 295 | "id": 5, 296 | "indexed": true, 297 | "name": "from", 298 | "nodeType": "VariableDeclaration", 299 | "scope": 7, 300 | "src": "161:20:0", 301 | "stateVariable": false, 302 | "storageLocation": "default", 303 | "typeDescriptions": { 304 | "typeIdentifier": "t_address", 305 | "typeString": "address" 306 | }, 307 | "typeName": { 308 | "id": 4, 309 | "name": "address", 310 | "nodeType": "ElementaryTypeName", 311 | "src": "161:7:0", 312 | "typeDescriptions": { 313 | "typeIdentifier": "t_address", 314 | "typeString": "address" 315 | } 316 | }, 317 | "value": null, 318 | "visibility": "internal" 319 | } 320 | ], 321 | "src": "160:22:0" 322 | }, 323 | "src": "139:44:0" 324 | }, 325 | { 326 | "anonymous": false, 327 | "documentation": null, 328 | "id": 13, 329 | "name": "CalledTrigger2", 330 | "nodeType": "EventDefinition", 331 | "parameters": { 332 | "id": 12, 333 | "nodeType": "ParameterList", 334 | "parameters": [ 335 | { 336 | "constant": false, 337 | "id": 9, 338 | "indexed": true, 339 | "name": "from", 340 | "nodeType": "VariableDeclaration", 341 | "scope": 13, 342 | "src": "210:20:0", 343 | "stateVariable": false, 344 | "storageLocation": "default", 345 | "typeDescriptions": { 346 | "typeIdentifier": "t_address", 347 | "typeString": "address" 348 | }, 349 | "typeName": { 350 | "id": 8, 351 | "name": "address", 352 | "nodeType": "ElementaryTypeName", 353 | "src": "210:7:0", 354 | "typeDescriptions": { 355 | "typeIdentifier": "t_address", 356 | "typeString": "address" 357 | } 358 | }, 359 | "value": null, 360 | "visibility": "internal" 361 | }, 362 | { 363 | "constant": false, 364 | "id": 11, 365 | "indexed": false, 366 | "name": "value", 367 | "nodeType": "VariableDeclaration", 368 | "scope": 13, 369 | "src": "232:13:0", 370 | "stateVariable": false, 371 | "storageLocation": "default", 372 | "typeDescriptions": { 373 | "typeIdentifier": "t_uint256", 374 | "typeString": "uint256" 375 | }, 376 | "typeName": { 377 | "id": 10, 378 | "name": "uint256", 379 | "nodeType": "ElementaryTypeName", 380 | "src": "232:7:0", 381 | "typeDescriptions": { 382 | "typeIdentifier": "t_uint256", 383 | "typeString": "uint256" 384 | } 385 | }, 386 | "value": null, 387 | "visibility": "internal" 388 | } 389 | ], 390 | "src": "209:37:0" 391 | }, 392 | "src": "188:59:0" 393 | }, 394 | { 395 | "anonymous": false, 396 | "documentation": null, 397 | "id": 21, 398 | "name": "CalledTrigger3", 399 | "nodeType": "EventDefinition", 400 | "parameters": { 401 | "id": 20, 402 | "nodeType": "ParameterList", 403 | "parameters": [ 404 | { 405 | "constant": false, 406 | "id": 15, 407 | "indexed": true, 408 | "name": "from", 409 | "nodeType": "VariableDeclaration", 410 | "scope": 21, 411 | "src": "274:20:0", 412 | "stateVariable": false, 413 | "storageLocation": "default", 414 | "typeDescriptions": { 415 | "typeIdentifier": "t_address", 416 | "typeString": "address" 417 | }, 418 | "typeName": { 419 | "id": 14, 420 | "name": "address", 421 | "nodeType": "ElementaryTypeName", 422 | "src": "274:7:0", 423 | "typeDescriptions": { 424 | "typeIdentifier": "t_address", 425 | "typeString": "address" 426 | } 427 | }, 428 | "value": null, 429 | "visibility": "internal" 430 | }, 431 | { 432 | "constant": false, 433 | "id": 17, 434 | "indexed": false, 435 | "name": "val1", 436 | "nodeType": "VariableDeclaration", 437 | "scope": 21, 438 | "src": "296:12:0", 439 | "stateVariable": false, 440 | "storageLocation": "default", 441 | "typeDescriptions": { 442 | "typeIdentifier": "t_uint256", 443 | "typeString": "uint256" 444 | }, 445 | "typeName": { 446 | "id": 16, 447 | "name": "uint256", 448 | "nodeType": "ElementaryTypeName", 449 | "src": "296:7:0", 450 | "typeDescriptions": { 451 | "typeIdentifier": "t_uint256", 452 | "typeString": "uint256" 453 | } 454 | }, 455 | "value": null, 456 | "visibility": "internal" 457 | }, 458 | { 459 | "constant": false, 460 | "id": 19, 461 | "indexed": false, 462 | "name": "val2", 463 | "nodeType": "VariableDeclaration", 464 | "scope": 21, 465 | "src": "310:12:0", 466 | "stateVariable": false, 467 | "storageLocation": "default", 468 | "typeDescriptions": { 469 | "typeIdentifier": "t_uint256", 470 | "typeString": "uint256" 471 | }, 472 | "typeName": { 473 | "id": 18, 474 | "name": "uint256", 475 | "nodeType": "ElementaryTypeName", 476 | "src": "310:7:0", 477 | "typeDescriptions": { 478 | "typeIdentifier": "t_uint256", 479 | "typeString": "uint256" 480 | } 481 | }, 482 | "value": null, 483 | "visibility": "internal" 484 | } 485 | ], 486 | "src": "273:50:0" 487 | }, 488 | "src": "252:72:0" 489 | }, 490 | { 491 | "anonymous": false, 492 | "documentation": null, 493 | "id": 27, 494 | "name": "CalledTrigger4", 495 | "nodeType": "EventDefinition", 496 | "parameters": { 497 | "id": 26, 498 | "nodeType": "ParameterList", 499 | "parameters": [ 500 | { 501 | "constant": false, 502 | "id": 23, 503 | "indexed": false, 504 | "name": "val1", 505 | "nodeType": "VariableDeclaration", 506 | "scope": 27, 507 | "src": "351:12:0", 508 | "stateVariable": false, 509 | "storageLocation": "default", 510 | "typeDescriptions": { 511 | "typeIdentifier": "t_uint256", 512 | "typeString": "uint256" 513 | }, 514 | "typeName": { 515 | "id": 22, 516 | "name": "uint256", 517 | "nodeType": "ElementaryTypeName", 518 | "src": "351:7:0", 519 | "typeDescriptions": { 520 | "typeIdentifier": "t_uint256", 521 | "typeString": "uint256" 522 | } 523 | }, 524 | "value": null, 525 | "visibility": "internal" 526 | }, 527 | { 528 | "constant": false, 529 | "id": 25, 530 | "indexed": false, 531 | "name": "val2", 532 | "nodeType": "VariableDeclaration", 533 | "scope": 27, 534 | "src": "365:12:0", 535 | "stateVariable": false, 536 | "storageLocation": "default", 537 | "typeDescriptions": { 538 | "typeIdentifier": "t_uint256", 539 | "typeString": "uint256" 540 | }, 541 | "typeName": { 542 | "id": 24, 543 | "name": "uint256", 544 | "nodeType": "ElementaryTypeName", 545 | "src": "365:7:0", 546 | "typeDescriptions": { 547 | "typeIdentifier": "t_uint256", 548 | "typeString": "uint256" 549 | } 550 | }, 551 | "value": null, 552 | "visibility": "internal" 553 | } 554 | ], 555 | "src": "350:28:0" 556 | }, 557 | "src": "329:50:0" 558 | }, 559 | { 560 | "anonymous": false, 561 | "documentation": null, 562 | "id": 33, 563 | "name": "CalledTrigger5", 564 | "nodeType": "EventDefinition", 565 | "parameters": { 566 | "id": 32, 567 | "nodeType": "ParameterList", 568 | "parameters": [ 569 | { 570 | "constant": false, 571 | "id": 29, 572 | "indexed": true, 573 | "name": "val1", 574 | "nodeType": "VariableDeclaration", 575 | "scope": 33, 576 | "src": "406:20:0", 577 | "stateVariable": false, 578 | "storageLocation": "default", 579 | "typeDescriptions": { 580 | "typeIdentifier": "t_uint256", 581 | "typeString": "uint256" 582 | }, 583 | "typeName": { 584 | "id": 28, 585 | "name": "uint256", 586 | "nodeType": "ElementaryTypeName", 587 | "src": "406:7:0", 588 | "typeDescriptions": { 589 | "typeIdentifier": "t_uint256", 590 | "typeString": "uint256" 591 | } 592 | }, 593 | "value": null, 594 | "visibility": "internal" 595 | }, 596 | { 597 | "constant": false, 598 | "id": 31, 599 | "indexed": true, 600 | "name": "val2", 601 | "nodeType": "VariableDeclaration", 602 | "scope": 33, 603 | "src": "428:20:0", 604 | "stateVariable": false, 605 | "storageLocation": "default", 606 | "typeDescriptions": { 607 | "typeIdentifier": "t_uint256", 608 | "typeString": "uint256" 609 | }, 610 | "typeName": { 611 | "id": 30, 612 | "name": "uint256", 613 | "nodeType": "ElementaryTypeName", 614 | "src": "428:7:0", 615 | "typeDescriptions": { 616 | "typeIdentifier": "t_uint256", 617 | "typeString": "uint256" 618 | } 619 | }, 620 | "value": null, 621 | "visibility": "internal" 622 | } 623 | ], 624 | "src": "405:44:0" 625 | }, 626 | "src": "384:66:0" 627 | }, 628 | { 629 | "anonymous": false, 630 | "documentation": null, 631 | "id": 41, 632 | "name": "CalledTrigger6", 633 | "nodeType": "EventDefinition", 634 | "parameters": { 635 | "id": 40, 636 | "nodeType": "ParameterList", 637 | "parameters": [ 638 | { 639 | "constant": false, 640 | "id": 35, 641 | "indexed": false, 642 | "name": "from", 643 | "nodeType": "VariableDeclaration", 644 | "scope": 41, 645 | "src": "477:13:0", 646 | "stateVariable": false, 647 | "storageLocation": "default", 648 | "typeDescriptions": { 649 | "typeIdentifier": "t_address", 650 | "typeString": "address" 651 | }, 652 | "typeName": { 653 | "id": 34, 654 | "name": "address", 655 | "nodeType": "ElementaryTypeName", 656 | "src": "477:7:0", 657 | "typeDescriptions": { 658 | "typeIdentifier": "t_address", 659 | "typeString": "address" 660 | } 661 | }, 662 | "value": null, 663 | "visibility": "internal" 664 | }, 665 | { 666 | "constant": false, 667 | "id": 37, 668 | "indexed": false, 669 | "name": "timestamp", 670 | "nodeType": "VariableDeclaration", 671 | "scope": 41, 672 | "src": "492:17:0", 673 | "stateVariable": false, 674 | "storageLocation": "default", 675 | "typeDescriptions": { 676 | "typeIdentifier": "t_uint256", 677 | "typeString": "uint256" 678 | }, 679 | "typeName": { 680 | "id": 36, 681 | "name": "uint256", 682 | "nodeType": "ElementaryTypeName", 683 | "src": "492:7:0", 684 | "typeDescriptions": { 685 | "typeIdentifier": "t_uint256", 686 | "typeString": "uint256" 687 | } 688 | }, 689 | "value": null, 690 | "visibility": "internal" 691 | }, 692 | { 693 | "constant": false, 694 | "id": 39, 695 | "indexed": false, 696 | "name": "blockNumber", 697 | "nodeType": "VariableDeclaration", 698 | "scope": 41, 699 | "src": "511:19:0", 700 | "stateVariable": false, 701 | "storageLocation": "default", 702 | "typeDescriptions": { 703 | "typeIdentifier": "t_uint256", 704 | "typeString": "uint256" 705 | }, 706 | "typeName": { 707 | "id": 38, 708 | "name": "uint256", 709 | "nodeType": "ElementaryTypeName", 710 | "src": "511:7:0", 711 | "typeDescriptions": { 712 | "typeIdentifier": "t_uint256", 713 | "typeString": "uint256" 714 | } 715 | }, 716 | "value": null, 717 | "visibility": "internal" 718 | } 719 | ], 720 | "src": "476:55:0" 721 | }, 722 | "src": "455:77:0" 723 | }, 724 | { 725 | "anonymous": false, 726 | "documentation": null, 727 | "id": 47, 728 | "name": "MoneyReceived", 729 | "nodeType": "EventDefinition", 730 | "parameters": { 731 | "id": 46, 732 | "nodeType": "ParameterList", 733 | "parameters": [ 734 | { 735 | "constant": false, 736 | "id": 43, 737 | "indexed": true, 738 | "name": "from", 739 | "nodeType": "VariableDeclaration", 740 | "scope": 47, 741 | "src": "558:20:0", 742 | "stateVariable": false, 743 | "storageLocation": "default", 744 | "typeDescriptions": { 745 | "typeIdentifier": "t_address", 746 | "typeString": "address" 747 | }, 748 | "typeName": { 749 | "id": 42, 750 | "name": "address", 751 | "nodeType": "ElementaryTypeName", 752 | "src": "558:7:0", 753 | "typeDescriptions": { 754 | "typeIdentifier": "t_address", 755 | "typeString": "address" 756 | } 757 | }, 758 | "value": null, 759 | "visibility": "internal" 760 | }, 761 | { 762 | "constant": false, 763 | "id": 45, 764 | "indexed": false, 765 | "name": "value", 766 | "nodeType": "VariableDeclaration", 767 | "scope": 47, 768 | "src": "580:13:0", 769 | "stateVariable": false, 770 | "storageLocation": "default", 771 | "typeDescriptions": { 772 | "typeIdentifier": "t_uint256", 773 | "typeString": "uint256" 774 | }, 775 | "typeName": { 776 | "id": 44, 777 | "name": "uint256", 778 | "nodeType": "ElementaryTypeName", 779 | "src": "580:7:0", 780 | "typeDescriptions": { 781 | "typeIdentifier": "t_uint256", 782 | "typeString": "uint256" 783 | } 784 | }, 785 | "value": null, 786 | "visibility": "internal" 787 | } 788 | ], 789 | "src": "557:37:0" 790 | }, 791 | "src": "537:58:0" 792 | }, 793 | { 794 | "body": { 795 | "id": 54, 796 | "nodeType": "Block", 797 | "src": "661:28:0", 798 | "statements": [ 799 | { 800 | "expression": { 801 | "argumentTypes": null, 802 | "hexValue": "74727565", 803 | "id": 52, 804 | "isConstant": false, 805 | "isLValue": false, 806 | "isPure": true, 807 | "kind": "bool", 808 | "lValueRequested": false, 809 | "nodeType": "Literal", 810 | "src": "678:4:0", 811 | "subdenomination": null, 812 | "typeDescriptions": { 813 | "typeIdentifier": "t_bool", 814 | "typeString": "bool" 815 | }, 816 | "value": "true" 817 | }, 818 | "functionReturnParameters": 51, 819 | "id": 53, 820 | "nodeType": "Return", 821 | "src": "671:11:0" 822 | } 823 | ] 824 | }, 825 | "documentation": null, 826 | "id": 55, 827 | "implemented": true, 828 | "isConstructor": false, 829 | "isDeclaredConst": true, 830 | "modifiers": [], 831 | "name": "contractExists", 832 | "nodeType": "FunctionDefinition", 833 | "parameters": { 834 | "id": 48, 835 | "nodeType": "ParameterList", 836 | "parameters": [], 837 | "src": "625:2:0" 838 | }, 839 | "payable": false, 840 | "returnParameters": { 841 | "id": 51, 842 | "nodeType": "ParameterList", 843 | "parameters": [ 844 | { 845 | "constant": false, 846 | "id": 50, 847 | "name": "result", 848 | "nodeType": "VariableDeclaration", 849 | "scope": 55, 850 | "src": "649:11:0", 851 | "stateVariable": false, 852 | "storageLocation": "default", 853 | "typeDescriptions": { 854 | "typeIdentifier": "t_bool", 855 | "typeString": "bool" 856 | }, 857 | "typeName": { 858 | "id": 49, 859 | "name": "bool", 860 | "nodeType": "ElementaryTypeName", 861 | "src": "649:4:0", 862 | "typeDescriptions": { 863 | "typeIdentifier": "t_bool", 864 | "typeString": "bool" 865 | } 866 | }, 867 | "value": null, 868 | "visibility": "internal" 869 | } 870 | ], 871 | "src": "648:13:0" 872 | }, 873 | "scope": 175, 874 | "src": "601:88:0", 875 | "stateMutability": "pure", 876 | "superFunction": null, 877 | "visibility": "public" 878 | }, 879 | { 880 | "body": { 881 | "id": 63, 882 | "nodeType": "Block", 883 | "src": "744:34:0", 884 | "statements": [ 885 | { 886 | "expression": { 887 | "argumentTypes": null, 888 | "id": 61, 889 | "isConstant": false, 890 | "isLValue": false, 891 | "isPure": false, 892 | "lValueRequested": false, 893 | "leftHandSide": { 894 | "argumentTypes": null, 895 | "id": 58, 896 | "name": "_owner", 897 | "nodeType": "Identifier", 898 | "overloadedDeclarations": [], 899 | "referencedDeclaration": 3, 900 | "src": "752:6:0", 901 | "typeDescriptions": { 902 | "typeIdentifier": "t_address", 903 | "typeString": "address" 904 | } 905 | }, 906 | "nodeType": "Assignment", 907 | "operator": "=", 908 | "rightHandSide": { 909 | "argumentTypes": null, 910 | "expression": { 911 | "argumentTypes": null, 912 | "id": 59, 913 | "name": "msg", 914 | "nodeType": "Identifier", 915 | "overloadedDeclarations": [], 916 | "referencedDeclaration": 582, 917 | "src": "761:3:0", 918 | "typeDescriptions": { 919 | "typeIdentifier": "t_magic_message", 920 | "typeString": "msg" 921 | } 922 | }, 923 | "id": 60, 924 | "isConstant": false, 925 | "isLValue": false, 926 | "isPure": false, 927 | "lValueRequested": false, 928 | "memberName": "sender", 929 | "nodeType": "MemberAccess", 930 | "referencedDeclaration": null, 931 | "src": "761:10:0", 932 | "typeDescriptions": { 933 | "typeIdentifier": "t_address", 934 | "typeString": "address" 935 | } 936 | }, 937 | "src": "752:19:0", 938 | "typeDescriptions": { 939 | "typeIdentifier": "t_address", 940 | "typeString": "address" 941 | } 942 | }, 943 | "id": 62, 944 | "nodeType": "ExpressionStatement", 945 | "src": "752:19:0" 946 | } 947 | ] 948 | }, 949 | "documentation": null, 950 | "id": 64, 951 | "implemented": true, 952 | "isConstructor": true, 953 | "isDeclaredConst": false, 954 | "modifiers": [], 955 | "name": "", 956 | "nodeType": "FunctionDefinition", 957 | "parameters": { 958 | "id": 56, 959 | "nodeType": "ParameterList", 960 | "parameters": [], 961 | "src": "734:2:0" 962 | }, 963 | "payable": false, 964 | "returnParameters": { 965 | "id": 57, 966 | "nodeType": "ParameterList", 967 | "parameters": [], 968 | "src": "744:0:0" 969 | }, 970 | "scope": 175, 971 | "src": "723:55:0", 972 | "stateMutability": "nonpayable", 973 | "superFunction": null, 974 | "visibility": "public" 975 | }, 976 | { 977 | "body": { 978 | "id": 72, 979 | "nodeType": "Block", 980 | "src": "816:48:0", 981 | "statements": [ 982 | { 983 | "eventCall": { 984 | "argumentTypes": null, 985 | "arguments": [ 986 | { 987 | "argumentTypes": null, 988 | "expression": { 989 | "argumentTypes": null, 990 | "id": 68, 991 | "name": "msg", 992 | "nodeType": "Identifier", 993 | "overloadedDeclarations": [], 994 | "referencedDeclaration": 582, 995 | "src": "846:3:0", 996 | "typeDescriptions": { 997 | "typeIdentifier": "t_magic_message", 998 | "typeString": "msg" 999 | } 1000 | }, 1001 | "id": 69, 1002 | "isConstant": false, 1003 | "isLValue": false, 1004 | "isPure": false, 1005 | "lValueRequested": false, 1006 | "memberName": "sender", 1007 | "nodeType": "MemberAccess", 1008 | "referencedDeclaration": null, 1009 | "src": "846:10:0", 1010 | "typeDescriptions": { 1011 | "typeIdentifier": "t_address", 1012 | "typeString": "address" 1013 | } 1014 | } 1015 | ], 1016 | "expression": { 1017 | "argumentTypes": [ 1018 | { 1019 | "typeIdentifier": "t_address", 1020 | "typeString": "address" 1021 | } 1022 | ], 1023 | "id": 67, 1024 | "name": "CalledTrigger1", 1025 | "nodeType": "Identifier", 1026 | "overloadedDeclarations": [], 1027 | "referencedDeclaration": 7, 1028 | "src": "831:14:0", 1029 | "typeDescriptions": { 1030 | "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", 1031 | "typeString": "function (address)" 1032 | } 1033 | }, 1034 | "id": 70, 1035 | "isConstant": false, 1036 | "isLValue": false, 1037 | "isPure": false, 1038 | "kind": "functionCall", 1039 | "lValueRequested": false, 1040 | "names": [], 1041 | "nodeType": "FunctionCall", 1042 | "src": "831:26:0", 1043 | "typeDescriptions": { 1044 | "typeIdentifier": "t_tuple$__$", 1045 | "typeString": "tuple()" 1046 | } 1047 | }, 1048 | "id": 71, 1049 | "nodeType": "EmitStatement", 1050 | "src": "826:31:0" 1051 | } 1052 | ] 1053 | }, 1054 | "documentation": null, 1055 | "id": 73, 1056 | "implemented": true, 1057 | "isConstructor": false, 1058 | "isDeclaredConst": false, 1059 | "modifiers": [], 1060 | "name": "triggerEvent1", 1061 | "nodeType": "FunctionDefinition", 1062 | "parameters": { 1063 | "id": 65, 1064 | "nodeType": "ParameterList", 1065 | "parameters": [], 1066 | "src": "806:2:0" 1067 | }, 1068 | "payable": false, 1069 | "returnParameters": { 1070 | "id": 66, 1071 | "nodeType": "ParameterList", 1072 | "parameters": [], 1073 | "src": "816:0:0" 1074 | }, 1075 | "scope": 175, 1076 | "src": "784:80:0", 1077 | "stateMutability": "nonpayable", 1078 | "superFunction": null, 1079 | "visibility": "public" 1080 | }, 1081 | { 1082 | "body": { 1083 | "id": 86, 1084 | "nodeType": "Block", 1085 | "src": "902:83:0", 1086 | "statements": [ 1087 | { 1088 | "assignments": [ 1089 | 77 1090 | ], 1091 | "declarations": [ 1092 | { 1093 | "constant": false, 1094 | "id": 77, 1095 | "name": "myVal", 1096 | "nodeType": "VariableDeclaration", 1097 | "scope": 87, 1098 | "src": "911:13:0", 1099 | "stateVariable": false, 1100 | "storageLocation": "default", 1101 | "typeDescriptions": { 1102 | "typeIdentifier": "t_uint256", 1103 | "typeString": "uint256" 1104 | }, 1105 | "typeName": { 1106 | "id": 76, 1107 | "name": "uint256", 1108 | "nodeType": "ElementaryTypeName", 1109 | "src": "911:7:0", 1110 | "typeDescriptions": { 1111 | "typeIdentifier": "t_uint256", 1112 | "typeString": "uint256" 1113 | } 1114 | }, 1115 | "value": null, 1116 | "visibility": "internal" 1117 | } 1118 | ], 1119 | "id": 79, 1120 | "initialValue": { 1121 | "argumentTypes": null, 1122 | "hexValue": "39393939", 1123 | "id": 78, 1124 | "isConstant": false, 1125 | "isLValue": false, 1126 | "isPure": true, 1127 | "kind": "number", 1128 | "lValueRequested": false, 1129 | "nodeType": "Literal", 1130 | "src": "927:4:0", 1131 | "subdenomination": null, 1132 | "typeDescriptions": { 1133 | "typeIdentifier": "t_rational_9999_by_1", 1134 | "typeString": "int_const 9999" 1135 | }, 1136 | "value": "9999" 1137 | }, 1138 | "nodeType": "VariableDeclarationStatement", 1139 | "src": "911:20:0" 1140 | }, 1141 | { 1142 | "eventCall": { 1143 | "argumentTypes": null, 1144 | "arguments": [ 1145 | { 1146 | "argumentTypes": null, 1147 | "expression": { 1148 | "argumentTypes": null, 1149 | "id": 81, 1150 | "name": "msg", 1151 | "nodeType": "Identifier", 1152 | "overloadedDeclarations": [], 1153 | "referencedDeclaration": 582, 1154 | "src": "960:3:0", 1155 | "typeDescriptions": { 1156 | "typeIdentifier": "t_magic_message", 1157 | "typeString": "msg" 1158 | } 1159 | }, 1160 | "id": 82, 1161 | "isConstant": false, 1162 | "isLValue": false, 1163 | "isPure": false, 1164 | "lValueRequested": false, 1165 | "memberName": "sender", 1166 | "nodeType": "MemberAccess", 1167 | "referencedDeclaration": null, 1168 | "src": "960:10:0", 1169 | "typeDescriptions": { 1170 | "typeIdentifier": "t_address", 1171 | "typeString": "address" 1172 | } 1173 | }, 1174 | { 1175 | "argumentTypes": null, 1176 | "id": 83, 1177 | "name": "myVal", 1178 | "nodeType": "Identifier", 1179 | "overloadedDeclarations": [], 1180 | "referencedDeclaration": 77, 1181 | "src": "972:5:0", 1182 | "typeDescriptions": { 1183 | "typeIdentifier": "t_uint256", 1184 | "typeString": "uint256" 1185 | } 1186 | } 1187 | ], 1188 | "expression": { 1189 | "argumentTypes": [ 1190 | { 1191 | "typeIdentifier": "t_address", 1192 | "typeString": "address" 1193 | }, 1194 | { 1195 | "typeIdentifier": "t_uint256", 1196 | "typeString": "uint256" 1197 | } 1198 | ], 1199 | "id": 80, 1200 | "name": "CalledTrigger2", 1201 | "nodeType": "Identifier", 1202 | "overloadedDeclarations": [], 1203 | "referencedDeclaration": 13, 1204 | "src": "945:14:0", 1205 | "typeDescriptions": { 1206 | "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", 1207 | "typeString": "function (address,uint256)" 1208 | } 1209 | }, 1210 | "id": 84, 1211 | "isConstant": false, 1212 | "isLValue": false, 1213 | "isPure": false, 1214 | "kind": "functionCall", 1215 | "lValueRequested": false, 1216 | "names": [], 1217 | "nodeType": "FunctionCall", 1218 | "src": "945:33:0", 1219 | "typeDescriptions": { 1220 | "typeIdentifier": "t_tuple$__$", 1221 | "typeString": "tuple()" 1222 | } 1223 | }, 1224 | "id": 85, 1225 | "nodeType": "EmitStatement", 1226 | "src": "940:38:0" 1227 | } 1228 | ] 1229 | }, 1230 | "documentation": null, 1231 | "id": 87, 1232 | "implemented": true, 1233 | "isConstructor": false, 1234 | "isDeclaredConst": false, 1235 | "modifiers": [], 1236 | "name": "triggerEvent2", 1237 | "nodeType": "FunctionDefinition", 1238 | "parameters": { 1239 | "id": 74, 1240 | "nodeType": "ParameterList", 1241 | "parameters": [], 1242 | "src": "892:2:0" 1243 | }, 1244 | "payable": false, 1245 | "returnParameters": { 1246 | "id": 75, 1247 | "nodeType": "ParameterList", 1248 | "parameters": [], 1249 | "src": "902:0:0" 1250 | }, 1251 | "scope": 175, 1252 | "src": "870:115:0", 1253 | "stateMutability": "nonpayable", 1254 | "superFunction": null, 1255 | "visibility": "public" 1256 | }, 1257 | { 1258 | "body": { 1259 | "id": 101, 1260 | "nodeType": "Block", 1261 | "src": "1023:90:0", 1262 | "statements": [ 1263 | { 1264 | "assignments": [ 1265 | 91 1266 | ], 1267 | "declarations": [ 1268 | { 1269 | "constant": false, 1270 | "id": 91, 1271 | "name": "myVal", 1272 | "nodeType": "VariableDeclaration", 1273 | "scope": 102, 1274 | "src": "1032:13:0", 1275 | "stateVariable": false, 1276 | "storageLocation": "default", 1277 | "typeDescriptions": { 1278 | "typeIdentifier": "t_uint256", 1279 | "typeString": "uint256" 1280 | }, 1281 | "typeName": { 1282 | "id": 90, 1283 | "name": "uint256", 1284 | "nodeType": "ElementaryTypeName", 1285 | "src": "1032:7:0", 1286 | "typeDescriptions": { 1287 | "typeIdentifier": "t_uint256", 1288 | "typeString": "uint256" 1289 | } 1290 | }, 1291 | "value": null, 1292 | "visibility": "internal" 1293 | } 1294 | ], 1295 | "id": 93, 1296 | "initialValue": { 1297 | "argumentTypes": null, 1298 | "hexValue": "39393939", 1299 | "id": 92, 1300 | "isConstant": false, 1301 | "isLValue": false, 1302 | "isPure": true, 1303 | "kind": "number", 1304 | "lValueRequested": false, 1305 | "nodeType": "Literal", 1306 | "src": "1048:4:0", 1307 | "subdenomination": null, 1308 | "typeDescriptions": { 1309 | "typeIdentifier": "t_rational_9999_by_1", 1310 | "typeString": "int_const 9999" 1311 | }, 1312 | "value": "9999" 1313 | }, 1314 | "nodeType": "VariableDeclarationStatement", 1315 | "src": "1032:20:0" 1316 | }, 1317 | { 1318 | "eventCall": { 1319 | "argumentTypes": null, 1320 | "arguments": [ 1321 | { 1322 | "argumentTypes": null, 1323 | "expression": { 1324 | "argumentTypes": null, 1325 | "id": 95, 1326 | "name": "msg", 1327 | "nodeType": "Identifier", 1328 | "overloadedDeclarations": [], 1329 | "referencedDeclaration": 582, 1330 | "src": "1081:3:0", 1331 | "typeDescriptions": { 1332 | "typeIdentifier": "t_magic_message", 1333 | "typeString": "msg" 1334 | } 1335 | }, 1336 | "id": 96, 1337 | "isConstant": false, 1338 | "isLValue": false, 1339 | "isPure": false, 1340 | "lValueRequested": false, 1341 | "memberName": "sender", 1342 | "nodeType": "MemberAccess", 1343 | "referencedDeclaration": null, 1344 | "src": "1081:10:0", 1345 | "typeDescriptions": { 1346 | "typeIdentifier": "t_address", 1347 | "typeString": "address" 1348 | } 1349 | }, 1350 | { 1351 | "argumentTypes": null, 1352 | "id": 97, 1353 | "name": "myVal", 1354 | "nodeType": "Identifier", 1355 | "overloadedDeclarations": [], 1356 | "referencedDeclaration": 91, 1357 | "src": "1093:5:0", 1358 | "typeDescriptions": { 1359 | "typeIdentifier": "t_uint256", 1360 | "typeString": "uint256" 1361 | } 1362 | }, 1363 | { 1364 | "argumentTypes": null, 1365 | "id": 98, 1366 | "name": "myVal", 1367 | "nodeType": "Identifier", 1368 | "overloadedDeclarations": [], 1369 | "referencedDeclaration": 91, 1370 | "src": "1100:5:0", 1371 | "typeDescriptions": { 1372 | "typeIdentifier": "t_uint256", 1373 | "typeString": "uint256" 1374 | } 1375 | } 1376 | ], 1377 | "expression": { 1378 | "argumentTypes": [ 1379 | { 1380 | "typeIdentifier": "t_address", 1381 | "typeString": "address" 1382 | }, 1383 | { 1384 | "typeIdentifier": "t_uint256", 1385 | "typeString": "uint256" 1386 | }, 1387 | { 1388 | "typeIdentifier": "t_uint256", 1389 | "typeString": "uint256" 1390 | } 1391 | ], 1392 | "id": 94, 1393 | "name": "CalledTrigger3", 1394 | "nodeType": "Identifier", 1395 | "overloadedDeclarations": [], 1396 | "referencedDeclaration": 21, 1397 | "src": "1066:14:0", 1398 | "typeDescriptions": { 1399 | "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", 1400 | "typeString": "function (address,uint256,uint256)" 1401 | } 1402 | }, 1403 | "id": 99, 1404 | "isConstant": false, 1405 | "isLValue": false, 1406 | "isPure": false, 1407 | "kind": "functionCall", 1408 | "lValueRequested": false, 1409 | "names": [], 1410 | "nodeType": "FunctionCall", 1411 | "src": "1066:40:0", 1412 | "typeDescriptions": { 1413 | "typeIdentifier": "t_tuple$__$", 1414 | "typeString": "tuple()" 1415 | } 1416 | }, 1417 | "id": 100, 1418 | "nodeType": "EmitStatement", 1419 | "src": "1061:45:0" 1420 | } 1421 | ] 1422 | }, 1423 | "documentation": null, 1424 | "id": 102, 1425 | "implemented": true, 1426 | "isConstructor": false, 1427 | "isDeclaredConst": false, 1428 | "modifiers": [], 1429 | "name": "triggerEvent3", 1430 | "nodeType": "FunctionDefinition", 1431 | "parameters": { 1432 | "id": 88, 1433 | "nodeType": "ParameterList", 1434 | "parameters": [], 1435 | "src": "1013:2:0" 1436 | }, 1437 | "payable": false, 1438 | "returnParameters": { 1439 | "id": 89, 1440 | "nodeType": "ParameterList", 1441 | "parameters": [], 1442 | "src": "1023:0:0" 1443 | }, 1444 | "scope": 175, 1445 | "src": "991:122:0", 1446 | "stateMutability": "nonpayable", 1447 | "superFunction": null, 1448 | "visibility": "public" 1449 | }, 1450 | { 1451 | "body": { 1452 | "id": 114, 1453 | "nodeType": "Block", 1454 | "src": "1151:78:0", 1455 | "statements": [ 1456 | { 1457 | "assignments": [ 1458 | 106 1459 | ], 1460 | "declarations": [ 1461 | { 1462 | "constant": false, 1463 | "id": 106, 1464 | "name": "myVal", 1465 | "nodeType": "VariableDeclaration", 1466 | "scope": 115, 1467 | "src": "1160:13:0", 1468 | "stateVariable": false, 1469 | "storageLocation": "default", 1470 | "typeDescriptions": { 1471 | "typeIdentifier": "t_uint256", 1472 | "typeString": "uint256" 1473 | }, 1474 | "typeName": { 1475 | "id": 105, 1476 | "name": "uint256", 1477 | "nodeType": "ElementaryTypeName", 1478 | "src": "1160:7:0", 1479 | "typeDescriptions": { 1480 | "typeIdentifier": "t_uint256", 1481 | "typeString": "uint256" 1482 | } 1483 | }, 1484 | "value": null, 1485 | "visibility": "internal" 1486 | } 1487 | ], 1488 | "id": 108, 1489 | "initialValue": { 1490 | "argumentTypes": null, 1491 | "hexValue": "39393939", 1492 | "id": 107, 1493 | "isConstant": false, 1494 | "isLValue": false, 1495 | "isPure": true, 1496 | "kind": "number", 1497 | "lValueRequested": false, 1498 | "nodeType": "Literal", 1499 | "src": "1176:4:0", 1500 | "subdenomination": null, 1501 | "typeDescriptions": { 1502 | "typeIdentifier": "t_rational_9999_by_1", 1503 | "typeString": "int_const 9999" 1504 | }, 1505 | "value": "9999" 1506 | }, 1507 | "nodeType": "VariableDeclarationStatement", 1508 | "src": "1160:20:0" 1509 | }, 1510 | { 1511 | "eventCall": { 1512 | "argumentTypes": null, 1513 | "arguments": [ 1514 | { 1515 | "argumentTypes": null, 1516 | "id": 110, 1517 | "name": "myVal", 1518 | "nodeType": "Identifier", 1519 | "overloadedDeclarations": [], 1520 | "referencedDeclaration": 106, 1521 | "src": "1209:5:0", 1522 | "typeDescriptions": { 1523 | "typeIdentifier": "t_uint256", 1524 | "typeString": "uint256" 1525 | } 1526 | }, 1527 | { 1528 | "argumentTypes": null, 1529 | "id": 111, 1530 | "name": "myVal", 1531 | "nodeType": "Identifier", 1532 | "overloadedDeclarations": [], 1533 | "referencedDeclaration": 106, 1534 | "src": "1216:5:0", 1535 | "typeDescriptions": { 1536 | "typeIdentifier": "t_uint256", 1537 | "typeString": "uint256" 1538 | } 1539 | } 1540 | ], 1541 | "expression": { 1542 | "argumentTypes": [ 1543 | { 1544 | "typeIdentifier": "t_uint256", 1545 | "typeString": "uint256" 1546 | }, 1547 | { 1548 | "typeIdentifier": "t_uint256", 1549 | "typeString": "uint256" 1550 | } 1551 | ], 1552 | "id": 109, 1553 | "name": "CalledTrigger4", 1554 | "nodeType": "Identifier", 1555 | "overloadedDeclarations": [], 1556 | "referencedDeclaration": 27, 1557 | "src": "1194:14:0", 1558 | "typeDescriptions": { 1559 | "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", 1560 | "typeString": "function (uint256,uint256)" 1561 | } 1562 | }, 1563 | "id": 112, 1564 | "isConstant": false, 1565 | "isLValue": false, 1566 | "isPure": false, 1567 | "kind": "functionCall", 1568 | "lValueRequested": false, 1569 | "names": [], 1570 | "nodeType": "FunctionCall", 1571 | "src": "1194:28:0", 1572 | "typeDescriptions": { 1573 | "typeIdentifier": "t_tuple$__$", 1574 | "typeString": "tuple()" 1575 | } 1576 | }, 1577 | "id": 113, 1578 | "nodeType": "EmitStatement", 1579 | "src": "1189:33:0" 1580 | } 1581 | ] 1582 | }, 1583 | "documentation": null, 1584 | "id": 115, 1585 | "implemented": true, 1586 | "isConstructor": false, 1587 | "isDeclaredConst": false, 1588 | "modifiers": [], 1589 | "name": "triggerEvent4", 1590 | "nodeType": "FunctionDefinition", 1591 | "parameters": { 1592 | "id": 103, 1593 | "nodeType": "ParameterList", 1594 | "parameters": [], 1595 | "src": "1141:2:0" 1596 | }, 1597 | "payable": false, 1598 | "returnParameters": { 1599 | "id": 104, 1600 | "nodeType": "ParameterList", 1601 | "parameters": [], 1602 | "src": "1151:0:0" 1603 | }, 1604 | "scope": 175, 1605 | "src": "1119:110:0", 1606 | "stateMutability": "nonpayable", 1607 | "superFunction": null, 1608 | "visibility": "public" 1609 | }, 1610 | { 1611 | "body": { 1612 | "id": 127, 1613 | "nodeType": "Block", 1614 | "src": "1267:78:0", 1615 | "statements": [ 1616 | { 1617 | "assignments": [ 1618 | 119 1619 | ], 1620 | "declarations": [ 1621 | { 1622 | "constant": false, 1623 | "id": 119, 1624 | "name": "myVal", 1625 | "nodeType": "VariableDeclaration", 1626 | "scope": 128, 1627 | "src": "1276:13:0", 1628 | "stateVariable": false, 1629 | "storageLocation": "default", 1630 | "typeDescriptions": { 1631 | "typeIdentifier": "t_uint256", 1632 | "typeString": "uint256" 1633 | }, 1634 | "typeName": { 1635 | "id": 118, 1636 | "name": "uint256", 1637 | "nodeType": "ElementaryTypeName", 1638 | "src": "1276:7:0", 1639 | "typeDescriptions": { 1640 | "typeIdentifier": "t_uint256", 1641 | "typeString": "uint256" 1642 | } 1643 | }, 1644 | "value": null, 1645 | "visibility": "internal" 1646 | } 1647 | ], 1648 | "id": 121, 1649 | "initialValue": { 1650 | "argumentTypes": null, 1651 | "hexValue": "39393939", 1652 | "id": 120, 1653 | "isConstant": false, 1654 | "isLValue": false, 1655 | "isPure": true, 1656 | "kind": "number", 1657 | "lValueRequested": false, 1658 | "nodeType": "Literal", 1659 | "src": "1292:4:0", 1660 | "subdenomination": null, 1661 | "typeDescriptions": { 1662 | "typeIdentifier": "t_rational_9999_by_1", 1663 | "typeString": "int_const 9999" 1664 | }, 1665 | "value": "9999" 1666 | }, 1667 | "nodeType": "VariableDeclarationStatement", 1668 | "src": "1276:20:0" 1669 | }, 1670 | { 1671 | "eventCall": { 1672 | "argumentTypes": null, 1673 | "arguments": [ 1674 | { 1675 | "argumentTypes": null, 1676 | "id": 123, 1677 | "name": "myVal", 1678 | "nodeType": "Identifier", 1679 | "overloadedDeclarations": [], 1680 | "referencedDeclaration": 119, 1681 | "src": "1325:5:0", 1682 | "typeDescriptions": { 1683 | "typeIdentifier": "t_uint256", 1684 | "typeString": "uint256" 1685 | } 1686 | }, 1687 | { 1688 | "argumentTypes": null, 1689 | "id": 124, 1690 | "name": "myVal", 1691 | "nodeType": "Identifier", 1692 | "overloadedDeclarations": [], 1693 | "referencedDeclaration": 119, 1694 | "src": "1332:5:0", 1695 | "typeDescriptions": { 1696 | "typeIdentifier": "t_uint256", 1697 | "typeString": "uint256" 1698 | } 1699 | } 1700 | ], 1701 | "expression": { 1702 | "argumentTypes": [ 1703 | { 1704 | "typeIdentifier": "t_uint256", 1705 | "typeString": "uint256" 1706 | }, 1707 | { 1708 | "typeIdentifier": "t_uint256", 1709 | "typeString": "uint256" 1710 | } 1711 | ], 1712 | "id": 122, 1713 | "name": "CalledTrigger5", 1714 | "nodeType": "Identifier", 1715 | "overloadedDeclarations": [], 1716 | "referencedDeclaration": 33, 1717 | "src": "1310:14:0", 1718 | "typeDescriptions": { 1719 | "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", 1720 | "typeString": "function (uint256,uint256)" 1721 | } 1722 | }, 1723 | "id": 125, 1724 | "isConstant": false, 1725 | "isLValue": false, 1726 | "isPure": false, 1727 | "kind": "functionCall", 1728 | "lValueRequested": false, 1729 | "names": [], 1730 | "nodeType": "FunctionCall", 1731 | "src": "1310:28:0", 1732 | "typeDescriptions": { 1733 | "typeIdentifier": "t_tuple$__$", 1734 | "typeString": "tuple()" 1735 | } 1736 | }, 1737 | "id": 126, 1738 | "nodeType": "EmitStatement", 1739 | "src": "1305:33:0" 1740 | } 1741 | ] 1742 | }, 1743 | "documentation": null, 1744 | "id": 128, 1745 | "implemented": true, 1746 | "isConstructor": false, 1747 | "isDeclaredConst": false, 1748 | "modifiers": [], 1749 | "name": "triggerEvent5", 1750 | "nodeType": "FunctionDefinition", 1751 | "parameters": { 1752 | "id": 116, 1753 | "nodeType": "ParameterList", 1754 | "parameters": [], 1755 | "src": "1257:2:0" 1756 | }, 1757 | "payable": false, 1758 | "returnParameters": { 1759 | "id": 117, 1760 | "nodeType": "ParameterList", 1761 | "parameters": [], 1762 | "src": "1267:0:0" 1763 | }, 1764 | "scope": 175, 1765 | "src": "1235:110:0", 1766 | "stateMutability": "nonpayable", 1767 | "superFunction": null, 1768 | "visibility": "public" 1769 | }, 1770 | { 1771 | "body": { 1772 | "id": 140, 1773 | "nodeType": "Block", 1774 | "src": "1556:73:0", 1775 | "statements": [ 1776 | { 1777 | "eventCall": { 1778 | "argumentTypes": null, 1779 | "arguments": [ 1780 | { 1781 | "argumentTypes": null, 1782 | "expression": { 1783 | "argumentTypes": null, 1784 | "id": 132, 1785 | "name": "msg", 1786 | "nodeType": "Identifier", 1787 | "overloadedDeclarations": [], 1788 | "referencedDeclaration": 582, 1789 | "src": "1585:3:0", 1790 | "typeDescriptions": { 1791 | "typeIdentifier": "t_magic_message", 1792 | "typeString": "msg" 1793 | } 1794 | }, 1795 | "id": 133, 1796 | "isConstant": false, 1797 | "isLValue": false, 1798 | "isPure": false, 1799 | "lValueRequested": false, 1800 | "memberName": "sender", 1801 | "nodeType": "MemberAccess", 1802 | "referencedDeclaration": null, 1803 | "src": "1585:10:0", 1804 | "typeDescriptions": { 1805 | "typeIdentifier": "t_address", 1806 | "typeString": "address" 1807 | } 1808 | }, 1809 | { 1810 | "argumentTypes": null, 1811 | "arguments": [], 1812 | "expression": { 1813 | "argumentTypes": [], 1814 | "id": 134, 1815 | "name": "unixTime", 1816 | "nodeType": "Identifier", 1817 | "overloadedDeclarations": [], 1818 | "referencedDeclaration": 160, 1819 | "src": "1597:8:0", 1820 | "typeDescriptions": { 1821 | "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", 1822 | "typeString": "function () view returns (uint256)" 1823 | } 1824 | }, 1825 | "id": 135, 1826 | "isConstant": false, 1827 | "isLValue": false, 1828 | "isPure": false, 1829 | "kind": "functionCall", 1830 | "lValueRequested": false, 1831 | "names": [], 1832 | "nodeType": "FunctionCall", 1833 | "src": "1597:10:0", 1834 | "typeDescriptions": { 1835 | "typeIdentifier": "t_uint256", 1836 | "typeString": "uint256" 1837 | } 1838 | }, 1839 | { 1840 | "argumentTypes": null, 1841 | "expression": { 1842 | "argumentTypes": null, 1843 | "id": 136, 1844 | "name": "block", 1845 | "nodeType": "Identifier", 1846 | "overloadedDeclarations": [], 1847 | "referencedDeclaration": 572, 1848 | "src": "1609:5:0", 1849 | "typeDescriptions": { 1850 | "typeIdentifier": "t_magic_block", 1851 | "typeString": "block" 1852 | } 1853 | }, 1854 | "id": 137, 1855 | "isConstant": false, 1856 | "isLValue": false, 1857 | "isPure": false, 1858 | "lValueRequested": false, 1859 | "memberName": "number", 1860 | "nodeType": "MemberAccess", 1861 | "referencedDeclaration": null, 1862 | "src": "1609:12:0", 1863 | "typeDescriptions": { 1864 | "typeIdentifier": "t_uint256", 1865 | "typeString": "uint256" 1866 | } 1867 | } 1868 | ], 1869 | "expression": { 1870 | "argumentTypes": [ 1871 | { 1872 | "typeIdentifier": "t_address", 1873 | "typeString": "address" 1874 | }, 1875 | { 1876 | "typeIdentifier": "t_uint256", 1877 | "typeString": "uint256" 1878 | }, 1879 | { 1880 | "typeIdentifier": "t_uint256", 1881 | "typeString": "uint256" 1882 | } 1883 | ], 1884 | "id": 131, 1885 | "name": "CalledTrigger6", 1886 | "nodeType": "Identifier", 1887 | "overloadedDeclarations": [], 1888 | "referencedDeclaration": 41, 1889 | "src": "1570:14:0", 1890 | "typeDescriptions": { 1891 | "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", 1892 | "typeString": "function (address,uint256,uint256)" 1893 | } 1894 | }, 1895 | "id": 138, 1896 | "isConstant": false, 1897 | "isLValue": false, 1898 | "isPure": false, 1899 | "kind": "functionCall", 1900 | "lValueRequested": false, 1901 | "names": [], 1902 | "nodeType": "FunctionCall", 1903 | "src": "1570:52:0", 1904 | "typeDescriptions": { 1905 | "typeIdentifier": "t_tuple$__$", 1906 | "typeString": "tuple()" 1907 | } 1908 | }, 1909 | "id": 139, 1910 | "nodeType": "EmitStatement", 1911 | "src": "1565:57:0" 1912 | } 1913 | ] 1914 | }, 1915 | "documentation": null, 1916 | "id": 141, 1917 | "implemented": true, 1918 | "isConstructor": false, 1919 | "isDeclaredConst": false, 1920 | "modifiers": [], 1921 | "name": "triggerEvent6", 1922 | "nodeType": "FunctionDefinition", 1923 | "parameters": { 1924 | "id": 129, 1925 | "nodeType": "ParameterList", 1926 | "parameters": [], 1927 | "src": "1546:2:0" 1928 | }, 1929 | "payable": false, 1930 | "returnParameters": { 1931 | "id": 130, 1932 | "nodeType": "ParameterList", 1933 | "parameters": [], 1934 | "src": "1556:0:0" 1935 | }, 1936 | "scope": 175, 1937 | "src": "1524:105:0", 1938 | "stateMutability": "nonpayable", 1939 | "superFunction": null, 1940 | "visibility": "public" 1941 | }, 1942 | { 1943 | "body": { 1944 | "id": 151, 1945 | "nodeType": "Block", 1946 | "src": "1662:58:0", 1947 | "statements": [ 1948 | { 1949 | "eventCall": { 1950 | "argumentTypes": null, 1951 | "arguments": [ 1952 | { 1953 | "argumentTypes": null, 1954 | "expression": { 1955 | "argumentTypes": null, 1956 | "id": 145, 1957 | "name": "msg", 1958 | "nodeType": "Identifier", 1959 | "overloadedDeclarations": [], 1960 | "referencedDeclaration": 582, 1961 | "src": "1691:3:0", 1962 | "typeDescriptions": { 1963 | "typeIdentifier": "t_magic_message", 1964 | "typeString": "msg" 1965 | } 1966 | }, 1967 | "id": 146, 1968 | "isConstant": false, 1969 | "isLValue": false, 1970 | "isPure": false, 1971 | "lValueRequested": false, 1972 | "memberName": "sender", 1973 | "nodeType": "MemberAccess", 1974 | "referencedDeclaration": null, 1975 | "src": "1691:10:0", 1976 | "typeDescriptions": { 1977 | "typeIdentifier": "t_address", 1978 | "typeString": "address" 1979 | } 1980 | }, 1981 | { 1982 | "argumentTypes": null, 1983 | "expression": { 1984 | "argumentTypes": null, 1985 | "id": 147, 1986 | "name": "msg", 1987 | "nodeType": "Identifier", 1988 | "overloadedDeclarations": [], 1989 | "referencedDeclaration": 582, 1990 | "src": "1703:3:0", 1991 | "typeDescriptions": { 1992 | "typeIdentifier": "t_magic_message", 1993 | "typeString": "msg" 1994 | } 1995 | }, 1996 | "id": 148, 1997 | "isConstant": false, 1998 | "isLValue": false, 1999 | "isPure": false, 2000 | "lValueRequested": false, 2001 | "memberName": "value", 2002 | "nodeType": "MemberAccess", 2003 | "referencedDeclaration": null, 2004 | "src": "1703:9:0", 2005 | "typeDescriptions": { 2006 | "typeIdentifier": "t_uint256", 2007 | "typeString": "uint256" 2008 | } 2009 | } 2010 | ], 2011 | "expression": { 2012 | "argumentTypes": [ 2013 | { 2014 | "typeIdentifier": "t_address", 2015 | "typeString": "address" 2016 | }, 2017 | { 2018 | "typeIdentifier": "t_uint256", 2019 | "typeString": "uint256" 2020 | } 2021 | ], 2022 | "id": 144, 2023 | "name": "MoneyReceived", 2024 | "nodeType": "Identifier", 2025 | "overloadedDeclarations": [], 2026 | "referencedDeclaration": 47, 2027 | "src": "1677:13:0", 2028 | "typeDescriptions": { 2029 | "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", 2030 | "typeString": "function (address,uint256)" 2031 | } 2032 | }, 2033 | "id": 149, 2034 | "isConstant": false, 2035 | "isLValue": false, 2036 | "isPure": false, 2037 | "kind": "functionCall", 2038 | "lValueRequested": false, 2039 | "names": [], 2040 | "nodeType": "FunctionCall", 2041 | "src": "1677:36:0", 2042 | "typeDescriptions": { 2043 | "typeIdentifier": "t_tuple$__$", 2044 | "typeString": "tuple()" 2045 | } 2046 | }, 2047 | "id": 150, 2048 | "nodeType": "EmitStatement", 2049 | "src": "1672:41:0" 2050 | } 2051 | ] 2052 | }, 2053 | "documentation": null, 2054 | "id": 152, 2055 | "implemented": true, 2056 | "isConstructor": false, 2057 | "isDeclaredConst": false, 2058 | "modifiers": [], 2059 | "name": "", 2060 | "nodeType": "FunctionDefinition", 2061 | "parameters": { 2062 | "id": 142, 2063 | "nodeType": "ParameterList", 2064 | "parameters": [], 2065 | "src": "1644:2:0" 2066 | }, 2067 | "payable": true, 2068 | "returnParameters": { 2069 | "id": 143, 2070 | "nodeType": "ParameterList", 2071 | "parameters": [], 2072 | "src": "1662:0:0" 2073 | }, 2074 | "scope": 175, 2075 | "src": "1635:85:0", 2076 | "stateMutability": "payable", 2077 | "superFunction": null, 2078 | "visibility": "public" 2079 | }, 2080 | { 2081 | "body": { 2082 | "id": 159, 2083 | "nodeType": "Block", 2084 | "src": "1865:27:0", 2085 | "statements": [ 2086 | { 2087 | "expression": { 2088 | "argumentTypes": null, 2089 | "id": 157, 2090 | "name": "now", 2091 | "nodeType": "Identifier", 2092 | "overloadedDeclarations": [], 2093 | "referencedDeclaration": 584, 2094 | "src": "1882:3:0", 2095 | "typeDescriptions": { 2096 | "typeIdentifier": "t_uint256", 2097 | "typeString": "uint256" 2098 | } 2099 | }, 2100 | "functionReturnParameters": 156, 2101 | "id": 158, 2102 | "nodeType": "Return", 2103 | "src": "1875:10:0" 2104 | } 2105 | ] 2106 | }, 2107 | "documentation": "Returns Unix Timestamp\nE.g: https://www.unixtimestamp.com", 2108 | "id": 160, 2109 | "implemented": true, 2110 | "isConstructor": false, 2111 | "isDeclaredConst": true, 2112 | "modifiers": [], 2113 | "name": "unixTime", 2114 | "nodeType": "FunctionDefinition", 2115 | "parameters": { 2116 | "id": 153, 2117 | "nodeType": "ParameterList", 2118 | "parameters": [], 2119 | "src": "1831:2:0" 2120 | }, 2121 | "payable": false, 2122 | "returnParameters": { 2123 | "id": 156, 2124 | "nodeType": "ParameterList", 2125 | "parameters": [ 2126 | { 2127 | "constant": false, 2128 | "id": 155, 2129 | "name": "", 2130 | "nodeType": "VariableDeclaration", 2131 | "scope": 160, 2132 | "src": "1857:7:0", 2133 | "stateVariable": false, 2134 | "storageLocation": "default", 2135 | "typeDescriptions": { 2136 | "typeIdentifier": "t_uint256", 2137 | "typeString": "uint256" 2138 | }, 2139 | "typeName": { 2140 | "id": 154, 2141 | "name": "uint256", 2142 | "nodeType": "ElementaryTypeName", 2143 | "src": "1857:7:0", 2144 | "typeDescriptions": { 2145 | "typeIdentifier": "t_uint256", 2146 | "typeString": "uint256" 2147 | } 2148 | }, 2149 | "value": null, 2150 | "visibility": "internal" 2151 | } 2152 | ], 2153 | "src": "1856:9:0" 2154 | }, 2155 | "scope": 175, 2156 | "src": "1814:78:0", 2157 | "stateMutability": "view", 2158 | "superFunction": null, 2159 | "visibility": "internal" 2160 | }, 2161 | { 2162 | "body": { 2163 | "id": 173, 2164 | "nodeType": "Block", 2165 | "src": "2086:85:0", 2166 | "statements": [ 2167 | { 2168 | "condition": { 2169 | "argumentTypes": null, 2170 | "commonType": { 2171 | "typeIdentifier": "t_address", 2172 | "typeString": "address" 2173 | }, 2174 | "id": 166, 2175 | "isConstant": false, 2176 | "isLValue": false, 2177 | "isPure": false, 2178 | "lValueRequested": false, 2179 | "leftExpression": { 2180 | "argumentTypes": null, 2181 | "expression": { 2182 | "argumentTypes": null, 2183 | "id": 163, 2184 | "name": "msg", 2185 | "nodeType": "Identifier", 2186 | "overloadedDeclarations": [], 2187 | "referencedDeclaration": 582, 2188 | "src": "2100:3:0", 2189 | "typeDescriptions": { 2190 | "typeIdentifier": "t_magic_message", 2191 | "typeString": "msg" 2192 | } 2193 | }, 2194 | "id": 164, 2195 | "isConstant": false, 2196 | "isLValue": false, 2197 | "isPure": false, 2198 | "lValueRequested": false, 2199 | "memberName": "sender", 2200 | "nodeType": "MemberAccess", 2201 | "referencedDeclaration": null, 2202 | "src": "2100:10:0", 2203 | "typeDescriptions": { 2204 | "typeIdentifier": "t_address", 2205 | "typeString": "address" 2206 | } 2207 | }, 2208 | "nodeType": "BinaryOperation", 2209 | "operator": "==", 2210 | "rightExpression": { 2211 | "argumentTypes": null, 2212 | "id": 165, 2213 | "name": "_owner", 2214 | "nodeType": "Identifier", 2215 | "overloadedDeclarations": [], 2216 | "referencedDeclaration": 3, 2217 | "src": "2114:6:0", 2218 | "typeDescriptions": { 2219 | "typeIdentifier": "t_address", 2220 | "typeString": "address" 2221 | } 2222 | }, 2223 | "src": "2100:20:0", 2224 | "typeDescriptions": { 2225 | "typeIdentifier": "t_bool", 2226 | "typeString": "bool" 2227 | } 2228 | }, 2229 | "falseBody": null, 2230 | "id": 172, 2231 | "nodeType": "IfStatement", 2232 | "src": "2096:69:0", 2233 | "trueBody": { 2234 | "id": 171, 2235 | "nodeType": "Block", 2236 | "src": "2122:43:0", 2237 | "statements": [ 2238 | { 2239 | "expression": { 2240 | "argumentTypes": null, 2241 | "arguments": [ 2242 | { 2243 | "argumentTypes": null, 2244 | "id": 168, 2245 | "name": "_owner", 2246 | "nodeType": "Identifier", 2247 | "overloadedDeclarations": [], 2248 | "referencedDeclaration": 3, 2249 | "src": "2147:6:0", 2250 | "typeDescriptions": { 2251 | "typeIdentifier": "t_address", 2252 | "typeString": "address" 2253 | } 2254 | } 2255 | ], 2256 | "expression": { 2257 | "argumentTypes": [ 2258 | { 2259 | "typeIdentifier": "t_address", 2260 | "typeString": "address" 2261 | } 2262 | ], 2263 | "id": 167, 2264 | "name": "selfdestruct", 2265 | "nodeType": "Identifier", 2266 | "overloadedDeclarations": [], 2267 | "referencedDeclaration": 590, 2268 | "src": "2134:12:0", 2269 | "typeDescriptions": { 2270 | "typeIdentifier": "t_function_selfdestruct_nonpayable$_t_address_$returns$__$", 2271 | "typeString": "function (address)" 2272 | } 2273 | }, 2274 | "id": 169, 2275 | "isConstant": false, 2276 | "isLValue": false, 2277 | "isPure": false, 2278 | "kind": "functionCall", 2279 | "lValueRequested": false, 2280 | "names": [], 2281 | "nodeType": "FunctionCall", 2282 | "src": "2134:20:0", 2283 | "typeDescriptions": { 2284 | "typeIdentifier": "t_tuple$__$", 2285 | "typeString": "tuple()" 2286 | } 2287 | }, 2288 | "id": 170, 2289 | "nodeType": "ExpressionStatement", 2290 | "src": "2134:20:0" 2291 | } 2292 | ] 2293 | } 2294 | } 2295 | ] 2296 | }, 2297 | "documentation": null, 2298 | "id": 174, 2299 | "implemented": true, 2300 | "isConstructor": false, 2301 | "isDeclaredConst": false, 2302 | "modifiers": [], 2303 | "name": "adminDeleteRegistry", 2304 | "nodeType": "FunctionDefinition", 2305 | "parameters": { 2306 | "id": 161, 2307 | "nodeType": "ParameterList", 2308 | "parameters": [], 2309 | "src": "2076:2:0" 2310 | }, 2311 | "payable": false, 2312 | "returnParameters": { 2313 | "id": 162, 2314 | "nodeType": "ParameterList", 2315 | "parameters": [], 2316 | "src": "2086:0:0" 2317 | }, 2318 | "scope": 175, 2319 | "src": "2048:123:0", 2320 | "stateMutability": "nonpayable", 2321 | "superFunction": null, 2322 | "visibility": "public" 2323 | } 2324 | ], 2325 | "scope": 176, 2326 | "src": "26:2148:0" 2327 | } 2328 | ], 2329 | "src": "0:2175:0" 2330 | }, 2331 | "legacyAST": { 2332 | "absolutePath": "/Users/tho/htdocs/ConsenSys/DrupalEthereum/EventHandlingPHP/vendor/digitaldonkey/ethereum-php/tests/TestEthClient/test_contracts/contracts/CallableEvents.sol", 2333 | "exportedSymbols": { 2334 | "CallableEvents": [ 2335 | 175 2336 | ] 2337 | }, 2338 | "id": 176, 2339 | "nodeType": "SourceUnit", 2340 | "nodes": [ 2341 | { 2342 | "id": 1, 2343 | "literals": [ 2344 | "solidity", 2345 | "^", 2346 | "0.4", 2347 | ".24" 2348 | ], 2349 | "nodeType": "PragmaDirective", 2350 | "src": "0:24:0" 2351 | }, 2352 | { 2353 | "baseContracts": [], 2354 | "contractDependencies": [], 2355 | "contractKind": "contract", 2356 | "documentation": null, 2357 | "fullyImplemented": true, 2358 | "id": 175, 2359 | "linearizedBaseContracts": [ 2360 | 175 2361 | ], 2362 | "name": "CallableEvents", 2363 | "nodeType": "ContractDefinition", 2364 | "nodes": [ 2365 | { 2366 | "constant": false, 2367 | "id": 3, 2368 | "name": "_owner", 2369 | "nodeType": "VariableDeclaration", 2370 | "scope": 175, 2371 | "src": "57:14:0", 2372 | "stateVariable": true, 2373 | "storageLocation": "default", 2374 | "typeDescriptions": { 2375 | "typeIdentifier": "t_address", 2376 | "typeString": "address" 2377 | }, 2378 | "typeName": { 2379 | "id": 2, 2380 | "name": "address", 2381 | "nodeType": "ElementaryTypeName", 2382 | "src": "57:7:0", 2383 | "typeDescriptions": { 2384 | "typeIdentifier": "t_address", 2385 | "typeString": "address" 2386 | } 2387 | }, 2388 | "value": null, 2389 | "visibility": "internal" 2390 | }, 2391 | { 2392 | "anonymous": false, 2393 | "documentation": null, 2394 | "id": 7, 2395 | "name": "CalledTrigger1", 2396 | "nodeType": "EventDefinition", 2397 | "parameters": { 2398 | "id": 6, 2399 | "nodeType": "ParameterList", 2400 | "parameters": [ 2401 | { 2402 | "constant": false, 2403 | "id": 5, 2404 | "indexed": true, 2405 | "name": "from", 2406 | "nodeType": "VariableDeclaration", 2407 | "scope": 7, 2408 | "src": "161:20:0", 2409 | "stateVariable": false, 2410 | "storageLocation": "default", 2411 | "typeDescriptions": { 2412 | "typeIdentifier": "t_address", 2413 | "typeString": "address" 2414 | }, 2415 | "typeName": { 2416 | "id": 4, 2417 | "name": "address", 2418 | "nodeType": "ElementaryTypeName", 2419 | "src": "161:7:0", 2420 | "typeDescriptions": { 2421 | "typeIdentifier": "t_address", 2422 | "typeString": "address" 2423 | } 2424 | }, 2425 | "value": null, 2426 | "visibility": "internal" 2427 | } 2428 | ], 2429 | "src": "160:22:0" 2430 | }, 2431 | "src": "139:44:0" 2432 | }, 2433 | { 2434 | "anonymous": false, 2435 | "documentation": null, 2436 | "id": 13, 2437 | "name": "CalledTrigger2", 2438 | "nodeType": "EventDefinition", 2439 | "parameters": { 2440 | "id": 12, 2441 | "nodeType": "ParameterList", 2442 | "parameters": [ 2443 | { 2444 | "constant": false, 2445 | "id": 9, 2446 | "indexed": true, 2447 | "name": "from", 2448 | "nodeType": "VariableDeclaration", 2449 | "scope": 13, 2450 | "src": "210:20:0", 2451 | "stateVariable": false, 2452 | "storageLocation": "default", 2453 | "typeDescriptions": { 2454 | "typeIdentifier": "t_address", 2455 | "typeString": "address" 2456 | }, 2457 | "typeName": { 2458 | "id": 8, 2459 | "name": "address", 2460 | "nodeType": "ElementaryTypeName", 2461 | "src": "210:7:0", 2462 | "typeDescriptions": { 2463 | "typeIdentifier": "t_address", 2464 | "typeString": "address" 2465 | } 2466 | }, 2467 | "value": null, 2468 | "visibility": "internal" 2469 | }, 2470 | { 2471 | "constant": false, 2472 | "id": 11, 2473 | "indexed": false, 2474 | "name": "value", 2475 | "nodeType": "VariableDeclaration", 2476 | "scope": 13, 2477 | "src": "232:13:0", 2478 | "stateVariable": false, 2479 | "storageLocation": "default", 2480 | "typeDescriptions": { 2481 | "typeIdentifier": "t_uint256", 2482 | "typeString": "uint256" 2483 | }, 2484 | "typeName": { 2485 | "id": 10, 2486 | "name": "uint256", 2487 | "nodeType": "ElementaryTypeName", 2488 | "src": "232:7:0", 2489 | "typeDescriptions": { 2490 | "typeIdentifier": "t_uint256", 2491 | "typeString": "uint256" 2492 | } 2493 | }, 2494 | "value": null, 2495 | "visibility": "internal" 2496 | } 2497 | ], 2498 | "src": "209:37:0" 2499 | }, 2500 | "src": "188:59:0" 2501 | }, 2502 | { 2503 | "anonymous": false, 2504 | "documentation": null, 2505 | "id": 21, 2506 | "name": "CalledTrigger3", 2507 | "nodeType": "EventDefinition", 2508 | "parameters": { 2509 | "id": 20, 2510 | "nodeType": "ParameterList", 2511 | "parameters": [ 2512 | { 2513 | "constant": false, 2514 | "id": 15, 2515 | "indexed": true, 2516 | "name": "from", 2517 | "nodeType": "VariableDeclaration", 2518 | "scope": 21, 2519 | "src": "274:20:0", 2520 | "stateVariable": false, 2521 | "storageLocation": "default", 2522 | "typeDescriptions": { 2523 | "typeIdentifier": "t_address", 2524 | "typeString": "address" 2525 | }, 2526 | "typeName": { 2527 | "id": 14, 2528 | "name": "address", 2529 | "nodeType": "ElementaryTypeName", 2530 | "src": "274:7:0", 2531 | "typeDescriptions": { 2532 | "typeIdentifier": "t_address", 2533 | "typeString": "address" 2534 | } 2535 | }, 2536 | "value": null, 2537 | "visibility": "internal" 2538 | }, 2539 | { 2540 | "constant": false, 2541 | "id": 17, 2542 | "indexed": false, 2543 | "name": "val1", 2544 | "nodeType": "VariableDeclaration", 2545 | "scope": 21, 2546 | "src": "296:12:0", 2547 | "stateVariable": false, 2548 | "storageLocation": "default", 2549 | "typeDescriptions": { 2550 | "typeIdentifier": "t_uint256", 2551 | "typeString": "uint256" 2552 | }, 2553 | "typeName": { 2554 | "id": 16, 2555 | "name": "uint256", 2556 | "nodeType": "ElementaryTypeName", 2557 | "src": "296:7:0", 2558 | "typeDescriptions": { 2559 | "typeIdentifier": "t_uint256", 2560 | "typeString": "uint256" 2561 | } 2562 | }, 2563 | "value": null, 2564 | "visibility": "internal" 2565 | }, 2566 | { 2567 | "constant": false, 2568 | "id": 19, 2569 | "indexed": false, 2570 | "name": "val2", 2571 | "nodeType": "VariableDeclaration", 2572 | "scope": 21, 2573 | "src": "310:12:0", 2574 | "stateVariable": false, 2575 | "storageLocation": "default", 2576 | "typeDescriptions": { 2577 | "typeIdentifier": "t_uint256", 2578 | "typeString": "uint256" 2579 | }, 2580 | "typeName": { 2581 | "id": 18, 2582 | "name": "uint256", 2583 | "nodeType": "ElementaryTypeName", 2584 | "src": "310:7:0", 2585 | "typeDescriptions": { 2586 | "typeIdentifier": "t_uint256", 2587 | "typeString": "uint256" 2588 | } 2589 | }, 2590 | "value": null, 2591 | "visibility": "internal" 2592 | } 2593 | ], 2594 | "src": "273:50:0" 2595 | }, 2596 | "src": "252:72:0" 2597 | }, 2598 | { 2599 | "anonymous": false, 2600 | "documentation": null, 2601 | "id": 27, 2602 | "name": "CalledTrigger4", 2603 | "nodeType": "EventDefinition", 2604 | "parameters": { 2605 | "id": 26, 2606 | "nodeType": "ParameterList", 2607 | "parameters": [ 2608 | { 2609 | "constant": false, 2610 | "id": 23, 2611 | "indexed": false, 2612 | "name": "val1", 2613 | "nodeType": "VariableDeclaration", 2614 | "scope": 27, 2615 | "src": "351:12:0", 2616 | "stateVariable": false, 2617 | "storageLocation": "default", 2618 | "typeDescriptions": { 2619 | "typeIdentifier": "t_uint256", 2620 | "typeString": "uint256" 2621 | }, 2622 | "typeName": { 2623 | "id": 22, 2624 | "name": "uint256", 2625 | "nodeType": "ElementaryTypeName", 2626 | "src": "351:7:0", 2627 | "typeDescriptions": { 2628 | "typeIdentifier": "t_uint256", 2629 | "typeString": "uint256" 2630 | } 2631 | }, 2632 | "value": null, 2633 | "visibility": "internal" 2634 | }, 2635 | { 2636 | "constant": false, 2637 | "id": 25, 2638 | "indexed": false, 2639 | "name": "val2", 2640 | "nodeType": "VariableDeclaration", 2641 | "scope": 27, 2642 | "src": "365:12:0", 2643 | "stateVariable": false, 2644 | "storageLocation": "default", 2645 | "typeDescriptions": { 2646 | "typeIdentifier": "t_uint256", 2647 | "typeString": "uint256" 2648 | }, 2649 | "typeName": { 2650 | "id": 24, 2651 | "name": "uint256", 2652 | "nodeType": "ElementaryTypeName", 2653 | "src": "365:7:0", 2654 | "typeDescriptions": { 2655 | "typeIdentifier": "t_uint256", 2656 | "typeString": "uint256" 2657 | } 2658 | }, 2659 | "value": null, 2660 | "visibility": "internal" 2661 | } 2662 | ], 2663 | "src": "350:28:0" 2664 | }, 2665 | "src": "329:50:0" 2666 | }, 2667 | { 2668 | "anonymous": false, 2669 | "documentation": null, 2670 | "id": 33, 2671 | "name": "CalledTrigger5", 2672 | "nodeType": "EventDefinition", 2673 | "parameters": { 2674 | "id": 32, 2675 | "nodeType": "ParameterList", 2676 | "parameters": [ 2677 | { 2678 | "constant": false, 2679 | "id": 29, 2680 | "indexed": true, 2681 | "name": "val1", 2682 | "nodeType": "VariableDeclaration", 2683 | "scope": 33, 2684 | "src": "406:20:0", 2685 | "stateVariable": false, 2686 | "storageLocation": "default", 2687 | "typeDescriptions": { 2688 | "typeIdentifier": "t_uint256", 2689 | "typeString": "uint256" 2690 | }, 2691 | "typeName": { 2692 | "id": 28, 2693 | "name": "uint256", 2694 | "nodeType": "ElementaryTypeName", 2695 | "src": "406:7:0", 2696 | "typeDescriptions": { 2697 | "typeIdentifier": "t_uint256", 2698 | "typeString": "uint256" 2699 | } 2700 | }, 2701 | "value": null, 2702 | "visibility": "internal" 2703 | }, 2704 | { 2705 | "constant": false, 2706 | "id": 31, 2707 | "indexed": true, 2708 | "name": "val2", 2709 | "nodeType": "VariableDeclaration", 2710 | "scope": 33, 2711 | "src": "428:20:0", 2712 | "stateVariable": false, 2713 | "storageLocation": "default", 2714 | "typeDescriptions": { 2715 | "typeIdentifier": "t_uint256", 2716 | "typeString": "uint256" 2717 | }, 2718 | "typeName": { 2719 | "id": 30, 2720 | "name": "uint256", 2721 | "nodeType": "ElementaryTypeName", 2722 | "src": "428:7:0", 2723 | "typeDescriptions": { 2724 | "typeIdentifier": "t_uint256", 2725 | "typeString": "uint256" 2726 | } 2727 | }, 2728 | "value": null, 2729 | "visibility": "internal" 2730 | } 2731 | ], 2732 | "src": "405:44:0" 2733 | }, 2734 | "src": "384:66:0" 2735 | }, 2736 | { 2737 | "anonymous": false, 2738 | "documentation": null, 2739 | "id": 41, 2740 | "name": "CalledTrigger6", 2741 | "nodeType": "EventDefinition", 2742 | "parameters": { 2743 | "id": 40, 2744 | "nodeType": "ParameterList", 2745 | "parameters": [ 2746 | { 2747 | "constant": false, 2748 | "id": 35, 2749 | "indexed": false, 2750 | "name": "from", 2751 | "nodeType": "VariableDeclaration", 2752 | "scope": 41, 2753 | "src": "477:13:0", 2754 | "stateVariable": false, 2755 | "storageLocation": "default", 2756 | "typeDescriptions": { 2757 | "typeIdentifier": "t_address", 2758 | "typeString": "address" 2759 | }, 2760 | "typeName": { 2761 | "id": 34, 2762 | "name": "address", 2763 | "nodeType": "ElementaryTypeName", 2764 | "src": "477:7:0", 2765 | "typeDescriptions": { 2766 | "typeIdentifier": "t_address", 2767 | "typeString": "address" 2768 | } 2769 | }, 2770 | "value": null, 2771 | "visibility": "internal" 2772 | }, 2773 | { 2774 | "constant": false, 2775 | "id": 37, 2776 | "indexed": false, 2777 | "name": "timestamp", 2778 | "nodeType": "VariableDeclaration", 2779 | "scope": 41, 2780 | "src": "492:17:0", 2781 | "stateVariable": false, 2782 | "storageLocation": "default", 2783 | "typeDescriptions": { 2784 | "typeIdentifier": "t_uint256", 2785 | "typeString": "uint256" 2786 | }, 2787 | "typeName": { 2788 | "id": 36, 2789 | "name": "uint256", 2790 | "nodeType": "ElementaryTypeName", 2791 | "src": "492:7:0", 2792 | "typeDescriptions": { 2793 | "typeIdentifier": "t_uint256", 2794 | "typeString": "uint256" 2795 | } 2796 | }, 2797 | "value": null, 2798 | "visibility": "internal" 2799 | }, 2800 | { 2801 | "constant": false, 2802 | "id": 39, 2803 | "indexed": false, 2804 | "name": "blockNumber", 2805 | "nodeType": "VariableDeclaration", 2806 | "scope": 41, 2807 | "src": "511:19:0", 2808 | "stateVariable": false, 2809 | "storageLocation": "default", 2810 | "typeDescriptions": { 2811 | "typeIdentifier": "t_uint256", 2812 | "typeString": "uint256" 2813 | }, 2814 | "typeName": { 2815 | "id": 38, 2816 | "name": "uint256", 2817 | "nodeType": "ElementaryTypeName", 2818 | "src": "511:7:0", 2819 | "typeDescriptions": { 2820 | "typeIdentifier": "t_uint256", 2821 | "typeString": "uint256" 2822 | } 2823 | }, 2824 | "value": null, 2825 | "visibility": "internal" 2826 | } 2827 | ], 2828 | "src": "476:55:0" 2829 | }, 2830 | "src": "455:77:0" 2831 | }, 2832 | { 2833 | "anonymous": false, 2834 | "documentation": null, 2835 | "id": 47, 2836 | "name": "MoneyReceived", 2837 | "nodeType": "EventDefinition", 2838 | "parameters": { 2839 | "id": 46, 2840 | "nodeType": "ParameterList", 2841 | "parameters": [ 2842 | { 2843 | "constant": false, 2844 | "id": 43, 2845 | "indexed": true, 2846 | "name": "from", 2847 | "nodeType": "VariableDeclaration", 2848 | "scope": 47, 2849 | "src": "558:20:0", 2850 | "stateVariable": false, 2851 | "storageLocation": "default", 2852 | "typeDescriptions": { 2853 | "typeIdentifier": "t_address", 2854 | "typeString": "address" 2855 | }, 2856 | "typeName": { 2857 | "id": 42, 2858 | "name": "address", 2859 | "nodeType": "ElementaryTypeName", 2860 | "src": "558:7:0", 2861 | "typeDescriptions": { 2862 | "typeIdentifier": "t_address", 2863 | "typeString": "address" 2864 | } 2865 | }, 2866 | "value": null, 2867 | "visibility": "internal" 2868 | }, 2869 | { 2870 | "constant": false, 2871 | "id": 45, 2872 | "indexed": false, 2873 | "name": "value", 2874 | "nodeType": "VariableDeclaration", 2875 | "scope": 47, 2876 | "src": "580:13:0", 2877 | "stateVariable": false, 2878 | "storageLocation": "default", 2879 | "typeDescriptions": { 2880 | "typeIdentifier": "t_uint256", 2881 | "typeString": "uint256" 2882 | }, 2883 | "typeName": { 2884 | "id": 44, 2885 | "name": "uint256", 2886 | "nodeType": "ElementaryTypeName", 2887 | "src": "580:7:0", 2888 | "typeDescriptions": { 2889 | "typeIdentifier": "t_uint256", 2890 | "typeString": "uint256" 2891 | } 2892 | }, 2893 | "value": null, 2894 | "visibility": "internal" 2895 | } 2896 | ], 2897 | "src": "557:37:0" 2898 | }, 2899 | "src": "537:58:0" 2900 | }, 2901 | { 2902 | "body": { 2903 | "id": 54, 2904 | "nodeType": "Block", 2905 | "src": "661:28:0", 2906 | "statements": [ 2907 | { 2908 | "expression": { 2909 | "argumentTypes": null, 2910 | "hexValue": "74727565", 2911 | "id": 52, 2912 | "isConstant": false, 2913 | "isLValue": false, 2914 | "isPure": true, 2915 | "kind": "bool", 2916 | "lValueRequested": false, 2917 | "nodeType": "Literal", 2918 | "src": "678:4:0", 2919 | "subdenomination": null, 2920 | "typeDescriptions": { 2921 | "typeIdentifier": "t_bool", 2922 | "typeString": "bool" 2923 | }, 2924 | "value": "true" 2925 | }, 2926 | "functionReturnParameters": 51, 2927 | "id": 53, 2928 | "nodeType": "Return", 2929 | "src": "671:11:0" 2930 | } 2931 | ] 2932 | }, 2933 | "documentation": null, 2934 | "id": 55, 2935 | "implemented": true, 2936 | "isConstructor": false, 2937 | "isDeclaredConst": true, 2938 | "modifiers": [], 2939 | "name": "contractExists", 2940 | "nodeType": "FunctionDefinition", 2941 | "parameters": { 2942 | "id": 48, 2943 | "nodeType": "ParameterList", 2944 | "parameters": [], 2945 | "src": "625:2:0" 2946 | }, 2947 | "payable": false, 2948 | "returnParameters": { 2949 | "id": 51, 2950 | "nodeType": "ParameterList", 2951 | "parameters": [ 2952 | { 2953 | "constant": false, 2954 | "id": 50, 2955 | "name": "result", 2956 | "nodeType": "VariableDeclaration", 2957 | "scope": 55, 2958 | "src": "649:11:0", 2959 | "stateVariable": false, 2960 | "storageLocation": "default", 2961 | "typeDescriptions": { 2962 | "typeIdentifier": "t_bool", 2963 | "typeString": "bool" 2964 | }, 2965 | "typeName": { 2966 | "id": 49, 2967 | "name": "bool", 2968 | "nodeType": "ElementaryTypeName", 2969 | "src": "649:4:0", 2970 | "typeDescriptions": { 2971 | "typeIdentifier": "t_bool", 2972 | "typeString": "bool" 2973 | } 2974 | }, 2975 | "value": null, 2976 | "visibility": "internal" 2977 | } 2978 | ], 2979 | "src": "648:13:0" 2980 | }, 2981 | "scope": 175, 2982 | "src": "601:88:0", 2983 | "stateMutability": "pure", 2984 | "superFunction": null, 2985 | "visibility": "public" 2986 | }, 2987 | { 2988 | "body": { 2989 | "id": 63, 2990 | "nodeType": "Block", 2991 | "src": "744:34:0", 2992 | "statements": [ 2993 | { 2994 | "expression": { 2995 | "argumentTypes": null, 2996 | "id": 61, 2997 | "isConstant": false, 2998 | "isLValue": false, 2999 | "isPure": false, 3000 | "lValueRequested": false, 3001 | "leftHandSide": { 3002 | "argumentTypes": null, 3003 | "id": 58, 3004 | "name": "_owner", 3005 | "nodeType": "Identifier", 3006 | "overloadedDeclarations": [], 3007 | "referencedDeclaration": 3, 3008 | "src": "752:6:0", 3009 | "typeDescriptions": { 3010 | "typeIdentifier": "t_address", 3011 | "typeString": "address" 3012 | } 3013 | }, 3014 | "nodeType": "Assignment", 3015 | "operator": "=", 3016 | "rightHandSide": { 3017 | "argumentTypes": null, 3018 | "expression": { 3019 | "argumentTypes": null, 3020 | "id": 59, 3021 | "name": "msg", 3022 | "nodeType": "Identifier", 3023 | "overloadedDeclarations": [], 3024 | "referencedDeclaration": 582, 3025 | "src": "761:3:0", 3026 | "typeDescriptions": { 3027 | "typeIdentifier": "t_magic_message", 3028 | "typeString": "msg" 3029 | } 3030 | }, 3031 | "id": 60, 3032 | "isConstant": false, 3033 | "isLValue": false, 3034 | "isPure": false, 3035 | "lValueRequested": false, 3036 | "memberName": "sender", 3037 | "nodeType": "MemberAccess", 3038 | "referencedDeclaration": null, 3039 | "src": "761:10:0", 3040 | "typeDescriptions": { 3041 | "typeIdentifier": "t_address", 3042 | "typeString": "address" 3043 | } 3044 | }, 3045 | "src": "752:19:0", 3046 | "typeDescriptions": { 3047 | "typeIdentifier": "t_address", 3048 | "typeString": "address" 3049 | } 3050 | }, 3051 | "id": 62, 3052 | "nodeType": "ExpressionStatement", 3053 | "src": "752:19:0" 3054 | } 3055 | ] 3056 | }, 3057 | "documentation": null, 3058 | "id": 64, 3059 | "implemented": true, 3060 | "isConstructor": true, 3061 | "isDeclaredConst": false, 3062 | "modifiers": [], 3063 | "name": "", 3064 | "nodeType": "FunctionDefinition", 3065 | "parameters": { 3066 | "id": 56, 3067 | "nodeType": "ParameterList", 3068 | "parameters": [], 3069 | "src": "734:2:0" 3070 | }, 3071 | "payable": false, 3072 | "returnParameters": { 3073 | "id": 57, 3074 | "nodeType": "ParameterList", 3075 | "parameters": [], 3076 | "src": "744:0:0" 3077 | }, 3078 | "scope": 175, 3079 | "src": "723:55:0", 3080 | "stateMutability": "nonpayable", 3081 | "superFunction": null, 3082 | "visibility": "public" 3083 | }, 3084 | { 3085 | "body": { 3086 | "id": 72, 3087 | "nodeType": "Block", 3088 | "src": "816:48:0", 3089 | "statements": [ 3090 | { 3091 | "eventCall": { 3092 | "argumentTypes": null, 3093 | "arguments": [ 3094 | { 3095 | "argumentTypes": null, 3096 | "expression": { 3097 | "argumentTypes": null, 3098 | "id": 68, 3099 | "name": "msg", 3100 | "nodeType": "Identifier", 3101 | "overloadedDeclarations": [], 3102 | "referencedDeclaration": 582, 3103 | "src": "846:3:0", 3104 | "typeDescriptions": { 3105 | "typeIdentifier": "t_magic_message", 3106 | "typeString": "msg" 3107 | } 3108 | }, 3109 | "id": 69, 3110 | "isConstant": false, 3111 | "isLValue": false, 3112 | "isPure": false, 3113 | "lValueRequested": false, 3114 | "memberName": "sender", 3115 | "nodeType": "MemberAccess", 3116 | "referencedDeclaration": null, 3117 | "src": "846:10:0", 3118 | "typeDescriptions": { 3119 | "typeIdentifier": "t_address", 3120 | "typeString": "address" 3121 | } 3122 | } 3123 | ], 3124 | "expression": { 3125 | "argumentTypes": [ 3126 | { 3127 | "typeIdentifier": "t_address", 3128 | "typeString": "address" 3129 | } 3130 | ], 3131 | "id": 67, 3132 | "name": "CalledTrigger1", 3133 | "nodeType": "Identifier", 3134 | "overloadedDeclarations": [], 3135 | "referencedDeclaration": 7, 3136 | "src": "831:14:0", 3137 | "typeDescriptions": { 3138 | "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", 3139 | "typeString": "function (address)" 3140 | } 3141 | }, 3142 | "id": 70, 3143 | "isConstant": false, 3144 | "isLValue": false, 3145 | "isPure": false, 3146 | "kind": "functionCall", 3147 | "lValueRequested": false, 3148 | "names": [], 3149 | "nodeType": "FunctionCall", 3150 | "src": "831:26:0", 3151 | "typeDescriptions": { 3152 | "typeIdentifier": "t_tuple$__$", 3153 | "typeString": "tuple()" 3154 | } 3155 | }, 3156 | "id": 71, 3157 | "nodeType": "EmitStatement", 3158 | "src": "826:31:0" 3159 | } 3160 | ] 3161 | }, 3162 | "documentation": null, 3163 | "id": 73, 3164 | "implemented": true, 3165 | "isConstructor": false, 3166 | "isDeclaredConst": false, 3167 | "modifiers": [], 3168 | "name": "triggerEvent1", 3169 | "nodeType": "FunctionDefinition", 3170 | "parameters": { 3171 | "id": 65, 3172 | "nodeType": "ParameterList", 3173 | "parameters": [], 3174 | "src": "806:2:0" 3175 | }, 3176 | "payable": false, 3177 | "returnParameters": { 3178 | "id": 66, 3179 | "nodeType": "ParameterList", 3180 | "parameters": [], 3181 | "src": "816:0:0" 3182 | }, 3183 | "scope": 175, 3184 | "src": "784:80:0", 3185 | "stateMutability": "nonpayable", 3186 | "superFunction": null, 3187 | "visibility": "public" 3188 | }, 3189 | { 3190 | "body": { 3191 | "id": 86, 3192 | "nodeType": "Block", 3193 | "src": "902:83:0", 3194 | "statements": [ 3195 | { 3196 | "assignments": [ 3197 | 77 3198 | ], 3199 | "declarations": [ 3200 | { 3201 | "constant": false, 3202 | "id": 77, 3203 | "name": "myVal", 3204 | "nodeType": "VariableDeclaration", 3205 | "scope": 87, 3206 | "src": "911:13:0", 3207 | "stateVariable": false, 3208 | "storageLocation": "default", 3209 | "typeDescriptions": { 3210 | "typeIdentifier": "t_uint256", 3211 | "typeString": "uint256" 3212 | }, 3213 | "typeName": { 3214 | "id": 76, 3215 | "name": "uint256", 3216 | "nodeType": "ElementaryTypeName", 3217 | "src": "911:7:0", 3218 | "typeDescriptions": { 3219 | "typeIdentifier": "t_uint256", 3220 | "typeString": "uint256" 3221 | } 3222 | }, 3223 | "value": null, 3224 | "visibility": "internal" 3225 | } 3226 | ], 3227 | "id": 79, 3228 | "initialValue": { 3229 | "argumentTypes": null, 3230 | "hexValue": "39393939", 3231 | "id": 78, 3232 | "isConstant": false, 3233 | "isLValue": false, 3234 | "isPure": true, 3235 | "kind": "number", 3236 | "lValueRequested": false, 3237 | "nodeType": "Literal", 3238 | "src": "927:4:0", 3239 | "subdenomination": null, 3240 | "typeDescriptions": { 3241 | "typeIdentifier": "t_rational_9999_by_1", 3242 | "typeString": "int_const 9999" 3243 | }, 3244 | "value": "9999" 3245 | }, 3246 | "nodeType": "VariableDeclarationStatement", 3247 | "src": "911:20:0" 3248 | }, 3249 | { 3250 | "eventCall": { 3251 | "argumentTypes": null, 3252 | "arguments": [ 3253 | { 3254 | "argumentTypes": null, 3255 | "expression": { 3256 | "argumentTypes": null, 3257 | "id": 81, 3258 | "name": "msg", 3259 | "nodeType": "Identifier", 3260 | "overloadedDeclarations": [], 3261 | "referencedDeclaration": 582, 3262 | "src": "960:3:0", 3263 | "typeDescriptions": { 3264 | "typeIdentifier": "t_magic_message", 3265 | "typeString": "msg" 3266 | } 3267 | }, 3268 | "id": 82, 3269 | "isConstant": false, 3270 | "isLValue": false, 3271 | "isPure": false, 3272 | "lValueRequested": false, 3273 | "memberName": "sender", 3274 | "nodeType": "MemberAccess", 3275 | "referencedDeclaration": null, 3276 | "src": "960:10:0", 3277 | "typeDescriptions": { 3278 | "typeIdentifier": "t_address", 3279 | "typeString": "address" 3280 | } 3281 | }, 3282 | { 3283 | "argumentTypes": null, 3284 | "id": 83, 3285 | "name": "myVal", 3286 | "nodeType": "Identifier", 3287 | "overloadedDeclarations": [], 3288 | "referencedDeclaration": 77, 3289 | "src": "972:5:0", 3290 | "typeDescriptions": { 3291 | "typeIdentifier": "t_uint256", 3292 | "typeString": "uint256" 3293 | } 3294 | } 3295 | ], 3296 | "expression": { 3297 | "argumentTypes": [ 3298 | { 3299 | "typeIdentifier": "t_address", 3300 | "typeString": "address" 3301 | }, 3302 | { 3303 | "typeIdentifier": "t_uint256", 3304 | "typeString": "uint256" 3305 | } 3306 | ], 3307 | "id": 80, 3308 | "name": "CalledTrigger2", 3309 | "nodeType": "Identifier", 3310 | "overloadedDeclarations": [], 3311 | "referencedDeclaration": 13, 3312 | "src": "945:14:0", 3313 | "typeDescriptions": { 3314 | "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", 3315 | "typeString": "function (address,uint256)" 3316 | } 3317 | }, 3318 | "id": 84, 3319 | "isConstant": false, 3320 | "isLValue": false, 3321 | "isPure": false, 3322 | "kind": "functionCall", 3323 | "lValueRequested": false, 3324 | "names": [], 3325 | "nodeType": "FunctionCall", 3326 | "src": "945:33:0", 3327 | "typeDescriptions": { 3328 | "typeIdentifier": "t_tuple$__$", 3329 | "typeString": "tuple()" 3330 | } 3331 | }, 3332 | "id": 85, 3333 | "nodeType": "EmitStatement", 3334 | "src": "940:38:0" 3335 | } 3336 | ] 3337 | }, 3338 | "documentation": null, 3339 | "id": 87, 3340 | "implemented": true, 3341 | "isConstructor": false, 3342 | "isDeclaredConst": false, 3343 | "modifiers": [], 3344 | "name": "triggerEvent2", 3345 | "nodeType": "FunctionDefinition", 3346 | "parameters": { 3347 | "id": 74, 3348 | "nodeType": "ParameterList", 3349 | "parameters": [], 3350 | "src": "892:2:0" 3351 | }, 3352 | "payable": false, 3353 | "returnParameters": { 3354 | "id": 75, 3355 | "nodeType": "ParameterList", 3356 | "parameters": [], 3357 | "src": "902:0:0" 3358 | }, 3359 | "scope": 175, 3360 | "src": "870:115:0", 3361 | "stateMutability": "nonpayable", 3362 | "superFunction": null, 3363 | "visibility": "public" 3364 | }, 3365 | { 3366 | "body": { 3367 | "id": 101, 3368 | "nodeType": "Block", 3369 | "src": "1023:90:0", 3370 | "statements": [ 3371 | { 3372 | "assignments": [ 3373 | 91 3374 | ], 3375 | "declarations": [ 3376 | { 3377 | "constant": false, 3378 | "id": 91, 3379 | "name": "myVal", 3380 | "nodeType": "VariableDeclaration", 3381 | "scope": 102, 3382 | "src": "1032:13:0", 3383 | "stateVariable": false, 3384 | "storageLocation": "default", 3385 | "typeDescriptions": { 3386 | "typeIdentifier": "t_uint256", 3387 | "typeString": "uint256" 3388 | }, 3389 | "typeName": { 3390 | "id": 90, 3391 | "name": "uint256", 3392 | "nodeType": "ElementaryTypeName", 3393 | "src": "1032:7:0", 3394 | "typeDescriptions": { 3395 | "typeIdentifier": "t_uint256", 3396 | "typeString": "uint256" 3397 | } 3398 | }, 3399 | "value": null, 3400 | "visibility": "internal" 3401 | } 3402 | ], 3403 | "id": 93, 3404 | "initialValue": { 3405 | "argumentTypes": null, 3406 | "hexValue": "39393939", 3407 | "id": 92, 3408 | "isConstant": false, 3409 | "isLValue": false, 3410 | "isPure": true, 3411 | "kind": "number", 3412 | "lValueRequested": false, 3413 | "nodeType": "Literal", 3414 | "src": "1048:4:0", 3415 | "subdenomination": null, 3416 | "typeDescriptions": { 3417 | "typeIdentifier": "t_rational_9999_by_1", 3418 | "typeString": "int_const 9999" 3419 | }, 3420 | "value": "9999" 3421 | }, 3422 | "nodeType": "VariableDeclarationStatement", 3423 | "src": "1032:20:0" 3424 | }, 3425 | { 3426 | "eventCall": { 3427 | "argumentTypes": null, 3428 | "arguments": [ 3429 | { 3430 | "argumentTypes": null, 3431 | "expression": { 3432 | "argumentTypes": null, 3433 | "id": 95, 3434 | "name": "msg", 3435 | "nodeType": "Identifier", 3436 | "overloadedDeclarations": [], 3437 | "referencedDeclaration": 582, 3438 | "src": "1081:3:0", 3439 | "typeDescriptions": { 3440 | "typeIdentifier": "t_magic_message", 3441 | "typeString": "msg" 3442 | } 3443 | }, 3444 | "id": 96, 3445 | "isConstant": false, 3446 | "isLValue": false, 3447 | "isPure": false, 3448 | "lValueRequested": false, 3449 | "memberName": "sender", 3450 | "nodeType": "MemberAccess", 3451 | "referencedDeclaration": null, 3452 | "src": "1081:10:0", 3453 | "typeDescriptions": { 3454 | "typeIdentifier": "t_address", 3455 | "typeString": "address" 3456 | } 3457 | }, 3458 | { 3459 | "argumentTypes": null, 3460 | "id": 97, 3461 | "name": "myVal", 3462 | "nodeType": "Identifier", 3463 | "overloadedDeclarations": [], 3464 | "referencedDeclaration": 91, 3465 | "src": "1093:5:0", 3466 | "typeDescriptions": { 3467 | "typeIdentifier": "t_uint256", 3468 | "typeString": "uint256" 3469 | } 3470 | }, 3471 | { 3472 | "argumentTypes": null, 3473 | "id": 98, 3474 | "name": "myVal", 3475 | "nodeType": "Identifier", 3476 | "overloadedDeclarations": [], 3477 | "referencedDeclaration": 91, 3478 | "src": "1100:5:0", 3479 | "typeDescriptions": { 3480 | "typeIdentifier": "t_uint256", 3481 | "typeString": "uint256" 3482 | } 3483 | } 3484 | ], 3485 | "expression": { 3486 | "argumentTypes": [ 3487 | { 3488 | "typeIdentifier": "t_address", 3489 | "typeString": "address" 3490 | }, 3491 | { 3492 | "typeIdentifier": "t_uint256", 3493 | "typeString": "uint256" 3494 | }, 3495 | { 3496 | "typeIdentifier": "t_uint256", 3497 | "typeString": "uint256" 3498 | } 3499 | ], 3500 | "id": 94, 3501 | "name": "CalledTrigger3", 3502 | "nodeType": "Identifier", 3503 | "overloadedDeclarations": [], 3504 | "referencedDeclaration": 21, 3505 | "src": "1066:14:0", 3506 | "typeDescriptions": { 3507 | "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", 3508 | "typeString": "function (address,uint256,uint256)" 3509 | } 3510 | }, 3511 | "id": 99, 3512 | "isConstant": false, 3513 | "isLValue": false, 3514 | "isPure": false, 3515 | "kind": "functionCall", 3516 | "lValueRequested": false, 3517 | "names": [], 3518 | "nodeType": "FunctionCall", 3519 | "src": "1066:40:0", 3520 | "typeDescriptions": { 3521 | "typeIdentifier": "t_tuple$__$", 3522 | "typeString": "tuple()" 3523 | } 3524 | }, 3525 | "id": 100, 3526 | "nodeType": "EmitStatement", 3527 | "src": "1061:45:0" 3528 | } 3529 | ] 3530 | }, 3531 | "documentation": null, 3532 | "id": 102, 3533 | "implemented": true, 3534 | "isConstructor": false, 3535 | "isDeclaredConst": false, 3536 | "modifiers": [], 3537 | "name": "triggerEvent3", 3538 | "nodeType": "FunctionDefinition", 3539 | "parameters": { 3540 | "id": 88, 3541 | "nodeType": "ParameterList", 3542 | "parameters": [], 3543 | "src": "1013:2:0" 3544 | }, 3545 | "payable": false, 3546 | "returnParameters": { 3547 | "id": 89, 3548 | "nodeType": "ParameterList", 3549 | "parameters": [], 3550 | "src": "1023:0:0" 3551 | }, 3552 | "scope": 175, 3553 | "src": "991:122:0", 3554 | "stateMutability": "nonpayable", 3555 | "superFunction": null, 3556 | "visibility": "public" 3557 | }, 3558 | { 3559 | "body": { 3560 | "id": 114, 3561 | "nodeType": "Block", 3562 | "src": "1151:78:0", 3563 | "statements": [ 3564 | { 3565 | "assignments": [ 3566 | 106 3567 | ], 3568 | "declarations": [ 3569 | { 3570 | "constant": false, 3571 | "id": 106, 3572 | "name": "myVal", 3573 | "nodeType": "VariableDeclaration", 3574 | "scope": 115, 3575 | "src": "1160:13:0", 3576 | "stateVariable": false, 3577 | "storageLocation": "default", 3578 | "typeDescriptions": { 3579 | "typeIdentifier": "t_uint256", 3580 | "typeString": "uint256" 3581 | }, 3582 | "typeName": { 3583 | "id": 105, 3584 | "name": "uint256", 3585 | "nodeType": "ElementaryTypeName", 3586 | "src": "1160:7:0", 3587 | "typeDescriptions": { 3588 | "typeIdentifier": "t_uint256", 3589 | "typeString": "uint256" 3590 | } 3591 | }, 3592 | "value": null, 3593 | "visibility": "internal" 3594 | } 3595 | ], 3596 | "id": 108, 3597 | "initialValue": { 3598 | "argumentTypes": null, 3599 | "hexValue": "39393939", 3600 | "id": 107, 3601 | "isConstant": false, 3602 | "isLValue": false, 3603 | "isPure": true, 3604 | "kind": "number", 3605 | "lValueRequested": false, 3606 | "nodeType": "Literal", 3607 | "src": "1176:4:0", 3608 | "subdenomination": null, 3609 | "typeDescriptions": { 3610 | "typeIdentifier": "t_rational_9999_by_1", 3611 | "typeString": "int_const 9999" 3612 | }, 3613 | "value": "9999" 3614 | }, 3615 | "nodeType": "VariableDeclarationStatement", 3616 | "src": "1160:20:0" 3617 | }, 3618 | { 3619 | "eventCall": { 3620 | "argumentTypes": null, 3621 | "arguments": [ 3622 | { 3623 | "argumentTypes": null, 3624 | "id": 110, 3625 | "name": "myVal", 3626 | "nodeType": "Identifier", 3627 | "overloadedDeclarations": [], 3628 | "referencedDeclaration": 106, 3629 | "src": "1209:5:0", 3630 | "typeDescriptions": { 3631 | "typeIdentifier": "t_uint256", 3632 | "typeString": "uint256" 3633 | } 3634 | }, 3635 | { 3636 | "argumentTypes": null, 3637 | "id": 111, 3638 | "name": "myVal", 3639 | "nodeType": "Identifier", 3640 | "overloadedDeclarations": [], 3641 | "referencedDeclaration": 106, 3642 | "src": "1216:5:0", 3643 | "typeDescriptions": { 3644 | "typeIdentifier": "t_uint256", 3645 | "typeString": "uint256" 3646 | } 3647 | } 3648 | ], 3649 | "expression": { 3650 | "argumentTypes": [ 3651 | { 3652 | "typeIdentifier": "t_uint256", 3653 | "typeString": "uint256" 3654 | }, 3655 | { 3656 | "typeIdentifier": "t_uint256", 3657 | "typeString": "uint256" 3658 | } 3659 | ], 3660 | "id": 109, 3661 | "name": "CalledTrigger4", 3662 | "nodeType": "Identifier", 3663 | "overloadedDeclarations": [], 3664 | "referencedDeclaration": 27, 3665 | "src": "1194:14:0", 3666 | "typeDescriptions": { 3667 | "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", 3668 | "typeString": "function (uint256,uint256)" 3669 | } 3670 | }, 3671 | "id": 112, 3672 | "isConstant": false, 3673 | "isLValue": false, 3674 | "isPure": false, 3675 | "kind": "functionCall", 3676 | "lValueRequested": false, 3677 | "names": [], 3678 | "nodeType": "FunctionCall", 3679 | "src": "1194:28:0", 3680 | "typeDescriptions": { 3681 | "typeIdentifier": "t_tuple$__$", 3682 | "typeString": "tuple()" 3683 | } 3684 | }, 3685 | "id": 113, 3686 | "nodeType": "EmitStatement", 3687 | "src": "1189:33:0" 3688 | } 3689 | ] 3690 | }, 3691 | "documentation": null, 3692 | "id": 115, 3693 | "implemented": true, 3694 | "isConstructor": false, 3695 | "isDeclaredConst": false, 3696 | "modifiers": [], 3697 | "name": "triggerEvent4", 3698 | "nodeType": "FunctionDefinition", 3699 | "parameters": { 3700 | "id": 103, 3701 | "nodeType": "ParameterList", 3702 | "parameters": [], 3703 | "src": "1141:2:0" 3704 | }, 3705 | "payable": false, 3706 | "returnParameters": { 3707 | "id": 104, 3708 | "nodeType": "ParameterList", 3709 | "parameters": [], 3710 | "src": "1151:0:0" 3711 | }, 3712 | "scope": 175, 3713 | "src": "1119:110:0", 3714 | "stateMutability": "nonpayable", 3715 | "superFunction": null, 3716 | "visibility": "public" 3717 | }, 3718 | { 3719 | "body": { 3720 | "id": 127, 3721 | "nodeType": "Block", 3722 | "src": "1267:78:0", 3723 | "statements": [ 3724 | { 3725 | "assignments": [ 3726 | 119 3727 | ], 3728 | "declarations": [ 3729 | { 3730 | "constant": false, 3731 | "id": 119, 3732 | "name": "myVal", 3733 | "nodeType": "VariableDeclaration", 3734 | "scope": 128, 3735 | "src": "1276:13:0", 3736 | "stateVariable": false, 3737 | "storageLocation": "default", 3738 | "typeDescriptions": { 3739 | "typeIdentifier": "t_uint256", 3740 | "typeString": "uint256" 3741 | }, 3742 | "typeName": { 3743 | "id": 118, 3744 | "name": "uint256", 3745 | "nodeType": "ElementaryTypeName", 3746 | "src": "1276:7:0", 3747 | "typeDescriptions": { 3748 | "typeIdentifier": "t_uint256", 3749 | "typeString": "uint256" 3750 | } 3751 | }, 3752 | "value": null, 3753 | "visibility": "internal" 3754 | } 3755 | ], 3756 | "id": 121, 3757 | "initialValue": { 3758 | "argumentTypes": null, 3759 | "hexValue": "39393939", 3760 | "id": 120, 3761 | "isConstant": false, 3762 | "isLValue": false, 3763 | "isPure": true, 3764 | "kind": "number", 3765 | "lValueRequested": false, 3766 | "nodeType": "Literal", 3767 | "src": "1292:4:0", 3768 | "subdenomination": null, 3769 | "typeDescriptions": { 3770 | "typeIdentifier": "t_rational_9999_by_1", 3771 | "typeString": "int_const 9999" 3772 | }, 3773 | "value": "9999" 3774 | }, 3775 | "nodeType": "VariableDeclarationStatement", 3776 | "src": "1276:20:0" 3777 | }, 3778 | { 3779 | "eventCall": { 3780 | "argumentTypes": null, 3781 | "arguments": [ 3782 | { 3783 | "argumentTypes": null, 3784 | "id": 123, 3785 | "name": "myVal", 3786 | "nodeType": "Identifier", 3787 | "overloadedDeclarations": [], 3788 | "referencedDeclaration": 119, 3789 | "src": "1325:5:0", 3790 | "typeDescriptions": { 3791 | "typeIdentifier": "t_uint256", 3792 | "typeString": "uint256" 3793 | } 3794 | }, 3795 | { 3796 | "argumentTypes": null, 3797 | "id": 124, 3798 | "name": "myVal", 3799 | "nodeType": "Identifier", 3800 | "overloadedDeclarations": [], 3801 | "referencedDeclaration": 119, 3802 | "src": "1332:5:0", 3803 | "typeDescriptions": { 3804 | "typeIdentifier": "t_uint256", 3805 | "typeString": "uint256" 3806 | } 3807 | } 3808 | ], 3809 | "expression": { 3810 | "argumentTypes": [ 3811 | { 3812 | "typeIdentifier": "t_uint256", 3813 | "typeString": "uint256" 3814 | }, 3815 | { 3816 | "typeIdentifier": "t_uint256", 3817 | "typeString": "uint256" 3818 | } 3819 | ], 3820 | "id": 122, 3821 | "name": "CalledTrigger5", 3822 | "nodeType": "Identifier", 3823 | "overloadedDeclarations": [], 3824 | "referencedDeclaration": 33, 3825 | "src": "1310:14:0", 3826 | "typeDescriptions": { 3827 | "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", 3828 | "typeString": "function (uint256,uint256)" 3829 | } 3830 | }, 3831 | "id": 125, 3832 | "isConstant": false, 3833 | "isLValue": false, 3834 | "isPure": false, 3835 | "kind": "functionCall", 3836 | "lValueRequested": false, 3837 | "names": [], 3838 | "nodeType": "FunctionCall", 3839 | "src": "1310:28:0", 3840 | "typeDescriptions": { 3841 | "typeIdentifier": "t_tuple$__$", 3842 | "typeString": "tuple()" 3843 | } 3844 | }, 3845 | "id": 126, 3846 | "nodeType": "EmitStatement", 3847 | "src": "1305:33:0" 3848 | } 3849 | ] 3850 | }, 3851 | "documentation": null, 3852 | "id": 128, 3853 | "implemented": true, 3854 | "isConstructor": false, 3855 | "isDeclaredConst": false, 3856 | "modifiers": [], 3857 | "name": "triggerEvent5", 3858 | "nodeType": "FunctionDefinition", 3859 | "parameters": { 3860 | "id": 116, 3861 | "nodeType": "ParameterList", 3862 | "parameters": [], 3863 | "src": "1257:2:0" 3864 | }, 3865 | "payable": false, 3866 | "returnParameters": { 3867 | "id": 117, 3868 | "nodeType": "ParameterList", 3869 | "parameters": [], 3870 | "src": "1267:0:0" 3871 | }, 3872 | "scope": 175, 3873 | "src": "1235:110:0", 3874 | "stateMutability": "nonpayable", 3875 | "superFunction": null, 3876 | "visibility": "public" 3877 | }, 3878 | { 3879 | "body": { 3880 | "id": 140, 3881 | "nodeType": "Block", 3882 | "src": "1556:73:0", 3883 | "statements": [ 3884 | { 3885 | "eventCall": { 3886 | "argumentTypes": null, 3887 | "arguments": [ 3888 | { 3889 | "argumentTypes": null, 3890 | "expression": { 3891 | "argumentTypes": null, 3892 | "id": 132, 3893 | "name": "msg", 3894 | "nodeType": "Identifier", 3895 | "overloadedDeclarations": [], 3896 | "referencedDeclaration": 582, 3897 | "src": "1585:3:0", 3898 | "typeDescriptions": { 3899 | "typeIdentifier": "t_magic_message", 3900 | "typeString": "msg" 3901 | } 3902 | }, 3903 | "id": 133, 3904 | "isConstant": false, 3905 | "isLValue": false, 3906 | "isPure": false, 3907 | "lValueRequested": false, 3908 | "memberName": "sender", 3909 | "nodeType": "MemberAccess", 3910 | "referencedDeclaration": null, 3911 | "src": "1585:10:0", 3912 | "typeDescriptions": { 3913 | "typeIdentifier": "t_address", 3914 | "typeString": "address" 3915 | } 3916 | }, 3917 | { 3918 | "argumentTypes": null, 3919 | "arguments": [], 3920 | "expression": { 3921 | "argumentTypes": [], 3922 | "id": 134, 3923 | "name": "unixTime", 3924 | "nodeType": "Identifier", 3925 | "overloadedDeclarations": [], 3926 | "referencedDeclaration": 160, 3927 | "src": "1597:8:0", 3928 | "typeDescriptions": { 3929 | "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", 3930 | "typeString": "function () view returns (uint256)" 3931 | } 3932 | }, 3933 | "id": 135, 3934 | "isConstant": false, 3935 | "isLValue": false, 3936 | "isPure": false, 3937 | "kind": "functionCall", 3938 | "lValueRequested": false, 3939 | "names": [], 3940 | "nodeType": "FunctionCall", 3941 | "src": "1597:10:0", 3942 | "typeDescriptions": { 3943 | "typeIdentifier": "t_uint256", 3944 | "typeString": "uint256" 3945 | } 3946 | }, 3947 | { 3948 | "argumentTypes": null, 3949 | "expression": { 3950 | "argumentTypes": null, 3951 | "id": 136, 3952 | "name": "block", 3953 | "nodeType": "Identifier", 3954 | "overloadedDeclarations": [], 3955 | "referencedDeclaration": 572, 3956 | "src": "1609:5:0", 3957 | "typeDescriptions": { 3958 | "typeIdentifier": "t_magic_block", 3959 | "typeString": "block" 3960 | } 3961 | }, 3962 | "id": 137, 3963 | "isConstant": false, 3964 | "isLValue": false, 3965 | "isPure": false, 3966 | "lValueRequested": false, 3967 | "memberName": "number", 3968 | "nodeType": "MemberAccess", 3969 | "referencedDeclaration": null, 3970 | "src": "1609:12:0", 3971 | "typeDescriptions": { 3972 | "typeIdentifier": "t_uint256", 3973 | "typeString": "uint256" 3974 | } 3975 | } 3976 | ], 3977 | "expression": { 3978 | "argumentTypes": [ 3979 | { 3980 | "typeIdentifier": "t_address", 3981 | "typeString": "address" 3982 | }, 3983 | { 3984 | "typeIdentifier": "t_uint256", 3985 | "typeString": "uint256" 3986 | }, 3987 | { 3988 | "typeIdentifier": "t_uint256", 3989 | "typeString": "uint256" 3990 | } 3991 | ], 3992 | "id": 131, 3993 | "name": "CalledTrigger6", 3994 | "nodeType": "Identifier", 3995 | "overloadedDeclarations": [], 3996 | "referencedDeclaration": 41, 3997 | "src": "1570:14:0", 3998 | "typeDescriptions": { 3999 | "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", 4000 | "typeString": "function (address,uint256,uint256)" 4001 | } 4002 | }, 4003 | "id": 138, 4004 | "isConstant": false, 4005 | "isLValue": false, 4006 | "isPure": false, 4007 | "kind": "functionCall", 4008 | "lValueRequested": false, 4009 | "names": [], 4010 | "nodeType": "FunctionCall", 4011 | "src": "1570:52:0", 4012 | "typeDescriptions": { 4013 | "typeIdentifier": "t_tuple$__$", 4014 | "typeString": "tuple()" 4015 | } 4016 | }, 4017 | "id": 139, 4018 | "nodeType": "EmitStatement", 4019 | "src": "1565:57:0" 4020 | } 4021 | ] 4022 | }, 4023 | "documentation": null, 4024 | "id": 141, 4025 | "implemented": true, 4026 | "isConstructor": false, 4027 | "isDeclaredConst": false, 4028 | "modifiers": [], 4029 | "name": "triggerEvent6", 4030 | "nodeType": "FunctionDefinition", 4031 | "parameters": { 4032 | "id": 129, 4033 | "nodeType": "ParameterList", 4034 | "parameters": [], 4035 | "src": "1546:2:0" 4036 | }, 4037 | "payable": false, 4038 | "returnParameters": { 4039 | "id": 130, 4040 | "nodeType": "ParameterList", 4041 | "parameters": [], 4042 | "src": "1556:0:0" 4043 | }, 4044 | "scope": 175, 4045 | "src": "1524:105:0", 4046 | "stateMutability": "nonpayable", 4047 | "superFunction": null, 4048 | "visibility": "public" 4049 | }, 4050 | { 4051 | "body": { 4052 | "id": 151, 4053 | "nodeType": "Block", 4054 | "src": "1662:58:0", 4055 | "statements": [ 4056 | { 4057 | "eventCall": { 4058 | "argumentTypes": null, 4059 | "arguments": [ 4060 | { 4061 | "argumentTypes": null, 4062 | "expression": { 4063 | "argumentTypes": null, 4064 | "id": 145, 4065 | "name": "msg", 4066 | "nodeType": "Identifier", 4067 | "overloadedDeclarations": [], 4068 | "referencedDeclaration": 582, 4069 | "src": "1691:3:0", 4070 | "typeDescriptions": { 4071 | "typeIdentifier": "t_magic_message", 4072 | "typeString": "msg" 4073 | } 4074 | }, 4075 | "id": 146, 4076 | "isConstant": false, 4077 | "isLValue": false, 4078 | "isPure": false, 4079 | "lValueRequested": false, 4080 | "memberName": "sender", 4081 | "nodeType": "MemberAccess", 4082 | "referencedDeclaration": null, 4083 | "src": "1691:10:0", 4084 | "typeDescriptions": { 4085 | "typeIdentifier": "t_address", 4086 | "typeString": "address" 4087 | } 4088 | }, 4089 | { 4090 | "argumentTypes": null, 4091 | "expression": { 4092 | "argumentTypes": null, 4093 | "id": 147, 4094 | "name": "msg", 4095 | "nodeType": "Identifier", 4096 | "overloadedDeclarations": [], 4097 | "referencedDeclaration": 582, 4098 | "src": "1703:3:0", 4099 | "typeDescriptions": { 4100 | "typeIdentifier": "t_magic_message", 4101 | "typeString": "msg" 4102 | } 4103 | }, 4104 | "id": 148, 4105 | "isConstant": false, 4106 | "isLValue": false, 4107 | "isPure": false, 4108 | "lValueRequested": false, 4109 | "memberName": "value", 4110 | "nodeType": "MemberAccess", 4111 | "referencedDeclaration": null, 4112 | "src": "1703:9:0", 4113 | "typeDescriptions": { 4114 | "typeIdentifier": "t_uint256", 4115 | "typeString": "uint256" 4116 | } 4117 | } 4118 | ], 4119 | "expression": { 4120 | "argumentTypes": [ 4121 | { 4122 | "typeIdentifier": "t_address", 4123 | "typeString": "address" 4124 | }, 4125 | { 4126 | "typeIdentifier": "t_uint256", 4127 | "typeString": "uint256" 4128 | } 4129 | ], 4130 | "id": 144, 4131 | "name": "MoneyReceived", 4132 | "nodeType": "Identifier", 4133 | "overloadedDeclarations": [], 4134 | "referencedDeclaration": 47, 4135 | "src": "1677:13:0", 4136 | "typeDescriptions": { 4137 | "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", 4138 | "typeString": "function (address,uint256)" 4139 | } 4140 | }, 4141 | "id": 149, 4142 | "isConstant": false, 4143 | "isLValue": false, 4144 | "isPure": false, 4145 | "kind": "functionCall", 4146 | "lValueRequested": false, 4147 | "names": [], 4148 | "nodeType": "FunctionCall", 4149 | "src": "1677:36:0", 4150 | "typeDescriptions": { 4151 | "typeIdentifier": "t_tuple$__$", 4152 | "typeString": "tuple()" 4153 | } 4154 | }, 4155 | "id": 150, 4156 | "nodeType": "EmitStatement", 4157 | "src": "1672:41:0" 4158 | } 4159 | ] 4160 | }, 4161 | "documentation": null, 4162 | "id": 152, 4163 | "implemented": true, 4164 | "isConstructor": false, 4165 | "isDeclaredConst": false, 4166 | "modifiers": [], 4167 | "name": "", 4168 | "nodeType": "FunctionDefinition", 4169 | "parameters": { 4170 | "id": 142, 4171 | "nodeType": "ParameterList", 4172 | "parameters": [], 4173 | "src": "1644:2:0" 4174 | }, 4175 | "payable": true, 4176 | "returnParameters": { 4177 | "id": 143, 4178 | "nodeType": "ParameterList", 4179 | "parameters": [], 4180 | "src": "1662:0:0" 4181 | }, 4182 | "scope": 175, 4183 | "src": "1635:85:0", 4184 | "stateMutability": "payable", 4185 | "superFunction": null, 4186 | "visibility": "public" 4187 | }, 4188 | { 4189 | "body": { 4190 | "id": 159, 4191 | "nodeType": "Block", 4192 | "src": "1865:27:0", 4193 | "statements": [ 4194 | { 4195 | "expression": { 4196 | "argumentTypes": null, 4197 | "id": 157, 4198 | "name": "now", 4199 | "nodeType": "Identifier", 4200 | "overloadedDeclarations": [], 4201 | "referencedDeclaration": 584, 4202 | "src": "1882:3:0", 4203 | "typeDescriptions": { 4204 | "typeIdentifier": "t_uint256", 4205 | "typeString": "uint256" 4206 | } 4207 | }, 4208 | "functionReturnParameters": 156, 4209 | "id": 158, 4210 | "nodeType": "Return", 4211 | "src": "1875:10:0" 4212 | } 4213 | ] 4214 | }, 4215 | "documentation": "Returns Unix Timestamp\nE.g: https://www.unixtimestamp.com", 4216 | "id": 160, 4217 | "implemented": true, 4218 | "isConstructor": false, 4219 | "isDeclaredConst": true, 4220 | "modifiers": [], 4221 | "name": "unixTime", 4222 | "nodeType": "FunctionDefinition", 4223 | "parameters": { 4224 | "id": 153, 4225 | "nodeType": "ParameterList", 4226 | "parameters": [], 4227 | "src": "1831:2:0" 4228 | }, 4229 | "payable": false, 4230 | "returnParameters": { 4231 | "id": 156, 4232 | "nodeType": "ParameterList", 4233 | "parameters": [ 4234 | { 4235 | "constant": false, 4236 | "id": 155, 4237 | "name": "", 4238 | "nodeType": "VariableDeclaration", 4239 | "scope": 160, 4240 | "src": "1857:7:0", 4241 | "stateVariable": false, 4242 | "storageLocation": "default", 4243 | "typeDescriptions": { 4244 | "typeIdentifier": "t_uint256", 4245 | "typeString": "uint256" 4246 | }, 4247 | "typeName": { 4248 | "id": 154, 4249 | "name": "uint256", 4250 | "nodeType": "ElementaryTypeName", 4251 | "src": "1857:7:0", 4252 | "typeDescriptions": { 4253 | "typeIdentifier": "t_uint256", 4254 | "typeString": "uint256" 4255 | } 4256 | }, 4257 | "value": null, 4258 | "visibility": "internal" 4259 | } 4260 | ], 4261 | "src": "1856:9:0" 4262 | }, 4263 | "scope": 175, 4264 | "src": "1814:78:0", 4265 | "stateMutability": "view", 4266 | "superFunction": null, 4267 | "visibility": "internal" 4268 | }, 4269 | { 4270 | "body": { 4271 | "id": 173, 4272 | "nodeType": "Block", 4273 | "src": "2086:85:0", 4274 | "statements": [ 4275 | { 4276 | "condition": { 4277 | "argumentTypes": null, 4278 | "commonType": { 4279 | "typeIdentifier": "t_address", 4280 | "typeString": "address" 4281 | }, 4282 | "id": 166, 4283 | "isConstant": false, 4284 | "isLValue": false, 4285 | "isPure": false, 4286 | "lValueRequested": false, 4287 | "leftExpression": { 4288 | "argumentTypes": null, 4289 | "expression": { 4290 | "argumentTypes": null, 4291 | "id": 163, 4292 | "name": "msg", 4293 | "nodeType": "Identifier", 4294 | "overloadedDeclarations": [], 4295 | "referencedDeclaration": 582, 4296 | "src": "2100:3:0", 4297 | "typeDescriptions": { 4298 | "typeIdentifier": "t_magic_message", 4299 | "typeString": "msg" 4300 | } 4301 | }, 4302 | "id": 164, 4303 | "isConstant": false, 4304 | "isLValue": false, 4305 | "isPure": false, 4306 | "lValueRequested": false, 4307 | "memberName": "sender", 4308 | "nodeType": "MemberAccess", 4309 | "referencedDeclaration": null, 4310 | "src": "2100:10:0", 4311 | "typeDescriptions": { 4312 | "typeIdentifier": "t_address", 4313 | "typeString": "address" 4314 | } 4315 | }, 4316 | "nodeType": "BinaryOperation", 4317 | "operator": "==", 4318 | "rightExpression": { 4319 | "argumentTypes": null, 4320 | "id": 165, 4321 | "name": "_owner", 4322 | "nodeType": "Identifier", 4323 | "overloadedDeclarations": [], 4324 | "referencedDeclaration": 3, 4325 | "src": "2114:6:0", 4326 | "typeDescriptions": { 4327 | "typeIdentifier": "t_address", 4328 | "typeString": "address" 4329 | } 4330 | }, 4331 | "src": "2100:20:0", 4332 | "typeDescriptions": { 4333 | "typeIdentifier": "t_bool", 4334 | "typeString": "bool" 4335 | } 4336 | }, 4337 | "falseBody": null, 4338 | "id": 172, 4339 | "nodeType": "IfStatement", 4340 | "src": "2096:69:0", 4341 | "trueBody": { 4342 | "id": 171, 4343 | "nodeType": "Block", 4344 | "src": "2122:43:0", 4345 | "statements": [ 4346 | { 4347 | "expression": { 4348 | "argumentTypes": null, 4349 | "arguments": [ 4350 | { 4351 | "argumentTypes": null, 4352 | "id": 168, 4353 | "name": "_owner", 4354 | "nodeType": "Identifier", 4355 | "overloadedDeclarations": [], 4356 | "referencedDeclaration": 3, 4357 | "src": "2147:6:0", 4358 | "typeDescriptions": { 4359 | "typeIdentifier": "t_address", 4360 | "typeString": "address" 4361 | } 4362 | } 4363 | ], 4364 | "expression": { 4365 | "argumentTypes": [ 4366 | { 4367 | "typeIdentifier": "t_address", 4368 | "typeString": "address" 4369 | } 4370 | ], 4371 | "id": 167, 4372 | "name": "selfdestruct", 4373 | "nodeType": "Identifier", 4374 | "overloadedDeclarations": [], 4375 | "referencedDeclaration": 590, 4376 | "src": "2134:12:0", 4377 | "typeDescriptions": { 4378 | "typeIdentifier": "t_function_selfdestruct_nonpayable$_t_address_$returns$__$", 4379 | "typeString": "function (address)" 4380 | } 4381 | }, 4382 | "id": 169, 4383 | "isConstant": false, 4384 | "isLValue": false, 4385 | "isPure": false, 4386 | "kind": "functionCall", 4387 | "lValueRequested": false, 4388 | "names": [], 4389 | "nodeType": "FunctionCall", 4390 | "src": "2134:20:0", 4391 | "typeDescriptions": { 4392 | "typeIdentifier": "t_tuple$__$", 4393 | "typeString": "tuple()" 4394 | } 4395 | }, 4396 | "id": 170, 4397 | "nodeType": "ExpressionStatement", 4398 | "src": "2134:20:0" 4399 | } 4400 | ] 4401 | } 4402 | } 4403 | ] 4404 | }, 4405 | "documentation": null, 4406 | "id": 174, 4407 | "implemented": true, 4408 | "isConstructor": false, 4409 | "isDeclaredConst": false, 4410 | "modifiers": [], 4411 | "name": "adminDeleteRegistry", 4412 | "nodeType": "FunctionDefinition", 4413 | "parameters": { 4414 | "id": 161, 4415 | "nodeType": "ParameterList", 4416 | "parameters": [], 4417 | "src": "2076:2:0" 4418 | }, 4419 | "payable": false, 4420 | "returnParameters": { 4421 | "id": 162, 4422 | "nodeType": "ParameterList", 4423 | "parameters": [], 4424 | "src": "2086:0:0" 4425 | }, 4426 | "scope": 175, 4427 | "src": "2048:123:0", 4428 | "stateMutability": "nonpayable", 4429 | "superFunction": null, 4430 | "visibility": "public" 4431 | } 4432 | ], 4433 | "scope": 176, 4434 | "src": "26:2148:0" 4435 | } 4436 | ], 4437 | "src": "0:2175:0" 4438 | }, 4439 | "compiler": { 4440 | "name": "solc", 4441 | "version": "0.4.24+commit.e67f0147.Emscripten.clang" 4442 | }, 4443 | "networks": { 4444 | "5777": { 4445 | "events": {}, 4446 | "links": {}, 4447 | "address": "0xa25b1c8d99a9f43a71a7873ae29587e9ebb9dade", 4448 | "transactionHash": "0x6eb167a41d583ff4a48c1823720bcfe1053cdafb14ded635200caf2e2a005ca4" 4449 | } 4450 | }, 4451 | "schemaVersion": "2.0.1", 4452 | "updatedAt": "2018-07-25T11:39:08.717Z" 4453 | } 4454 | -------------------------------------------------------------------------------- /app/truffle/contracts/CallableEvents.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.24; 2 | 3 | contract CallableEvents { 4 | 5 | address _owner; 6 | 7 | // Event allowing listening to newly signed Accounts (?) 8 | event CalledTrigger1 (address indexed from); 9 | event CalledTrigger2 (address indexed from, uint256 value); 10 | event CalledTrigger3 (address indexed from, uint256 val1, uint256 val2); 11 | event CalledTrigger4 (uint256 val1, uint256 val2); 12 | event CalledTrigger5 (uint256 indexed val1, uint256 indexed val2); 13 | event CalledTrigger6 (address from, uint256 timestamp, uint256 blockNumber); 14 | event MoneyReceived (address indexed from, uint256 value); 15 | 16 | function contractExists () public pure returns (bool result){ 17 | return true; 18 | } 19 | 20 | // Administrative below 21 | constructor() public { 22 | _owner = msg.sender; 23 | } 24 | 25 | function triggerEvent1() public { 26 | emit CalledTrigger1(msg.sender); 27 | } 28 | 29 | function triggerEvent2() public { 30 | uint256 myVal = 9999; 31 | emit CalledTrigger2(msg.sender, myVal); 32 | } 33 | 34 | function triggerEvent3() public { 35 | uint256 myVal = 9999; 36 | emit CalledTrigger3(msg.sender, myVal, myVal); 37 | } 38 | 39 | function triggerEvent4() public { 40 | uint256 myVal = 9999; 41 | emit CalledTrigger4(myVal, myVal); 42 | } 43 | 44 | function triggerEvent5() public { 45 | uint256 myVal = 9999; 46 | emit CalledTrigger5(myVal, myVal); 47 | } 48 | 49 | // Timestamp could be modified by miner. 50 | // For time critical events you should only rely on block number. 51 | // See: https://ethereum.stackexchange.com/a/9859/852 52 | function triggerEvent6() public { 53 | emit CalledTrigger6(msg.sender, unixTime(), block.number); 54 | } 55 | 56 | function () public payable { 57 | emit MoneyReceived(msg.sender, msg.value); 58 | } 59 | 60 | /** 61 | * Returns Unix Timestamp 62 | * E.g: https://www.unixtimestamp.com 63 | */ 64 | function unixTime() internal view returns (uint256){ 65 | return now; 66 | } 67 | 68 | 69 | // function getTheMoney() public { 70 | // if (msg.sender == _owner) { 71 | // _owner.transfer(address(this).balance); 72 | // } 73 | // } 74 | 75 | function adminDeleteRegistry() public { 76 | if (msg.sender == _owner) { 77 | selfdestruct(_owner); 78 | } 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /docker-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | /usr/local/bin/php /opt/local/php-ethereum-listener/infinite-blockProcessor-example.php 2>&1 4 | --------------------------------------------------------------------------------