400 lines
119 KiB
JSON
400 lines
119 KiB
JSON
{
|
|
"schemaVersion": "2.0.0",
|
|
"contractName": "SimpleFunctionRegistryFeature",
|
|
"compilerOutput": {
|
|
"abi": [
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "bytes4",
|
|
"name": "selector",
|
|
"type": "bytes4"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "address",
|
|
"name": "oldImpl",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "address",
|
|
"name": "newImpl",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "ProxyFunctionUpdated",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "FEATURE_NAME",
|
|
"outputs": [
|
|
{
|
|
"internalType": "string",
|
|
"name": "",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "FEATURE_VERSION",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes4",
|
|
"name": "selector",
|
|
"type": "bytes4"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "impl",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "_extendSelf",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "bootstrap",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes4",
|
|
"name": "success",
|
|
"type": "bytes4"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes4",
|
|
"name": "selector",
|
|
"type": "bytes4"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "impl",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "extend",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes4",
|
|
"name": "selector",
|
|
"type": "bytes4"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "idx",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "getRollbackEntryAtIndex",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "impl",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes4",
|
|
"name": "selector",
|
|
"type": "bytes4"
|
|
}
|
|
],
|
|
"name": "getRollbackLength",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "rollbackLength",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "bytes4",
|
|
"name": "selector",
|
|
"type": "bytes4"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "targetImpl",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "rollback",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"details": "Basic registry management features.",
|
|
"kind": "dev",
|
|
"methods": {
|
|
"_extendSelf(bytes4,address)": {
|
|
"details": "Register or replace a function. Only callable from within. This function is only used during the bootstrap process and should be deregistered by the deployer after bootstrapping is complete.",
|
|
"params": {
|
|
"impl": "The implementation contract for the function.",
|
|
"selector": "The function selector."
|
|
}
|
|
},
|
|
"bootstrap()": {
|
|
"details": "Initializes this feature, registering its own functions.",
|
|
"returns": {
|
|
"success": "Magic bytes if successful."
|
|
}
|
|
},
|
|
"extend(bytes4,address)": {
|
|
"details": "Register or replace a function. Only directly callable by an authority.",
|
|
"params": {
|
|
"impl": "The implementation contract for the function.",
|
|
"selector": "The function selector."
|
|
}
|
|
},
|
|
"getRollbackEntryAtIndex(bytes4,uint256)": {
|
|
"details": "Retrieve an entry in the rollback history for a function.",
|
|
"params": {
|
|
"idx": "The index in the rollback history.",
|
|
"selector": "The function selector."
|
|
},
|
|
"returns": {
|
|
"impl": "An implementation address for the function at index `idx`."
|
|
}
|
|
},
|
|
"getRollbackLength(bytes4)": {
|
|
"details": "Retrieve the length of the rollback history for a function.",
|
|
"params": {
|
|
"selector": "The function selector."
|
|
},
|
|
"returns": {
|
|
"rollbackLength": "The number of items in the rollback history for the function."
|
|
}
|
|
},
|
|
"rollback(bytes4,address)": {
|
|
"details": "Roll back to a prior implementation of a function. Only directly callable by an authority.",
|
|
"params": {
|
|
"selector": "The function selector.",
|
|
"targetImpl": "The address of an older implementation of the function."
|
|
}
|
|
}
|
|
},
|
|
"stateVariables": {
|
|
"FEATURE_NAME": {
|
|
"details": "Name of this feature."
|
|
},
|
|
"FEATURE_VERSION": {
|
|
"details": "Version of this feature."
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"bytecode": {
|
|
"linkReferences": {},
|
|
"object": "0x60c0604052610011600160008061002d565b60a05234801561002057600080fd5b503060601b60805261005f565b6bffffffff0000000000000000604084901b1667ffffffff00000000602084901b161763ffffffff8216179392505050565b60805160601c60a051610d256100996000398061014552508061065952806106a352806106ed528061073752806107815250610d256000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80636eb224cb1161005b5780636eb224cb146100f55780639db64a4014610108578063dfd007491461011b578063fb969b0a1461012e57610088565b8063031b905c1461008d5780630ee8be1b146100ab5780636ae4b4f7146100c05780636ba6bbc2146100d5575b600080fd5b610095610143565b6040516100a29190610c93565b60405180910390f35b6100be6100b9366004610b02565b610167565b005b6100c861018d565b6040516100a29190610c22565b6100e86100e3366004610b3a565b6101c6565b6040516100a29190610b65565b6100be610103366004610b02565b610237565b6100be610116366004610b02565b6102ee565b610095610129366004610ae6565b6105ee565b610136610631565b6040516100a29190610bad565b7f000000000000000000000000000000000000000000000000000000000000000081565b33301461017f5761017f61017a336107ca565b610882565b610189828261088a565b5050565b6040518060400160405280601681526020017f53696d706c6546756e6374696f6e52656769737472790000000000000000000081525081565b60006101d061097c565b7fffffffff00000000000000000000000000000000000000000000000000000000841660009081526020919091526040902080548390811061020e57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169392505050565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561027f57600080fd5b505afa158015610293573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b79190610ac3565b90503373ffffffffffffffffffffffffffffffffffffffff8216146102e3576102e361017a338361098f565b50610189828261088a565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561033657600080fd5b505afa15801561034a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036e9190610ac3565b90503373ffffffffffffffffffffffffffffffffffffffff82161461039a5761039a61017a338361098f565b506000806103a6610a4a565b7fffffffff000000000000000000000000000000000000000000000000000000008616600090815260208290526040902054919350915073ffffffffffffffffffffffffffffffffffffffff90811690841681141561040757505050610189565b7fffffffff000000000000000000000000000000000000000000000000000000008516600090815260208490526040902080545b801561052a57600082600183038154811061045257fe5b600091825260209091200154835473ffffffffffffffffffffffffffffffffffffffff909116915083908061048357fe5b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905573ffffffffffffffffffffffffffffffffffffffff8181169088161415610502575061052a565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0161043b565b8061053c5761053c61017a8888610a65565b7fffffffff0000000000000000000000000000000000000000000000000000000087166000818152602086905260409081902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8a16179055517f2ae221083467de52078b0096696ab88d8d53a7ecb44bb65b56a2bab687598367906105dd9086908a90610b86565b60405180910390a250505050505050565b60006105f861097c565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216600090815260209290925250604090205490565b600061067d7f6eb224cb000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061088a565b6106c77f0ee8be1b000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061088a565b6107117f9db64a40000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061088a565b61075b7fdfd00749000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061088a565b6107a57f6ba6bbc2000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061088a565b507fd150751b0000000000000000000000000000000000000000000000000000000090565b60607ff0ec779b0bcda6d84abf99ee2c67647d1100ebbb553a9c2d1c2ba1579592832c826040516024016107fe9190610b65565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050919050565b805160208201fd5b600080610895610a4a565b7fffffffff0000000000000000000000000000000000000000000000000000000086166000818152602083815260408083208054878452828520805460018101825581875285872001805473ffffffffffffffffffffffffffffffffffffffff9384167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216811790925596889052948890528254909516908b161790555194965092945091927f2ae221083467de52078b0096696ab88d8d53a7ecb44bb65b56a2bab6875983679061096c9085908990610b86565b60405180910390a2505050505050565b6000806109896001610a9b565b92915050565b60607f1de45ad18e8a4484220a3ca14f4d977641addbaba5a344b1384dc2aa78a2e34d83836040516024016109c5929190610b86565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b600080610a5561097c565b610a5d610ab6565b915091509091565b60607fa0425c2dc08feeb46e95a8e23b3c6d740f439b9610c5a973cad3b7eca6ccfe6383836040516024016109c5929190610bda565b60006080826007811115610aab57fe5b600101901b92915050565b6000806109896000610a9b565b600060208284031215610ad4578081fd5b8151610adf81610c9c565b9392505050565b600060208284031215610af7578081fd5b8135610adf81610cc1565b60008060408385031215610b14578081fd5b8235610b1f81610cc1565b91506020830135610b2f81610c9c565b809150509250929050565b60008060408385031215610b4c578182fd5b8235610b5781610cc1565b946020939093013593505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b6000602080835283518082850152825b81811015610c4e57858101830151858201604001528201610c32565b81811115610c5f5783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b90815260200190565b73ffffffffffffffffffffffffffffffffffffffff81168114610cbe57600080fd5b50565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610cbe57600080fdfea2646970667358221220bf023ad1c0bb56a5a934d3a6696df5e19953a6feb3aaa7606fc1a495a8ba3f7d64736f6c634300060c0033",
|
|
"opcodes": "PUSH1 0xC0 PUSH1 0x40 MSTORE PUSH2 0x11 PUSH1 0x1 PUSH1 0x0 DUP1 PUSH2 0x2D JUMP JUMPDEST PUSH1 0xA0 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x20 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP ADDRESS PUSH1 0x60 SHL PUSH1 0x80 MSTORE PUSH2 0x5F JUMP JUMPDEST PUSH12 0xFFFFFFFF0000000000000000 PUSH1 0x40 DUP5 SWAP1 SHL AND PUSH8 0xFFFFFFFF00000000 PUSH1 0x20 DUP5 SWAP1 SHL AND OR PUSH4 0xFFFFFFFF DUP3 AND OR SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH1 0x60 SHR PUSH1 0xA0 MLOAD PUSH2 0xD25 PUSH2 0x99 PUSH1 0x0 CODECOPY DUP1 PUSH2 0x145 MSTORE POP DUP1 PUSH2 0x659 MSTORE DUP1 PUSH2 0x6A3 MSTORE DUP1 PUSH2 0x6ED MSTORE DUP1 PUSH2 0x737 MSTORE DUP1 PUSH2 0x781 MSTORE POP PUSH2 0xD25 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x88 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x6EB224CB GT PUSH2 0x5B JUMPI DUP1 PUSH4 0x6EB224CB EQ PUSH2 0xF5 JUMPI DUP1 PUSH4 0x9DB64A40 EQ PUSH2 0x108 JUMPI DUP1 PUSH4 0xDFD00749 EQ PUSH2 0x11B JUMPI DUP1 PUSH4 0xFB969B0A EQ PUSH2 0x12E JUMPI PUSH2 0x88 JUMP JUMPDEST DUP1 PUSH4 0x31B905C EQ PUSH2 0x8D JUMPI DUP1 PUSH4 0xEE8BE1B EQ PUSH2 0xAB JUMPI DUP1 PUSH4 0x6AE4B4F7 EQ PUSH2 0xC0 JUMPI DUP1 PUSH4 0x6BA6BBC2 EQ PUSH2 0xD5 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x95 PUSH2 0x143 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xA2 SWAP2 SWAP1 PUSH2 0xC93 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xBE PUSH2 0xB9 CALLDATASIZE PUSH1 0x4 PUSH2 0xB02 JUMP JUMPDEST PUSH2 0x167 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xC8 PUSH2 0x18D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xA2 SWAP2 SWAP1 PUSH2 0xC22 JUMP JUMPDEST PUSH2 0xE8 PUSH2 0xE3 CALLDATASIZE PUSH1 0x4 PUSH2 0xB3A JUMP JUMPDEST PUSH2 0x1C6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xA2 SWAP2 SWAP1 PUSH2 0xB65 JUMP JUMPDEST PUSH2 0xBE PUSH2 0x103 CALLDATASIZE PUSH1 0x4 PUSH2 0xB02 JUMP JUMPDEST PUSH2 0x237 JUMP JUMPDEST PUSH2 0xBE PUSH2 0x116 CALLDATASIZE PUSH1 0x4 PUSH2 0xB02 JUMP JUMPDEST PUSH2 0x2EE JUMP JUMPDEST PUSH2 0x95 PUSH2 0x129 CALLDATASIZE PUSH1 0x4 PUSH2 0xAE6 JUMP JUMPDEST PUSH2 0x5EE JUMP JUMPDEST PUSH2 0x136 PUSH2 0x631 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xA2 SWAP2 SWAP1 PUSH2 0xBAD JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x17F JUMPI PUSH2 0x17F PUSH2 0x17A CALLER PUSH2 0x7CA JUMP JUMPDEST PUSH2 0x882 JUMP JUMPDEST PUSH2 0x189 DUP3 DUP3 PUSH2 0x88A JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x16 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x53696D706C6546756E6374696F6E526567697374727900000000000000000000 DUP2 MSTORE POP DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D0 PUSH2 0x97C JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD DUP4 SWAP1 DUP2 LT PUSH2 0x20E JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 ADDRESS PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x8DA5CB5B PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x27F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x293 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x2B7 SWAP2 SWAP1 PUSH2 0xAC3 JUMP JUMPDEST SWAP1 POP CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND EQ PUSH2 0x2E3 JUMPI PUSH2 0x2E3 PUSH2 0x17A CALLER DUP4 PUSH2 0x98F JUMP JUMPDEST POP PUSH2 0x189 DUP3 DUP3 PUSH2 0x88A JUMP JUMPDEST PUSH1 0x0 ADDRESS PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x8DA5CB5B PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x336 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x34A JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x36E SWAP2 SWAP1 PUSH2 0xAC3 JUMP JUMPDEST SWAP1 POP CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND EQ PUSH2 0x39A JUMPI PUSH2 0x39A PUSH2 0x17A CALLER DUP4 PUSH2 0x98F JUMP JUMPDEST POP PUSH1 0x0 DUP1 PUSH2 0x3A6 PUSH2 0xA4A JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP7 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP3 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP2 SWAP4 POP SWAP2 POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 DUP2 AND SWAP1 DUP5 AND DUP2 EQ ISZERO PUSH2 0x407 JUMPI POP POP POP PUSH2 0x189 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP5 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD JUMPDEST DUP1 ISZERO PUSH2 0x52A JUMPI PUSH1 0x0 DUP3 PUSH1 0x1 DUP4 SUB DUP2 SLOAD DUP2 LT PUSH2 0x452 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD DUP4 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP2 AND SWAP2 POP DUP4 SWAP1 DUP1 PUSH2 0x483 JUMPI INVALID JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 SWAP1 KECCAK256 DUP2 ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 DUP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND SWAP1 SSTORE ADD SWAP1 SSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 DUP2 AND SWAP1 DUP9 AND EQ ISZERO PUSH2 0x502 JUMPI POP PUSH2 0x52A JUMP JUMPDEST POP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD PUSH2 0x43B JUMP JUMPDEST DUP1 PUSH2 0x53C JUMPI PUSH2 0x53C PUSH2 0x17A DUP9 DUP9 PUSH2 0xA65 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP8 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP7 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP11 AND OR SWAP1 SSTORE MLOAD PUSH32 0x2AE221083467DE52078B0096696AB88D8D53A7ECB44BB65B56A2BAB687598367 SWAP1 PUSH2 0x5DD SWAP1 DUP7 SWAP1 DUP11 SWAP1 PUSH2 0xB86 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5F8 PUSH2 0x97C JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP3 SWAP1 SWAP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP3 SWAP1 SWAP3 MSTORE POP PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x67D PUSH32 0x6EB224CB00000000000000000000000000000000000000000000000000000000 PUSH32 0x0 PUSH2 0x88A JUMP JUMPDEST PUSH2 0x6C7 PUSH32 0xEE8BE1B00000000000000000000000000000000000000000000000000000000 PUSH32 0x0 PUSH2 0x88A JUMP JUMPDEST PUSH2 0x711 PUSH32 0x9DB64A4000000000000000000000000000000000000000000000000000000000 PUSH32 0x0 PUSH2 0x88A JUMP JUMPDEST PUSH2 0x75B PUSH32 0xDFD0074900000000000000000000000000000000000000000000000000000000 PUSH32 0x0 PUSH2 0x88A JUMP JUMPDEST PUSH2 0x7A5 PUSH32 0x6BA6BBC200000000000000000000000000000000000000000000000000000000 PUSH32 0x0 PUSH2 0x88A JUMP JUMPDEST POP PUSH32 0xD150751B00000000000000000000000000000000000000000000000000000000 SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH32 0xF0EC779B0BCDA6D84ABF99EE2C67647D1100EBBB553A9C2D1C2BA1579592832C DUP3 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x7FE SWAP2 SWAP1 PUSH2 0xB65 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP3 ADD REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x895 PUSH2 0xA4A JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP7 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP4 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP1 SLOAD DUP8 DUP5 MSTORE DUP3 DUP6 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP2 ADD DUP3 SSTORE DUP2 DUP8 MSTORE DUP6 DUP8 KECCAK256 ADD DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP4 DUP5 AND PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 SWAP2 DUP3 AND DUP2 OR SWAP1 SWAP3 SSTORE SWAP7 DUP9 SWAP1 MSTORE SWAP5 DUP9 SWAP1 MSTORE DUP3 SLOAD SWAP1 SWAP6 AND SWAP1 DUP12 AND OR SWAP1 SSTORE MLOAD SWAP5 SWAP7 POP SWAP3 SWAP5 POP SWAP2 SWAP3 PUSH32 0x2AE221083467DE52078B0096696AB88D8D53A7ECB44BB65B56A2BAB687598367 SWAP1 PUSH2 0x96C SWAP1 DUP6 SWAP1 DUP10 SWAP1 PUSH2 0xB86 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x989 PUSH1 0x1 PUSH2 0xA9B JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 PUSH32 0x1DE45AD18E8A4484220A3CA14F4D977641ADDBABA5A344B1384DC2AA78A2E34D DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x9C5 SWAP3 SWAP2 SWAP1 PUSH2 0xB86 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0xA55 PUSH2 0x97C JUMP JUMPDEST PUSH2 0xA5D PUSH2 0xAB6 JUMP JUMPDEST SWAP2 POP SWAP2 POP SWAP1 SWAP2 JUMP JUMPDEST PUSH1 0x60 PUSH32 0xA0425C2DC08FEEB46E95A8E23B3C6D740F439B9610C5A973CAD3B7ECA6CCFE63 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x9C5 SWAP3 SWAP2 SWAP1 PUSH2 0xBDA JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0xAAB JUMPI INVALID JUMPDEST PUSH1 0x1 ADD SWAP1 SHL SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x989 PUSH1 0x0 PUSH2 0xA9B JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xAD4 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0xADF DUP2 PUSH2 0xC9C JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xAF7 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xADF DUP2 PUSH2 0xCC1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xB14 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0xB1F DUP2 PUSH2 0xCC1 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0xB2F DUP2 PUSH2 0xC9C JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xB4C JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0xB57 DUP2 PUSH2 0xCC1 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 DUP4 AND DUP2 MSTORE SWAP2 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xC4E JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0xC32 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0xC5F JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xCBE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP2 AND DUP2 EQ PUSH2 0xCBE JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xBF MUL GASPRICE 0xD1 0xC0 0xBB JUMP 0xA5 0xA9 CALLVALUE 0xD3 0xA6 PUSH10 0x6DF5E19953A6FEB3AAA7 PUSH1 0x6F 0xC1 LOG4 SWAP6 0xA8 0xBA EXTCODEHASH PUSH30 0x64736F6C634300060C003300000000000000000000000000000000000000 ",
|
|
"sourceMap": "1131:5482:4:-:0;;;1447:23;1462:1;1465;;1447:14;:23::i;:::-;1395:75;;1131:5482;;;;;;;;;-1:-1:-1;1920:4:8;1894:31;;;;1131:5482:4;;2672:235:8;2834:20;2852:2;2834:20;;;;2859;2877:2;2859:20;;;;2833:47;2883:17;;;2833:67;2672:235;;;;;:::o;1131:5482:4:-;;;;;;;;;;;;;;;"
|
|
},
|
|
"deployedBytecode": {
|
|
"immutableReferences": {
|
|
"251": [
|
|
{
|
|
"length": 32,
|
|
"start": 325
|
|
}
|
|
],
|
|
"655": [
|
|
{
|
|
"length": 32,
|
|
"start": 1625
|
|
},
|
|
{
|
|
"length": 32,
|
|
"start": 1699
|
|
},
|
|
{
|
|
"length": 32,
|
|
"start": 1773
|
|
},
|
|
{
|
|
"length": 32,
|
|
"start": 1847
|
|
},
|
|
{
|
|
"length": 32,
|
|
"start": 1921
|
|
}
|
|
]
|
|
},
|
|
"linkReferences": {},
|
|
"object": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c80636eb224cb1161005b5780636eb224cb146100f55780639db64a4014610108578063dfd007491461011b578063fb969b0a1461012e57610088565b8063031b905c1461008d5780630ee8be1b146100ab5780636ae4b4f7146100c05780636ba6bbc2146100d5575b600080fd5b610095610143565b6040516100a29190610c93565b60405180910390f35b6100be6100b9366004610b02565b610167565b005b6100c861018d565b6040516100a29190610c22565b6100e86100e3366004610b3a565b6101c6565b6040516100a29190610b65565b6100be610103366004610b02565b610237565b6100be610116366004610b02565b6102ee565b610095610129366004610ae6565b6105ee565b610136610631565b6040516100a29190610bad565b7f000000000000000000000000000000000000000000000000000000000000000081565b33301461017f5761017f61017a336107ca565b610882565b610189828261088a565b5050565b6040518060400160405280601681526020017f53696d706c6546756e6374696f6e52656769737472790000000000000000000081525081565b60006101d061097c565b7fffffffff00000000000000000000000000000000000000000000000000000000841660009081526020919091526040902080548390811061020e57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff169392505050565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561027f57600080fd5b505afa158015610293573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b79190610ac3565b90503373ffffffffffffffffffffffffffffffffffffffff8216146102e3576102e361017a338361098f565b50610189828261088a565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561033657600080fd5b505afa15801561034a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036e9190610ac3565b90503373ffffffffffffffffffffffffffffffffffffffff82161461039a5761039a61017a338361098f565b506000806103a6610a4a565b7fffffffff000000000000000000000000000000000000000000000000000000008616600090815260208290526040902054919350915073ffffffffffffffffffffffffffffffffffffffff90811690841681141561040757505050610189565b7fffffffff000000000000000000000000000000000000000000000000000000008516600090815260208490526040902080545b801561052a57600082600183038154811061045257fe5b600091825260209091200154835473ffffffffffffffffffffffffffffffffffffffff909116915083908061048357fe5b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905573ffffffffffffffffffffffffffffffffffffffff8181169088161415610502575061052a565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0161043b565b8061053c5761053c61017a8888610a65565b7fffffffff0000000000000000000000000000000000000000000000000000000087166000818152602086905260409081902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8a16179055517f2ae221083467de52078b0096696ab88d8d53a7ecb44bb65b56a2bab687598367906105dd9086908a90610b86565b60405180910390a250505050505050565b60006105f861097c565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216600090815260209290925250604090205490565b600061067d7f6eb224cb000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061088a565b6106c77f0ee8be1b000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061088a565b6107117f9db64a40000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061088a565b61075b7fdfd00749000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061088a565b6107a57f6ba6bbc2000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061088a565b507fd150751b0000000000000000000000000000000000000000000000000000000090565b60607ff0ec779b0bcda6d84abf99ee2c67647d1100ebbb553a9c2d1c2ba1579592832c826040516024016107fe9190610b65565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091529050919050565b805160208201fd5b600080610895610a4a565b7fffffffff0000000000000000000000000000000000000000000000000000000086166000818152602083815260408083208054878452828520805460018101825581875285872001805473ffffffffffffffffffffffffffffffffffffffff9384167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216811790925596889052948890528254909516908b161790555194965092945091927f2ae221083467de52078b0096696ab88d8d53a7ecb44bb65b56a2bab6875983679061096c9085908990610b86565b60405180910390a2505050505050565b6000806109896001610a9b565b92915050565b60607f1de45ad18e8a4484220a3ca14f4d977641addbaba5a344b1384dc2aa78a2e34d83836040516024016109c5929190610b86565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b600080610a5561097c565b610a5d610ab6565b915091509091565b60607fa0425c2dc08feeb46e95a8e23b3c6d740f439b9610c5a973cad3b7eca6ccfe6383836040516024016109c5929190610bda565b60006080826007811115610aab57fe5b600101901b92915050565b6000806109896000610a9b565b600060208284031215610ad4578081fd5b8151610adf81610c9c565b9392505050565b600060208284031215610af7578081fd5b8135610adf81610cc1565b60008060408385031215610b14578081fd5b8235610b1f81610cc1565b91506020830135610b2f81610c9c565b809150509250929050565b60008060408385031215610b4c578182fd5b8235610b5781610cc1565b946020939093013593505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b6000602080835283518082850152825b81811015610c4e57858101830151858201604001528201610c32565b81811115610c5f5783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b90815260200190565b73ffffffffffffffffffffffffffffffffffffffff81168114610cbe57600080fd5b50565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610cbe57600080fdfea2646970667358221220bf023ad1c0bb56a5a934d3a6696df5e19953a6feb3aaa7606fc1a495a8ba3f7d64736f6c634300060c0033",
|
|
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x88 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x6EB224CB GT PUSH2 0x5B JUMPI DUP1 PUSH4 0x6EB224CB EQ PUSH2 0xF5 JUMPI DUP1 PUSH4 0x9DB64A40 EQ PUSH2 0x108 JUMPI DUP1 PUSH4 0xDFD00749 EQ PUSH2 0x11B JUMPI DUP1 PUSH4 0xFB969B0A EQ PUSH2 0x12E JUMPI PUSH2 0x88 JUMP JUMPDEST DUP1 PUSH4 0x31B905C EQ PUSH2 0x8D JUMPI DUP1 PUSH4 0xEE8BE1B EQ PUSH2 0xAB JUMPI DUP1 PUSH4 0x6AE4B4F7 EQ PUSH2 0xC0 JUMPI DUP1 PUSH4 0x6BA6BBC2 EQ PUSH2 0xD5 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x95 PUSH2 0x143 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xA2 SWAP2 SWAP1 PUSH2 0xC93 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xBE PUSH2 0xB9 CALLDATASIZE PUSH1 0x4 PUSH2 0xB02 JUMP JUMPDEST PUSH2 0x167 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xC8 PUSH2 0x18D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xA2 SWAP2 SWAP1 PUSH2 0xC22 JUMP JUMPDEST PUSH2 0xE8 PUSH2 0xE3 CALLDATASIZE PUSH1 0x4 PUSH2 0xB3A JUMP JUMPDEST PUSH2 0x1C6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xA2 SWAP2 SWAP1 PUSH2 0xB65 JUMP JUMPDEST PUSH2 0xBE PUSH2 0x103 CALLDATASIZE PUSH1 0x4 PUSH2 0xB02 JUMP JUMPDEST PUSH2 0x237 JUMP JUMPDEST PUSH2 0xBE PUSH2 0x116 CALLDATASIZE PUSH1 0x4 PUSH2 0xB02 JUMP JUMPDEST PUSH2 0x2EE JUMP JUMPDEST PUSH2 0x95 PUSH2 0x129 CALLDATASIZE PUSH1 0x4 PUSH2 0xAE6 JUMP JUMPDEST PUSH2 0x5EE JUMP JUMPDEST PUSH2 0x136 PUSH2 0x631 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xA2 SWAP2 SWAP1 PUSH2 0xBAD JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x17F JUMPI PUSH2 0x17F PUSH2 0x17A CALLER PUSH2 0x7CA JUMP JUMPDEST PUSH2 0x882 JUMP JUMPDEST PUSH2 0x189 DUP3 DUP3 PUSH2 0x88A JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x16 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x53696D706C6546756E6374696F6E526567697374727900000000000000000000 DUP2 MSTORE POP DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D0 PUSH2 0x97C JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD DUP4 SWAP1 DUP2 LT PUSH2 0x20E JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 ADDRESS PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x8DA5CB5B PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x27F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x293 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x2B7 SWAP2 SWAP1 PUSH2 0xAC3 JUMP JUMPDEST SWAP1 POP CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND EQ PUSH2 0x2E3 JUMPI PUSH2 0x2E3 PUSH2 0x17A CALLER DUP4 PUSH2 0x98F JUMP JUMPDEST POP PUSH2 0x189 DUP3 DUP3 PUSH2 0x88A JUMP JUMPDEST PUSH1 0x0 ADDRESS PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0x8DA5CB5B PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x336 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x34A JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x36E SWAP2 SWAP1 PUSH2 0xAC3 JUMP JUMPDEST SWAP1 POP CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND EQ PUSH2 0x39A JUMPI PUSH2 0x39A PUSH2 0x17A CALLER DUP4 PUSH2 0x98F JUMP JUMPDEST POP PUSH1 0x0 DUP1 PUSH2 0x3A6 PUSH2 0xA4A JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP7 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP3 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP2 SWAP4 POP SWAP2 POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 DUP2 AND SWAP1 DUP5 AND DUP2 EQ ISZERO PUSH2 0x407 JUMPI POP POP POP PUSH2 0x189 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP5 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD JUMPDEST DUP1 ISZERO PUSH2 0x52A JUMPI PUSH1 0x0 DUP3 PUSH1 0x1 DUP4 SUB DUP2 SLOAD DUP2 LT PUSH2 0x452 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD DUP4 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP2 AND SWAP2 POP DUP4 SWAP1 DUP1 PUSH2 0x483 JUMPI INVALID JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 SWAP1 KECCAK256 DUP2 ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 DUP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND SWAP1 SSTORE ADD SWAP1 SSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 DUP2 AND SWAP1 DUP9 AND EQ ISZERO PUSH2 0x502 JUMPI POP PUSH2 0x52A JUMP JUMPDEST POP PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD PUSH2 0x43B JUMP JUMPDEST DUP1 PUSH2 0x53C JUMPI PUSH2 0x53C PUSH2 0x17A DUP9 DUP9 PUSH2 0xA65 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP8 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP7 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP11 AND OR SWAP1 SSTORE MLOAD PUSH32 0x2AE221083467DE52078B0096696AB88D8D53A7ECB44BB65B56A2BAB687598367 SWAP1 PUSH2 0x5DD SWAP1 DUP7 SWAP1 DUP11 SWAP1 PUSH2 0xB86 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5F8 PUSH2 0x97C JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP3 SWAP1 SWAP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP3 SWAP1 SWAP3 MSTORE POP PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x67D PUSH32 0x6EB224CB00000000000000000000000000000000000000000000000000000000 PUSH32 0x0 PUSH2 0x88A JUMP JUMPDEST PUSH2 0x6C7 PUSH32 0xEE8BE1B00000000000000000000000000000000000000000000000000000000 PUSH32 0x0 PUSH2 0x88A JUMP JUMPDEST PUSH2 0x711 PUSH32 0x9DB64A4000000000000000000000000000000000000000000000000000000000 PUSH32 0x0 PUSH2 0x88A JUMP JUMPDEST PUSH2 0x75B PUSH32 0xDFD0074900000000000000000000000000000000000000000000000000000000 PUSH32 0x0 PUSH2 0x88A JUMP JUMPDEST PUSH2 0x7A5 PUSH32 0x6BA6BBC200000000000000000000000000000000000000000000000000000000 PUSH32 0x0 PUSH2 0x88A JUMP JUMPDEST POP PUSH32 0xD150751B00000000000000000000000000000000000000000000000000000000 SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH32 0xF0EC779B0BCDA6D84ABF99EE2C67647D1100EBBB553A9C2D1C2BA1579592832C DUP3 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x7FE SWAP2 SWAP1 PUSH2 0xB65 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP3 ADD REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x895 PUSH2 0xA4A JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP7 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP4 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP1 SLOAD DUP8 DUP5 MSTORE DUP3 DUP6 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP2 ADD DUP3 SSTORE DUP2 DUP8 MSTORE DUP6 DUP8 KECCAK256 ADD DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP4 DUP5 AND PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 SWAP2 DUP3 AND DUP2 OR SWAP1 SWAP3 SSTORE SWAP7 DUP9 SWAP1 MSTORE SWAP5 DUP9 SWAP1 MSTORE DUP3 SLOAD SWAP1 SWAP6 AND SWAP1 DUP12 AND OR SWAP1 SSTORE MLOAD SWAP5 SWAP7 POP SWAP3 SWAP5 POP SWAP2 SWAP3 PUSH32 0x2AE221083467DE52078B0096696AB88D8D53A7ECB44BB65B56A2BAB687598367 SWAP1 PUSH2 0x96C SWAP1 DUP6 SWAP1 DUP10 SWAP1 PUSH2 0xB86 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x989 PUSH1 0x1 PUSH2 0xA9B JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 PUSH32 0x1DE45AD18E8A4484220A3CA14F4D977641ADDBABA5A344B1384DC2AA78A2E34D DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x9C5 SWAP3 SWAP2 SWAP1 PUSH2 0xB86 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0xA55 PUSH2 0x97C JUMP JUMPDEST PUSH2 0xA5D PUSH2 0xAB6 JUMP JUMPDEST SWAP2 POP SWAP2 POP SWAP1 SWAP2 JUMP JUMPDEST PUSH1 0x60 PUSH32 0xA0425C2DC08FEEB46E95A8E23B3C6D740F439B9610C5A973CAD3B7ECA6CCFE63 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x9C5 SWAP3 SWAP2 SWAP1 PUSH2 0xBDA JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0xAAB JUMPI INVALID JUMPDEST PUSH1 0x1 ADD SWAP1 SHL SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x989 PUSH1 0x0 PUSH2 0xA9B JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xAD4 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0xADF DUP2 PUSH2 0xC9C JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xAF7 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xADF DUP2 PUSH2 0xCC1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xB14 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0xB1F DUP2 PUSH2 0xCC1 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0xB2F DUP2 PUSH2 0xC9C JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xB4C JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0xB57 DUP2 PUSH2 0xCC1 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 DUP4 AND DUP2 MSTORE SWAP2 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xC4E JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0xC32 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0xC5F JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xCBE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP2 AND DUP2 EQ PUSH2 0xCBE JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xBF MUL GASPRICE 0xD1 0xC0 0xBB JUMP 0xA5 0xA9 CALLVALUE 0xD3 0xA6 PUSH10 0x6DF5E19953A6FEB3AAA7 PUSH1 0x6F 0xC1 LOG4 SWAP6 0xA8 0xBA EXTCODEHASH PUSH30 0x64736F6C634300060C003300000000000000000000000000000000000000 ",
|
|
"sourceMap": "1131:5482:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1395:75;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4326:130;;;;;;:::i;:::-;;:::i;:::-;;1280:71;;;:::i;:::-;;;;;;;:::i;5199:241::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3808:143::-;;;;;;:::i;:::-;;:::i;2471:1120::-;;;;;;:::i;:::-;;:::i;4691:234::-;;;;;;:::i;:::-;;:::i;1637:582::-;;;:::i;:::-;;;;;;;:::i;1395:75::-;;;:::o;4326:130::-;1272:10:8;1294:4;1272:27;1268:123;;1315:65;:55;1359:10;1315:43;:55::i;:::-;:63;:65::i;:::-;4426:23:4::1;4434:8;4444:4;4426:7;:23::i;:::-;4326:130:::0;;:::o;1280:71::-;;;;;;;;;;;;;;;;;;;:::o;5199:241::-;5326:12;5361:45;:43;:45::i;:::-;:67;;;:57;:67;;;;;;;;;;;:72;;5429:3;;5361:72;;;;;;;;;;;;;;;;;;;5199:241;-1:-1:-1;;;5199:241:4:o;3808:143::-;1527:13:8;1567:4;1543:36;;;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1527:54;-1:-1:-1;1599:10:8;:19;;;;1595:180;;1638:122;:112;1695:10;1727:5;1638:35;:112::i;:122::-;3808:143:4;3921:23:::1;3929:8;3939:4;3921:7;:23::i;2471:1120::-:0;1527:13:8;1567:4;1543:36;;;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1527:54;-1:-1:-1;1599:10:8;:19;;;;1595:180;;1638:122;:112;1695:10;1727:5;1638:35;:112::i;:122::-;2471:1120:4;2606:53:::1;2673:41:::0;2727:14:::1;:12;:14::i;:::-;2774:25:::0;;::::1;2752:19;2774:25:::0;;;::::1;::::0;;;;;;;2592:149;;-1:-1:-1;2592:149:4;-1:-1:-1;2774:25:4::1;::::0;;::::1;::::0;2813;::::1;::::0;::::1;2809:114;;;2906:7;;;;;2809:114;3035:26:::0;;::::1;3007:25;3035:26:::0;;;::::1;::::0;;;;;;3083:14;;3107:175:::1;3114:5:::0;;3107:175:::1;;3140:12;3155:7;3167:1;3163;:5;3155:14;;;;;;;;;::::0;;;::::1;::::0;;;::::1;::::0;3183:13;;3155:14:::1;::::0;;::::1;::::0;-1:-1:-1;3183:7:4;;:13;::::1;;;;;::::0;;;::::1;::::0;;;;;;;;;;;::::1;::::0;;;;;::::1;3214:18:::0;;::::1;::::0;;::::1;;3210:62;;;3252:5;;;3210:62;-1:-1:-1::0;3121:3:4;;3107:175:::1;;;3295:6:::0;3291:176:::1;;3317:139;:129;3396:8;3422:10;3317:61;:129::i;:139::-;3476:25:::0;;::::1;:15;:25:::0;;;::::1;::::0;;;;;;;;:38;;;::::1;;::::0;::::1;;::::0;;3529:55;::::1;::::0;::::1;::::0;3560:11;;3476:38;;3529:55:::1;:::i;:::-;;;;;;;;1794:1:8;;;;;2471:1120:4::0;;:::o;4691:234::-;4799:22;4844:45;:43;:45::i;:::-;:67;;;;;:57;:67;;;;;;;;-1:-1:-1;4844:67:4;;;:74;;4691:234::o;1637:582::-;1692:14;1788:46;1796:20;1818:15;1788:7;:46::i;:::-;1844:51;1852:25;1879:15;1844:7;:51::i;:::-;1948:48;1956:22;1980:15;1948:7;:48::i;:::-;2035:57;2043:31;2076:15;2035:7;:57::i;:::-;2102:63;2110:37;2149:15;2102:7;:63::i;:::-;-1:-1:-1;2182:30:4;1637:582;:::o;724:257:0:-;820:12;898:45;958:6;855:119;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;724:257:0;;;:::o;1531:170:13:-;1674:9;1668:16;1661:4;1650:9;1646:20;1639:46;5604:485:4;5696:53;5763:41;5817:14;:12;:14::i;:::-;5860:25;;;5842:15;5860:25;;;;;;;;;;;;;5923:26;;;;;;5959:21;;5860:25;5959:21;;;;;;;;;;;;;5860:25;;;;5959:21;;;;;;;;;5990:25;;;;;;;;:32;;;;;;;;;;;6037:45;5923:26;;-1:-1:-1;5860:25:4;;-1:-1:-1;5860:25:4;;6037:45;;;;5860:25;;5990:32;;6037:45;:::i;:::-;;;;;;;;5604:485;;;;;;:::o;1068:483:11:-;1113:20;1145:19;1167:92;1206:43;1167:25;:92::i;:::-;1145:114;1517:28;-1:-1:-1;;1517:28:11:o;725:303:1:-;849:12;927:44;986:6;1006:5;884:137;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;725:303:1;;;;:::o;6270:341:4:-;6353:53;6420:41;6507:45;:43;:45::i;:::-;6566:28;:26;:28::i;:::-;6486:118;;;;6270:341;;:::o;740:315:3:-;859:12;937:54;1006:8;1028:10;894:154;;;;;;;;;:::i;1606:335:12:-;1698:12;922:3;1899:9;1891:18;;;;;;;;1912:1;1891:22;1890:44;;;1606:335;-1:-1:-1;;1606:335:12:o;1094:466:10:-;1139:20;1171:19;1193:75;1232:26;1193:25;:75::i;555:263:-1:-;;670:2;658:9;649:7;645:23;641:32;638:2;;;-1:-1;;676:12;638:2;226:6;220:13;238:33;265:5;238:33;:::i;:::-;728:74;632:186;-1:-1;;;632:186::o;825:239::-;;928:2;916:9;907:7;903:23;899:32;896:2;;;-1:-1;;934:12;896:2;362:6;349:20;374:32;400:5;374:32;:::i;1071:364::-;;;1191:2;1179:9;1170:7;1166:23;1162:32;1159:2;;;-1:-1;;1197:12;1159:2;362:6;349:20;374:32;400:5;374:32;:::i;:::-;1249:62;-1:-1;1348:2;1387:22;;72:20;97:33;72:20;97:33;:::i;:::-;1356:63;;;;1153:282;;;;;:::o;1442:364::-;;;1562:2;1550:9;1541:7;1537:23;1533:32;1530:2;;;-1:-1;;1568:12;1530:2;362:6;349:20;374:32;400:5;374:32;:::i;:::-;1620:62;1719:2;1758:22;;;;485:20;;-1:-1;;;1524:282::o;2524:222::-;4823:42;4812:54;;;;1884:37;;2651:2;2636:18;;2622:124::o;2753:333::-;4823:42;4812:54;;;1884:37;;4812:54;;3072:2;3057:18;;1884:37;2908:2;2893:18;;2879:207::o;3093:218::-;4671:66;4660:78;;;;2002:36;;3218:2;3203:18;;3189:122::o;3318:329::-;4671:66;4660:78;;;;2002:36;;4823:42;4812:54;3633:2;3618:18;;1884:37;3471:2;3456:18;;3442:205::o;3654:310::-;;3801:2;;3822:17;3815:47;2195:5;4288:12;4445:6;3801:2;3790:9;3786:18;4433:19;-1:-1;5030:101;5044:6;5041:1;5038:13;5030:101;;;5111:11;;;;;5105:18;5092:11;;;4473:14;5092:11;5085:39;5059:10;;5030:101;;;5146:6;5143:1;5140:13;5137:2;;;-1:-1;4473:14;5202:6;3790:9;5193:16;;5186:27;5137:2;-1:-1;5322:2;5302:14;5318:7;5298:28;2353:39;;;;4473:14;2353:39;;3772:192;-1:-1;;;3772:192::o;3971:222::-;2475:37;;;4098:2;4083:18;;4069:124::o;5339:117::-;4823:42;5426:5;4812:54;5401:5;5398:35;5388:2;;5447:1;;5437:12;5388:2;5382:74;:::o;5463:115::-;4671:66;5548:5;4660:78;5524:5;5521:34;5511:2;;5569:1;;5559:12"
|
|
},
|
|
"methodIdentifiers": {
|
|
"FEATURE_NAME()": "6ae4b4f7",
|
|
"FEATURE_VERSION()": "031b905c",
|
|
"_extendSelf(bytes4,address)": "0ee8be1b",
|
|
"bootstrap()": "fb969b0a",
|
|
"extend(bytes4,address)": "6eb224cb",
|
|
"getRollbackEntryAtIndex(bytes4,uint256)": "6ba6bbc2",
|
|
"getRollbackLength(bytes4)": "dfd00749",
|
|
"rollback(bytes4,address)": "9db64a40"
|
|
}
|
|
}
|
|
},
|
|
"sourceTreeHashHex": "0x82dbbd5dfa7c9694f469f27a3df778e1d9911411161c525c41bee8beaed31ad1",
|
|
"sources": {
|
|
"./SimpleFunctionRegistryFeature.sol": {
|
|
"id": 4,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../fixins/FixinCommon.sol\";\nimport \"../storage/LibProxyStorage.sol\";\nimport \"../storage/LibSimpleFunctionRegistryStorage.sol\";\nimport \"../errors/LibSimpleFunctionRegistryRichErrors.sol\";\nimport \"../migrations/LibBootstrap.sol\";\nimport \"./interfaces/IFeature.sol\";\nimport \"./interfaces/ISimpleFunctionRegistryFeature.sol\";\n\n\n/// @dev Basic registry management features.\ncontract SimpleFunctionRegistryFeature is\n IFeature,\n ISimpleFunctionRegistryFeature,\n FixinCommon\n{\n /// @dev Name of this feature.\n string public constant override FEATURE_NAME = \"SimpleFunctionRegistry\";\n /// @dev Version of this feature.\n uint256 public immutable override FEATURE_VERSION = _encodeVersion(1, 0, 0);\n\n using LibRichErrorsV06 for bytes;\n\n /// @dev Initializes this feature, registering its own functions.\n /// @return success Magic bytes if successful.\n function bootstrap()\n external\n returns (bytes4 success)\n {\n // Register the registration functions (inception vibes).\n _extend(this.extend.selector, _implementation);\n _extend(this._extendSelf.selector, _implementation);\n // Register the rollback function.\n _extend(this.rollback.selector, _implementation);\n // Register getters.\n _extend(this.getRollbackLength.selector, _implementation);\n _extend(this.getRollbackEntryAtIndex.selector, _implementation);\n return LibBootstrap.BOOTSTRAP_SUCCESS;\n }\n\n /// @dev Roll back to a prior implementation of a function.\n /// Only directly callable by an authority.\n /// @param selector The function selector.\n /// @param targetImpl The address of an older implementation of the function.\n function rollback(bytes4 selector, address targetImpl)\n external\n override\n onlyOwner\n {\n (\n LibSimpleFunctionRegistryStorage.Storage storage stor,\n LibProxyStorage.Storage storage proxyStor\n ) = _getStorages();\n\n address currentImpl = proxyStor.impls[selector];\n if (currentImpl == targetImpl) {\n // Do nothing if already at targetImpl.\n return;\n }\n // Walk history backwards until we find the target implementation.\n address[] storage history = stor.implHistory[selector];\n uint256 i = history.length;\n for (; i > 0; --i) {\n address impl = history[i - 1];\n history.pop();\n if (impl == targetImpl) {\n break;\n }\n }\n if (i == 0) {\n LibSimpleFunctionRegistryRichErrors.NotInRollbackHistoryError(\n selector,\n targetImpl\n ).rrevert();\n }\n proxyStor.impls[selector] = targetImpl;\n emit ProxyFunctionUpdated(selector, currentImpl, targetImpl);\n }\n\n /// @dev Register or replace a function.\n /// Only directly callable by an authority.\n /// @param selector The function selector.\n /// @param impl The implementation contract for the function.\n function extend(bytes4 selector, address impl)\n external\n override\n onlyOwner\n {\n _extend(selector, impl);\n }\n\n /// @dev Register or replace a function.\n /// Only callable from within.\n /// This function is only used during the bootstrap process and\n /// should be deregistered by the deployer after bootstrapping is\n /// complete.\n /// @param selector The function selector.\n /// @param impl The implementation contract for the function.\n function _extendSelf(bytes4 selector, address impl)\n external\n onlySelf\n {\n _extend(selector, impl);\n }\n\n /// @dev Retrieve the length of the rollback history for a function.\n /// @param selector The function selector.\n /// @return rollbackLength The number of items in the rollback history for\n /// the function.\n function getRollbackLength(bytes4 selector)\n external\n override\n view\n returns (uint256 rollbackLength)\n {\n return LibSimpleFunctionRegistryStorage.getStorage().implHistory[selector].length;\n }\n\n /// @dev Retrieve an entry in the rollback history for a function.\n /// @param selector The function selector.\n /// @param idx The index in the rollback history.\n /// @return impl An implementation address for the function at\n /// index `idx`.\n function getRollbackEntryAtIndex(bytes4 selector, uint256 idx)\n external\n override\n view\n returns (address impl)\n {\n return LibSimpleFunctionRegistryStorage.getStorage().implHistory[selector][idx];\n }\n\n /// @dev Register or replace a function.\n /// @param selector The function selector.\n /// @param impl The implementation contract for the function.\n function _extend(bytes4 selector, address impl)\n private\n {\n (\n LibSimpleFunctionRegistryStorage.Storage storage stor,\n LibProxyStorage.Storage storage proxyStor\n ) = _getStorages();\n\n address oldImpl = proxyStor.impls[selector];\n address[] storage history = stor.implHistory[selector];\n history.push(oldImpl);\n proxyStor.impls[selector] = impl;\n emit ProxyFunctionUpdated(selector, oldImpl, impl);\n }\n\n /// @dev Get the storage buckets for this feature and the proxy.\n /// @return stor Storage bucket for this feature.\n /// @return proxyStor age bucket for the proxy.\n function _getStorages()\n private\n pure\n returns (\n LibSimpleFunctionRegistryStorage.Storage storage stor,\n LibProxyStorage.Storage storage proxyStor\n )\n {\n return (\n LibSimpleFunctionRegistryStorage.getStorage(),\n LibProxyStorage.getStorage()\n );\n }\n}\n"
|
|
},
|
|
"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol": {
|
|
"id": 13,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibRichErrorsV06 {\n\n // bytes4(keccak256(\"Error(string)\"))\n bytes4 internal constant STANDARD_ERROR_SELECTOR = 0x08c379a0;\n\n // solhint-disable func-name-mixedcase\n /// @dev ABI encode a standard, string revert error payload.\n /// This is the same payload that would be included by a `revert(string)`\n /// solidity statement. It has the function signature `Error(string)`.\n /// @param message The error string.\n /// @return The ABI encoded error.\n function StandardError(string memory message)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n STANDARD_ERROR_SELECTOR,\n bytes(message)\n );\n }\n // solhint-enable func-name-mixedcase\n\n /// @dev Reverts an encoded rich revert reason `errorData`.\n /// @param errorData ABI encoded error data.\n function rrevert(bytes memory errorData)\n internal\n pure\n {\n assembly {\n revert(add(errorData, 0x20), mload(errorData))\n }\n }\n}\n"
|
|
},
|
|
"../fixins/FixinCommon.sol": {
|
|
"id": 8,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibCommonRichErrors.sol\";\nimport \"../errors/LibOwnableRichErrors.sol\";\nimport \"../features/interfaces/IOwnableFeature.sol\";\nimport \"../features/interfaces/ISimpleFunctionRegistryFeature.sol\";\n\n\n/// @dev Common feature utilities.\nabstract contract FixinCommon {\n\n using LibRichErrorsV06 for bytes;\n\n /// @dev The implementation address of this feature.\n address internal immutable _implementation;\n\n /// @dev The caller must be this contract.\n modifier onlySelf() virtual {\n if (msg.sender != address(this)) {\n LibCommonRichErrors.OnlyCallableBySelfError(msg.sender).rrevert();\n }\n _;\n }\n\n /// @dev The caller of this function must be the owner.\n modifier onlyOwner() virtual {\n {\n address owner = IOwnableFeature(address(this)).owner();\n if (msg.sender != owner) {\n LibOwnableRichErrors.OnlyOwnerError(\n msg.sender,\n owner\n ).rrevert();\n }\n }\n _;\n }\n\n constructor() internal {\n // Remember this feature's original address.\n _implementation = address(this);\n }\n\n /// @dev Registers a function implemented by this feature at `_implementation`.\n /// Can and should only be called within a `migrate()`.\n /// @param selector The selector of the function whose implementation\n /// is at `_implementation`.\n function _registerFeatureFunction(bytes4 selector)\n internal\n {\n ISimpleFunctionRegistryFeature(address(this)).extend(selector, _implementation);\n }\n\n /// @dev Encode a feature version as a `uint256`.\n /// @param major The major version number of the feature.\n /// @param minor The minor version number of the feature.\n /// @param revision The revision number of the feature.\n /// @return encodedVersion The encoded version number.\n function _encodeVersion(uint32 major, uint32 minor, uint32 revision)\n internal\n pure\n returns (uint256 encodedVersion)\n {\n return (uint256(major) << 64) | (uint256(minor) << 32) | uint256(revision);\n }\n}\n"
|
|
},
|
|
"../errors/LibCommonRichErrors.sol": {
|
|
"id": 0,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibCommonRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function OnlyCallableBySelfError(address sender)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OnlyCallableBySelfError(address)\")),\n sender\n );\n }\n\n function IllegalReentrancyError(bytes4 selector, uint256 reentrancyFlags)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"IllegalReentrancyError(bytes4,uint256)\")),\n selector,\n reentrancyFlags\n );\n }\n}\n"
|
|
},
|
|
"../errors/LibOwnableRichErrors.sol": {
|
|
"id": 1,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibOwnableRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function OnlyOwnerError(\n address sender,\n address owner\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OnlyOwnerError(address,address)\")),\n sender,\n owner\n );\n }\n\n function TransferOwnerToZeroError()\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"TransferOwnerToZeroError()\"))\n );\n }\n\n function MigrateCallFailedError(address target, bytes memory resultData)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MigrateCallFailedError(address,bytes)\")),\n target,\n resultData\n );\n }\n}\n"
|
|
},
|
|
"./interfaces/IOwnableFeature.sol": {
|
|
"id": 6,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/interfaces/IOwnableV06.sol\";\n\n\n// solhint-disable no-empty-blocks\n/// @dev Owner management and migration features.\ninterface IOwnableFeature is\n IOwnableV06\n{\n /// @dev Emitted when `migrate()` is called.\n /// @param caller The caller of `migrate()`.\n /// @param migrator The migration contract.\n /// @param newOwner The address of the new owner.\n event Migrated(address caller, address migrator, address newOwner);\n\n /// @dev Execute a migration function in the context of the ZeroEx contract.\n /// The result of the function being called should be the magic bytes\n /// 0x2c64c5ef (`keccack('MIGRATE_SUCCESS')`). Only callable by the owner.\n /// The owner will be temporarily set to `address(this)` inside the call.\n /// Before returning, the owner will be set to `newOwner`.\n /// @param target The migrator contract address.\n /// @param newOwner The address of the new owner.\n /// @param data The call data.\n function migrate(address target, bytes calldata data, address newOwner) external;\n}\n"
|
|
},
|
|
"@0x/contracts-utils/contracts/src/v06/interfaces/IOwnableV06.sol": {
|
|
"id": 14,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\ninterface IOwnableV06 {\n\n /// @dev Emitted by Ownable when ownership is transferred.\n /// @param previousOwner The previous owner of the contract.\n /// @param newOwner The new owner of the contract.\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /// @dev Transfers ownership of the contract to a new address.\n /// @param newOwner The address that will become the owner.\n function transferOwnership(address newOwner) external;\n\n /// @dev The owner of this contract.\n /// @return ownerAddress The owner address.\n function owner() external view returns (address ownerAddress);\n}\n"
|
|
},
|
|
"./interfaces/ISimpleFunctionRegistryFeature.sol": {
|
|
"id": 7,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Basic registry management features.\ninterface ISimpleFunctionRegistryFeature {\n\n /// @dev A function implementation was updated via `extend()` or `rollback()`.\n /// @param selector The function selector.\n /// @param oldImpl The implementation contract address being replaced.\n /// @param newImpl The replacement implementation contract address.\n event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address newImpl);\n\n /// @dev Roll back to a prior implementation of a function.\n /// @param selector The function selector.\n /// @param targetImpl The address of an older implementation of the function.\n function rollback(bytes4 selector, address targetImpl) external;\n\n /// @dev Register or replace a function.\n /// @param selector The function selector.\n /// @param impl The implementation contract for the function.\n function extend(bytes4 selector, address impl) external;\n\n /// @dev Retrieve the length of the rollback history for a function.\n /// @param selector The function selector.\n /// @return rollbackLength The number of items in the rollback history for\n /// the function.\n function getRollbackLength(bytes4 selector)\n external\n view\n returns (uint256 rollbackLength);\n\n /// @dev Retrieve an entry in the rollback history for a function.\n /// @param selector The function selector.\n /// @param idx The index in the rollback history.\n /// @return impl An implementation address for the function at\n /// index `idx`.\n function getRollbackEntryAtIndex(bytes4 selector, uint256 idx)\n external\n view\n returns (address impl);\n}\n"
|
|
},
|
|
"../storage/LibProxyStorage.sol": {
|
|
"id": 10,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./LibStorage.sol\";\n\n\n/// @dev Storage helpers for the proxy contract.\nlibrary LibProxyStorage {\n\n /// @dev Storage bucket for proxy contract.\n struct Storage {\n // Mapping of function selector -> function implementation\n mapping(bytes4 => address) impls;\n // The owner of the proxy contract.\n address owner;\n }\n\n /// @dev Get the storage bucket for this contract.\n function getStorage() internal pure returns (Storage storage stor) {\n uint256 storageSlot = LibStorage.getStorageSlot(\n LibStorage.StorageId.Proxy\n );\n // Dip into assembly to change the slot pointed to by the local\n // variable `stor`.\n // See https://solidity.readthedocs.io/en/v0.6.8/assembly.html?highlight=slot#access-to-external-variables-functions-and-libraries\n assembly { stor_slot := storageSlot }\n }\n}\n"
|
|
},
|
|
"../storage/LibStorage.sol": {
|
|
"id": 12,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Common storage helpers\nlibrary LibStorage {\n\n /// @dev What to bit-shift a storage ID by to get its slot.\n /// This gives us a maximum of 2**128 inline fields in each bucket.\n uint256 private constant STORAGE_SLOT_EXP = 128;\n\n /// @dev Storage IDs for feature storage buckets.\n /// WARNING: APPEND-ONLY.\n enum StorageId {\n Proxy,\n SimpleFunctionRegistry,\n Ownable,\n TokenSpender,\n TransformERC20,\n MetaTransactions,\n ReentrancyGuard,\n NativeOrders\n }\n\n /// @dev Get the storage slot given a storage ID. We assign unique, well-spaced\n /// slots to storage bucket variables to ensure they do not overlap.\n /// See: https://solidity.readthedocs.io/en/v0.6.6/assembly.html#access-to-external-variables-functions-and-libraries\n /// @param storageId An entry in `StorageId`\n /// @return slot The storage slot.\n function getStorageSlot(StorageId storageId)\n internal\n pure\n returns (uint256 slot)\n {\n // This should never overflow with a reasonable `STORAGE_SLOT_EXP`\n // because Solidity will do a range check on `storageId` during the cast.\n return (uint256(storageId) + 1) << STORAGE_SLOT_EXP;\n }\n}\n"
|
|
},
|
|
"../storage/LibSimpleFunctionRegistryStorage.sol": {
|
|
"id": 11,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./LibStorage.sol\";\n\n\n/// @dev Storage helpers for the `SimpleFunctionRegistry` feature.\nlibrary LibSimpleFunctionRegistryStorage {\n\n /// @dev Storage bucket for this feature.\n struct Storage {\n // Mapping of function selector -> implementation history.\n mapping(bytes4 => address[]) implHistory;\n }\n\n /// @dev Get the storage bucket for this contract.\n function getStorage() internal pure returns (Storage storage stor) {\n uint256 storageSlot = LibStorage.getStorageSlot(\n LibStorage.StorageId.SimpleFunctionRegistry\n );\n // Dip into assembly to change the slot pointed to by the local\n // variable `stor`.\n // See https://solidity.readthedocs.io/en/v0.6.8/assembly.html?highlight=slot#access-to-external-variables-functions-and-libraries\n assembly { stor_slot := storageSlot }\n }\n}\n"
|
|
},
|
|
"../errors/LibSimpleFunctionRegistryRichErrors.sol": {
|
|
"id": 3,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibSimpleFunctionRegistryRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function NotInRollbackHistoryError(bytes4 selector, address targetImpl)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"NotInRollbackHistoryError(bytes4,address)\")),\n selector,\n targetImpl\n );\n }\n}\n"
|
|
},
|
|
"../migrations/LibBootstrap.sol": {
|
|
"id": 9,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibProxyRichErrors.sol\";\n\n\nlibrary LibBootstrap {\n\n /// @dev Magic bytes returned by the bootstrapper to indicate success.\n /// This is `keccack('BOOTSTRAP_SUCCESS')`.\n bytes4 internal constant BOOTSTRAP_SUCCESS = 0xd150751b;\n\n using LibRichErrorsV06 for bytes;\n\n /// @dev Perform a delegatecall and ensure it returns the magic bytes.\n /// @param target The call target.\n /// @param data The call data.\n function delegatecallBootstrapFunction(\n address target,\n bytes memory data\n )\n internal\n {\n (bool success, bytes memory resultData) = target.delegatecall(data);\n if (!success ||\n resultData.length != 32 ||\n abi.decode(resultData, (bytes4)) != BOOTSTRAP_SUCCESS)\n {\n LibProxyRichErrors.BootstrapCallFailedError(target, resultData).rrevert();\n }\n }\n}\n"
|
|
},
|
|
"../errors/LibProxyRichErrors.sol": {
|
|
"id": 2,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibProxyRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function NotImplementedError(bytes4 selector)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"NotImplementedError(bytes4)\")),\n selector\n );\n }\n\n function InvalidBootstrapCallerError(address actual, address expected)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InvalidBootstrapCallerError(address,address)\")),\n actual,\n expected\n );\n }\n\n function InvalidDieCallerError(address actual, address expected)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InvalidDieCallerError(address,address)\")),\n actual,\n expected\n );\n }\n\n function BootstrapCallFailedError(address target, bytes memory resultData)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"BootstrapCallFailedError(address,bytes)\")),\n target,\n resultData\n );\n }\n}\n"
|
|
},
|
|
"./interfaces/IFeature.sol": {
|
|
"id": 5,
|
|
"content": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Basic interface for a feature contract.\ninterface IFeature {\n\n // solhint-disable func-name-mixedcase\n\n /// @dev The name of this feature set.\n function FEATURE_NAME() external view returns (string memory name);\n\n /// @dev The version of this feature set.\n function FEATURE_VERSION() external view returns (uint256 version);\n}\n"
|
|
}
|
|
},
|
|
"sourceCodes": {
|
|
"./SimpleFunctionRegistryFeature.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../fixins/FixinCommon.sol\";\nimport \"../storage/LibProxyStorage.sol\";\nimport \"../storage/LibSimpleFunctionRegistryStorage.sol\";\nimport \"../errors/LibSimpleFunctionRegistryRichErrors.sol\";\nimport \"../migrations/LibBootstrap.sol\";\nimport \"./interfaces/IFeature.sol\";\nimport \"./interfaces/ISimpleFunctionRegistryFeature.sol\";\n\n\n/// @dev Basic registry management features.\ncontract SimpleFunctionRegistryFeature is\n IFeature,\n ISimpleFunctionRegistryFeature,\n FixinCommon\n{\n /// @dev Name of this feature.\n string public constant override FEATURE_NAME = \"SimpleFunctionRegistry\";\n /// @dev Version of this feature.\n uint256 public immutable override FEATURE_VERSION = _encodeVersion(1, 0, 0);\n\n using LibRichErrorsV06 for bytes;\n\n /// @dev Initializes this feature, registering its own functions.\n /// @return success Magic bytes if successful.\n function bootstrap()\n external\n returns (bytes4 success)\n {\n // Register the registration functions (inception vibes).\n _extend(this.extend.selector, _implementation);\n _extend(this._extendSelf.selector, _implementation);\n // Register the rollback function.\n _extend(this.rollback.selector, _implementation);\n // Register getters.\n _extend(this.getRollbackLength.selector, _implementation);\n _extend(this.getRollbackEntryAtIndex.selector, _implementation);\n return LibBootstrap.BOOTSTRAP_SUCCESS;\n }\n\n /// @dev Roll back to a prior implementation of a function.\n /// Only directly callable by an authority.\n /// @param selector The function selector.\n /// @param targetImpl The address of an older implementation of the function.\n function rollback(bytes4 selector, address targetImpl)\n external\n override\n onlyOwner\n {\n (\n LibSimpleFunctionRegistryStorage.Storage storage stor,\n LibProxyStorage.Storage storage proxyStor\n ) = _getStorages();\n\n address currentImpl = proxyStor.impls[selector];\n if (currentImpl == targetImpl) {\n // Do nothing if already at targetImpl.\n return;\n }\n // Walk history backwards until we find the target implementation.\n address[] storage history = stor.implHistory[selector];\n uint256 i = history.length;\n for (; i > 0; --i) {\n address impl = history[i - 1];\n history.pop();\n if (impl == targetImpl) {\n break;\n }\n }\n if (i == 0) {\n LibSimpleFunctionRegistryRichErrors.NotInRollbackHistoryError(\n selector,\n targetImpl\n ).rrevert();\n }\n proxyStor.impls[selector] = targetImpl;\n emit ProxyFunctionUpdated(selector, currentImpl, targetImpl);\n }\n\n /// @dev Register or replace a function.\n /// Only directly callable by an authority.\n /// @param selector The function selector.\n /// @param impl The implementation contract for the function.\n function extend(bytes4 selector, address impl)\n external\n override\n onlyOwner\n {\n _extend(selector, impl);\n }\n\n /// @dev Register or replace a function.\n /// Only callable from within.\n /// This function is only used during the bootstrap process and\n /// should be deregistered by the deployer after bootstrapping is\n /// complete.\n /// @param selector The function selector.\n /// @param impl The implementation contract for the function.\n function _extendSelf(bytes4 selector, address impl)\n external\n onlySelf\n {\n _extend(selector, impl);\n }\n\n /// @dev Retrieve the length of the rollback history for a function.\n /// @param selector The function selector.\n /// @return rollbackLength The number of items in the rollback history for\n /// the function.\n function getRollbackLength(bytes4 selector)\n external\n override\n view\n returns (uint256 rollbackLength)\n {\n return LibSimpleFunctionRegistryStorage.getStorage().implHistory[selector].length;\n }\n\n /// @dev Retrieve an entry in the rollback history for a function.\n /// @param selector The function selector.\n /// @param idx The index in the rollback history.\n /// @return impl An implementation address for the function at\n /// index `idx`.\n function getRollbackEntryAtIndex(bytes4 selector, uint256 idx)\n external\n override\n view\n returns (address impl)\n {\n return LibSimpleFunctionRegistryStorage.getStorage().implHistory[selector][idx];\n }\n\n /// @dev Register or replace a function.\n /// @param selector The function selector.\n /// @param impl The implementation contract for the function.\n function _extend(bytes4 selector, address impl)\n private\n {\n (\n LibSimpleFunctionRegistryStorage.Storage storage stor,\n LibProxyStorage.Storage storage proxyStor\n ) = _getStorages();\n\n address oldImpl = proxyStor.impls[selector];\n address[] storage history = stor.implHistory[selector];\n history.push(oldImpl);\n proxyStor.impls[selector] = impl;\n emit ProxyFunctionUpdated(selector, oldImpl, impl);\n }\n\n /// @dev Get the storage buckets for this feature and the proxy.\n /// @return stor Storage bucket for this feature.\n /// @return proxyStor age bucket for the proxy.\n function _getStorages()\n private\n pure\n returns (\n LibSimpleFunctionRegistryStorage.Storage storage stor,\n LibProxyStorage.Storage storage proxyStor\n )\n {\n return (\n LibSimpleFunctionRegistryStorage.getStorage(),\n LibProxyStorage.getStorage()\n );\n }\n}\n",
|
|
"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibRichErrorsV06 {\n\n // bytes4(keccak256(\"Error(string)\"))\n bytes4 internal constant STANDARD_ERROR_SELECTOR = 0x08c379a0;\n\n // solhint-disable func-name-mixedcase\n /// @dev ABI encode a standard, string revert error payload.\n /// This is the same payload that would be included by a `revert(string)`\n /// solidity statement. It has the function signature `Error(string)`.\n /// @param message The error string.\n /// @return The ABI encoded error.\n function StandardError(string memory message)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n STANDARD_ERROR_SELECTOR,\n bytes(message)\n );\n }\n // solhint-enable func-name-mixedcase\n\n /// @dev Reverts an encoded rich revert reason `errorData`.\n /// @param errorData ABI encoded error data.\n function rrevert(bytes memory errorData)\n internal\n pure\n {\n assembly {\n revert(add(errorData, 0x20), mload(errorData))\n }\n }\n}\n",
|
|
"../fixins/FixinCommon.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibCommonRichErrors.sol\";\nimport \"../errors/LibOwnableRichErrors.sol\";\nimport \"../features/interfaces/IOwnableFeature.sol\";\nimport \"../features/interfaces/ISimpleFunctionRegistryFeature.sol\";\n\n\n/// @dev Common feature utilities.\nabstract contract FixinCommon {\n\n using LibRichErrorsV06 for bytes;\n\n /// @dev The implementation address of this feature.\n address internal immutable _implementation;\n\n /// @dev The caller must be this contract.\n modifier onlySelf() virtual {\n if (msg.sender != address(this)) {\n LibCommonRichErrors.OnlyCallableBySelfError(msg.sender).rrevert();\n }\n _;\n }\n\n /// @dev The caller of this function must be the owner.\n modifier onlyOwner() virtual {\n {\n address owner = IOwnableFeature(address(this)).owner();\n if (msg.sender != owner) {\n LibOwnableRichErrors.OnlyOwnerError(\n msg.sender,\n owner\n ).rrevert();\n }\n }\n _;\n }\n\n constructor() internal {\n // Remember this feature's original address.\n _implementation = address(this);\n }\n\n /// @dev Registers a function implemented by this feature at `_implementation`.\n /// Can and should only be called within a `migrate()`.\n /// @param selector The selector of the function whose implementation\n /// is at `_implementation`.\n function _registerFeatureFunction(bytes4 selector)\n internal\n {\n ISimpleFunctionRegistryFeature(address(this)).extend(selector, _implementation);\n }\n\n /// @dev Encode a feature version as a `uint256`.\n /// @param major The major version number of the feature.\n /// @param minor The minor version number of the feature.\n /// @param revision The revision number of the feature.\n /// @return encodedVersion The encoded version number.\n function _encodeVersion(uint32 major, uint32 minor, uint32 revision)\n internal\n pure\n returns (uint256 encodedVersion)\n {\n return (uint256(major) << 64) | (uint256(minor) << 32) | uint256(revision);\n }\n}\n",
|
|
"../errors/LibCommonRichErrors.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibCommonRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function OnlyCallableBySelfError(address sender)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OnlyCallableBySelfError(address)\")),\n sender\n );\n }\n\n function IllegalReentrancyError(bytes4 selector, uint256 reentrancyFlags)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"IllegalReentrancyError(bytes4,uint256)\")),\n selector,\n reentrancyFlags\n );\n }\n}\n",
|
|
"../errors/LibOwnableRichErrors.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibOwnableRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function OnlyOwnerError(\n address sender,\n address owner\n )\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"OnlyOwnerError(address,address)\")),\n sender,\n owner\n );\n }\n\n function TransferOwnerToZeroError()\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"TransferOwnerToZeroError()\"))\n );\n }\n\n function MigrateCallFailedError(address target, bytes memory resultData)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"MigrateCallFailedError(address,bytes)\")),\n target,\n resultData\n );\n }\n}\n",
|
|
"./interfaces/IOwnableFeature.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/interfaces/IOwnableV06.sol\";\n\n\n// solhint-disable no-empty-blocks\n/// @dev Owner management and migration features.\ninterface IOwnableFeature is\n IOwnableV06\n{\n /// @dev Emitted when `migrate()` is called.\n /// @param caller The caller of `migrate()`.\n /// @param migrator The migration contract.\n /// @param newOwner The address of the new owner.\n event Migrated(address caller, address migrator, address newOwner);\n\n /// @dev Execute a migration function in the context of the ZeroEx contract.\n /// The result of the function being called should be the magic bytes\n /// 0x2c64c5ef (`keccack('MIGRATE_SUCCESS')`). Only callable by the owner.\n /// The owner will be temporarily set to `address(this)` inside the call.\n /// Before returning, the owner will be set to `newOwner`.\n /// @param target The migrator contract address.\n /// @param newOwner The address of the new owner.\n /// @param data The call data.\n function migrate(address target, bytes calldata data, address newOwner) external;\n}\n",
|
|
"@0x/contracts-utils/contracts/src/v06/interfaces/IOwnableV06.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\ninterface IOwnableV06 {\n\n /// @dev Emitted by Ownable when ownership is transferred.\n /// @param previousOwner The previous owner of the contract.\n /// @param newOwner The new owner of the contract.\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /// @dev Transfers ownership of the contract to a new address.\n /// @param newOwner The address that will become the owner.\n function transferOwnership(address newOwner) external;\n\n /// @dev The owner of this contract.\n /// @return ownerAddress The owner address.\n function owner() external view returns (address ownerAddress);\n}\n",
|
|
"./interfaces/ISimpleFunctionRegistryFeature.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Basic registry management features.\ninterface ISimpleFunctionRegistryFeature {\n\n /// @dev A function implementation was updated via `extend()` or `rollback()`.\n /// @param selector The function selector.\n /// @param oldImpl The implementation contract address being replaced.\n /// @param newImpl The replacement implementation contract address.\n event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address newImpl);\n\n /// @dev Roll back to a prior implementation of a function.\n /// @param selector The function selector.\n /// @param targetImpl The address of an older implementation of the function.\n function rollback(bytes4 selector, address targetImpl) external;\n\n /// @dev Register or replace a function.\n /// @param selector The function selector.\n /// @param impl The implementation contract for the function.\n function extend(bytes4 selector, address impl) external;\n\n /// @dev Retrieve the length of the rollback history for a function.\n /// @param selector The function selector.\n /// @return rollbackLength The number of items in the rollback history for\n /// the function.\n function getRollbackLength(bytes4 selector)\n external\n view\n returns (uint256 rollbackLength);\n\n /// @dev Retrieve an entry in the rollback history for a function.\n /// @param selector The function selector.\n /// @param idx The index in the rollback history.\n /// @return impl An implementation address for the function at\n /// index `idx`.\n function getRollbackEntryAtIndex(bytes4 selector, uint256 idx)\n external\n view\n returns (address impl);\n}\n",
|
|
"../storage/LibProxyStorage.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./LibStorage.sol\";\n\n\n/// @dev Storage helpers for the proxy contract.\nlibrary LibProxyStorage {\n\n /// @dev Storage bucket for proxy contract.\n struct Storage {\n // Mapping of function selector -> function implementation\n mapping(bytes4 => address) impls;\n // The owner of the proxy contract.\n address owner;\n }\n\n /// @dev Get the storage bucket for this contract.\n function getStorage() internal pure returns (Storage storage stor) {\n uint256 storageSlot = LibStorage.getStorageSlot(\n LibStorage.StorageId.Proxy\n );\n // Dip into assembly to change the slot pointed to by the local\n // variable `stor`.\n // See https://solidity.readthedocs.io/en/v0.6.8/assembly.html?highlight=slot#access-to-external-variables-functions-and-libraries\n assembly { stor_slot := storageSlot }\n }\n}\n",
|
|
"../storage/LibStorage.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Common storage helpers\nlibrary LibStorage {\n\n /// @dev What to bit-shift a storage ID by to get its slot.\n /// This gives us a maximum of 2**128 inline fields in each bucket.\n uint256 private constant STORAGE_SLOT_EXP = 128;\n\n /// @dev Storage IDs for feature storage buckets.\n /// WARNING: APPEND-ONLY.\n enum StorageId {\n Proxy,\n SimpleFunctionRegistry,\n Ownable,\n TokenSpender,\n TransformERC20,\n MetaTransactions,\n ReentrancyGuard,\n NativeOrders\n }\n\n /// @dev Get the storage slot given a storage ID. We assign unique, well-spaced\n /// slots to storage bucket variables to ensure they do not overlap.\n /// See: https://solidity.readthedocs.io/en/v0.6.6/assembly.html#access-to-external-variables-functions-and-libraries\n /// @param storageId An entry in `StorageId`\n /// @return slot The storage slot.\n function getStorageSlot(StorageId storageId)\n internal\n pure\n returns (uint256 slot)\n {\n // This should never overflow with a reasonable `STORAGE_SLOT_EXP`\n // because Solidity will do a range check on `storageId` during the cast.\n return (uint256(storageId) + 1) << STORAGE_SLOT_EXP;\n }\n}\n",
|
|
"../storage/LibSimpleFunctionRegistryStorage.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./LibStorage.sol\";\n\n\n/// @dev Storage helpers for the `SimpleFunctionRegistry` feature.\nlibrary LibSimpleFunctionRegistryStorage {\n\n /// @dev Storage bucket for this feature.\n struct Storage {\n // Mapping of function selector -> implementation history.\n mapping(bytes4 => address[]) implHistory;\n }\n\n /// @dev Get the storage bucket for this contract.\n function getStorage() internal pure returns (Storage storage stor) {\n uint256 storageSlot = LibStorage.getStorageSlot(\n LibStorage.StorageId.SimpleFunctionRegistry\n );\n // Dip into assembly to change the slot pointed to by the local\n // variable `stor`.\n // See https://solidity.readthedocs.io/en/v0.6.8/assembly.html?highlight=slot#access-to-external-variables-functions-and-libraries\n assembly { stor_slot := storageSlot }\n }\n}\n",
|
|
"../errors/LibSimpleFunctionRegistryRichErrors.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibSimpleFunctionRegistryRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function NotInRollbackHistoryError(bytes4 selector, address targetImpl)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"NotInRollbackHistoryError(bytes4,address)\")),\n selector,\n targetImpl\n );\n }\n}\n",
|
|
"../migrations/LibBootstrap.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibProxyRichErrors.sol\";\n\n\nlibrary LibBootstrap {\n\n /// @dev Magic bytes returned by the bootstrapper to indicate success.\n /// This is `keccack('BOOTSTRAP_SUCCESS')`.\n bytes4 internal constant BOOTSTRAP_SUCCESS = 0xd150751b;\n\n using LibRichErrorsV06 for bytes;\n\n /// @dev Perform a delegatecall and ensure it returns the magic bytes.\n /// @param target The call target.\n /// @param data The call data.\n function delegatecallBootstrapFunction(\n address target,\n bytes memory data\n )\n internal\n {\n (bool success, bytes memory resultData) = target.delegatecall(data);\n if (!success ||\n resultData.length != 32 ||\n abi.decode(resultData, (bytes4)) != BOOTSTRAP_SUCCESS)\n {\n LibProxyRichErrors.BootstrapCallFailedError(target, resultData).rrevert();\n }\n }\n}\n",
|
|
"../errors/LibProxyRichErrors.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\n\n\nlibrary LibProxyRichErrors {\n\n // solhint-disable func-name-mixedcase\n\n function NotImplementedError(bytes4 selector)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"NotImplementedError(bytes4)\")),\n selector\n );\n }\n\n function InvalidBootstrapCallerError(address actual, address expected)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InvalidBootstrapCallerError(address,address)\")),\n actual,\n expected\n );\n }\n\n function InvalidDieCallerError(address actual, address expected)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"InvalidDieCallerError(address,address)\")),\n actual,\n expected\n );\n }\n\n function BootstrapCallFailedError(address target, bytes memory resultData)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encodeWithSelector(\n bytes4(keccak256(\"BootstrapCallFailedError(address,bytes)\")),\n target,\n resultData\n );\n }\n}\n",
|
|
"./interfaces/IFeature.sol": "// SPDX-License-Identifier: Apache-2.0\n/*\n\n Copyright 2020 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.6.5;\npragma experimental ABIEncoderV2;\n\n\n/// @dev Basic interface for a feature contract.\ninterface IFeature {\n\n // solhint-disable func-name-mixedcase\n\n /// @dev The name of this feature set.\n function FEATURE_NAME() external view returns (string memory name);\n\n /// @dev The version of this feature set.\n function FEATURE_VERSION() external view returns (uint256 version);\n}\n"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.6.12+commit.27d51765",
|
|
"settings": {
|
|
"remappings": [
|
|
"@0x/contracts-utils=/Users/michaelzhu/protocol/node_modules/@0x/contracts-utils",
|
|
"@0x/contracts-erc20=/Users/michaelzhu/protocol/contracts/zero-ex/node_modules/@0x/contracts-erc20"
|
|
],
|
|
"optimizer": {
|
|
"enabled": true,
|
|
"runs": 1000000,
|
|
"details": {
|
|
"yul": true,
|
|
"deduplicate": true,
|
|
"cse": true,
|
|
"constantOptimizer": true
|
|
}
|
|
},
|
|
"outputSelection": {
|
|
"*": {
|
|
"*": [
|
|
"abi",
|
|
"devdoc",
|
|
"evm.bytecode.object",
|
|
"evm.bytecode.sourceMap",
|
|
"evm.deployedBytecode.object",
|
|
"evm.deployedBytecode.sourceMap",
|
|
"evm.methodIdentifiers"
|
|
]
|
|
}
|
|
},
|
|
"evmVersion": "istanbul"
|
|
}
|
|
},
|
|
"chains": {}
|
|
}
|