Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x59dAa74f2D15c87Aac435eC18Cb559f92490C100
Balance 0 ETH
Nonce 1
Code Size 7723 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

7723 bytes
0x60806040526004361061008a5760003560e01c80637b103999116100595780637b103999146103d657806387c13943146103f857806399eb59b91461040d578063dc9031c41461042d578063fa2901a51461044d576100bf565b80630f532d18146103705780631413dc7d1461039b57806338c5c08e146103b057806371938509146103c3576100bf565b366100bf576100983361046f565b6100bd5760405162461bcd60e51b81526004016100b490611a14565b60405180910390fd5b005b7f00000000000000000000000084faf5b559f58d651e51300c5a7d078cb964e6916001600160a01b031663ea750af66040518163ffffffff1660e01b815260040160206040518083038186803b15801561011857600080fd5b505afa15801561012c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101509190611758565b1561016d5760405162461bcd60e51b81526004016100b490611b35565b604051630c81ee5560e11b81526001600160a01b037f00000000000000000000000084faf5b559f58d651e51300c5a7d078cb964e6911690631903dcaa906101b99030906004016117c4565b60206040518083038186803b1580156101d157600080fd5b505afa1580156101e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102099190611790565b156102265760405162461bcd60e51b81526004016100b490611a42565b6000610230610479565b6001600160a01b031614156102575760405162461bcd60e51b81526004016100b490611842565b61026033610499565b61027c5760405162461bcd60e51b81526004016100b4906118d1565b604051637bbf4a3f60e01b81526000906001600160a01b037f00000000000000000000000084faf5b559f58d651e51300c5a7d078cb964e6911690637bbf4a3f906102cb9033906004016117c4565b60206040518083038186803b1580156102e357600080fd5b505afa1580156102f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031b9190611790565b60601c90506060610363826000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061053e92505050565b8051909150602082018181f35b34801561037c57600080fd5b506103856105bd565b60405161039291906117f1565b60405180910390f35b3480156103a757600080fd5b506103856105cf565b6100bd6103be366004611674565b6105e1565b6100bd6103d1366004611674565b6107ce565b3480156103e257600080fd5b506103eb6109f4565b60405161039291906117c4565b34801561040457600080fd5b50610385610a18565b34801561041957600080fd5b50610385610428366004611778565b610a24565b34801561043957600080fd5b50610385610448366004611778565b610a36565b34801561045957600080fd5b50610462610a54565b60405161039291906117fa565b803b15155b919050565b60006104946001600080516020611db6833981519152610a5f565b905090565b60405163bb1010e960e01b81526000906001600160a01b037f00000000000000000000000084faf5b559f58d651e51300c5a7d078cb964e691169063bb1010e9906104e89085906004016117c4565b60206040518083038186803b15801561050057600080fd5b505afa158015610514573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105389190611758565b92915050565b606061054983610a72565b6105655760405162461bcd60e51b81526004016100b490611a89565b61056d610ac1565b600080835160208501866113885a03f43d6040519250601f19601f6020830101168301604052808352806000602085013e8115600181146105ad576105b4565b8160208501fd5b50505092915050565b600080516020611db683398151915281565b600080516020611dd683398151915281565b7f00000000000000000000000084faf5b559f58d651e51300c5a7d078cb964e6916001600160a01b031663ea750af66040518163ffffffff1660e01b815260040160206040518083038186803b15801561063a57600080fd5b505afa15801561064e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106729190611758565b1561068f5760405162461bcd60e51b81526004016100b490611b35565b604051630c81ee5560e11b81526001600160a01b037f00000000000000000000000084faf5b559f58d651e51300c5a7d078cb964e6911690631903dcaa906106db9030906004016117c4565b60206040518083038186803b1580156106f357600080fd5b505afa158015610707573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072b9190611790565b156107485760405162461bcd60e51b81526004016100b490611a42565b610750610ae8565b6107bf85858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250869250610b35915050565b6107c7610c82565b5050505050565b7f00000000000000000000000084faf5b559f58d651e51300c5a7d078cb964e6916001600160a01b031663ea750af66040518163ffffffff1660e01b815260040160206040518083038186803b15801561082757600080fd5b505afa15801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190611758565b1561087c5760405162461bcd60e51b81526004016100b490611b35565b604051630c81ee5560e11b81526001600160a01b037f00000000000000000000000084faf5b559f58d651e51300c5a7d078cb964e6911690631903dcaa906108c89030906004016117c4565b60206040518083038186803b1580156108e057600080fd5b505afa1580156108f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109189190611790565b156109355760405162461bcd60e51b81526004016100b490611a42565b600061093f610479565b6001600160a01b031614156109665760405162461bcd60e51b81526004016100b490611842565b3330146109855760405162461bcd60e51b81526004016100b490611ab2565b6107c785858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250869250610b35915050565b7f00000000000000000000000084faf5b559f58d651e51300c5a7d078cb964e69181565b670de0b6b3a764000081565b60016020526000908152604090205481565b60008181548110610a4357fe5b600091825260209091200154905081565b636139148b60e11b81565b6000908152602091909152604090205490565b604051631a98d06960e31b81526000906001600160a01b037f00000000000000000000000084faf5b559f58d651e51300c5a7d078cb964e691169063d4c68348906104e89085906004016117c4565b610ae6600080516020611dd6833981519152610adb610e23565b600191908201610e3e565b565b60005415610b085760405162461bcd60e51b81526004016100b490611be3565b610b10610e23565b15610b2d5760405162461bcd60e51b81526004016100b490611928565b610ae6610e50565b610b3d6115a2565b60008251855114610b605760405162461bcd60e51b81526004016100b490611ba2565b8351855114610b815760405162461bcd60e51b81526004016100b490611c43565b60005b8551811015610c7a576000858281518110610b9b57fe5b60200260200101519050610bae81610e9a565b610bd157610bd1858381518110610bc157fe5b6020026020010151828686610eb7565b6060610c03888481518110610be257fe5b6020026020010151878581518110610bf657fe5b602002602001015161053e565b9050610c0e82610f90565b15610c54576000610c1e83610faf565b90506000610c2d878488610fb8565b90508186018114610c505760405162461bcd60e51b81526004016100b490611ae9565b9450505b610c70888481518110610c6357fe5b6020026020010151611035565b5050600101610b84565b505050505050565b60005415610dda576000610c9660006110a7565b9050600060a082901c6002811115610caa57fe5b90506000816002811115610cba57fe5b1415610d64576040516370a0823160e01b815282906000906001600160a01b038316906370a0823190610cf19030906004016117c4565b60206040518083038186803b158015610d0957600080fd5b505afa158015610d1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d419190611790565b90508015610d5d57610d5d6001600160a01b03831633836110d9565b5050610dd3565b6001816002811115610d7257fe5b1415610dbb576000610d846000611134565b6040805160048152602481019091526020810180516001600160e01b0316636139148b60e11b179052909150610d5d90829061053e565b60405162461bcd60e51b81526004016100b490611879565b5050610c82565b478015610e1057604051339082156108fc029083906000818181858888f19350505050158015610e0e573d6000803e3d6000fd5b505b610e1861114e565b610e20611169565b50565b60006104946001600080516020611dd6833981519152610a5f565b60009182526020929092526040902055565b6000610e5a610479565b6001600160a01b031614610e805760405162461bcd60e51b81526004016100b4906118f9565b610ae66001600080516020611db683398151915233611184565b6000600160f81b8216610eaf57506001610474565b506000610474565b606080610ec3856111a2565b9150915060005b8251811015610f875783838281518110610ee057fe5b602002602001015110610f055760405162461bcd60e51b81526004016100b490611cbd565b600085848381518110610f1457fe5b60200260200101516101008110610f2757fe5b602002015190506000838381518110610f3c57fe5b602002602001015190506000670de0b6b3a764000090508160208b010180518015610f78578481028582820414610f7257600080fd5b83900494505b50929092525050600101610eca565b50505050505050565b6000610f9b82610faf565b610fa757506000610474565b506001610474565b60f01c60ff1690565b81516000906020810615610fde5760405162461bcd60e51b81526004016100b490611c0c565b60208104830191506101008211156110085760405162461bcd60e51b81526004016100b490611b7a565b8260051b60005b8281101561102b5760208187018101518383018901520161100f565b5050509392505050565b60005461104157610e20565b600160a01b6110506000611363565b1415610e2057600080548061106157fe5b600190038181906000526020600020016000905590556110816000611363565b6001600160e01b0319161561109b5761109b6000826113a8565b610e20600060016113ca565b60006110b282611363565b9050818054806110be57fe5b60019003818190600052602060002001600090559055919050565b61112f8363a9059cbb60e01b84846040516024016110f89291906117d8565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611400565b505050565b600061113f82611363565b60001c9050818054806110be57fe5b610ae66001600080516020611db68339815191526000611184565b610ae66001600080516020611dd68339815191526000610e3e565b6000918252602092909252604090206001600160a01b039091169055565b6060806111ae83610e9a565b156111cb5760405162461bcd60e51b81526004016100b490611a62565b60165b60ff8481161480156111e05750600081115b156111f55760089390931c92600019016111ce565b600081116112155760405162461bcd60e51b81526004016100b4906118a7565b8067ffffffffffffffff8111801561122c57600080fd5b50604051908082528060200260200182016040528015611256578160200160208202803683370190505b5092508067ffffffffffffffff8111801561127057600080fd5b5060405190808252806020026020018201604052801561129a578160200160208202803683370190505b50915060005b818110156112d557835160ff8616908590839081106112bb57fe5b602090810291909101015260089490941c936001016112a0565b506000805b604081101561133c5760018616156113305782821061130b5760405162461bcd60e51b81526004016100b490611999565b8060200260040184838151811061131e57fe5b60209081029190910101526001909101905b600195861c95016112da565b5081811461135c5760405162461bcd60e51b81526004016100b490611957565b5050915091565b80546000906113845760405162461bcd60e51b81526004016100b490611b55565b81548290600019810190811061139657fe5b90600052602060002001549050919050565b8154600181018355600092835260209092206001600160a01b03909116910155565b818160028111156113d757fe5b81546001810183556000928352602090922060a09190911b6001600160a01b0319169101555050565b6060611455826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661148f9092919063ffffffff16565b80519091501561112f57808060200190518101906114739190611758565b61112f5760405162461bcd60e51b81526004016100b490611cf4565b606061149e84846000856114a8565b90505b9392505050565b6060824710156114ca5760405162461bcd60e51b81526004016100b4906119ce565b6114d38561046f565b6114ef5760405162461bcd60e51b81526004016100b490611c86565b60006060866001600160a01b0316858760405161150c91906117a8565b60006040518083038185875af1925050503d8060008114611549576040519150601f19603f3d011682016040523d82523d6000602084013e61154e565b606091505b509150915061155e828286611569565b979650505050505050565b606083156115785750816114a1565b8251156115885782518084602001fd5b8160405162461bcd60e51b81526004016100b4919061180f565b604051806120000160405280610100906020820280368337509192915050565b60008083601f8401126115d3578182fd5b50813567ffffffffffffffff8111156115ea578182fd5b602083019150836020808302850101111561160457600080fd5b9250929050565b600082601f83011261161b578081fd5b813567ffffffffffffffff811115611631578182fd5b611644601f8201601f1916602001611d3e565b915080825283602082850101111561165b57600080fd5b8060208401602084013760009082016020015292915050565b60008060008060006060868803121561168b578081fd5b853567ffffffffffffffff808211156116a2578283fd5b6116ae89838a016115c2565b90975095506020915087820135818111156116c7578384fd5b6116d38a828b016115c2565b9096509450506040880135818111156116ea578384fd5b88019050601f810189136116fc578283fd5b803561170f61170a82611d65565b611d3e565b81815283810190838501865b84811015611744576117328e88843589010161160b565b8452928601929086019060010161171b565b505080955050505050509295509295909350565b600060208284031215611769578081fd5b815180151581146114a1578182fd5b600060208284031215611789578081fd5b5035919050565b6000602082840312156117a1578081fd5b5051919050565b600082516117ba818460208701611d85565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b90815260200190565b6001600160e01b031991909116815260200190565b600060208252825180602084015261182e816040850160208701611d85565b601f01601f19169190910160400192915050565b60208082526019908201527f53656e646572206973206e6f7420696e697469616c697a656400000000000000604082015260600190565b602080825260149082015273496e76616c69642068616e646c6572207479706560601b604082015260600190565b60208082526010908201526f4e6f2064796e616d696320706172616d60801b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b0b63632b960911b604082015260600190565b60208082526015908201527414d95b99195c881a5cc81a5b9a5d1a585b1a5e9959605a1b604082015260600190565b6020808252601590820152744375626520636f756e746572206e6f74207a65726f60581b604082015260600190565b60208082526022908201527f4c6f636174696f6e20636f756e74206c657373207468616e2072656620636f756040820152611b9d60f21b606082015260800190565b6020808252818101527f4c6f636174696f6e20636f756e7420657863656564732072656620636f756e74604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601490820152734e6f7420616c6c6f7765642066726f6d20454f4160601b604082015260600190565b60208082526006908201526510985b9b995960d21b604082015260600190565b6020808252600d908201526c53746174696320706172616d7360981b604082015260600190565b6020808252600f908201526e24b73b30b634b2103430b7323632b960891b604082015260600190565b6020808252601d908201527f446f6573206e6f7420616c6c6f772065787465726e616c2063616c6c73000000604082015260600190565b6020808252602c908201527f52657475726e206e756d20616e64207061727365642072657475726e206e756d60408201526b081b9bdd081b585d18da195960a21b606082015260800190565b60208082526006908201526512185b1d195960d21b604082015260600190565b6020808252600b908201526a737461636b20656d70747960a81b604082015260600190565b6020808252600e908201526d737461636b206f766572666c6f7760901b604082015260600190565b60208082526021908201527f546f7320616e64206461746173206c656e67746820696e636f6e73697374656e6040820152601d60fa1b606082015260800190565b6020808252600f908201526e537461636b206e6f7420656d70747960881b604082015260600190565b60208082526019908201527f696c6c6567616c206c656e67746820666f72205f706172736500000000000000604082015260600190565b60208082526023908201527f546f7320616e6420636f6e66696773206c656e67746820696e636f6e73697374604082015262195b9d60ea1b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252601e908201527f5265666572656e636520746f206f7574206f66206c6f63616c537461636b0000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60405181810167ffffffffffffffff81118282101715611d5d57600080fd5b604052919050565b600067ffffffffffffffff821115611d7b578081fd5b5060209081020190565b60005b83811015611da0578181015183820152602001611d88565b83811115611daf576000848401525b5050505056feb2f2618cecbbb6e7468cc0f2aa43858ad8d153e0280b22285e28e853bb9d453af9543f11459ccccd21306c8881aaab675ff49d988c1162fd1dd9bbcdbe4446bea264697066735822122051db33abd03600483453f645abc594ed426f00b8264511097e052adb605fff3a64736f6c634300060c0033

Verified Source Code Partial Match

Compiler: v0.6.12+commit.27d51765 EVM: istanbul Optimization: Yes (200 runs)
Proxy.sol 1069 lines
// File: contracts/lib/LibParam.sol

pragma solidity ^0.6.0;

library LibParam {
    bytes32 private constant STATIC_MASK =
        0x0100000000000000000000000000000000000000000000000000000000000000;
    bytes32 private constant PARAMS_MASK =
        0x0000000000000000000000000000000000000000000000000000000000000001;
    bytes32 private constant REFS_MASK =
        0x00000000000000000000000000000000000000000000000000000000000000FF;
    bytes32 private constant RETURN_NUM_MASK =
        0x00FF000000000000000000000000000000000000000000000000000000000000;

    uint256 private constant REFS_LIMIT = 22;
    uint256 private constant PARAMS_SIZE_LIMIT = 64;
    uint256 private constant RETURN_NUM_OFFSET = 240;

    function isStatic(bytes32 conf) internal pure returns (bool) {
        if (conf & STATIC_MASK == 0) return true;
        else return false;
    }

    function isReferenced(bytes32 conf) internal pure returns (bool) {
        if (getReturnNum(conf) == 0) return false;
        else return true;
    }

    function getReturnNum(bytes32 conf) internal pure returns (uint256 num) {
        bytes32 temp = (conf & RETURN_NUM_MASK) >> RETURN_NUM_OFFSET;
        num = uint256(temp);
    }

    function getParams(bytes32 conf)
        internal
        pure
        returns (uint256[] memory refs, uint256[] memory params)
    {
        require(!isStatic(conf), "Static params");
        uint256 n = REFS_LIMIT;
        while (conf & REFS_MASK == REFS_MASK && n > 0) {
            n--;
            conf = conf >> 8;
        }
        require(n > 0, "No dynamic param");
        refs = new uint256[](n);
        params = new uint256[](n);
        for (uint256 i = 0; i < n; i++) {
            refs[i] = uint256(conf & REFS_MASK);
            conf = conf >> 8;
        }
        uint256 i = 0;
        for (uint256 k = 0; k < PARAMS_SIZE_LIMIT; k++) {
            if (conf & PARAMS_MASK != 0) {
                require(i < n, "Location count exceeds ref count");
                params[i] = k * 32 + 4;
                i++;
            }
            conf = conf >> 1;
        }
        require(i == n, "Location count less than ref count");
    }
}

// File: contracts/lib/LibStack.sol

pragma solidity ^0.6.0;


library LibStack {
    function setAddress(bytes32[] storage _stack, address _input) internal {
        _stack.push(bytes32(uint256(uint160(_input))));
    }

    function set(bytes32[] storage _stack, bytes32 _input) internal {
        _stack.push(_input);
    }

    function setHandlerType(bytes32[] storage _stack, Config.HandlerType _input)
        internal
    {
        _stack.push(bytes12(uint96(_input)));
    }

    function getAddress(bytes32[] storage _stack)
        internal
        returns (address ret)
    {
        ret = address(uint160(uint256(peek(_stack))));
        _stack.pop();
    }

    function getSig(bytes32[] storage _stack) internal returns (bytes4 ret) {
        ret = bytes4(peek(_stack));
        _stack.pop();
    }

    function get(bytes32[] storage _stack) internal returns (bytes32 ret) {
        ret = peek(_stack);
        _stack.pop();
    }

    function peek(bytes32[] storage _stack)
        internal
        view
        returns (bytes32 ret)
    {
        require(_stack.length > 0, "stack empty");
        ret = _stack[_stack.length - 1];
    }
}

// File: contracts/lib/LibCache.sol

pragma solidity ^0.6.0;

library LibCache {
    function set(
        mapping(bytes32 => bytes32) storage _cache,
        bytes32 _key,
        bytes32 _value
    ) internal {
        _cache[_key] = _value;
    }

    function setAddress(
        mapping(bytes32 => bytes32) storage _cache,
        bytes32 _key,
        address _value
    ) internal {
        _cache[_key] = bytes32(uint256(uint160(_value)));
    }

    function setUint256(
        mapping(bytes32 => bytes32) storage _cache,
        bytes32 _key,
        uint256 _value
    ) internal {
        _cache[_key] = bytes32(_value);
    }

    function getAddress(
        mapping(bytes32 => bytes32) storage _cache,
        bytes32 _key
    ) internal view returns (address ret) {
        ret = address(uint160(uint256(_cache[_key])));
    }

    function getUint256(
        mapping(bytes32 => bytes32) storage _cache,
        bytes32 _key
    ) internal view returns (uint256 ret) {
        ret = uint256(_cache[_key]);
    }

    function get(mapping(bytes32 => bytes32) storage _cache, bytes32 _key)
        internal
        view
        returns (bytes32 ret)
    {
        ret = _cache[_key];
    }
}

// File: contracts/Storage.sol

pragma solidity ^0.6.0;



/// @notice A cache structure composed by a bytes32 array
contract Storage {
    using LibCache for mapping(bytes32 => bytes32);
    using LibStack for bytes32[];

    bytes32[] public stack;
    mapping(bytes32 => bytes32) public cache;

    // keccak256 hash of "msg.sender"
    // prettier-ignore
    bytes32 public constant MSG_SENDER_KEY = 0xb2f2618cecbbb6e7468cc0f2aa43858ad8d153e0280b22285e28e853bb9d453a;

    // keccak256 hash of "cube.counter"
    // prettier-ignore
    bytes32 public constant CUBE_COUNTER_KEY = 0xf9543f11459ccccd21306c8881aaab675ff49d988c1162fd1dd9bbcdbe4446be;

    modifier isStackEmpty() {
        require(stack.length == 0, "Stack not empty");
        _;
    }

    modifier isCubeCounterZero() {
        require(_getCubeCounter() == 0, "Cube counter not zero");
        _;
    }

    modifier isInitialized() {
        require(_getSender() != address(0), "Sender is not initialized");
        _;
    }

    modifier isNotInitialized() {
        require(_getSender() == address(0), "Sender is initialized");
        _;
    }

    function _setSender() internal isNotInitialized {
        cache.setAddress(MSG_SENDER_KEY, msg.sender);
    }

    function _resetSender() internal {
        cache.setAddress(MSG_SENDER_KEY, address(0));
    }

    function _getSender() internal view returns (address) {
        return cache.getAddress(MSG_SENDER_KEY);
    }

    function _addCubeCounter() internal {
        cache.setUint256(CUBE_COUNTER_KEY, _getCubeCounter() + 1);
    }

    function _resetCubeCounter() internal {
        cache.setUint256(CUBE_COUNTER_KEY, 0);
    }

    function _getCubeCounter() internal view returns (uint256) {
        return cache.getUint256(CUBE_COUNTER_KEY);
    }
}

// File: contracts/Config.sol

pragma solidity ^0.6.0;

contract Config {
    // function signature of "postProcess()"
    bytes4 public constant POSTPROCESS_SIG = 0xc2722916;

    // The base amount of percentage function
    uint256 public constant PERCENTAGE_BASE = 1 ether;

    // Handler post-process type. Others should not happen now.
    enum HandlerType {Token, Custom, Others}
}

// File: contracts/interface/IRegistry.sol

pragma solidity ^0.6.0;

interface IRegistry {
    function handlers(address) external view returns (bytes32);
    function callers(address) external view returns (bytes32);
    function bannedAgents(address) external view returns (uint256);
    function fHalt() external view returns (bool);
    function isValidHandler(address handler) external view returns (bool);
    function isValidCaller(address handler) external view returns (bool);
}

// File: contracts/interface/IProxy.sol

pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;

interface IProxy {
    function batchExec(address[] calldata tos, bytes32[] calldata configs, bytes[] memory datas) external payable;
    function execs(address[] calldata tos, bytes32[] calldata configs, bytes[] memory datas) external payable;
}

// File: @openzeppelin/contracts/utils/Address.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: @openzeppelin/contracts/math/SafeMath.sol


pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol


pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol


pragma solidity >=0.6.0 <0.8.0;




/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// File: contracts/Proxy.sol

pragma solidity ^0.6.0;







/**
 * @title The entrance of Furucombo
 * @author Ben Huang
 */
contract Proxy is IProxy, Storage, Config {
    using Address for address;
    using SafeERC20 for IERC20;
    using LibParam for bytes32;

    modifier isNotBanned() {
        require(registry.bannedAgents(address(this)) == 0, "Banned");
        _;
    }

    modifier isNotHalted() {
        require(registry.fHalt() == false, "Halted");
        _;
    }

    IRegistry public immutable registry;

    constructor(address _registry) public {
        registry = IRegistry(_registry);
    }

    /**
     * @notice Direct transfer from EOA should be reverted.
     * @dev Callback function will be handled here.
     */
    fallback() external payable isNotHalted isNotBanned isInitialized {
        // If triggered by a function call, caller should be registered in
        // registry.
        // The function call will then be forwarded to the location registered
        // in registry.
        require(_isValidCaller(msg.sender), "Invalid caller");

        address target = address(bytes20(registry.callers(msg.sender)));
        bytes memory result = _exec(target, msg.data);

        // return result for aave v2 flashloan()
        uint256 size = result.length;
        assembly {
            let loc := add(result, 0x20)
            return(loc, size)
        }
    }

    /**
     * @notice Direct transfer from EOA should be reverted.
     */
    receive() external payable {
        require(Address.isContract(msg.sender), "Not allowed from EOA");
    }

    /**
     * @notice Combo execution function. Including three phases: pre-process,
     * exection and post-process.
     * @param tos The handlers of combo.
     * @param configs The configurations of executing cubes.
     * @param datas The combo datas.
     */
    function batchExec(
        address[] calldata tos,
        bytes32[] calldata configs,
        bytes[] memory datas
    ) external payable override isNotHalted isNotBanned {
        _preProcess();
        _execs(tos, configs, datas);
        _postProcess();
    }

    /**
     * @notice The execution interface for callback function to be executed.
     * @dev This function can only be called through the handler, which makes
     * the caller become proxy itself.
     */
    function execs(
        address[] calldata tos,
        bytes32[] calldata configs,
        bytes[] memory datas
    ) external payable override isNotHalted isNotBanned isInitialized {
        require(msg.sender == address(this), "Does not allow external calls");
        _execs(tos, configs, datas);
    }

    /**
     * @notice The execution phase.
     * @param tos The handlers of combo.
     * @param configs The configurations of executing cubes.
     * @param datas The combo datas.
     */
    function _execs(
        address[] memory tos,
        bytes32[] memory configs,
        bytes[] memory datas
    ) internal {
        bytes32[256] memory localStack;
        uint256 index = 0;

        require(
            tos.length == datas.length,
            "Tos and datas length inconsistent"
        );
        require(
            tos.length == configs.length,
            "Tos and configs length inconsistent"
        );
        for (uint256 i = 0; i < tos.length; i++) {
            bytes32 config = configs[i];
            // Check if the data contains dynamic parameter
            if (!config.isStatic()) {
                // If so, trim the exectution data base on the configuration and stack content
                _trim(datas[i], config, localStack, index);
            }
            // Check if the output will be referenced afterwards
            bytes memory result = _exec(tos[i], datas[i]);
            if (config.isReferenced()) {
                // If so, parse the output and place it into local stack
                uint256 num = config.getReturnNum();
                uint256 newIndex = _parse(localStack, result, index);
                require(
                    newIndex == index + num,
                    "Return num and parsed return num not matched"
                );
                index = newIndex;
            }

            // Setup the process to be triggered in the post-process phase
            _setPostProcess(tos[i]);
        }
    }

    /**
     * @notice Trimming the execution data.
     * @param data The execution data.
     * @param config The configuration.
     * @param localStack The stack the be referenced.
     * @param index Current element count of localStack.
     */
    function _trim(
        bytes memory data,
        bytes32 config,
        bytes32[256] memory localStack,
        uint256 index
    ) internal pure {
        // Fetch the parameter configuration from config
        (uint256[] memory refs, uint256[] memory params) = config.getParams();
        // Trim the data with the reference and parameters
        for (uint256 i = 0; i < refs.length; i++) {
            require(refs[i] < index, "Reference to out of localStack");
            bytes32 ref = localStack[refs[i]];
            uint256 offset = params[i];
            uint256 base = PERCENTAGE_BASE;
            assembly {
                let loc := add(add(data, 0x20), offset)
                let m := mload(loc)
                // Adjust the value by multiplier if a dynamic parameter is not zero
                if iszero(iszero(m)) {
                    // Assert no overflow first
                    let p := mul(m, ref)
                    if iszero(eq(div(p, m), ref)) {
                        revert(0, 0)
                    } // require(p / m == ref)
                    ref := div(p, base)
                }
                mstore(loc, ref)
            }
        }
    }

    /**
     * @notice Parse the return data to the local stack.
     * @param localStack The local stack to place the return values.
     * @param ret The return data.
     * @param index The current tail.
     */
    function _parse(
        bytes32[256] memory localStack,
        bytes memory ret,
        uint256 index
    ) internal pure returns (uint256 newIndex) {
        uint256 len = ret.length;
        // The return value should be multiple of 32-bytes to be parsed.
        require(len % 32 == 0, "illegal length for _parse");
        // Estimate the tail after the process.
        newIndex = index + len / 32;
        require(newIndex <= 256, "stack overflow");
        assembly {
            let offset := shl(5, index)
            // Store the data into localStack
            for {
                let i := 0
            } lt(i, len) {
                i := add(i, 0x20)
            } {
                mstore(
                    add(localStack, add(i, offset)),
                    mload(add(add(ret, i), 0x20))
                )
            }
        }
    }

    /**
     * @notice The execution of a single cube.
     * @param _to The handler of cube.
     * @param _data The cube execution data.
     */
    function _exec(address _to, bytes memory _data)
        internal
        returns (bytes memory result)
    {
        require(_isValidHandler(_to), "Invalid handler");
        _addCubeCounter();
        assembly {
            let succeeded := delegatecall(
                sub(gas(), 5000),
                _to,
                add(_data, 0x20),
                mload(_data),
                0,
                0
            )
            let size := returndatasize()

            result := mload(0x40)
            mstore(
                0x40,
                add(result, and(add(add(size, 0x20), 0x1f), not(0x1f)))
            )
            mstore(result, size)
            returndatacopy(add(result, 0x20), 0, size)

            switch iszero(succeeded)
                case 1 {
                    revert(add(result, 0x20), size)
                }
        }
    }

    /**
     * @notice Setup the post-process.
     * @param _to The handler of post-process.
     */
    function _setPostProcess(address _to) internal {
        // If the stack length equals 0, just skip
        // If the top is a custom post-process, replace it with the handler
        // address.
        if (stack.length == 0) {
            return;
        } else if (
            stack.peek() == bytes32(bytes12(uint96(HandlerType.Custom)))
        ) {
            stack.pop();
            // Check if the handler is already set.
            if (bytes4(stack.peek()) != 0x00000000) stack.setAddress(_to);
            stack.setHandlerType(HandlerType.Custom);
        }
    }

    /// @notice The pre-process phase.
    function _preProcess() internal virtual isStackEmpty isCubeCounterZero {
        // Set the sender.
        _setSender();
    }

    /// @notice The post-process phase.
    function _postProcess() internal {
        // Handler type will be parsed at the beginning. Will send the token back to
        // user if the handler type is "Token". Will get the handler address and
        // execute the customized post-process if handler type is "Custom".
        while (stack.length > 0) {
            bytes32 top = stack.get();
            // Get handler type
            HandlerType handlerType = HandlerType(uint96(bytes12(top)));
            if (handlerType == HandlerType.Token) {
                address addr = address(uint160(uint256(top)));
                uint256 amount = IERC20(addr).balanceOf(address(this));
                if (amount > 0) IERC20(addr).safeTransfer(msg.sender, amount);
            } else if (handlerType == HandlerType.Custom) {
                address addr = stack.getAddress();
                _exec(addr, abi.encodeWithSelector(POSTPROCESS_SIG));
            } else {
                revert("Invalid handler type");
            }
        }

        // Balance should also be returned to user
        uint256 amount = address(this).balance;
        if (amount > 0) msg.sender.transfer(amount);

        // Reset the msg.sender and cube counter
        _resetSender();
        _resetCubeCounter();
    }

    /// @notice Check if the handler is valid in registry.
    function _isValidHandler(address handler) internal view returns (bool) {
        return registry.isValidHandler(handler);
    }

    /// @notice Check if the caller is valid in registry.
    function _isValidCaller(address caller) internal view returns (bool) {
        return registry.isValidCaller(caller);
    }
}

Read Contract

CUBE_COUNTER_KEY 0x1413dc7d → bytes32
MSG_SENDER_KEY 0x0f532d18 → bytes32
PERCENTAGE_BASE 0x87c13943 → uint256
POSTPROCESS_SIG 0xfa2901a5 → bytes4
cache 0x99eb59b9 → bytes32
registry 0x7b103999 → address
stack 0xdc9031c4 → bytes32

Write Contract 2 functions

These functions modify contract state and require a wallet transaction to execute.

batchExec 0x38c5c08e
address[] tos
bytes32[] configs
bytes[] datas
execs 0x71938509
address[] tos
bytes32[] configs
bytes[] datas

Token Balances (1)

View Transfers →
stETH 0

Recent Transactions

No transactions found for this address