Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 internal transaction
Advanced mode:
Parent Txn Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
2033789 | 2789 days ago | 42 wei |
Loading...
Loading
Contract Name:
ReversibleDemo
Compiler Version
v0.3.5-2016-08-07-f7af7de
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2016-08-08 */ // `interface` would make a nice keyword ;) contract TheDaoHardForkOracle { // `ran()` manually verified true on both ETH and ETC chains function forked() constant returns (bool); } // demostrates calling own function in a "reversible" manner /* important lines are marked by multi-line comments */ contract ReversibleDemo { // counters (all public to simplify inspection) uint public numcalls; uint public numcallsinternal; address owner; // needed for "naive" and "oraclized" checks address constant withdrawdaoaddr = 0xbf4ed7b27f1d666546e30d74d50d173d20bca754; TheDaoHardForkOracle oracle = TheDaoHardForkOracle(0xe8e506306ddb78ee38c9b0d86c257bd97c2536b3); event logCall(uint indexed _numcalls, uint indexed _numcallsinternal); modifier onlyOwner { if (msg.sender != owner) throw; _ } modifier onlyThis { if (msg.sender != address(this)) throw; _ } // constructor (setting `owner` allows later termination) function ReversibleDemo() { owner = msg.sender; } /* external: increments stack height */ /* onlyThis: prevent actual external calling */ function sendIfNotForked() external onlyThis returns (bool) { numcallsinternal++; /* naive check for "is this the classic chain" */ // guaranteed `true`: enough has been withdrawn already // three million ------> 3'000'000 if (withdrawdaoaddr.balance < 3000000 ether) { /* intentionally not checking return value */ owner.send(42); } /* "reverse" if it's actually the HF chain */ if (oracle.forked()) throw; // not exactly a "success": send() could have failed on classic return true; } // accepts value transfers function doCall(uint _gas) onlyOwner { numcalls++; // if it throws, there won't be any return value on the stack :/ this.sendIfNotForked.gas(_gas)(); logCall(numcalls, numcallsinternal); } function selfDestruct() onlyOwner { selfdestruct(owner); } // reject value trasfers function() { throw; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"numcalls","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"numcallsinternal","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[],"name":"sendIfNotForked","outputs":[{"name":"","type":"bool"}],"type":"function"},{"constant":false,"inputs":[],"name":"selfDestruct","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_gas","type":"uint256"}],"name":"doCall","outputs":[],"type":"function"},{"inputs":[],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_numcalls","type":"uint256"},{"indexed":true,"name":"_numcallsinternal","type":"uint256"}],"name":"logCall","type":"event"}]
Contract Creation Code
606060405260038054600160a060020a03191673e8e506306ddb78ee38c9b0d86c257bd97c2536b317905560028054600160a060020a031916331790556102528061004a6000396000f36060604052361561004b5760e060020a60003504636e8b7c2381146100535780638f2591171461005c5780639c6034a7146100655780639cb8a26a1461008a578063f1bca7a4146100a8575b6100c9610002565b6100cb60005481565b6100cb60015481565b6100dd600030600160a060020a031633600160a060020a03161415156100f757610002565b6100c960025433600160a060020a039081169116146101ad57610002565b6100c960043560025433600160a060020a039081169116146101bb57610002565b005b60408051918252519081900360200190f35b604080519115158252519081900360200190f35b50600190565b60018054810190556a027b46536c66c8e300000073bf4ed7b27f1d666546e30d74d50d173d20bca75431101561014e57600254604051600160a060020a039190911690600090602a9082818181858883f150505050505b600360009054906101000a9004600160a060020a0316600160a060020a03166316c727216040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050604051511590506100f157610002565b600254600160a060020a0316ff5b600080546001018155604080517f9c6034a7000000000000000000000000000000000000000000000000000000008152905130600160a060020a031692639c6034a79285926004828101936020938390039091019082908887f115610002575050604051600154600080549194509092507fe187a550592d0937aaaf3d9b82a1798666ec120c2af2d58f114ff1f6faaaa96e91a35056
Deployed Bytecode
0x6060604052361561004b5760e060020a60003504636e8b7c2381146100535780638f2591171461005c5780639c6034a7146100655780639cb8a26a1461008a578063f1bca7a4146100a8575b6100c9610002565b6100cb60005481565b6100cb60015481565b6100dd600030600160a060020a031633600160a060020a03161415156100f757610002565b6100c960025433600160a060020a039081169116146101ad57610002565b6100c960043560025433600160a060020a039081169116146101bb57610002565b005b60408051918252519081900360200190f35b604080519115158252519081900360200190f35b50600190565b60018054810190556a027b46536c66c8e300000073bf4ed7b27f1d666546e30d74d50d173d20bca75431101561014e57600254604051600160a060020a039190911690600090602a9082818181858883f150505050505b600360009054906101000a9004600160a060020a0316600160a060020a03166316c727216040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050604051511590506100f157610002565b600254600160a060020a0316ff5b600080546001018155604080517f9c6034a7000000000000000000000000000000000000000000000000000000008152905130600160a060020a031692639c6034a79285926004828101936020938390039091019082908887f115610002575050604051600154600080549194509092507fe187a550592d0937aaaf3d9b82a1798666ec120c2af2d58f114ff1f6faaaa96e91a35056
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 24 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.