ETH Price: $3,334.70 (-3.36%)

Contract

0x4A6cE97a84178A84c1CEE46a763Db619D0e6e413
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x6080604065927922018-10-27 11:12:592222 days ago1540638779IN
 Create: Kernel
0 ETH0.018512896

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Kernel

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-10-28
*/

pragma solidity 0.4.24;
// File: contracts/acl/IACL.sol
/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.4.24;


interface IACL {
    function initialize(address permissionsCreator) external;

    // TODO: this should be external
    // See https://github.com/ethereum/solidity/issues/4832
    function hasPermission(address who, address where, bytes32 what, bytes how) public view returns (bool);
}
// File: contracts/common/IVaultRecoverable.sol
/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.4.24;


interface IVaultRecoverable {
    function transferToVault(address token) external;

    function allowRecoverability(address token) external view returns (bool);
    function getRecoveryVault() external view returns (address);
}
// File: contracts/kernel/IKernel.sol
/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.4.24;




// This should be an interface, but interfaces can't inherit yet :(
contract IKernel is IVaultRecoverable {
    event SetApp(bytes32 indexed namespace, bytes32 indexed appId, address app);

    function acl() public view returns (IACL);
    function hasPermission(address who, address where, bytes32 what, bytes how) public view returns (bool);

    function setApp(bytes32 namespace, bytes32 appId, address app) public;
    function getApp(bytes32 namespace, bytes32 appId) public view returns (address);
}
// File: contracts/kernel/KernelConstants.sol
/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.4.24;


contract KernelAppIds {
    /* Hardcoded constants to save gas
    bytes32 internal constant KERNEL_CORE_APP_ID = apmNamehash("kernel");
    bytes32 internal constant KERNEL_DEFAULT_ACL_APP_ID = apmNamehash("acl");
    bytes32 internal constant KERNEL_DEFAULT_VAULT_APP_ID = apmNamehash("vault");
    */
    bytes32 internal constant KERNEL_CORE_APP_ID = 0x3b4bf6bf3ad5000ecf0f989d5befde585c6860fea3e574a4fab4c49d1c177d9c;
    bytes32 internal constant KERNEL_DEFAULT_ACL_APP_ID = 0xe3262375f45a6e2026b7e7b18c2b807434f2508fe1a2a3dfb493c7df8f4aad6a;
    bytes32 internal constant KERNEL_DEFAULT_VAULT_APP_ID = 0x7e852e0fcfce6551c13800f1e7476f982525c2b5277ba14b24339c68416336d1;
}


contract KernelNamespaceConstants {
    /* Hardcoded constants to save gas
    bytes32 internal constant KERNEL_CORE_NAMESPACE = keccak256("core");
    bytes32 internal constant KERNEL_APP_BASES_NAMESPACE = keccak256("base");
    bytes32 internal constant KERNEL_APP_ADDR_NAMESPACE = keccak256("app");
    */
    bytes32 internal constant KERNEL_CORE_NAMESPACE = 0xc681a85306374a5ab27f0bbc385296a54bcd314a1948b6cf61c4ea1bc44bb9f8;
    bytes32 internal constant KERNEL_APP_BASES_NAMESPACE = 0xf1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f;
    bytes32 internal constant KERNEL_APP_ADDR_NAMESPACE = 0xd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb;
}
// File: contracts/kernel/KernelStorage.sol
contract KernelStorage {
    // namespace => app id => address
    mapping (bytes32 => mapping (bytes32 => address)) public apps;
    bytes32 public recoveryVaultAppId;
}
// File: contracts/acl/ACLSyntaxSugar.sol
/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.4.24;


contract ACLSyntaxSugar {
    function arr() internal pure returns (uint256[]) {}

    function arr(bytes32 _a) internal pure returns (uint256[] r) {
        return arr(uint256(_a));
    }

    function arr(bytes32 _a, bytes32 _b) internal pure returns (uint256[] r) {
        return arr(uint256(_a), uint256(_b));
    }

    function arr(address _a) internal pure returns (uint256[] r) {
        return arr(uint256(_a));
    }

    function arr(address _a, address _b) internal pure returns (uint256[] r) {
        return arr(uint256(_a), uint256(_b));
    }

    function arr(address _a, uint256 _b, uint256 _c) internal pure returns (uint256[] r) {
        return arr(uint256(_a), _b, _c);
    }

    function arr(address _a, uint256 _b, uint256 _c, uint256 _d) internal pure returns (uint256[] r) {
        return arr(uint256(_a), _b, _c, _d);
    }

    function arr(address _a, uint256 _b) internal pure returns (uint256[] r) {
        return arr(uint256(_a), uint256(_b));
    }

    function arr(address _a, address _b, uint256 _c, uint256 _d, uint256 _e) internal pure returns (uint256[] r) {
        return arr(uint256(_a), uint256(_b), _c, _d, _e);
    }

    function arr(address _a, address _b, address _c) internal pure returns (uint256[] r) {
        return arr(uint256(_a), uint256(_b), uint256(_c));
    }

    function arr(address _a, address _b, uint256 _c) internal pure returns (uint256[] r) {
        return arr(uint256(_a), uint256(_b), uint256(_c));
    }

    function arr(uint256 _a) internal pure returns (uint256[] r) {
        r = new uint256[](1);
        r[0] = _a;
    }

    function arr(uint256 _a, uint256 _b) internal pure returns (uint256[] r) {
        r = new uint256[](2);
        r[0] = _a;
        r[1] = _b;
    }

    function arr(uint256 _a, uint256 _b, uint256 _c) internal pure returns (uint256[] r) {
        r = new uint256[](3);
        r[0] = _a;
        r[1] = _b;
        r[2] = _c;
    }

    function arr(uint256 _a, uint256 _b, uint256 _c, uint256 _d) internal pure returns (uint256[] r) {
        r = new uint256[](4);
        r[0] = _a;
        r[1] = _b;
        r[2] = _c;
        r[3] = _d;
    }

    function arr(uint256 _a, uint256 _b, uint256 _c, uint256 _d, uint256 _e) internal pure returns (uint256[] r) {
        r = new uint256[](5);
        r[0] = _a;
        r[1] = _b;
        r[2] = _c;
        r[3] = _d;
        r[4] = _e;
    }
}


contract ACLHelpers {
    function decodeParamOp(uint256 _x) internal pure returns (uint8 b) {
        return uint8(_x >> (8 * 30));
    }

    function decodeParamId(uint256 _x) internal pure returns (uint8 b) {
        return uint8(_x >> (8 * 31));
    }

    function decodeParamsList(uint256 _x) internal pure returns (uint32 a, uint32 b, uint32 c) {
        a = uint32(_x);
        b = uint32(_x >> (8 * 4));
        c = uint32(_x >> (8 * 8));
    }
}
// File: contracts/lib/misc/ERCProxy.sol
/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.4.24;


contract ERCProxy {
    uint256 internal constant FORWARDING = 1;
    uint256 internal constant UPGRADEABLE = 2;

    function proxyType() public pure returns (uint256 proxyTypeId);
    function implementation() public view returns (address codeAddr);
}
// File: contracts/common/IsContract.sol
/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.4.24;


contract IsContract {
    /*
    * NOTE: this should NEVER be used for authentication
    * (see pitfalls: https://github.com/fergarrui/ethereum-security/tree/master/contracts/extcodesize).
    *
    * This is only intended to be used as a sanity check that an address is actually a contract,
    * RATHER THAN an address not being a contract.
    */
    function isContract(address _target) internal view returns (bool) {
        if (_target == address(0)) {
            return false;
        }

        uint256 size;
        assembly { size := extcodesize(_target) }
        return size > 0;
    }
}
// File: contracts/common/UnstructuredStorage.sol
/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.4.24;


library UnstructuredStorage {
    function getStorageBool(bytes32 position) internal view returns (bool data) {
        assembly { data := sload(position) }
    }

    function getStorageAddress(bytes32 position) internal view returns (address data) {
        assembly { data := sload(position) }
    }

    function getStorageBytes32(bytes32 position) internal view returns (bytes32 data) {
        assembly { data := sload(position) }
    }

    function getStorageUint256(bytes32 position) internal view returns (uint256 data) {
        assembly { data := sload(position) }
    }

    function setStorageBool(bytes32 position, bool data) internal {
        assembly { sstore(position, data) }
    }

    function setStorageAddress(bytes32 position, address data) internal {
        assembly { sstore(position, data) }
    }

    function setStorageBytes32(bytes32 position, bytes32 data) internal {
        assembly { sstore(position, data) }
    }

    function setStorageUint256(bytes32 position, uint256 data) internal {
        assembly { sstore(position, data) }
    }
}
// File: contracts/common/Uint256Helpers.sol
library Uint256Helpers {
    uint256 private constant MAX_UINT64 = uint64(-1);

    string private constant ERROR_NUMBER_TOO_BIG = "UINT64_NUMBER_TOO_BIG";

    function toUint64(uint256 a) internal pure returns (uint64) {
        require(a <= MAX_UINT64, ERROR_NUMBER_TOO_BIG);
        return uint64(a);
    }
}
// File: contracts/common/TimeHelpers.sol
/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.4.24;



contract TimeHelpers {
    using Uint256Helpers for uint256;

    /**
    * @dev Returns the current block number.
    *      Using a function rather than `block.number` allows us to easily mock the block number in
    *      tests.
    */
    function getBlockNumber() internal view returns (uint256) {
        return block.number;
    }

    /**
    * @dev Returns the current block number, converted to uint64.
    *      Using a function rather than `block.number` allows us to easily mock the block number in
    *      tests.
    */
    function getBlockNumber64() internal view returns (uint64) {
        return getBlockNumber().toUint64();
    }

    /**
    * @dev Returns the current timestamp.
    *      Using a function rather than `block.timestamp` allows us to easily mock it in
    *      tests.
    */
    function getTimestamp() internal view returns (uint256) {
        return block.timestamp; // solium-disable-line security/no-block-members
    }

    /**
    * @dev Returns the current timestamp, converted to uint64.
    *      Using a function rather than `block.timestamp` allows us to easily mock it in
    *      tests.
    */
    function getTimestamp64() internal view returns (uint64) {
        return getTimestamp().toUint64();
    }
}
// File: contracts/common/Initializable.sol
/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.4.24;




contract Initializable is TimeHelpers {
    using UnstructuredStorage for bytes32;

    // keccak256("aragonOS.initializable.initializationBlock")
    bytes32 internal constant INITIALIZATION_BLOCK_POSITION = 0xebb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e;

    string private constant ERROR_ALREADY_INITIALIZED = "INIT_ALREADY_INITIALIZED";
    string private constant ERROR_NOT_INITIALIZED = "INIT_NOT_INITIALIZED";

    modifier onlyInit {
        require(getInitializationBlock() == 0, ERROR_ALREADY_INITIALIZED);
        _;
    }

    modifier isInitialized {
        require(hasInitialized(), ERROR_NOT_INITIALIZED);
        _;
    }

    /**
    * @return Block number in which the contract was initialized
    */
    function getInitializationBlock() public view returns (uint256) {
        return INITIALIZATION_BLOCK_POSITION.getStorageUint256();
    }

    /**
    * @return Whether the contract has been initialized by the time of the current block
    */
    function hasInitialized() public view returns (bool) {
        uint256 initializationBlock = getInitializationBlock();
        return initializationBlock != 0 && getBlockNumber() >= initializationBlock;
    }

    /**
    * @dev Function to be called by top level contract after initialization has finished.
    */
    function initialized() internal onlyInit {
        INITIALIZATION_BLOCK_POSITION.setStorageUint256(getBlockNumber());
    }

    /**
    * @dev Function to be called by top level contract after initialization to enable the contract
    *      at a future block number rather than immediately.
    */
    function initializedAt(uint256 _blockNumber) internal onlyInit {
        INITIALIZATION_BLOCK_POSITION.setStorageUint256(_blockNumber);
    }
}
// File: contracts/common/Petrifiable.sol
/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.4.24;



contract Petrifiable is Initializable {
    // Use block UINT256_MAX (which should be never) as the initializable date
    uint256 internal constant PETRIFIED_BLOCK = uint256(-1);

    function isPetrified() public view returns (bool) {
        return getInitializationBlock() == PETRIFIED_BLOCK;
    }

    /**
    * @dev Function to be called by top level contract to prevent being initialized.
    *      Useful for freezing base contracts when they're used behind proxies.
    */
    function petrify() internal onlyInit {
        initializedAt(PETRIFIED_BLOCK);
    }
}
// File: contracts/lib/token/ERC20.sol
// See https://github.com/OpenZeppelin/openzeppelin-solidity/blob/a9f910d34f0ab33a1ae5e714f69f9596a02b4d91/contracts/token/ERC20/ERC20.sol

pragma solidity ^0.4.24;


/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 {
    function totalSupply() public view returns (uint256);

    function balanceOf(address _who) public view returns (uint256);

    function allowance(address _owner, address _spender)
        public view returns (uint256);

    function transfer(address _to, uint256 _value) public returns (bool);

    function approve(address _spender, uint256 _value)
        public returns (bool);

    function transferFrom(address _from, address _to, uint256 _value)
        public returns (bool);

    event Transfer(
        address indexed from,
        address indexed to,
        uint256 value
    );

    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
}
// File: contracts/common/EtherTokenConstant.sol
/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.4.24;


// aragonOS and aragon-apps rely on address(0) to denote native ETH, in
// contracts where both tokens and ETH are accepted
contract EtherTokenConstant {
    address internal constant ETH = address(0);
}
// File: contracts/common/VaultRecoverable.sol
/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.4.24;






contract VaultRecoverable is IVaultRecoverable, EtherTokenConstant, IsContract {
    string private constant ERROR_DISALLOWED = "RECOVER_DISALLOWED";
    string private constant ERROR_VAULT_NOT_CONTRACT = "RECOVER_VAULT_NOT_CONTRACT";

    /**
     * @notice Send funds to recovery Vault. This contract should never receive funds,
     *         but in case it does, this function allows one to recover them.
     * @param _token Token balance to be sent to recovery vault.
     */
    function transferToVault(address _token) external {
        require(allowRecoverability(_token), ERROR_DISALLOWED);
        address vault = getRecoveryVault();
        require(isContract(vault), ERROR_VAULT_NOT_CONTRACT);

        if (_token == ETH) {
            vault.transfer(address(this).balance);
        } else {
            uint256 amount = ERC20(_token).balanceOf(this);
            ERC20(_token).transfer(vault, amount);
        }
    }

    /**
    * @dev By default deriving from AragonApp makes it recoverable
    * @param token Token address that would be recovered
    * @return bool whether the app allows the recovery
    */
    function allowRecoverability(address token) public view returns (bool) {
        return true;
    }

    // Cast non-implemented interface to be public so we can use it internally
    function getRecoveryVault() public view returns (address);
}
// File: contracts/apps/AppStorage.sol
/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.4.24;




contract AppStorage {
    using UnstructuredStorage for bytes32;

    /* Hardcoded constants to save gas
    bytes32 internal constant KERNEL_POSITION = keccak256("aragonOS.appStorage.kernel");
    bytes32 internal constant APP_ID_POSITION = keccak256("aragonOS.appStorage.appId");
    */
    bytes32 internal constant KERNEL_POSITION = 0x4172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137b;
    bytes32 internal constant APP_ID_POSITION = 0xd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b;

    function kernel() public view returns (IKernel) {
        return IKernel(KERNEL_POSITION.getStorageAddress());
    }

    function appId() public view returns (bytes32) {
        return APP_ID_POSITION.getStorageBytes32();
    }

    function setKernel(IKernel _kernel) internal {
        KERNEL_POSITION.setStorageAddress(address(_kernel));
    }

    function setAppId(bytes32 _appId) internal {
        APP_ID_POSITION.setStorageBytes32(_appId);
    }
}
// File: contracts/common/DelegateProxy.sol
contract DelegateProxy is ERCProxy, IsContract {
    uint256 internal constant FWD_GAS_LIMIT = 10000;

    /**
    * @dev Performs a delegatecall and returns whatever the delegatecall returned (entire context execution will return!)
    * @param _dst Destination address to perform the delegatecall
    * @param _calldata Calldata for the delegatecall
    */
    function delegatedFwd(address _dst, bytes _calldata) internal {
        require(isContract(_dst));
        uint256 fwdGasLimit = FWD_GAS_LIMIT;

        assembly {
            let result := delegatecall(sub(gas, fwdGasLimit), _dst, add(_calldata, 0x20), mload(_calldata), 0, 0)
            let size := returndatasize
            let ptr := mload(0x40)
            returndatacopy(ptr, 0, size)

            // revert instead of invalid() bc if the underlying call failed with invalid() it already wasted gas.
            // if the call returned error data, forward it
            switch result case 0 { revert(ptr, size) }
            default { return(ptr, size) }
        }
    }
}
// File: contracts/common/DepositableStorage.sol
contract DepositableStorage {
    using UnstructuredStorage for bytes32;

    // keccak256("aragonOS.depositableStorage.depositable")
    bytes32 internal constant DEPOSITABLE_POSITION = 0x665fd576fbbe6f247aff98f5c94a561e3f71ec2d3c988d56f12d342396c50cea;

    function isDepositable() public view returns (bool) {
        return DEPOSITABLE_POSITION.getStorageBool();
    }

    function setDepositable(bool _depositable) internal {
        DEPOSITABLE_POSITION.setStorageBool(_depositable);
    }
}
// File: contracts/common/DepositableDelegateProxy.sol
contract DepositableDelegateProxy is DepositableStorage, DelegateProxy {
    event ProxyDeposit(address sender, uint256 value);

    function () external payable {
        // send / transfer
        if (gasleft() < FWD_GAS_LIMIT) {
            require(msg.value > 0 && msg.data.length == 0);
            require(isDepositable());
            emit ProxyDeposit(msg.sender, msg.value);
        } else { // all calls except for send or transfer
            address target = implementation();
            delegatedFwd(target, msg.data);
        }
    }
}
// File: contracts/apps/AppProxyBase.sol
contract AppProxyBase is AppStorage, DepositableDelegateProxy, KernelNamespaceConstants {
    /**
    * @dev Initialize AppProxy
    * @param _kernel Reference to organization kernel for the app
    * @param _appId Identifier for app
    * @param _initializePayload Payload for call to be made after setup to initialize
    */
    constructor(IKernel _kernel, bytes32 _appId, bytes _initializePayload) public {
        setKernel(_kernel);
        setAppId(_appId);

        // Implicit check that kernel is actually a Kernel
        // The EVM doesn't actually provide a way for us to make sure, but we can force a revert to
        // occur if the kernel is set to 0x0 or a non-code address when we try to call a method on
        // it.
        address appCode = getAppBase(_appId);

        // If initialize payload is provided, it will be executed
        if (_initializePayload.length > 0) {
            require(isContract(appCode));
            // Cannot make delegatecall as a delegateproxy.delegatedFwd as it
            // returns ending execution context and halts contract deployment
            require(appCode.delegatecall(_initializePayload));
        }
    }

    function getAppBase(bytes32 _appId) internal view returns (address) {
        return kernel().getApp(KERNEL_APP_BASES_NAMESPACE, _appId);
    }
}
// File: contracts/apps/AppProxyUpgradeable.sol
contract AppProxyUpgradeable is AppProxyBase {
    /**
    * @dev Initialize AppProxyUpgradeable (makes it an upgradeable Aragon app)
    * @param _kernel Reference to organization kernel for the app
    * @param _appId Identifier for app
    * @param _initializePayload Payload for call to be made after setup to initialize
    */
    constructor(IKernel _kernel, bytes32 _appId, bytes _initializePayload)
        AppProxyBase(_kernel, _appId, _initializePayload)
        public // solium-disable-line visibility-first
    {

    }

    /**
     * @dev ERC897, the address the proxy would delegate calls to
     */
    function implementation() public view returns (address) {
        return getAppBase(appId());
    }

    /**
     * @dev ERC897, whether it is a forwarding (1) or an upgradeable (2) proxy
     */
    function proxyType() public pure returns (uint256 proxyTypeId) {
        return UPGRADEABLE;
    }
}
// File: contracts/apps/AppProxyPinned.sol
contract AppProxyPinned is IsContract, AppProxyBase {
    using UnstructuredStorage for bytes32;

    // keccak256("aragonOS.appStorage.pinnedCode")
    bytes32 internal constant PINNED_CODE_POSITION = 0xdee64df20d65e53d7f51cb6ab6d921a0a6a638a91e942e1d8d02df28e31c038e;

    /**
    * @dev Initialize AppProxyPinned (makes it an un-upgradeable Aragon app)
    * @param _kernel Reference to organization kernel for the app
    * @param _appId Identifier for app
    * @param _initializePayload Payload for call to be made after setup to initialize
    */
    constructor(IKernel _kernel, bytes32 _appId, bytes _initializePayload)
        AppProxyBase(_kernel, _appId, _initializePayload)
        public // solium-disable-line visibility-first
    {
        setPinnedCode(getAppBase(_appId));
        require(isContract(pinnedCode()));
    }

    /**
     * @dev ERC897, the address the proxy would delegate calls to
     */
    function implementation() public view returns (address) {
        return pinnedCode();
    }

    /**
     * @dev ERC897, whether it is a forwarding (1) or an upgradeable (2) proxy
     */
    function proxyType() public pure returns (uint256 proxyTypeId) {
        return FORWARDING;
    }

    function setPinnedCode(address _pinnedCode) internal {
        PINNED_CODE_POSITION.setStorageAddress(_pinnedCode);
    }

    function pinnedCode() internal view returns (address) {
        return PINNED_CODE_POSITION.getStorageAddress();
    }
}
// File: contracts/factory/AppProxyFactory.sol
contract AppProxyFactory {
    event NewAppProxy(address proxy, bool isUpgradeable, bytes32 appId);

    function newAppProxy(IKernel _kernel, bytes32 _appId) public returns (AppProxyUpgradeable) {
        return newAppProxy(_kernel, _appId, new bytes(0));
    }

    function newAppProxy(IKernel _kernel, bytes32 _appId, bytes _initializePayload) public returns (AppProxyUpgradeable) {
        AppProxyUpgradeable proxy = new AppProxyUpgradeable(_kernel, _appId, _initializePayload);
        emit NewAppProxy(address(proxy), true, _appId);
        return proxy;
    }

    function newAppProxyPinned(IKernel _kernel, bytes32 _appId) public returns (AppProxyPinned) {
        return newAppProxyPinned(_kernel, _appId, new bytes(0));
    }

    function newAppProxyPinned(IKernel _kernel, bytes32 _appId, bytes _initializePayload) public returns (AppProxyPinned) {
        AppProxyPinned proxy = new AppProxyPinned(_kernel, _appId, _initializePayload);
        emit NewAppProxy(address(proxy), false, _appId);
        return proxy;
    }
}
// File: contracts/kernel/Kernel.sol
// solium-disable-next-line max-len
contract Kernel is IKernel, KernelStorage, KernelAppIds, KernelNamespaceConstants, Petrifiable, IsContract, VaultRecoverable, AppProxyFactory, ACLSyntaxSugar {
    /* Hardcoded constants to save gas
    bytes32 public constant APP_MANAGER_ROLE = keccak256("APP_MANAGER_ROLE");
    */
    bytes32 public constant APP_MANAGER_ROLE = 0xb6d92708f3d4817afc106147d969e229ced5c46e65e0a5002a0d391287762bd0;

    string private constant ERROR_APP_NOT_CONTRACT = "KERNEL_APP_NOT_CONTRACT";
    string private constant ERROR_INVALID_APP_CHANGE = "KERNEL_INVALID_APP_CHANGE";
    string private constant ERROR_AUTH_FAILED = "KERNEL_AUTH_FAILED";

    /**
    * @dev Constructor that allows the deployer to choose if the base instance should be petrified immediately.
    * @param _shouldPetrify Immediately petrify this instance so that it can never be initialized
    */
    constructor(bool _shouldPetrify) public {
        if (_shouldPetrify) {
            petrify();
        }
    }

    /**
    * @dev Initialize can only be called once. It saves the block number in which it was initialized.
    * @notice Initializes a kernel instance along with its ACL and sets `_permissionsCreator` as the entity that can create other permissions
    * @param _baseAcl Address of base ACL app
    * @param _permissionsCreator Entity that will be given permission over createPermission
    */
    function initialize(IACL _baseAcl, address _permissionsCreator) public onlyInit {
        initialized();

        // Set ACL base
        _setApp(KERNEL_APP_BASES_NAMESPACE, KERNEL_DEFAULT_ACL_APP_ID, _baseAcl);

        // Create ACL instance and attach it as the default ACL app
        IACL acl = IACL(newAppProxy(this, KERNEL_DEFAULT_ACL_APP_ID));
        acl.initialize(_permissionsCreator);
        _setApp(KERNEL_APP_ADDR_NAMESPACE, KERNEL_DEFAULT_ACL_APP_ID, acl);

        recoveryVaultAppId = KERNEL_DEFAULT_VAULT_APP_ID;
    }

    /**
    * @dev Create a new instance of an app linked to this kernel
    * @notice Create a new upgradeable instance of `_appId` app linked to the Kernel, setting its code to `_appBase`
    * @param _appId Identifier for app
    * @param _appBase Address of the app's base implementation
    * @return AppProxy instance
    */
    function newAppInstance(bytes32 _appId, address _appBase)
        public
        auth(APP_MANAGER_ROLE, arr(KERNEL_APP_BASES_NAMESPACE, _appId))
        returns (ERCProxy appProxy)
    {
        return newAppInstance(_appId, _appBase, new bytes(0), false);
    }

    /**
    * @dev Create a new instance of an app linked to this kernel and set its base
    *      implementation if it was not already set
    * @notice Create a new upgradeable instance of `_appId` app linked to the Kernel, setting its code to `_appBase`. `_setDefault ? 'Also sets it as the default app instance.':''`
    * @param _appId Identifier for app
    * @param _appBase Address of the app's base implementation
    * @param _initializePayload Payload for call made by the proxy during its construction to initialize
    * @param _setDefault Whether the app proxy app is the default one.
    *        Useful when the Kernel needs to know of an instance of a particular app,
    *        like Vault for escape hatch mechanism.
    * @return AppProxy instance
    */
    function newAppInstance(bytes32 _appId, address _appBase, bytes _initializePayload, bool _setDefault)
        public
        auth(APP_MANAGER_ROLE, arr(KERNEL_APP_BASES_NAMESPACE, _appId))
        returns (ERCProxy appProxy)
    {
        _setAppIfNew(KERNEL_APP_BASES_NAMESPACE, _appId, _appBase);
        appProxy = newAppProxy(this, _appId, _initializePayload);
        // By calling setApp directly and not the internal functions, we make sure the params are checked
        // and it will only succeed if sender has permissions to set something to the namespace.
        if (_setDefault) {
            setApp(KERNEL_APP_ADDR_NAMESPACE, _appId, appProxy);
        }
    }

    /**
    * @dev Create a new pinned instance of an app linked to this kernel
    * @notice Create a new non-upgradeable instance of `_appId` app linked to the Kernel, setting its code to `_appBase`.
    * @param _appId Identifier for app
    * @param _appBase Address of the app's base implementation
    * @return AppProxy instance
    */
    function newPinnedAppInstance(bytes32 _appId, address _appBase)
        public
        auth(APP_MANAGER_ROLE, arr(KERNEL_APP_BASES_NAMESPACE, _appId))
        returns (ERCProxy appProxy)
    {
        return newPinnedAppInstance(_appId, _appBase, new bytes(0), false);
    }

    /**
    * @dev Create a new pinned instance of an app linked to this kernel and set
    *      its base implementation if it was not already set
    * @notice Create a new non-upgradeable instance of `_appId` app linked to the Kernel, setting its code to `_appBase`. `_setDefault ? 'Also sets it as the default app instance.':''`
    * @param _appId Identifier for app
    * @param _appBase Address of the app's base implementation
    * @param _initializePayload Payload for call made by the proxy during its construction to initialize
    * @param _setDefault Whether the app proxy app is the default one.
    *        Useful when the Kernel needs to know of an instance of a particular app,
    *        like Vault for escape hatch mechanism.
    * @return AppProxy instance
    */
    function newPinnedAppInstance(bytes32 _appId, address _appBase, bytes _initializePayload, bool _setDefault)
        public
        auth(APP_MANAGER_ROLE, arr(KERNEL_APP_BASES_NAMESPACE, _appId))
        returns (ERCProxy appProxy)
    {
        _setAppIfNew(KERNEL_APP_BASES_NAMESPACE, _appId, _appBase);
        appProxy = newAppProxyPinned(this, _appId, _initializePayload);
        // By calling setApp directly and not the internal functions, we make sure the params are checked
        // and it will only succeed if sender has permissions to set something to the namespace.
        if (_setDefault) {
            setApp(KERNEL_APP_ADDR_NAMESPACE, _appId, appProxy);
        }
    }

    /**
    * @dev Set the resolving address of an app instance or base implementation
    * @notice Set the resolving address of `_appId` in namespace `_namespace` to `_app`
    * @param _namespace App namespace to use
    * @param _appId Identifier for app
    * @param _app Address of the app instance or base implementation
    * @return ID of app
    */
    function setApp(bytes32 _namespace, bytes32 _appId, address _app)
        public
        auth(APP_MANAGER_ROLE, arr(_namespace, _appId))
    {
        _setApp(_namespace, _appId, _app);
    }

    /**
    * @dev Set the default vault id for the escape hatch mechanism
    * @param _recoveryVaultAppId Identifier of the recovery vault app
    */
    function setRecoveryVaultAppId(bytes32 _recoveryVaultAppId)
        public
        auth(APP_MANAGER_ROLE, arr(KERNEL_APP_ADDR_NAMESPACE, _recoveryVaultAppId))
    {
        recoveryVaultAppId = _recoveryVaultAppId;
    }

    // External access to default app id and namespace constants to mimic default getters for constants
    /* solium-disable function-order, mixedcase */
    function CORE_NAMESPACE() external pure returns (bytes32) { return KERNEL_CORE_NAMESPACE; }
    function APP_BASES_NAMESPACE() external pure returns (bytes32) { return KERNEL_APP_BASES_NAMESPACE; }
    function APP_ADDR_NAMESPACE() external pure returns (bytes32) { return KERNEL_APP_ADDR_NAMESPACE; }
    function KERNEL_APP_ID() external pure returns (bytes32) { return KERNEL_CORE_APP_ID; }
    function DEFAULT_ACL_APP_ID() external pure returns (bytes32) { return KERNEL_DEFAULT_ACL_APP_ID; }
    /* solium-enable function-order, mixedcase */

    /**
    * @dev Get the address of an app instance or base implementation
    * @param _namespace App namespace to use
    * @param _appId Identifier for app
    * @return Address of the app
    */
    function getApp(bytes32 _namespace, bytes32 _appId) public view returns (address) {
        return apps[_namespace][_appId];
    }

    /**
    * @dev Get the address of the recovery Vault instance (to recover funds)
    * @return Address of the Vault
    */
    function getRecoveryVault() public view returns (address) {
        return apps[KERNEL_APP_ADDR_NAMESPACE][recoveryVaultAppId];
    }

    /**
    * @dev Get the installed ACL app
    * @return ACL app
    */
    function acl() public view returns (IACL) {
        return IACL(getApp(KERNEL_APP_ADDR_NAMESPACE, KERNEL_DEFAULT_ACL_APP_ID));
    }

    /**
    * @dev Function called by apps to check ACL on kernel or to check permission status
    * @param _who Sender of the original call
    * @param _where Address of the app
    * @param _what Identifier for a group of actions in app
    * @param _how Extra data for ACL auth
    * @return Boolean indicating whether the ACL allows the role or not.
    *         Always returns false if the kernel hasn't been initialized yet.
    */
    function hasPermission(address _who, address _where, bytes32 _what, bytes _how) public view returns (bool) {
        IACL defaultAcl = acl();
        return address(defaultAcl) != address(0) && // Poor man's initialization check (saves gas)
            defaultAcl.hasPermission(_who, _where, _what, _how);
    }

    function _setApp(bytes32 _namespace, bytes32 _appId, address _app) internal {
        require(isContract(_app), ERROR_APP_NOT_CONTRACT);
        apps[_namespace][_appId] = _app;
        emit SetApp(_namespace, _appId, _app);
    }

    function _setAppIfNew(bytes32 _namespace, bytes32 _appId, address _app) internal {
        address app = getApp(_namespace, _appId);
        if (app != address(0)) {
            // The only way to set an app is if it passes the isContract check, so no need to check it again
            require(app == _app, ERROR_INVALID_APP_CHANGE);
        } else {
            _setApp(_namespace, _appId, _app);
        }
    }

    modifier auth(bytes32 _role, uint256[] memory params) {
        // Force cast the uint256[] into a bytes array, by overwriting its length
        // Note that the bytes array doesn't need to be initialized as we immediately overwrite it
        // with params and a new length, and params becomes invalid from this point forward
        bytes memory how;
        uint256 byteLength = params.length * 32;
        assembly {
            how := params
            mstore(how, byteLength)
        }

        require(hasPermission(msg.sender, address(this), _role, how), ERROR_AUTH_FAILED);
        _;
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"hasInitialized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"KERNEL_APP_ID","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"APP_ADDR_NAMESPACE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"getRecoveryVault","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_appId","type":"bytes32"},{"name":"_appBase","type":"address"},{"name":"_initializePayload","type":"bytes"},{"name":"_setDefault","type":"bool"}],"name":"newAppInstance","outputs":[{"name":"appProxy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"},{"name":"","type":"bytes32"}],"name":"apps","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_baseAcl","type":"address"},{"name":"_permissionsCreator","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"CORE_NAMESPACE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"}],"name":"allowRecoverability","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_appId","type":"bytes32"},{"name":"_appBase","type":"address"}],"name":"newAppInstance","outputs":[{"name":"appProxy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"recoveryVaultAppId","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getInitializationBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_recoveryVaultAppId","type":"bytes32"}],"name":"setRecoveryVaultAppId","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"APP_MANAGER_ROLE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_appId","type":"bytes32"},{"name":"_appBase","type":"address"}],"name":"newPinnedAppInstance","outputs":[{"name":"appProxy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"}],"name":"transferToVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_namespace","type":"bytes32"},{"name":"_appId","type":"bytes32"},{"name":"_app","type":"address"}],"name":"setApp","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_namespace","type":"bytes32"},{"name":"_appId","type":"bytes32"}],"name":"getApp","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_appId","type":"bytes32"},{"name":"_appBase","type":"address"},{"name":"_initializePayload","type":"bytes"},{"name":"_setDefault","type":"bool"}],"name":"newPinnedAppInstance","outputs":[{"name":"appProxy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_kernel","type":"address"},{"name":"_appId","type":"bytes32"},{"name":"_initializePayload","type":"bytes"}],"name":"newAppProxyPinned","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"APP_BASES_NAMESPACE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"acl","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isPetrified","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_kernel","type":"address"},{"name":"_appId","type":"bytes32"}],"name":"newAppProxy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"DEFAULT_ACL_APP_ID","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_kernel","type":"address"},{"name":"_appId","type":"bytes32"},{"name":"_initializePayload","type":"bytes"}],"name":"newAppProxy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_who","type":"address"},{"name":"_where","type":"address"},{"name":"_what","type":"bytes32"},{"name":"_how","type":"bytes"}],"name":"hasPermission","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_kernel","type":"address"},{"name":"_appId","type":"bytes32"}],"name":"newAppProxyPinned","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_shouldPetrify","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"proxy","type":"address"},{"indexed":false,"name":"isUpgradeable","type":"bool"},{"indexed":false,"name":"appId","type":"bytes32"}],"name":"NewAppProxy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"namespace","type":"bytes32"},{"indexed":true,"name":"appId","type":"bytes32"},{"indexed":false,"name":"app","type":"address"}],"name":"SetApp","type":"event"}]

60806040523480156200001157600080fd5b5060405160208062002f38833981016040525180156200003e576200003e64010000000062000045810204565b5062000263565b620000586401000000006200014d810204565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a454400000000000000006020820152901562000134576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620000f8578181015183820152602001620000de565b50505050905090810190601f168015620001265780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506200014b6000196401000000006200017c810204565b565b60006200017760008051602062002f1883398151915264010000000062001dd46200025b82021704565b905090565b6200018f6401000000006200014d810204565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a45440000000000000000602082015290156200022e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620000f8578181015183820152602001620000de565b506200025860008051602062002f188339815191528264010000000062001e716200025f82021704565b50565b5490565b9055565b612ca580620002736000396000f300608060405260043610620001865763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630803fac081146200018b5780631113ed0d14620001b7578063178e607914620001e157806332f0a3b514620001f9578063397edd41146200023a5780634558850c14620002b7578063485cc95514620002d5578063756f6049146200030e5780637e7db6e1146200032657806380cd5ac3146200035757806386070cfe146200038b5780638b3dd74914620003a35780638c61757d14620003bb5780638ea8dc9d14620003d6578063958fde8214620003ee5780639d4941d81462000422578063ae5b25401462000453578063be00bbd8146200048a578063c050a7a614620004a8578063d162f8b01462000525578063db8a61d4146200059e578063de28735914620005b6578063de4796ed14620005ce578063e156a8f314620005e6578063e8187ff0146200061a578063ede658b01462000632578063fdef910614620006ab578063ff289fc5146200072a575b600080fd5b3480156200019857600080fd5b50620001a36200075e565b604080519115158252519081900360200190f35b348015620001c457600080fd5b50620001cf6200078c565b60408051918252519081900360200190f35b348015620001ee57600080fd5b50620001cf620007b0565b3480156200020657600080fd5b5062000211620007d4565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156200024757600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845262000211948235946024803573ffffffffffffffffffffffffffffffffffffffff16953695946064949201919081908401838280828437509497505050509135151592506200081e915050565b348015620002c457600080fd5b5062000211600435602435620009df565b348015620002e257600080fd5b506200030c73ffffffffffffffffffffffffffffffffffffffff6004358116906024351662000a0f565b005b3480156200031b57600080fd5b50620001cf62000c6e565b3480156200033357600080fd5b50620001a373ffffffffffffffffffffffffffffffffffffffff6004351662000c92565b3480156200036457600080fd5b506200021160043573ffffffffffffffffffffffffffffffffffffffff6024351662000c98565b3480156200039857600080fd5b50620001cf62000dca565b348015620003b057600080fd5b50620001cf62000dd0565b348015620003c857600080fd5b506200030c60043562000e02565b348015620003e357600080fd5b50620001cf62000f14565b348015620003fb57600080fd5b506200021160043573ffffffffffffffffffffffffffffffffffffffff6024351662000f38565b3480156200042f57600080fd5b506200030c73ffffffffffffffffffffffffffffffffffffffff600435166200105f565b3480156200046057600080fd5b506200030c60043560243573ffffffffffffffffffffffffffffffffffffffff604435166200137d565b3480156200049757600080fd5b506200021160043560243562001479565b348015620004b557600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845262000211948235946024803573ffffffffffffffffffffffffffffffffffffffff1695369594606494920191908190840183828082843750949750505050913515159250620014aa915050565b3480156200053257600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526200021194823573ffffffffffffffffffffffffffffffffffffffff16946024803595369594606494920191908190840183828082843750949750620015e79650505050505050565b348015620005ab57600080fd5b50620001cf6200170c565b348015620005c357600080fd5b506200021162001730565b348015620005db57600080fd5b50620001a36200177e565b348015620005f357600080fd5b506200021173ffffffffffffffffffffffffffffffffffffffff60043516602435620017b1565b3480156200062757600080fd5b50620001cf620017d7565b3480156200063f57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526200021194823573ffffffffffffffffffffffffffffffffffffffff16946024803595369594606494920191908190840183828082843750949750620017fb9650505050505050565b348015620006b857600080fd5b50604080516020601f606435600481810135928301849004840285018401909552818452620001a39473ffffffffffffffffffffffffffffffffffffffff8135811695602480359092169560443595369560849401918190840183828082843750949750620019209650505050505050565b3480156200073757600080fd5b506200021173ffffffffffffffffffffffffffffffffffffffff6004351660243562001a7d565b6000806200076b62000dd0565b90508015801590620007865750806200078362001a9c565b10155b91505090565b7f3b4bf6bf3ad5000ecf0f989d5befde585c6860fea3e574a4fab4c49d1c177d9c90565b7fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb90565b60015460009081527f9e3eae70920eeef6013879bf9155b985893698c145361c31365929723678b257602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60007fb6d92708f3d4817afc106147d969e229ced5c46e65e0a5002a0d391287762bd06200086d7ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f8762001aa0565b80516020028082528190620008853330868562001920565b60408051808201909152601281527f4b45524e454c5f415554485f4641494c45440000000000000000000000000000602082015290151562000962576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620009265781810151838201526020016200090c565b50505050905090810190601f168015620009545780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50620009907ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f8a8a62001aae565b6200099d308a89620017fb565b94508515620009d357620009d37fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb8a876200137d565b50505050949350505050565b600060208181529281526040808220909352908152205473ffffffffffffffffffffffffffffffffffffffff1681565b600062000a1b62000dd0565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a454400000000000000006020820152901562000aba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b5062000ac562001bae565b62000b127ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f7fe3262375f45a6e2026b7e7b18c2b807434f2508fe1a2a3dfb493c7df8f4aad6a8562001c96565b62000b3e307fe3262375f45a6e2026b7e7b18c2b807434f2508fe1a2a3dfb493c7df8f4aad6a620017b1565b90508073ffffffffffffffffffffffffffffffffffffffff1663c4d66de8836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801562000bdc57600080fd5b505af115801562000bf1573d6000803e3d6000fd5b5062000c4592507fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb91507fe3262375f45a6e2026b7e7b18c2b807434f2508fe1a2a3dfb493c7df8f4aad6a90508362001c96565b50507f7e852e0fcfce6551c13800f1e7476f982525c2b5277ba14b24339c68416336d160015550565b7fc681a85306374a5ab27f0bbc385296a54bcd314a1948b6cf61c4ea1bc44bb9f890565b50600190565b60007fb6d92708f3d4817afc106147d969e229ced5c46e65e0a5002a0d391287762bd062000ce77ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f8562001aa0565b8051602002808252819062000cff3330868562001920565b60408051808201909152601281527f4b45524e454c5f415554485f4641494c45440000000000000000000000000000602082015290151562000d9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b506040805160008082526020820190925262000dbf91899189916200081e565b979650505050505050565b60015481565b600062000dfd7febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e62001dd4565b905090565b7fb6d92708f3d4817afc106147d969e229ced5c46e65e0a5002a0d391287762bd062000e4f7fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb8362001aa0565b8051602002808252819062000e673330868562001920565b60408051808201909152601281527f4b45524e454c5f415554485f4641494c45440000000000000000000000000000602082015290151562000f07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b5050506001929092555050565b7fb6d92708f3d4817afc106147d969e229ced5c46e65e0a5002a0d391287762bd081565b60007fb6d92708f3d4817afc106147d969e229ced5c46e65e0a5002a0d391287762bd062000f877ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f8562001aa0565b8051602002808252819062000f9f3330868562001920565b60408051808201909152601281527f4b45524e454c5f415554485f4641494c4544000000000000000000000000000060208201529015156200103f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b506040805160008082526020820190925262000dbf9189918991620014aa565b6000806200106d8362000c92565b60408051808201909152601281527f5245434f5645525f444953414c4c4f574544000000000000000000000000000060208201529015156200110d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b5062001118620007d4565b9150620011258262001dd8565b60408051808201909152601a81527f5245434f5645525f5641554c545f4e4f545f434f4e54524143540000000000006020820152901515620011c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b5073ffffffffffffffffffffffffffffffffffffffff831615156200122f5760405173ffffffffffffffffffffffffffffffffffffffff831690303180156108fc02916000818181858888f1935050505015801562001228573d6000803e3d6000fd5b5062001378565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8516916370a082319160248083019260209291908290030181600087803b1580156200129e57600080fd5b505af1158015620012b3573d6000803e3d6000fd5b505050506040513d6020811015620012ca57600080fd5b5051604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301526024820184905291519293509085169163a9059cbb916044808201926020929091908290030181600087803b1580156200134957600080fd5b505af11580156200135e573d6000803e3d6000fd5b505050506040513d60208110156200137557600080fd5b50505b505050565b7fb6d92708f3d4817afc106147d969e229ced5c46e65e0a5002a0d391287762bd0620013aa848462001aa0565b80516020028082528190620013c23330868562001920565b60408051808201909152601281527f4b45524e454c5f415554485f4641494c45440000000000000000000000000000602082015290151562001462576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b506200147087878762001c96565b50505050505050565b60009182526020828152604080842092845291905290205473ffffffffffffffffffffffffffffffffffffffff1690565b60007fb6d92708f3d4817afc106147d969e229ced5c46e65e0a5002a0d391287762bd0620014f97ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f8762001aa0565b80516020028082528190620015113330868562001920565b60408051808201909152601281527f4b45524e454c5f415554485f4641494c454400000000000000000000000000006020820152901515620015b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b50620015df7ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f8a8a62001aae565b6200099d308a895b600080848484620015f762001e75565b73ffffffffffffffffffffffffffffffffffffffff8416815260208082018490526060604083018181528451918401919091528351909160808401919085019080838360005b83811015620016575781810151838201526020016200163d565b50505050905090810190601f168015620016855780820380516001836020036101000a031916815260200191505b50945050505050604051809103906000f080158015620016a9573d6000803e3d6000fd5b506040805173ffffffffffffffffffffffffffffffffffffffff831681526000602082015280820187905290519192507fd880e726dced8808d727f02dd0e6fdd3a945b24bfee77e13367bcbe61ddbaf47919081900360600190a1949350505050565b7ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f90565b600062000dfd7fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb7fe3262375f45a6e2026b7e7b18c2b807434f2508fe1a2a3dfb493c7df8f4aad6a62001479565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff620017ab62000dd0565b14905090565b60408051600080825260208201909252620017d09084908490620017fb565b9392505050565b7fe3262375f45a6e2026b7e7b18c2b807434f2508fe1a2a3dfb493c7df8f4aad6a90565b6000808484846200180b62001e86565b73ffffffffffffffffffffffffffffffffffffffff8416815260208082018490526060604083018181528451918401919091528351909160808401919085019080838360005b838110156200186b57818101518382015260200162001851565b50505050905090810190601f168015620018995780820380516001836020036101000a031916815260200191505b50945050505050604051809103906000f080158015620018bd573d6000803e3d6000fd5b506040805173ffffffffffffffffffffffffffffffffffffffff831681526001602082015280820187905290519192507fd880e726dced8808d727f02dd0e6fdd3a945b24bfee77e13367bcbe61ddbaf47919081900360600190a1949350505050565b6000806200192d62001730565b905073ffffffffffffffffffffffffffffffffffffffff81161580159062001a7357506040517ffdef910600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483019081528782166024840152604483018790526080606484019081528651608485015286519285169363fdef9106938b938b938b938b9360a490910190602085019080838360005b83811015620019f3578181015183820152602001620019d9565b50505050905090810190601f16801562001a215780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801562001a4457600080fd5b505af115801562001a59573d6000803e3d6000fd5b505050506040513d602081101562001a7057600080fd5b50515b9695505050505050565b60408051600080825260208201909252620017d09084908490620015e7565b4390565b6060620017d0838362001e14565b600062001abc848462001479565b905073ffffffffffffffffffffffffffffffffffffffff81161562001b9b5760408051808201909152601981527f4b45524e454c5f494e56414c49445f4150505f4348414e474500000000000000602082015273ffffffffffffffffffffffffffffffffffffffff8281169084161462001b94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b5062001ba8565b62001ba884848462001c96565b50505050565b62001bb862000dd0565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a454400000000000000006020820152901562001c57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b5062001c9462001c6662001a9c565b7febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e9063ffffffff62001e7116565b565b62001ca18162001dd8565b60408051808201909152601781527f4b45524e454c5f4150505f4e4f545f434f4e5452414354000000000000000000602082015290151562001d41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b5060008381526020818152604080832085845282529182902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851690811790915582519081529151849286927f2ec1ae0a449b7ae354b9dacfb3ade6b6332ba26b7fcbb935835fa39dd7263b2392918290030190a3505050565b5490565b60008073ffffffffffffffffffffffffffffffffffffffff8316151562001e03576000915062001e0e565b823b90506000811191505b50919050565b60408051600280825260608083018452926020830190803883390190505090508281600081518110151562001e4557fe5b60209081029091010152805182908290600190811062001e6157fe5b6020908102909101015292915050565b9055565b6040516106f98062001e9883390190565b6040516106e98062002591833901905600608060405234801561001057600080fd5b506040516106f93803806106f98339810160409081528151602083015191830151909201828282600061004b8464010000000061017a810204565b61005d836401000000006101a2810204565b61006f836401000000006101d9810204565b90506000825111156101185761008d816401000000006102a9810204565b151561009857600080fd5b80600160a060020a03168260405180828051906020019080838360005b838110156100cd5781810151838201526020016100b5565b50505050905090810190601f1680156100fa5780820380516001836020036101000a031916815260200191505b50915050600060405180830381855af4915050151561011857600080fd5b50505050610145610137836101d9640100000000026401000000009004565b6401000000006102d6810204565b6101676101596401000000006102fb810204565b6401000000006102a9810204565b151561017257600080fd5b505050610354565b61019f6000805160206106b98339815191528264010000000061032261032682021704565b50565b61019f7fd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b8264010000000061032261032682021704565b60006101ec64010000000061032a810204565b604080517fbe00bbd80000000000000000000000000000000000000000000000000000000081527ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f6004820152602481018590529051600160a060020a03929092169163be00bbd8916044808201926020929091908290030181600087803b15801561027757600080fd5b505af115801561028b573d6000803e3d6000fd5b505050506040513d60208110156102a157600080fd5b505192915050565b600080600160a060020a03831615156102c557600091506102d0565b823b90506000811191505b50919050565b61019f6000805160206106d98339815191528264010000000061032261032682021704565b60006103216000805160206106d98339815191526401000000006102b561035082021704565b905090565b9055565b60006103216000805160206106b98339815191526401000000006102b561035082021704565b5490565b610356806103636000396000f30060806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416634555d5c9811461012b57806348a0c8dd146101525780635c60da1b1461017b57806380afdea8146101b9578063d4aae0c4146101ce575b60006127105a10156100e357600034118015610086575036155b151561009157600080fd5b6100996101e3565b15156100a457600080fd5b6040805133815234602082015281517f15eeaa57c7bd188c1388020bcadc2c436ec60d647d36ef5b9eb3c742217ddee1929181900390910190a1610128565b6100eb610213565b9050610128816000368080601f0160208091040260200160405190810160405280939291908181526020018383808284375061021d945050505050565b50005b34801561013757600080fd5b5061014061025e565b60408051918252519081900360200190f35b34801561015e57600080fd5b506101676101e3565b604080519115158252519081900360200190f35b34801561018757600080fd5b50610190610213565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156101c557600080fd5b50610140610263565b3480156101da57600080fd5b5061019061028e565b600061020e7f665fd576fbbe6f247aff98f5c94a561e3f71ec2d3c988d56f12d342396c50cea6102b5565b905090565b600061020e6102b9565b6000610228836102e4565b151561023357600080fd5b612710905060008083516020850186855a03f43d604051816000823e82801561025a578282f35b8282fd5b600190565b600061020e7fd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b6102b5565b600061020e7f4172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137b5b5490565b600061020e7fdee64df20d65e53d7f51cb6ab6d921a0a6a638a91e942e1d8d02df28e31c038e6102b5565b60008073ffffffffffffffffffffffffffffffffffffffff8316151561030d5760009150610318565b823b90506000811191505b50919050565b5490565b9055565b90555600a165627a7a7230582046a6e0d9148eff77d58df9471ec3a1e704f6505f760062bb4e5fc7efa28862f600294172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137bdee64df20d65e53d7f51cb6ab6d921a0a6a638a91e942e1d8d02df28e31c038e608060405234801561001057600080fd5b506040516106e93803806106e98339810160409081528151602083015191830151909201828282600061004b84640100000000610124810204565b61005d8364010000000061014c810204565b61006f83640100000000610183810204565b90506000825111156101185761008d81640100000000610253810204565b151561009857600080fd5b80600160a060020a03168260405180828051906020019080838360005b838110156100cd5781810151838201526020016100b5565b50505050905090810190601f1680156100fa5780820380516001836020036101000a031916815260200191505b50915050600060405180830381855af4915050151561011857600080fd5b505050505050506102b3565b6101496000805160206106c9833981519152826401000000006103d361028082021704565b50565b6101497fd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b826401000000006103d361028082021704565b6000610196640100000000610284810204565b604080517fbe00bbd80000000000000000000000000000000000000000000000000000000081527ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f6004820152602481018590529051600160a060020a03929092169163be00bbd8916044808201926020929091908290030181600087803b15801561022157600080fd5b505af1158015610235573d6000803e3d6000fd5b505050506040513d602081101561024b57600080fd5b505192915050565b600080600160a060020a038316151561026f576000915061027a565b823b90506000811191505b50919050565b9055565b60006102aa6000805160206106c98339815191526401000000006102bd6102af82021704565b905090565b5490565b610407806102c26000396000f30060806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416634555d5c9811461012b57806348a0c8dd146101525780635c60da1b1461017b57806380afdea8146101b9578063d4aae0c4146101ce575b60006127105a10156100e357600034118015610086575036155b151561009157600080fd5b6100996101e3565b15156100a457600080fd5b6040805133815234602082015281517f15eeaa57c7bd188c1388020bcadc2c436ec60d647d36ef5b9eb3c742217ddee1929181900390910190a1610128565b6100eb610213565b9050610128816000368080601f01602080910402602001604051908101604052809392919081815260200183838082843750610225945050505050565b50005b34801561013757600080fd5b50610140610266565b60408051918252519081900360200190f35b34801561015e57600080fd5b506101676101e3565b604080519115158252519081900360200190f35b34801561018757600080fd5b50610190610213565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156101c557600080fd5b5061014061026b565b3480156101da57600080fd5b50610190610296565b600061020e7f665fd576fbbe6f247aff98f5c94a561e3f71ec2d3c988d56f12d342396c50cea6102bd565b905090565b600061020e61022061026b565b6102c1565b600061023083610395565b151561023b57600080fd5b612710905060008083516020850186855a03f43d604051816000823e828015610262578282f35b8282fd5b600290565b600061020e7fd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b6102bd565b600061020e7f4172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137b5b5490565b60006102cb610296565b604080517fbe00bbd80000000000000000000000000000000000000000000000000000000081527ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f600482015260248101859052905173ffffffffffffffffffffffffffffffffffffffff929092169163be00bbd8916044808201926020929091908290030181600087803b15801561036357600080fd5b505af1158015610377573d6000803e3d6000fd5b505050506040513d602081101561038d57600080fd5b505192915050565b60008073ffffffffffffffffffffffffffffffffffffffff831615156103be57600091506103c9565b823b90506000811191505b50919050565b5490565b9055565b90555600a165627a7a72305820276efdd7355da6d727d8d918d459c69583630a4e2f5b4f75e059a5dfa16b10bf00294172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137ba165627a7a723058206979da1275d5482ca820648144ae85ca53310f13d305a23d8fcf83087f3b19a70029ebb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e0000000000000000000000000000000000000000000000000000000000000001

Deployed Bytecode

0x608060405260043610620001865763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630803fac081146200018b5780631113ed0d14620001b7578063178e607914620001e157806332f0a3b514620001f9578063397edd41146200023a5780634558850c14620002b7578063485cc95514620002d5578063756f6049146200030e5780637e7db6e1146200032657806380cd5ac3146200035757806386070cfe146200038b5780638b3dd74914620003a35780638c61757d14620003bb5780638ea8dc9d14620003d6578063958fde8214620003ee5780639d4941d81462000422578063ae5b25401462000453578063be00bbd8146200048a578063c050a7a614620004a8578063d162f8b01462000525578063db8a61d4146200059e578063de28735914620005b6578063de4796ed14620005ce578063e156a8f314620005e6578063e8187ff0146200061a578063ede658b01462000632578063fdef910614620006ab578063ff289fc5146200072a575b600080fd5b3480156200019857600080fd5b50620001a36200075e565b604080519115158252519081900360200190f35b348015620001c457600080fd5b50620001cf6200078c565b60408051918252519081900360200190f35b348015620001ee57600080fd5b50620001cf620007b0565b3480156200020657600080fd5b5062000211620007d4565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156200024757600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845262000211948235946024803573ffffffffffffffffffffffffffffffffffffffff16953695946064949201919081908401838280828437509497505050509135151592506200081e915050565b348015620002c457600080fd5b5062000211600435602435620009df565b348015620002e257600080fd5b506200030c73ffffffffffffffffffffffffffffffffffffffff6004358116906024351662000a0f565b005b3480156200031b57600080fd5b50620001cf62000c6e565b3480156200033357600080fd5b50620001a373ffffffffffffffffffffffffffffffffffffffff6004351662000c92565b3480156200036457600080fd5b506200021160043573ffffffffffffffffffffffffffffffffffffffff6024351662000c98565b3480156200039857600080fd5b50620001cf62000dca565b348015620003b057600080fd5b50620001cf62000dd0565b348015620003c857600080fd5b506200030c60043562000e02565b348015620003e357600080fd5b50620001cf62000f14565b348015620003fb57600080fd5b506200021160043573ffffffffffffffffffffffffffffffffffffffff6024351662000f38565b3480156200042f57600080fd5b506200030c73ffffffffffffffffffffffffffffffffffffffff600435166200105f565b3480156200046057600080fd5b506200030c60043560243573ffffffffffffffffffffffffffffffffffffffff604435166200137d565b3480156200049757600080fd5b506200021160043560243562001479565b348015620004b557600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845262000211948235946024803573ffffffffffffffffffffffffffffffffffffffff1695369594606494920191908190840183828082843750949750505050913515159250620014aa915050565b3480156200053257600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526200021194823573ffffffffffffffffffffffffffffffffffffffff16946024803595369594606494920191908190840183828082843750949750620015e79650505050505050565b348015620005ab57600080fd5b50620001cf6200170c565b348015620005c357600080fd5b506200021162001730565b348015620005db57600080fd5b50620001a36200177e565b348015620005f357600080fd5b506200021173ffffffffffffffffffffffffffffffffffffffff60043516602435620017b1565b3480156200062757600080fd5b50620001cf620017d7565b3480156200063f57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526200021194823573ffffffffffffffffffffffffffffffffffffffff16946024803595369594606494920191908190840183828082843750949750620017fb9650505050505050565b348015620006b857600080fd5b50604080516020601f606435600481810135928301849004840285018401909552818452620001a39473ffffffffffffffffffffffffffffffffffffffff8135811695602480359092169560443595369560849401918190840183828082843750949750620019209650505050505050565b3480156200073757600080fd5b506200021173ffffffffffffffffffffffffffffffffffffffff6004351660243562001a7d565b6000806200076b62000dd0565b90508015801590620007865750806200078362001a9c565b10155b91505090565b7f3b4bf6bf3ad5000ecf0f989d5befde585c6860fea3e574a4fab4c49d1c177d9c90565b7fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb90565b60015460009081527f9e3eae70920eeef6013879bf9155b985893698c145361c31365929723678b257602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60007fb6d92708f3d4817afc106147d969e229ced5c46e65e0a5002a0d391287762bd06200086d7ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f8762001aa0565b80516020028082528190620008853330868562001920565b60408051808201909152601281527f4b45524e454c5f415554485f4641494c45440000000000000000000000000000602082015290151562000962576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620009265781810151838201526020016200090c565b50505050905090810190601f168015620009545780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50620009907ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f8a8a62001aae565b6200099d308a89620017fb565b94508515620009d357620009d37fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb8a876200137d565b50505050949350505050565b600060208181529281526040808220909352908152205473ffffffffffffffffffffffffffffffffffffffff1681565b600062000a1b62000dd0565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a454400000000000000006020820152901562000aba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b5062000ac562001bae565b62000b127ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f7fe3262375f45a6e2026b7e7b18c2b807434f2508fe1a2a3dfb493c7df8f4aad6a8562001c96565b62000b3e307fe3262375f45a6e2026b7e7b18c2b807434f2508fe1a2a3dfb493c7df8f4aad6a620017b1565b90508073ffffffffffffffffffffffffffffffffffffffff1663c4d66de8836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801562000bdc57600080fd5b505af115801562000bf1573d6000803e3d6000fd5b5062000c4592507fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb91507fe3262375f45a6e2026b7e7b18c2b807434f2508fe1a2a3dfb493c7df8f4aad6a90508362001c96565b50507f7e852e0fcfce6551c13800f1e7476f982525c2b5277ba14b24339c68416336d160015550565b7fc681a85306374a5ab27f0bbc385296a54bcd314a1948b6cf61c4ea1bc44bb9f890565b50600190565b60007fb6d92708f3d4817afc106147d969e229ced5c46e65e0a5002a0d391287762bd062000ce77ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f8562001aa0565b8051602002808252819062000cff3330868562001920565b60408051808201909152601281527f4b45524e454c5f415554485f4641494c45440000000000000000000000000000602082015290151562000d9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b506040805160008082526020820190925262000dbf91899189916200081e565b979650505050505050565b60015481565b600062000dfd7febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e62001dd4565b905090565b7fb6d92708f3d4817afc106147d969e229ced5c46e65e0a5002a0d391287762bd062000e4f7fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb8362001aa0565b8051602002808252819062000e673330868562001920565b60408051808201909152601281527f4b45524e454c5f415554485f4641494c45440000000000000000000000000000602082015290151562000f07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b5050506001929092555050565b7fb6d92708f3d4817afc106147d969e229ced5c46e65e0a5002a0d391287762bd081565b60007fb6d92708f3d4817afc106147d969e229ced5c46e65e0a5002a0d391287762bd062000f877ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f8562001aa0565b8051602002808252819062000f9f3330868562001920565b60408051808201909152601281527f4b45524e454c5f415554485f4641494c4544000000000000000000000000000060208201529015156200103f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b506040805160008082526020820190925262000dbf9189918991620014aa565b6000806200106d8362000c92565b60408051808201909152601281527f5245434f5645525f444953414c4c4f574544000000000000000000000000000060208201529015156200110d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b5062001118620007d4565b9150620011258262001dd8565b60408051808201909152601a81527f5245434f5645525f5641554c545f4e4f545f434f4e54524143540000000000006020820152901515620011c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b5073ffffffffffffffffffffffffffffffffffffffff831615156200122f5760405173ffffffffffffffffffffffffffffffffffffffff831690303180156108fc02916000818181858888f1935050505015801562001228573d6000803e3d6000fd5b5062001378565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8516916370a082319160248083019260209291908290030181600087803b1580156200129e57600080fd5b505af1158015620012b3573d6000803e3d6000fd5b505050506040513d6020811015620012ca57600080fd5b5051604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301526024820184905291519293509085169163a9059cbb916044808201926020929091908290030181600087803b1580156200134957600080fd5b505af11580156200135e573d6000803e3d6000fd5b505050506040513d60208110156200137557600080fd5b50505b505050565b7fb6d92708f3d4817afc106147d969e229ced5c46e65e0a5002a0d391287762bd0620013aa848462001aa0565b80516020028082528190620013c23330868562001920565b60408051808201909152601281527f4b45524e454c5f415554485f4641494c45440000000000000000000000000000602082015290151562001462576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b506200147087878762001c96565b50505050505050565b60009182526020828152604080842092845291905290205473ffffffffffffffffffffffffffffffffffffffff1690565b60007fb6d92708f3d4817afc106147d969e229ced5c46e65e0a5002a0d391287762bd0620014f97ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f8762001aa0565b80516020028082528190620015113330868562001920565b60408051808201909152601281527f4b45524e454c5f415554485f4641494c454400000000000000000000000000006020820152901515620015b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b50620015df7ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f8a8a62001aae565b6200099d308a895b600080848484620015f762001e75565b73ffffffffffffffffffffffffffffffffffffffff8416815260208082018490526060604083018181528451918401919091528351909160808401919085019080838360005b83811015620016575781810151838201526020016200163d565b50505050905090810190601f168015620016855780820380516001836020036101000a031916815260200191505b50945050505050604051809103906000f080158015620016a9573d6000803e3d6000fd5b506040805173ffffffffffffffffffffffffffffffffffffffff831681526000602082015280820187905290519192507fd880e726dced8808d727f02dd0e6fdd3a945b24bfee77e13367bcbe61ddbaf47919081900360600190a1949350505050565b7ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f90565b600062000dfd7fd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb7fe3262375f45a6e2026b7e7b18c2b807434f2508fe1a2a3dfb493c7df8f4aad6a62001479565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff620017ab62000dd0565b14905090565b60408051600080825260208201909252620017d09084908490620017fb565b9392505050565b7fe3262375f45a6e2026b7e7b18c2b807434f2508fe1a2a3dfb493c7df8f4aad6a90565b6000808484846200180b62001e86565b73ffffffffffffffffffffffffffffffffffffffff8416815260208082018490526060604083018181528451918401919091528351909160808401919085019080838360005b838110156200186b57818101518382015260200162001851565b50505050905090810190601f168015620018995780820380516001836020036101000a031916815260200191505b50945050505050604051809103906000f080158015620018bd573d6000803e3d6000fd5b506040805173ffffffffffffffffffffffffffffffffffffffff831681526001602082015280820187905290519192507fd880e726dced8808d727f02dd0e6fdd3a945b24bfee77e13367bcbe61ddbaf47919081900360600190a1949350505050565b6000806200192d62001730565b905073ffffffffffffffffffffffffffffffffffffffff81161580159062001a7357506040517ffdef910600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483019081528782166024840152604483018790526080606484019081528651608485015286519285169363fdef9106938b938b938b938b9360a490910190602085019080838360005b83811015620019f3578181015183820152602001620019d9565b50505050905090810190601f16801562001a215780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801562001a4457600080fd5b505af115801562001a59573d6000803e3d6000fd5b505050506040513d602081101562001a7057600080fd5b50515b9695505050505050565b60408051600080825260208201909252620017d09084908490620015e7565b4390565b6060620017d0838362001e14565b600062001abc848462001479565b905073ffffffffffffffffffffffffffffffffffffffff81161562001b9b5760408051808201909152601981527f4b45524e454c5f494e56414c49445f4150505f4348414e474500000000000000602082015273ffffffffffffffffffffffffffffffffffffffff8281169084161462001b94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b5062001ba8565b62001ba884848462001c96565b50505050565b62001bb862000dd0565b60408051808201909152601881527f494e49545f414c52454144595f494e495449414c495a454400000000000000006020820152901562001c57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b5062001c9462001c6662001a9c565b7febb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e9063ffffffff62001e7116565b565b62001ca18162001dd8565b60408051808201909152601781527f4b45524e454c5f4150505f4e4f545f434f4e5452414354000000000000000000602082015290151562001d41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252838181518152602001915080519060200190808383600083811015620009265781810151838201526020016200090c565b5060008381526020818152604080832085845282529182902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851690811790915582519081529151849286927f2ec1ae0a449b7ae354b9dacfb3ade6b6332ba26b7fcbb935835fa39dd7263b2392918290030190a3505050565b5490565b60008073ffffffffffffffffffffffffffffffffffffffff8316151562001e03576000915062001e0e565b823b90506000811191505b50919050565b60408051600280825260608083018452926020830190803883390190505090508281600081518110151562001e4557fe5b60209081029091010152805182908290600190811062001e6157fe5b6020908102909101015292915050565b9055565b6040516106f98062001e9883390190565b6040516106e98062002591833901905600608060405234801561001057600080fd5b506040516106f93803806106f98339810160409081528151602083015191830151909201828282600061004b8464010000000061017a810204565b61005d836401000000006101a2810204565b61006f836401000000006101d9810204565b90506000825111156101185761008d816401000000006102a9810204565b151561009857600080fd5b80600160a060020a03168260405180828051906020019080838360005b838110156100cd5781810151838201526020016100b5565b50505050905090810190601f1680156100fa5780820380516001836020036101000a031916815260200191505b50915050600060405180830381855af4915050151561011857600080fd5b50505050610145610137836101d9640100000000026401000000009004565b6401000000006102d6810204565b6101676101596401000000006102fb810204565b6401000000006102a9810204565b151561017257600080fd5b505050610354565b61019f6000805160206106b98339815191528264010000000061032261032682021704565b50565b61019f7fd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b8264010000000061032261032682021704565b60006101ec64010000000061032a810204565b604080517fbe00bbd80000000000000000000000000000000000000000000000000000000081527ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f6004820152602481018590529051600160a060020a03929092169163be00bbd8916044808201926020929091908290030181600087803b15801561027757600080fd5b505af115801561028b573d6000803e3d6000fd5b505050506040513d60208110156102a157600080fd5b505192915050565b600080600160a060020a03831615156102c557600091506102d0565b823b90506000811191505b50919050565b61019f6000805160206106d98339815191528264010000000061032261032682021704565b60006103216000805160206106d98339815191526401000000006102b561035082021704565b905090565b9055565b60006103216000805160206106b98339815191526401000000006102b561035082021704565b5490565b610356806103636000396000f30060806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416634555d5c9811461012b57806348a0c8dd146101525780635c60da1b1461017b57806380afdea8146101b9578063d4aae0c4146101ce575b60006127105a10156100e357600034118015610086575036155b151561009157600080fd5b6100996101e3565b15156100a457600080fd5b6040805133815234602082015281517f15eeaa57c7bd188c1388020bcadc2c436ec60d647d36ef5b9eb3c742217ddee1929181900390910190a1610128565b6100eb610213565b9050610128816000368080601f0160208091040260200160405190810160405280939291908181526020018383808284375061021d945050505050565b50005b34801561013757600080fd5b5061014061025e565b60408051918252519081900360200190f35b34801561015e57600080fd5b506101676101e3565b604080519115158252519081900360200190f35b34801561018757600080fd5b50610190610213565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156101c557600080fd5b50610140610263565b3480156101da57600080fd5b5061019061028e565b600061020e7f665fd576fbbe6f247aff98f5c94a561e3f71ec2d3c988d56f12d342396c50cea6102b5565b905090565b600061020e6102b9565b6000610228836102e4565b151561023357600080fd5b612710905060008083516020850186855a03f43d604051816000823e82801561025a578282f35b8282fd5b600190565b600061020e7fd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b6102b5565b600061020e7f4172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137b5b5490565b600061020e7fdee64df20d65e53d7f51cb6ab6d921a0a6a638a91e942e1d8d02df28e31c038e6102b5565b60008073ffffffffffffffffffffffffffffffffffffffff8316151561030d5760009150610318565b823b90506000811191505b50919050565b5490565b9055565b90555600a165627a7a7230582046a6e0d9148eff77d58df9471ec3a1e704f6505f760062bb4e5fc7efa28862f600294172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137bdee64df20d65e53d7f51cb6ab6d921a0a6a638a91e942e1d8d02df28e31c038e608060405234801561001057600080fd5b506040516106e93803806106e98339810160409081528151602083015191830151909201828282600061004b84640100000000610124810204565b61005d8364010000000061014c810204565b61006f83640100000000610183810204565b90506000825111156101185761008d81640100000000610253810204565b151561009857600080fd5b80600160a060020a03168260405180828051906020019080838360005b838110156100cd5781810151838201526020016100b5565b50505050905090810190601f1680156100fa5780820380516001836020036101000a031916815260200191505b50915050600060405180830381855af4915050151561011857600080fd5b505050505050506102b3565b6101496000805160206106c9833981519152826401000000006103d361028082021704565b50565b6101497fd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b826401000000006103d361028082021704565b6000610196640100000000610284810204565b604080517fbe00bbd80000000000000000000000000000000000000000000000000000000081527ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f6004820152602481018590529051600160a060020a03929092169163be00bbd8916044808201926020929091908290030181600087803b15801561022157600080fd5b505af1158015610235573d6000803e3d6000fd5b505050506040513d602081101561024b57600080fd5b505192915050565b600080600160a060020a038316151561026f576000915061027a565b823b90506000811191505b50919050565b9055565b60006102aa6000805160206106c98339815191526401000000006102bd6102af82021704565b905090565b5490565b610407806102c26000396000f30060806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416634555d5c9811461012b57806348a0c8dd146101525780635c60da1b1461017b57806380afdea8146101b9578063d4aae0c4146101ce575b60006127105a10156100e357600034118015610086575036155b151561009157600080fd5b6100996101e3565b15156100a457600080fd5b6040805133815234602082015281517f15eeaa57c7bd188c1388020bcadc2c436ec60d647d36ef5b9eb3c742217ddee1929181900390910190a1610128565b6100eb610213565b9050610128816000368080601f01602080910402602001604051908101604052809392919081815260200183838082843750610225945050505050565b50005b34801561013757600080fd5b50610140610266565b60408051918252519081900360200190f35b34801561015e57600080fd5b506101676101e3565b604080519115158252519081900360200190f35b34801561018757600080fd5b50610190610213565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156101c557600080fd5b5061014061026b565b3480156101da57600080fd5b50610190610296565b600061020e7f665fd576fbbe6f247aff98f5c94a561e3f71ec2d3c988d56f12d342396c50cea6102bd565b905090565b600061020e61022061026b565b6102c1565b600061023083610395565b151561023b57600080fd5b612710905060008083516020850186855a03f43d604051816000823e828015610262578282f35b8282fd5b600290565b600061020e7fd625496217aa6a3453eecb9c3489dc5a53e6c67b444329ea2b2cbc9ff547639b6102bd565b600061020e7f4172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137b5b5490565b60006102cb610296565b604080517fbe00bbd80000000000000000000000000000000000000000000000000000000081527ff1f3eb40f5bc1ad1344716ced8b8a0431d840b5783aea1fd01786bc26f35ac0f600482015260248101859052905173ffffffffffffffffffffffffffffffffffffffff929092169163be00bbd8916044808201926020929091908290030181600087803b15801561036357600080fd5b505af1158015610377573d6000803e3d6000fd5b505050506040513d602081101561038d57600080fd5b505192915050565b60008073ffffffffffffffffffffffffffffffffffffffff831615156103be57600091506103c9565b823b90506000811191505b50919050565b5490565b9055565b90555600a165627a7a72305820276efdd7355da6d727d8d918d459c69583630a4e2f5b4f75e059a5dfa16b10bf00294172f0f7d2289153072b0a6ca36959e0cbe2efc3afe50fc81636caa96338137ba165627a7a723058206979da1275d5482ca820648144ae85ca53310f13d305a23d8fcf83087f3b19a70029

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000000000000000000000000000000000000000000001

-----Decoded View---------------
Arg [0] : _shouldPetrify (bool): True

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000001


Swarm Source

bzzr://6979da1275d5482ca820648144ae85ca53310f13d305a23d8fcf83087f3b19a7

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.