Contract 0xef6273937f3fa1c4e616afac0da0279552188e8d 1

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x6563c328808cb3f5926f5c796bcbc76680f4164a7f811fad531af38a2b8191ba0x60806040203220682022-08-15 14:32:4246 days 1 hr ago0x88532f5e88f6a1ccd9e64681acc63416594000f4 IN  Create: DefaultInstructions0 ETH0.001551559735 ETH
[ Download CSV Export 
Latest 3 internal transactions
Parent Txn Hash Block From To Value
0xe591baa7ca82c2f6385d7959b3d0a22405f79afcf2280476d51f06e6fba341ac203221292022-08-15 14:33:5446 days 1 hr ago 0xad961758441a99147478c594d70868c1104eb071 0xef6273937f3fa1c4e616afac0da0279552188e8d0 ETH
0xe591baa7ca82c2f6385d7959b3d0a22405f79afcf2280476d51f06e6fba341ac203221292022-08-15 14:33:5446 days 1 hr ago 0xad961758441a99147478c594d70868c1104eb071 0xef6273937f3fa1c4e616afac0da0279552188e8d0 ETH
0xe591baa7ca82c2f6385d7959b3d0a22405f79afcf2280476d51f06e6fba341ac203221292022-08-15 14:33:5446 days 1 hr ago 0xad961758441a99147478c594d70868c1104eb071 0xef6273937f3fa1c4e616afac0da0279552188e8d0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DefaultInstructions

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 20000 runs

Other Settings:
default evmVersion, GNU AGPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Arbiscan on 2022-08-15
*/

// SPDX-License-Identifier: AGPL-3.0-only

// [INSTR] The Instructions Module caches and executes batched instructions for protocol upgrades in the Kernel

pragma solidity ^0.8.15;

error TargetNotAContract(address target_);
error InvalidKeycode(Keycode keycode_);
error InvalidRole(Role role_);

function toKeycode(bytes5 keycode_) pure returns (Keycode) {
    return Keycode.wrap(keycode_);
}

function fromKeycode(Keycode keycode_) pure returns (bytes5) {
    return Keycode.unwrap(keycode_);
}

function toRole(bytes32 role_) pure returns (Role) {
    return Role.wrap(role_);
}

function fromRole(Role role_) pure returns (bytes32) {
    return Role.unwrap(role_);
}

function ensureContract(address target_) view {
    uint256 size;
    assembly("memory-safe") {
        size := extcodesize(target_)
    }
    if (size == 0) revert TargetNotAContract(target_);
}

function ensureValidKeycode(Keycode keycode_) pure {
    bytes5 unwrapped = Keycode.unwrap(keycode_);

    for (uint256 i = 0; i < 5; ) {
        bytes1 char = unwrapped[i];

        if (char < 0x41 || char > 0x5A) revert InvalidKeycode(keycode_); // A-Z only

        unchecked {
            i++;
        }
    }
}

function ensureValidRole(Role role_) pure {
    bytes32 unwrapped = Role.unwrap(role_);

    for (uint256 i = 0; i < 32; ) {
        bytes1 char = unwrapped[i];
        if ((char < 0x61 || char > 0x7A) && char != 0x00) {
            revert InvalidRole(role_); // a-z only
        }
        unchecked {
            i++;
        }
    }
}

// ######################## ~ ERRORS ~ ########################

// KERNEL ADAPTER

error KernelAdapter_OnlyKernel(address caller_);

// MODULE

error Module_PolicyNotAuthorized(address policy_);

// POLICY

error Policy_OnlyRole(Role role_);
error Policy_ModuleDoesNotExist(Keycode keycode_);

// KERNEL

error Kernel_OnlyExecutor(address caller_);
error Kernel_OnlyAdmin(address caller_);
error Kernel_ModuleAlreadyInstalled(Keycode module_);
error Kernel_InvalidModuleUpgrade(Keycode module_);
error Kernel_PolicyAlreadyApproved(address policy_);
error Kernel_PolicyNotApproved(address policy_);
error Kernel_AddressAlreadyHasRole(address addr_, Role role_);
error Kernel_AddressDoesNotHaveRole(address addr_, Role role_);
error Kernel_RoleDoesNotExist(Role role_);

// ######################## ~ GLOBAL TYPES ~ ########################

enum Actions {
    InstallModule,
    UpgradeModule,
    ActivatePolicy,
    DeactivatePolicy,
    ChangeExecutor,
    ChangeAdmin,
    MigrateKernel
}

struct Instruction {
    Actions action;
    address target;
}

struct Permissions {
    Keycode keycode;
    bytes4 funcSelector;
}

type Keycode is bytes5;
type Role is bytes32;

// ######################## ~ MODULE ABSTRACT ~ ########################

abstract contract KernelAdapter {
    Kernel public kernel;

    constructor(Kernel kernel_) {
        kernel = kernel_;
    }

    modifier onlyKernel() {
        if (msg.sender != address(kernel)) revert KernelAdapter_OnlyKernel(msg.sender);
        _;
    }

    function changeKernel(Kernel newKernel_) external onlyKernel {
        kernel = newKernel_;
    }
}

abstract contract Module is KernelAdapter {
    event PermissionSet(bytes4 funcSelector_, address policy_, bool permission_);

    constructor(Kernel kernel_) KernelAdapter(kernel_) {}

    modifier permissioned() {
        if (!kernel.modulePermissions(KEYCODE(), Policy(msg.sender), msg.sig))
            revert Module_PolicyNotAuthorized(msg.sender);
        _;
    }

    function KEYCODE() public pure virtual returns (Keycode);

    /// @notice Specify which version of a module is being implemented.
    /// @dev Minor version change retains interface. Major version upgrade indicates
    /// @dev breaking change to the interface.
    function VERSION() external pure virtual returns (uint8 major, uint8 minor) {}

    /// @notice Initialization function for the module.
    /// @dev This function is called when the module is installed or upgraded by the kernel.
    /// @dev Used to encompass any upgrade logic. Must be gated by onlyKernel.
    function INIT() external virtual onlyKernel {}
}

abstract contract Policy is KernelAdapter  {

    bool public isActive;

    constructor(Kernel kernel_) KernelAdapter(kernel_) {}

    modifier onlyRole(bytes32 role_) {
        Role role = toRole(role_);
        if(!kernel.hasRole(msg.sender, role))
            revert Policy_OnlyRole(role);
        _;
    }

    function configureDependencies() external virtual onlyKernel returns (Keycode[] memory dependencies) {}

    function requestPermissions() external view virtual onlyKernel returns (Permissions[] memory requests) {}

    function getModuleAddress(Keycode keycode_) internal view returns (address) {
        address moduleForKeycode = address(kernel.getModuleForKeycode(keycode_));
        if (moduleForKeycode == address(0)) revert Policy_ModuleDoesNotExist(keycode_);
        return moduleForKeycode;
    }

    /// @notice Function to let kernel grant or revoke active status
    function setActiveStatus(bool activate_) external onlyKernel {
        isActive = activate_;
    }
}

contract Kernel {
    // ######################## ~ VARS ~ ########################
    address public executor;
    address public admin;

    // ######################## ~ DEPENDENCY MANAGEMENT ~ ########################

    // Module Management
    Keycode[] public allKeycodes;
    mapping(Keycode => Module) public getModuleForKeycode; // get contract for module keycode
    mapping(Module => Keycode) public getKeycodeForModule; // get module keycode for contract
    
    // Module dependents data. Manages module dependencies for policies
    mapping(Keycode => Policy[]) public moduleDependents;
    mapping(Keycode => mapping(Policy => uint256)) public getDependentIndex;

    // Module <> Policy Permissions. Policy -> Keycode -> Function Selector -> Permission
    mapping(Keycode => mapping(Policy => mapping(bytes4 => bool))) public modulePermissions; // for policy addr, check if they have permission to call the function int he module

    // List of all active policies
    Policy[] public activePolicies;
    mapping(Policy => uint256) public getPolicyIndex;

    // Policy roles data
    mapping(address => mapping(Role => bool)) public hasRole;
    mapping(Role => bool) public isRole;

    // ######################## ~ EVENTS ~ ########################

    event PermissionsUpdated(
        Keycode indexed keycode_,
        Policy indexed policy_,
        bytes4 funcSelector_,
        bool granted_
    );
    event RoleGranted(Role indexed role_, address indexed addr_);
    event RoleRevoked(Role indexed role_, address indexed addr_);
    event ActionExecuted(Actions indexed action_, address indexed target_);

    // ######################## ~ BODY ~ ########################

    constructor() {
        executor = msg.sender;
        admin = msg.sender;
    }

    // ######################## ~ MODIFIERS ~ ########################

    // Role reserved for governor or any executing address
    modifier onlyExecutor() {
        if (msg.sender != executor) revert Kernel_OnlyExecutor(msg.sender);
        _;
    }

    // Role for managing policy roles
    modifier onlyAdmin() {
        if (msg.sender != admin) revert Kernel_OnlyAdmin(msg.sender);
        _;
    }

    // ######################## ~ KERNEL INTERFACE ~ ########################

    function executeAction(Actions action_, address target_) external onlyExecutor {
        if (action_ == Actions.InstallModule) {
            ensureContract(target_);
            ensureValidKeycode(Module(target_).KEYCODE());
            _installModule(Module(target_));
        } else if (action_ == Actions.UpgradeModule) {
            ensureContract(target_);
            ensureValidKeycode(Module(target_).KEYCODE());
            _upgradeModule(Module(target_));
        } else if (action_ == Actions.ActivatePolicy) {
            ensureContract(target_);
            _activatePolicy(Policy(target_));
        } else if (action_ == Actions.DeactivatePolicy) {
            ensureContract(target_);
            _deactivatePolicy(Policy(target_));
        } else if (action_ == Actions.MigrateKernel) {
            ensureContract(target_);
            _migrateKernel(Kernel(target_));
        } else if (action_ == Actions.ChangeExecutor) {
            executor = target_;
        } else if (action_ == Actions.ChangeAdmin) {
            admin = target_;
        }

        emit ActionExecuted(action_, target_);
    }

    // ######################## ~ KERNEL INTERNAL ~ ########################

    function _installModule(Module newModule_) internal {
        Keycode keycode = newModule_.KEYCODE();

        if (address(getModuleForKeycode[keycode]) != address(0))
            revert Kernel_ModuleAlreadyInstalled(keycode);

        getModuleForKeycode[keycode] = newModule_;
        getKeycodeForModule[newModule_] = keycode;
        allKeycodes.push(keycode);

        newModule_.INIT();
    }

    function _upgradeModule(Module newModule_) internal {
        Keycode keycode = newModule_.KEYCODE();
        Module oldModule = getModuleForKeycode[keycode];

        if (address(oldModule) == address(0) || oldModule == newModule_)
            revert Kernel_InvalidModuleUpgrade(keycode);

        getKeycodeForModule[oldModule] = Keycode.wrap(bytes5(0));
        getKeycodeForModule[newModule_] = keycode;
        getModuleForKeycode[keycode] = newModule_;

        newModule_.INIT();

        _reconfigurePolicies(keycode);
    }

    function _activatePolicy(Policy policy_) internal {
        if (policy_.isActive()) revert Kernel_PolicyAlreadyApproved(address(policy_));

        // Grant permissions for policy to access restricted module functions
        Permissions[] memory requests = policy_.requestPermissions();
        _setPolicyPermissions(policy_, requests, true);

        // Add policy to list of active policies
        activePolicies.push(policy_);
        getPolicyIndex[policy_] = activePolicies.length - 1;

        // Record module dependencies
        Keycode[] memory dependencies = policy_.configureDependencies();
        uint256 depLength = dependencies.length;

        for (uint256 i; i < depLength; ) {
            Keycode keycode = dependencies[i];

            moduleDependents[keycode].push(policy_);
            getDependentIndex[keycode][policy_] = moduleDependents[keycode].length - 1;

            unchecked {
                ++i;
            }
        }

        // Set policy status to active
        policy_.setActiveStatus(true);
    }

    function _deactivatePolicy(Policy policy_) internal {
        if (!policy_.isActive()) revert Kernel_PolicyNotApproved(address(policy_));

        // Revoke permissions
        Permissions[] memory requests = policy_.requestPermissions();
        _setPolicyPermissions(policy_, requests, false);

        // Remove policy from all policy data structures
        uint256 idx = getPolicyIndex[policy_];
        Policy lastPolicy = activePolicies[activePolicies.length - 1];

        activePolicies[idx] = lastPolicy;
        activePolicies.pop();
        getPolicyIndex[lastPolicy] = idx;
        delete getPolicyIndex[policy_];

        // Remove policy from module dependents
        _pruneFromDependents(policy_);

        // Set policy status to inactive
        policy_.setActiveStatus(false);
    }

    // WARNING: ACTION WILL BRICK THIS KERNEL. All functionality will move to the new kernel
    // New kernel must add in all of the modules and policies via executeAction
    // NOTE: Data does not get cleared from this kernel
    function _migrateKernel(Kernel newKernel_) internal {
        uint256 keycodeLen = allKeycodes.length;
        for (uint256 i; i < keycodeLen; ) {
            Module module = Module(getModuleForKeycode[allKeycodes[i]]);
            module.changeKernel(newKernel_);
            unchecked {
                ++i;
            }
        }

        uint256 policiesLen = activePolicies.length;
        for (uint256 j; j < policiesLen; ) {
            Policy policy = activePolicies[j];

            // Deactivate before changing kernel
            policy.setActiveStatus(false);
            policy.changeKernel(newKernel_);
            unchecked {
                ++j;
            }
        }
    }

    function _reconfigurePolicies(Keycode keycode_) internal {
        Policy[] memory dependents = moduleDependents[keycode_];
        uint256 depLength = dependents.length;

        for (uint256 i; i < depLength; ) {
            dependents[i].configureDependencies();

            unchecked {
                ++i;
            }
        }
    }

    function _setPolicyPermissions(
        Policy policy_,
        Permissions[] memory requests_,
        bool grant_
    ) internal {
        uint256 reqLength = requests_.length;
        for (uint256 i = 0; i < reqLength; ) {
            Permissions memory request = requests_[i];
            modulePermissions[request.keycode][policy_][request.funcSelector] = grant_;

            emit PermissionsUpdated(request.keycode, policy_, request.funcSelector, grant_);

            unchecked {
                ++i;
            }
        }
    }

    function _pruneFromDependents(Policy policy_) internal {
        Keycode[] memory dependencies = policy_.configureDependencies();
        uint256 depcLength = dependencies.length;

        for (uint256 i; i < depcLength; ) {
            Keycode keycode = dependencies[i];
            Policy[] storage dependents = moduleDependents[keycode];

            uint256 origIndex = getDependentIndex[keycode][policy_];
            Policy lastPolicy = dependents[dependents.length - 1];

            // Swap with last and pop
            dependents[origIndex] = lastPolicy;
            dependents.pop();

            // Record new index and delete terminated policy index
            getDependentIndex[keycode][lastPolicy] = origIndex;
            delete getDependentIndex[keycode][policy_];

            unchecked {
                ++i;
            }
        }
    }

    function grantRole(Role role_, address addr_) public onlyAdmin {
        if (hasRole[addr_][role_]) revert Kernel_AddressAlreadyHasRole(addr_, role_);

        ensureValidRole(role_);
        if (!isRole[role_]) isRole[role_] = true;

        hasRole[addr_][role_] = true;

        emit RoleGranted(role_, addr_);
    }

    function revokeRole(Role role_, address addr_) public onlyAdmin {
        if (!isRole[role_]) revert Kernel_RoleDoesNotExist(role_);
        if (!hasRole[addr_][role_]) revert Kernel_AddressDoesNotHaveRole(addr_, role_);

        hasRole[addr_][role_] = false;

        emit RoleRevoked(role_, addr_);
    }
}

interface IDefaultInstructions {

    event InstructionsStored(uint256 instructionsId);

    error INSTR_InstructionsCannotBeEmpty();
    error INSTR_InvalidChangeExecutorAction();
    error INSTR_InvalidTargetNotAContract();
    error INSTR_InvalidModuleKeycode();
}

contract DefaultInstructions is Module, IDefaultInstructions {

    /////////////////////////////////////////////////////////////////////////////////
    //                         Kernel Module Configuration                         //
    /////////////////////////////////////////////////////////////////////////////////

    constructor(Kernel kernel_) Module(kernel_) {}

    function KEYCODE() public pure override returns (Keycode) {
        return Keycode.wrap("INSTR");
    }

    /////////////////////////////////////////////////////////////////////////////////
    //                              Module Variables                               //
    /////////////////////////////////////////////////////////////////////////////////

    uint256 public totalInstructions;
    mapping(uint256 => Instruction[]) public storedInstructions;

    /////////////////////////////////////////////////////////////////////////////////
    //                             Policy Interface                                //
    /////////////////////////////////////////////////////////////////////////////////

    // view function for retrieving a list of instructions in an outside contract
    function getInstructions(uint256 instructionsId_) public view returns (Instruction[] memory) {
        return storedInstructions[instructionsId_];
    }

    function store(Instruction[] calldata instructions_) external permissioned returns (uint256) {
        uint256 length = instructions_.length;
        uint256 instructionsId = ++totalInstructions;

        // initialize an empty list of instructions that will be filled
        Instruction[] storage instructions = storedInstructions[instructionsId];

        // if there are no instructions, throw an error
        if (length == 0) {
            revert INSTR_InstructionsCannotBeEmpty();
        }

        // for each instruction, do the following actions:
        for (uint256 i; i < length; ) {
            // get the instruction
            Instruction calldata instruction = instructions_[i];

            // check the address that the instruction is being performed on is a contract (bytecode size > 0)
            _ensureContract(instruction.target);

            // if the instruction deals with a module, make sure the module has a valid keycode (UPPERCASE A-Z ONLY)
            if (
                instruction.action == Actions.InstallModule ||
                instruction.action == Actions.UpgradeModule
            ) {
                Module module = Module(instruction.target);
                _ensureValidKeycode(module.KEYCODE());
            } else if (instruction.action == Actions.ChangeExecutor && i != length - 1) {
                // throw an error if ChangeExecutor exists and is not the last Action in the instruction llist
                // this exists because if ChangeExecutor is not the last item in the list of instructions
                // the Kernel will not recognize any of the following instructions as valid, since the policy
                // executing the list of instructions no longer has permissions in the Kernel. To avoid this issue
                // and prevent invalid proposals from being saved, we perform this check.

                revert INSTR_InvalidChangeExecutorAction();
            }

            instructions.push(instructions_[i]);
            unchecked {
                ++i;
            }
        }

        emit InstructionsStored(instructionsId);

        return instructionsId;
    }

    /////////////////////////////// INTERNAL FUNCTIONS ////////////////////////////////

    function _ensureContract(address target_) internal view {
        uint256 size;
        assembly {
            size := extcodesize(target_)
        }
        if (size == 0) revert INSTR_InvalidTargetNotAContract();
    }

    function _ensureValidKeycode(Keycode keycode_) internal pure {
        bytes5 unwrapped = Keycode.unwrap(keycode_);

        for (uint256 i = 0; i < 5; ) {
            bytes1 char = unwrapped[i];

            if (char < 0x41 || char > 0x5A) revert INSTR_InvalidModuleKeycode(); // A-Z only"

            unchecked {
                i++;
            }
        }
    }
}

Contract ABI

[{"inputs":[{"internalType":"contract Kernel","name":"kernel_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"INSTR_InstructionsCannotBeEmpty","type":"error"},{"inputs":[],"name":"INSTR_InvalidChangeExecutorAction","type":"error"},{"inputs":[],"name":"INSTR_InvalidModuleKeycode","type":"error"},{"inputs":[],"name":"INSTR_InvalidTargetNotAContract","type":"error"},{"inputs":[{"internalType":"address","name":"caller_","type":"address"}],"name":"KernelAdapter_OnlyKernel","type":"error"},{"inputs":[{"internalType":"address","name":"policy_","type":"address"}],"name":"Module_PolicyNotAuthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"instructionsId","type":"uint256"}],"name":"InstructionsStored","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes4","name":"funcSelector_","type":"bytes4"},{"indexed":false,"internalType":"address","name":"policy_","type":"address"},{"indexed":false,"internalType":"bool","name":"permission_","type":"bool"}],"name":"PermissionSet","type":"event"},{"inputs":[],"name":"INIT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"KEYCODE","outputs":[{"internalType":"Keycode","name":"","type":"bytes5"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint8","name":"major","type":"uint8"},{"internalType":"uint8","name":"minor","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract Kernel","name":"newKernel_","type":"address"}],"name":"changeKernel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"instructionsId_","type":"uint256"}],"name":"getInstructions","outputs":[{"components":[{"internalType":"enum Actions","name":"action","type":"uint8"},{"internalType":"address","name":"target","type":"address"}],"internalType":"struct Instruction[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kernel","outputs":[{"internalType":"contract Kernel","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"enum Actions","name":"action","type":"uint8"},{"internalType":"address","name":"target","type":"address"}],"internalType":"struct Instruction[]","name":"instructions_","type":"tuple[]"}],"name":"store","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"storedInstructions","outputs":[{"internalType":"enum Actions","name":"action","type":"uint8"},{"internalType":"address","name":"target","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalInstructions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50604051610d64380380610d6483398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b610cd1806100936000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c8063b1d85eec11610076578063ea6439141161005b578063ea64391414610180578063f19928c014610188578063ffa1ad74146101a857600080fd5b8063b1d85eec14610128578063d4aae0c41461013b57600080fd5b80631ae7ec2e146100a85780634657b36c146100db5780636eaadfc7146100f05780638ba639a414610107575b600080fd5b6040517f494e53545200000000000000000000000000000000000000000000000000000081526020015b60405180910390f35b6100ee6100e93660046108bc565b6101bc565b005b6100f960015481565b6040519081526020016100d2565b61011a6101153660046108e0565b61025b565b6040516100d292919061096c565b6100f961013636600461099d565b6102a9565b60005461015b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100d2565b6100ee610648565b61019b610196366004610a12565b61069d565b6040516100d29190610a2b565b6040805160008082526020820152016100d2565b60005473ffffffffffffffffffffffffffffffffffffffff163314610214576040517f14fa403c0000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6002602052816000526040600020818154811061027757600080fd5b60009182526020909120015460ff81169250610100900473ffffffffffffffffffffffffffffffffffffffff16905082565b6000805473ffffffffffffffffffffffffffffffffffffffff1663f166d9eb7f494e5354520000000000000000000000000000000000000000000000000000006040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b811682527fffffffffff0000000000000000000000000000000000000000000000000000009290921660048201523360248201526000359091166044820152606401602060405180830381865afa158015610371573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103959190610a97565b6103cd576040517f02ad7db000000000000000000000000000000000000000000000000000000000815233600482015260240161020b565b60018054839160009182906103e190610ae8565b91829055506000818152600260205260408120919250839003610430576040517f3f6c6e9900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8381101561060b573687878381811061044e5761044e610b20565b905060400201905061047181602001602081019061046c91906108bc565b610759565b60006104806020830183610b5c565b600681111561049157610491610902565b14806104ba575060016104a76020830183610b5c565b60068111156104b8576104b8610902565b145b156105505760006104d160408301602084016108bc565b905061054a8173ffffffffffffffffffffffffffffffffffffffff16631ae7ec2e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610521573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105459190610b79565b61079a565b506105be565b600461055f6020830183610b5c565b600681111561057057610570610902565b1480156105875750610583600186610bbb565b8214155b156105be576040517fdcaa8ba700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828888848181106105d1576105d1610b20565b835460018101855560009485526020909420604090910292909201929190910190506105fd8282610bd2565b505081600101915050610433565b506040518281527f786456549a8048fc360b44d675c164244436ef1e5048c3aecea4d160400fd0019060200160405180910390a150949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461069b576040517f14fa403c00000000000000000000000000000000000000000000000000000000815233600482015260240161020b565b565b606060026000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561074e57600084815260209020604080518082019091529083018054829060ff16600681111561070857610708610902565b600681111561071957610719610902565b81529054610100900473ffffffffffffffffffffffffffffffffffffffff1660209182015290825260019290920191016106d2565b505050509050919050565b803b6000819003610796576040517f7e3d5ded00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b8060005b60058110156108925760008282600581106107bb576107bb610b20565b1a60f81b90507f41000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008216108061085257507f5a000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008216115b15610889576040517f2b79f4c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060010161079e565b505050565b73ffffffffffffffffffffffffffffffffffffffff811681146108b957600080fd5b50565b6000602082840312156108ce57600080fd5b81356108d981610897565b9392505050565b600080604083850312156108f357600080fd5b50508035926020909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60078110610968577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b6040810161097a8285610931565b73ffffffffffffffffffffffffffffffffffffffff831660208301529392505050565b600080602083850312156109b057600080fd5b823567ffffffffffffffff808211156109c857600080fd5b818501915085601f8301126109dc57600080fd5b8135818111156109eb57600080fd5b8660208260061b8501011115610a0057600080fd5b60209290920196919550909350505050565b600060208284031215610a2457600080fd5b5035919050565b602080825282518282018190526000919060409081850190868401855b82811015610a8a578151610a5d858251610931565b86015173ffffffffffffffffffffffffffffffffffffffff16848701529284019290850190600101610a48565b5091979650505050505050565b600060208284031215610aa957600080fd5b815180151581146108d957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610b1957610b19610ab9565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600781106108b957600080fd5b600060208284031215610b6e57600080fd5b81356108d981610b4f565b600060208284031215610b8b57600080fd5b81517fffffffffff000000000000000000000000000000000000000000000000000000811681146108d957600080fd5b600082821015610bcd57610bcd610ab9565b500390565b8135610bdd81610b4f565b60078110610c14577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b815460ff82169150817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082161783556020840135610c5181610897565b74ffffffffffffffffffffffffffffffffffffffff008160081b16837fffffffffffffffffffffff000000000000000000000000000000000000000000841617178455505050505056fea26469706673582212207ff42353b3740142f7b387b565860a6575a8927f18506098762e0978e9a301db64736f6c634300080f0033000000000000000000000000ad961758441a99147478c594d70868c1104eb071

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

000000000000000000000000ad961758441a99147478c594d70868c1104eb071

-----Decoded View---------------
Arg [0] : kernel_ (address): 0xad961758441a99147478c594d70868c1104eb071

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


Deployed ByteCode Sourcemap

15488:4288:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15875:105;;;15951:21;186:98:1;;174:2;159:18;15875:105:0;;;;;;;;3168:99;;;;;;:::i;:::-;;:::i;:::-;;16251:32;;;;;;;;;883:25:1;;;871:2;856:18;16251:32:0;737:177:1;16290:59:0;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;16866:2196::-;;;;;;:::i;:::-;;:::i;2929:20::-;;;;;;;;;;;;2827:42:1;2815:55;;;2797:74;;2785:2;2770:18;2929:20:0;2636:241:1;4250:46:0;;;:::i;16704:154::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3933:78::-;;;;3983:11;4098:36:1;;;4165:2;4150:18;;4143:45;4071:18;3933:78:0;3932:262:1;3168:99:0;3088:6;;;;3066:10;:29;3062:78;;3104:36;;;;;3129:10;3104:36;;;2797:74:1;2770:18;;3104:36:0;;;;;;;;3062:78;3240:6:::1;:19:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;3168:99::o;16290:59::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16290:59:0;;;;;;-1:-1:-1;16290:59:0;:::o;16866:2196::-;16950:7;3509:6;;;;:24;15951:21;3509:64;;3565:7;3509:64;;;;;;;;4700:66:1;4688:79;;;;3509:64:0;;;4670:98:1;3552:10:0;4784:18:1;;;4777:83;-1:-1:-1;3565:7:0;;;;4876:18:1;;;4869:107;4643:18;;3509:64:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3504:129;;3595:38;;;;;3622:10;3595:38;;;2797:74:1;2770:18;;3595:38:0;2636:241:1;3504:129:0;17045:17:::1;17043:19:::0;;16987:13;;16970:14:::1;::::0;;;17043:19:::1;::::0;::::1;:::i;:::-;::::0;;;;-1:-1:-1;17148:34:0::1;17185::::0;;;:18:::1;:34;::::0;;;;17043:19;;-1:-1:-1;17293:11:0;;;17289:84:::1;;17328:33;;;;;;;;;;;;;;17289:84;17450:9;17445:1524;17465:6;17461:1;:10;17445:1524;;;17526:32;17561:13;;17575:1;17561:16;;;;;;;:::i;:::-;;;;;;17526:51;;17705:35;17721:11;:18;;;;;;;;;;:::i;:::-;17705:15;:35::i;:::-;17919:21;17897:18;;::::0;::::1;:11:::0;:18:::1;:::i;:::-;:43;;;;;;;;:::i;:::-;;:107;;;-1:-1:-1::0;17983:21:0::1;17961:18;;::::0;::::1;:11:::0;:18:::1;:::i;:::-;:43;;;;;;;;:::i;:::-;;17897:107;17875:969;;;18039:13;18062:18;::::0;;;::::1;::::0;::::1;;:::i;:::-;18039:42;;18100:37;18120:6;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;18100:19;:37::i;:::-;18020:133;17875:969;;;18185:22;18163:18;;::::0;::::1;:11:::0;:18:::1;:::i;:::-;:44;;;;;;;;:::i;:::-;;:63;;;;-1:-1:-1::0;18216:10:0::1;18225:1;18216:6:::0;:10:::1;:::i;:::-;18211:1;:15;;18163:63;18159:685;;;18793:35;;;;;;;;;;;;;;18159:685;18860:12;18878:13;;18892:1;18878:16;;;;;;;:::i;:::-;18860:35:::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;18860:35:0;;;::::1;::::0;;;18878:16:::1;::::0;;::::1;::::0;;;::::1;::::0;18860:35;;;::::1;::::0;-1:-1:-1;18860:35:0::1;18878:16:::0;18860:35;::::1;:::i;:::-;;;18939:3;;;;;17475:1494;17445:1524;;;-1:-1:-1::0;18986:34:0::1;::::0;883:25:1;;;18986:34:0::1;::::0;871:2:1;856:18;18986:34:0::1;;;;;;;-1:-1:-1::0;19040:14:0;16866:2196;-1:-1:-1;;;;16866:2196:0:o;4250:46::-;3088:6;;;;3066:10;:29;3062:78;;3104:36;;;;;3129:10;3104:36;;;2797:74:1;2770:18;;3104:36:0;2636:241:1;3062:78:0;4250:46::o;16704:154::-;16775:20;16815:18;:35;16834:15;16815:35;;;;;;;;;;;16808:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16704:154;;;:::o;19161:226::-;19283:20;;19228:12;19328:9;;;19324:55;;19346:33;;;;;;;;;;;;;;19324:55;19217:170;19161:226;:::o;19395:378::-;19501:8;19467:16;19523:243;19547:1;19543;:5;19523:243;;;19567:11;19581:9;19591:1;19581:12;;;;;;;:::i;:::-;;;;;-1:-1:-1;19614:11:0;;;;;;:26;;-1:-1:-1;19629:11:0;;;;;19614:26;19610:67;;;19649:28;;;;;;;;;;;;;;19610:67;-1:-1:-1;19736:3:0;;19523:243;;;;19456:317;19395:378;:::o;295:162:1:-;389:42;382:5;378:54;371:5;368:65;358:93;;447:1;444;437:12;358:93;295:162;:::o;462:270::-;536:6;589:2;577:9;568:7;564:23;560:32;557:52;;;605:1;602;595:12;557:52;644:9;631:23;663:39;696:5;663:39;:::i;:::-;721:5;462:270;-1:-1:-1;;;462:270:1:o;919:248::-;987:6;995;1048:2;1036:9;1027:7;1023:23;1019:32;1016:52;;;1064:1;1061;1054:12;1016:52;-1:-1:-1;;1087:23:1;;;1157:2;1142:18;;;1129:32;;-1:-1:-1;919:248:1:o;1172:184::-;1224:77;1221:1;1214:88;1321:4;1318:1;1311:15;1345:4;1342:1;1335:15;1361:292;1440:1;1433:5;1430:12;1420:200;;1476:77;1473:1;1466:88;1577:4;1574:1;1567:15;1605:4;1602:1;1595:15;1420:200;1629:18;;1361:292::o;1658:323::-;1829:2;1814:18;;1841:42;1818:9;1865:6;1841:42;:::i;:::-;1931;1923:6;1919:55;1914:2;1903:9;1899:18;1892:83;1658:323;;;;;:::o;1986:645::-;2102:6;2110;2163:2;2151:9;2142:7;2138:23;2134:32;2131:52;;;2179:1;2176;2169:12;2131:52;2219:9;2206:23;2248:18;2289:2;2281:6;2278:14;2275:34;;;2305:1;2302;2295:12;2275:34;2343:6;2332:9;2328:22;2318:32;;2388:7;2381:4;2377:2;2373:13;2369:27;2359:55;;2410:1;2407;2400:12;2359:55;2450:2;2437:16;2476:2;2468:6;2465:14;2462:34;;;2492:1;2489;2482:12;2462:34;2545:7;2540:2;2530:6;2527:1;2523:14;2519:2;2515:23;2511:32;2508:45;2505:65;;;2566:1;2563;2556:12;2505:65;2597:2;2589:11;;;;;2619:6;;-1:-1:-1;1986:645:1;;-1:-1:-1;;;;1986:645:1:o;2882:180::-;2941:6;2994:2;2982:9;2973:7;2969:23;2965:32;2962:52;;;3010:1;3007;3000:12;2962:52;-1:-1:-1;3033:23:1;;2882:180;-1:-1:-1;2882:180:1:o;3067:860::-;3294:2;3346:21;;;3416:13;;3319:18;;;3438:22;;;3265:4;;3294:2;3479;;3497:18;;;;3538:15;;;3265:4;3581:320;3595:6;3592:1;3589:13;3581:320;;;3660:6;3654:13;3680:39;3715:3;3710:2;3704:9;3680:39;:::i;:::-;3763:11;;3757:18;3777:42;3753:67;3739:12;;;3732:89;3841:12;;;;3876:15;;;;3617:1;3610:9;3581:320;;;-1:-1:-1;3918:3:1;;3067:860;-1:-1:-1;;;;;;;3067:860:1:o;4987:277::-;5054:6;5107:2;5095:9;5086:7;5082:23;5078:32;5075:52;;;5123:1;5120;5113:12;5075:52;5155:9;5149:16;5208:5;5201:13;5194:21;5187:5;5184:32;5174:60;;5230:1;5227;5220:12;5269:184;5321:77;5318:1;5311:88;5418:4;5415:1;5408:15;5442:4;5439:1;5432:15;5458:195;5497:3;5528:66;5521:5;5518:77;5515:103;;5598:18;;:::i;:::-;-1:-1:-1;5645:1:1;5634:13;;5458:195::o;5658:184::-;5710:77;5707:1;5700:88;5807:4;5804:1;5797:15;5831:4;5828:1;5821:15;6107:106;6187:1;6180:5;6177:12;6167:40;;6203:1;6200;6193:12;6218:263;6288:6;6341:2;6329:9;6320:7;6316:23;6312:32;6309:52;;;6357:1;6354;6347:12;6309:52;6396:9;6383:23;6415:36;6445:5;6415:36;:::i;6486:364::-;6583:6;6636:2;6624:9;6615:7;6611:23;6607:32;6604:52;;;6652:1;6649;6642:12;6604:52;6684:9;6678:16;6734:66;6727:5;6723:78;6716:5;6713:89;6703:117;;6816:1;6813;6806:12;6855:125;6895:4;6923:1;6920;6917:8;6914:34;;;6928:18;;:::i;:::-;-1:-1:-1;6965:9:1;;6855:125::o;6985:893::-;7156:5;7143:19;7171:38;7201:7;7171:38;:::i;:::-;7240:1;7231:7;7228:14;7218:202;;7276:77;7273:1;7266:88;7377:4;7374:1;7367:15;7405:4;7402:1;7395:15;7218:202;7445:4;7439:11;7482:3;7473:7;7469:17;7459:27;;7588:2;7519:66;7515:2;7511:75;7508:83;7502:4;7495:97;7640:2;7633:5;7629:14;7616:28;7653:41;7686:7;7653:41;:::i;:::-;7825:44;7815:7;7812:1;7808:15;7804:66;7799:2;7730:66;7726:2;7722:75;7719:83;7716:155;7710:4;7703:169;;;;6985:893;;:::o

Metadata Hash

7ff42353b3740142f7b387b565860a6575a8927f18506098762e0978e9a301db
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.