356 lines
133 KiB
JSON
356 lines
133 KiB
JSON
{
|
|
"schemaVersion": "2.0.0",
|
|
"contractName": "OwnableFeature",
|
|
"compilerOutput": {
|
|
"abi": [
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "address",
|
|
"name": "caller",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "address",
|
|
"name": "migrator",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "address",
|
|
"name": "newOwner",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "Migrated",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "previousOwner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "newOwner",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "OwnershipTransferred",
|
|
"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": [],
|
|
"name": "bootstrap",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes4",
|
|
"name": "success",
|
|
"type": "bytes4"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "target",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "bytes",
|
|
"name": "data",
|
|
"type": "bytes"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "newOwner",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "migrate",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "owner",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "owner_",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "newOwner",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "transferOwnership",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"details": "Owner management features.",
|
|
"kind": "dev",
|
|
"methods": {
|
|
"bootstrap()": {
|
|
"details": "Initializes this feature. The intial owner will be set to this (ZeroEx) to allow the bootstrappers to call `extend()`. Ownership should be transferred to the real owner by the bootstrapper after bootstrapping is complete.",
|
|
"returns": {
|
|
"success": "Magic bytes if successful."
|
|
}
|
|
},
|
|
"migrate(address,bytes,address)": {
|
|
"details": "Execute a migration function in the context of the ZeroEx contract. The result of the function being called should be the magic bytes 0x2c64c5ef (`keccack('MIGRATE_SUCCESS')`). Only callable by the owner. Temporarily sets the owner to ourselves so we can perform admin functions. Before returning, the owner will be set to `newOwner`.",
|
|
"params": {
|
|
"data": "The call data.",
|
|
"newOwner": "The address of the new owner.",
|
|
"target": "The migrator contract address."
|
|
}
|
|
},
|
|
"owner()": {
|
|
"details": "Get the owner of this contract.",
|
|
"returns": {
|
|
"owner_": "The owner of this contract."
|
|
}
|
|
},
|
|
"transferOwnership(address)": {
|
|
"details": "Change the owner of this contract. Only directly callable by the owner.",
|
|
"params": {
|
|
"newOwner": "New owner address."
|
|
}
|
|
}
|
|
},
|
|
"stateVariables": {
|
|
"FEATURE_NAME": {
|
|
"details": "Name of this feature."
|
|
},
|
|
"FEATURE_VERSION": {
|
|
"details": "Version of this feature."
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"bytecode": {
|
|
"linkReferences": {},
|
|
"object": "0x60c0604052610011600160008061002d565b60a05234801561002057600080fd5b503060601b60805261005f565b6bffffffff0000000000000000604084901b1667ffffffff00000000602084901b161763ffffffff8216179392505050565b60805160601c60a051610cdb61008e6000398060fe52508061054452806105f452806106a45250610cdb6000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c80638da5cb5b116100505780638da5cb5b146100bf578063f2fde38b146100d4578063fb969b0a146100e757610072565b8063031b905c14610077578063261fe679146100955780636ae4b4f7146100aa575b600080fd5b61007f6100fc565b60405161008c9190610c4b565b60405180910390f35b6100a86100a33660046109db565b610120565b005b6100b26102ed565b60405161008c9190610c38565b6100c7610326565b60405161008c9190610b14565b6100a86100e236600461099c565b61034c565b6100ef6104a0565b60405161008c9190610bc3565b7f000000000000000000000000000000000000000000000000000000000000000081565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561016857600080fd5b505afa15801561017c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a091906109bf565b90503373ffffffffffffffffffffffffffffffffffffffff8216146101d1576101d16101cc3383610724565b6107df565b5073ffffffffffffffffffffffffffffffffffffffff81166101f8576101f86101cc6107e7565b6000610202610841565b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001630178155604080516020601f870181900481028201810190925285815291925061026c918791879087908190840183828082843760009201919091525061085492505050565b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161781556040517fe1b831b0e6f3aa16b4b1a6bd526b5cdeab4940744ca6e0251f5fe5f8caf1c81a906102de90339088908690610b35565b60405180910390a15050505050565b6040518060400160405280600781526020017f4f776e61626c650000000000000000000000000000000000000000000000000081525081565b6000610330610841565b5473ffffffffffffffffffffffffffffffffffffffff16905090565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561039457600080fd5b505afa1580156103a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103cc91906109bf565b90503373ffffffffffffffffffffffffffffffffffffffff8216146103f8576103f86101cc3383610724565b506000610403610841565b905073ffffffffffffffffffffffffffffffffffffffff82166104305761042b6101cc6107e7565b61049c565b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35b5050565b6000306104ab610841565b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff929092169190911790556040517f0ee8be1b0000000000000000000000000000000000000000000000000000000081523090630ee8be1b9061056c907ff2fde38b00000000000000000000000000000000000000000000000000000000907f000000000000000000000000000000000000000000000000000000000000000090600401610bf0565b600060405180830381600087803b15801561058657600080fd5b505af115801561059a573d6000803e3d6000fd5b50506040517f0ee8be1b000000000000000000000000000000000000000000000000000000008152309250630ee8be1b915061061c907f8da5cb5b00000000000000000000000000000000000000000000000000000000907f000000000000000000000000000000000000000000000000000000000000000090600401610bf0565b600060405180830381600087803b15801561063657600080fd5b505af115801561064a573d6000803e3d6000fd5b50506040517f0ee8be1b000000000000000000000000000000000000000000000000000000008152309250630ee8be1b91506106cc907f261fe67900000000000000000000000000000000000000000000000000000000907f000000000000000000000000000000000000000000000000000000000000000090600401610bf0565b600060405180830381600087803b1580156106e657600080fd5b505af11580156106fa573d6000803e3d6000fd5b507fd150751b00000000000000000000000000000000000000000000000000000000935050505090565b60607f1de45ad18e8a4484220a3ca14f4d977641addbaba5a344b1384dc2aa78a2e34d838360405160240161075a929190610b65565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b805160208201fd5b6040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fe69edc3e0000000000000000000000000000000000000000000000000000000017905290565b60008061084e600261094b565b92915050565b600060608373ffffffffffffffffffffffffffffffffffffffff168360405161087d9190610af8565b600060405180830381855af49150503d80600081146108b8576040519150601f19603f3d011682016040523d82523d6000602084013e6108bd565b606091505b50915091508115806108d157508051602014155b80610933575080517f2c64c5ef000000000000000000000000000000000000000000000000000000009061090e9083016020908101908401610a6e565b7fffffffff000000000000000000000000000000000000000000000000000000001614155b15610945576109456101cc8583610966565b50505050565b6000608082600781111561095b57fe5b600101901b92915050565b60607ff74b11883dedd9755c2b93d5d172e1ad0300f9d700d2a708ba05e9fd9d4d1528838360405160240161075a929190610b8c565b6000602082840312156109ad578081fd5b81356109b881610c80565b9392505050565b6000602082840312156109d0578081fd5b81516109b881610c80565b600080600080606085870312156109f0578283fd5b84356109fb81610c80565b9350602085013567ffffffffffffffff80821115610a17578485fd5b818701915087601f830112610a2a578485fd5b813581811115610a38578586fd5b886020828501011115610a49578586fd5b6020830195508094505050506040850135610a6381610c80565b939692955090935050565b600060208284031215610a7f578081fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146109b8578182fd5b60008151808452610ac6816020860160208601610c54565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251610b0a818460208701610c54565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff93841681529183166020830152909116604082015260600190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b600073ffffffffffffffffffffffffffffffffffffffff8416825260406020830152610bbb6040830184610aae565b949350505050565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b6000602082526109b86020830184610aae565b90815260200190565b60005b83811015610c6f578181015183820152602001610c57565b838111156109455750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114610ca257600080fd5b5056fea2646970667358221220f989f20ee63ba083fd7bdcb2650705fcedf701647ca126824112b42de079ec4f64736f6c634300060c0033",
|
|
"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 0xCDB PUSH2 0x8E PUSH1 0x0 CODECOPY DUP1 PUSH1 0xFE MSTORE POP DUP1 PUSH2 0x544 MSTORE DUP1 PUSH2 0x5F4 MSTORE DUP1 PUSH2 0x6A4 MSTORE POP PUSH2 0xCDB 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 0x72 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x8DA5CB5B GT PUSH2 0x50 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0xBF JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0xD4 JUMPI DUP1 PUSH4 0xFB969B0A EQ PUSH2 0xE7 JUMPI PUSH2 0x72 JUMP JUMPDEST DUP1 PUSH4 0x31B905C EQ PUSH2 0x77 JUMPI DUP1 PUSH4 0x261FE679 EQ PUSH2 0x95 JUMPI DUP1 PUSH4 0x6AE4B4F7 EQ PUSH2 0xAA JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x7F PUSH2 0xFC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP2 SWAP1 PUSH2 0xC4B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xA8 PUSH2 0xA3 CALLDATASIZE PUSH1 0x4 PUSH2 0x9DB JUMP JUMPDEST PUSH2 0x120 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB2 PUSH2 0x2ED JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP2 SWAP1 PUSH2 0xC38 JUMP JUMPDEST PUSH2 0xC7 PUSH2 0x326 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP2 SWAP1 PUSH2 0xB14 JUMP JUMPDEST PUSH2 0xA8 PUSH2 0xE2 CALLDATASIZE PUSH1 0x4 PUSH2 0x99C JUMP JUMPDEST PUSH2 0x34C JUMP JUMPDEST PUSH2 0xEF PUSH2 0x4A0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP2 SWAP1 PUSH2 0xBC3 JUMP JUMPDEST PUSH32 0x0 DUP2 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 0x168 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x17C 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 0x1A0 SWAP2 SWAP1 PUSH2 0x9BF JUMP JUMPDEST SWAP1 POP CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND EQ PUSH2 0x1D1 JUMPI PUSH2 0x1D1 PUSH2 0x1CC CALLER DUP4 PUSH2 0x724 JUMP JUMPDEST PUSH2 0x7DF JUMP JUMPDEST POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH2 0x1F8 JUMPI PUSH2 0x1F8 PUSH2 0x1CC PUSH2 0x7E7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x202 PUSH2 0x841 JUMP JUMPDEST DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND ADDRESS OR DUP2 SSTORE PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F DUP8 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP6 DUP2 MSTORE SWAP2 SWAP3 POP PUSH2 0x26C SWAP2 DUP8 SWAP2 DUP8 SWAP1 DUP8 SWAP1 DUP2 SWAP1 DUP5 ADD DUP4 DUP3 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP PUSH2 0x854 SWAP3 POP POP POP JUMP JUMPDEST DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND OR DUP2 SSTORE PUSH1 0x40 MLOAD PUSH32 0xE1B831B0E6F3AA16B4B1A6BD526B5CDEAB4940744CA6E0251F5FE5F8CAF1C81A SWAP1 PUSH2 0x2DE SWAP1 CALLER SWAP1 DUP9 SWAP1 DUP7 SWAP1 PUSH2 0xB35 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x7 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4F776E61626C6500000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x330 PUSH2 0x841 JUMP JUMPDEST SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP SWAP1 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 0x394 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x3A8 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 0x3CC SWAP2 SWAP1 PUSH2 0x9BF JUMP JUMPDEST SWAP1 POP CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND EQ PUSH2 0x3F8 JUMPI PUSH2 0x3F8 PUSH2 0x1CC CALLER DUP4 PUSH2 0x724 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x403 PUSH2 0x841 JUMP JUMPDEST SWAP1 POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND PUSH2 0x430 JUMPI PUSH2 0x42B PUSH2 0x1CC PUSH2 0x7E7 JUMP JUMPDEST PUSH2 0x49C JUMP JUMPDEST DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND SWAP1 DUP2 OR DUP3 SSTORE PUSH1 0x40 MLOAD CALLER SWAP1 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP1 PUSH1 0x0 SWAP1 LOG3 JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 ADDRESS PUSH2 0x4AB PUSH2 0x841 JUMP JUMPDEST DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0xEE8BE1B00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP1 PUSH4 0xEE8BE1B SWAP1 PUSH2 0x56C SWAP1 PUSH32 0xF2FDE38B00000000000000000000000000000000000000000000000000000000 SWAP1 PUSH32 0x0 SWAP1 PUSH1 0x4 ADD PUSH2 0xBF0 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x586 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x59A JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xEE8BE1B00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP3 POP PUSH4 0xEE8BE1B SWAP2 POP PUSH2 0x61C SWAP1 PUSH32 0x8DA5CB5B00000000000000000000000000000000000000000000000000000000 SWAP1 PUSH32 0x0 SWAP1 PUSH1 0x4 ADD PUSH2 0xBF0 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x636 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x64A JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xEE8BE1B00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP3 POP PUSH4 0xEE8BE1B SWAP2 POP PUSH2 0x6CC SWAP1 PUSH32 0x261FE67900000000000000000000000000000000000000000000000000000000 SWAP1 PUSH32 0x0 SWAP1 PUSH1 0x4 ADD PUSH2 0xBF0 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x6E6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x6FA JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH32 0xD150751B00000000000000000000000000000000000000000000000000000000 SWAP4 POP POP POP POP SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH32 0x1DE45AD18E8A4484220A3CA14F4D977641ADDBABA5A344B1384DC2AA78A2E34D DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x75A SWAP3 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 SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP3 ADD REVERT JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x4 DUP2 MSTORE PUSH1 0x24 DUP2 ADD SWAP1 SWAP2 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xE69EDC3E00000000000000000000000000000000000000000000000000000000 OR SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x84E PUSH1 0x2 PUSH2 0x94B JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH1 0x40 MLOAD PUSH2 0x87D SWAP2 SWAP1 PUSH2 0xAF8 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 GAS DELEGATECALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x8B8 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x8BD JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP DUP2 ISZERO DUP1 PUSH2 0x8D1 JUMPI POP DUP1 MLOAD PUSH1 0x20 EQ ISZERO JUMPDEST DUP1 PUSH2 0x933 JUMPI POP DUP1 MLOAD PUSH32 0x2C64C5EF00000000000000000000000000000000000000000000000000000000 SWAP1 PUSH2 0x90E SWAP1 DUP4 ADD PUSH1 0x20 SWAP1 DUP2 ADD SWAP1 DUP5 ADD PUSH2 0xA6E JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND EQ ISZERO JUMPDEST ISZERO PUSH2 0x945 JUMPI PUSH2 0x945 PUSH2 0x1CC DUP6 DUP4 PUSH2 0x966 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0x95B JUMPI INVALID JUMPDEST PUSH1 0x1 ADD SWAP1 SHL SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 PUSH32 0xF74B11883DEDD9755C2B93D5D172E1AD0300F9D700D2A708BA05E9FD9D4D1528 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x75A SWAP3 SWAP2 SWAP1 PUSH2 0xB8C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x9AD JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x9B8 DUP2 PUSH2 0xC80 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x9D0 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x9B8 DUP2 PUSH2 0xC80 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x60 DUP6 DUP8 SUB SLT ISZERO PUSH2 0x9F0 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH2 0x9FB DUP2 PUSH2 0xC80 JUMP JUMPDEST SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xA17 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP2 DUP8 ADD SWAP2 POP DUP8 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xA2A JUMPI DUP5 DUP6 REVERT JUMPDEST DUP2 CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH2 0xA38 JUMPI DUP6 DUP7 REVERT JUMPDEST DUP9 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0xA49 JUMPI DUP6 DUP7 REVERT JUMPDEST PUSH1 0x20 DUP4 ADD SWAP6 POP DUP1 SWAP5 POP POP POP POP PUSH1 0x40 DUP6 ADD CALLDATALOAD PUSH2 0xA63 DUP2 PUSH2 0xC80 JUMP JUMPDEST SWAP4 SWAP7 SWAP3 SWAP6 POP SWAP1 SWAP4 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xA7F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP2 AND DUP2 EQ PUSH2 0x9B8 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0xAC6 DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0xC54 JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 MLOAD PUSH2 0xB0A DUP2 DUP5 PUSH1 0x20 DUP8 ADD PUSH2 0xC54 JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP4 DUP5 AND DUP2 MSTORE SWAP2 DUP4 AND PUSH1 0x20 DUP4 ADD MSTORE SWAP1 SWAP2 AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 DUP4 AND DUP2 MSTORE SWAP2 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xBBB PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0xAAE JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP 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 DUP3 MSTORE PUSH2 0x9B8 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0xAAE JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xC6F JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xC57 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x945 JUMPI POP POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xCA2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xF9 DUP10 CALLCODE 0xE 0xE6 EXTCODESIZE LOG0 DUP4 REVERT PUSH28 0xDCB2650705FCEDF701647CA126824112B42DE079EC4F64736F6C6343 STOP MOD 0xC STOP CALLER ",
|
|
"sourceMap": "1121:3305:4:-:0;;;1393:23;1408:1;1411;;1393:14;:23::i;:::-;1341:75;;1121:3305;;;;;;;;;-1:-1:-1;1920:4:9;1894:31;;;;1121:3305:4;;2672:235:9;2834:20;2852:2;2834:20;;;;2859;2877:2;2859:20;;;;2833:47;2883:17;;;2833:67;2672:235;;;;;:::o;1121:3305:4:-;;;;;;;;;;;;;;;"
|
|
},
|
|
"deployedBytecode": {
|
|
"immutableReferences": {
|
|
"252": [
|
|
{
|
|
"length": 32,
|
|
"start": 254
|
|
}
|
|
],
|
|
"877": [
|
|
{
|
|
"length": 32,
|
|
"start": 1348
|
|
},
|
|
{
|
|
"length": 32,
|
|
"start": 1524
|
|
},
|
|
{
|
|
"length": 32,
|
|
"start": 1700
|
|
}
|
|
]
|
|
},
|
|
"linkReferences": {},
|
|
"object": "0x608060405234801561001057600080fd5b50600436106100725760003560e01c80638da5cb5b116100505780638da5cb5b146100bf578063f2fde38b146100d4578063fb969b0a146100e757610072565b8063031b905c14610077578063261fe679146100955780636ae4b4f7146100aa575b600080fd5b61007f6100fc565b60405161008c9190610c4b565b60405180910390f35b6100a86100a33660046109db565b610120565b005b6100b26102ed565b60405161008c9190610c38565b6100c7610326565b60405161008c9190610b14565b6100a86100e236600461099c565b61034c565b6100ef6104a0565b60405161008c9190610bc3565b7f000000000000000000000000000000000000000000000000000000000000000081565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561016857600080fd5b505afa15801561017c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a091906109bf565b90503373ffffffffffffffffffffffffffffffffffffffff8216146101d1576101d16101cc3383610724565b6107df565b5073ffffffffffffffffffffffffffffffffffffffff81166101f8576101f86101cc6107e7565b6000610202610841565b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001630178155604080516020601f870181900481028201810190925285815291925061026c918791879087908190840183828082843760009201919091525061085492505050565b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161781556040517fe1b831b0e6f3aa16b4b1a6bd526b5cdeab4940744ca6e0251f5fe5f8caf1c81a906102de90339088908690610b35565b60405180910390a15050505050565b6040518060400160405280600781526020017f4f776e61626c650000000000000000000000000000000000000000000000000081525081565b6000610330610841565b5473ffffffffffffffffffffffffffffffffffffffff16905090565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561039457600080fd5b505afa1580156103a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103cc91906109bf565b90503373ffffffffffffffffffffffffffffffffffffffff8216146103f8576103f86101cc3383610724565b506000610403610841565b905073ffffffffffffffffffffffffffffffffffffffff82166104305761042b6101cc6107e7565b61049c565b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35b5050565b6000306104ab610841565b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff929092169190911790556040517f0ee8be1b0000000000000000000000000000000000000000000000000000000081523090630ee8be1b9061056c907ff2fde38b00000000000000000000000000000000000000000000000000000000907f000000000000000000000000000000000000000000000000000000000000000090600401610bf0565b600060405180830381600087803b15801561058657600080fd5b505af115801561059a573d6000803e3d6000fd5b50506040517f0ee8be1b000000000000000000000000000000000000000000000000000000008152309250630ee8be1b915061061c907f8da5cb5b00000000000000000000000000000000000000000000000000000000907f000000000000000000000000000000000000000000000000000000000000000090600401610bf0565b600060405180830381600087803b15801561063657600080fd5b505af115801561064a573d6000803e3d6000fd5b50506040517f0ee8be1b000000000000000000000000000000000000000000000000000000008152309250630ee8be1b91506106cc907f261fe67900000000000000000000000000000000000000000000000000000000907f000000000000000000000000000000000000000000000000000000000000000090600401610bf0565b600060405180830381600087803b1580156106e657600080fd5b505af11580156106fa573d6000803e3d6000fd5b507fd150751b00000000000000000000000000000000000000000000000000000000935050505090565b60607f1de45ad18e8a4484220a3ca14f4d977641addbaba5a344b1384dc2aa78a2e34d838360405160240161075a929190610b65565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905092915050565b805160208201fd5b6040805160048152602481019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fe69edc3e0000000000000000000000000000000000000000000000000000000017905290565b60008061084e600261094b565b92915050565b600060608373ffffffffffffffffffffffffffffffffffffffff168360405161087d9190610af8565b600060405180830381855af49150503d80600081146108b8576040519150601f19603f3d011682016040523d82523d6000602084013e6108bd565b606091505b50915091508115806108d157508051602014155b80610933575080517f2c64c5ef000000000000000000000000000000000000000000000000000000009061090e9083016020908101908401610a6e565b7fffffffff000000000000000000000000000000000000000000000000000000001614155b15610945576109456101cc8583610966565b50505050565b6000608082600781111561095b57fe5b600101901b92915050565b60607ff74b11883dedd9755c2b93d5d172e1ad0300f9d700d2a708ba05e9fd9d4d1528838360405160240161075a929190610b8c565b6000602082840312156109ad578081fd5b81356109b881610c80565b9392505050565b6000602082840312156109d0578081fd5b81516109b881610c80565b600080600080606085870312156109f0578283fd5b84356109fb81610c80565b9350602085013567ffffffffffffffff80821115610a17578485fd5b818701915087601f830112610a2a578485fd5b813581811115610a38578586fd5b886020828501011115610a49578586fd5b6020830195508094505050506040850135610a6381610c80565b939692955090935050565b600060208284031215610a7f578081fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146109b8578182fd5b60008151808452610ac6816020860160208601610c54565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251610b0a818460208701610c54565b9190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff93841681529183166020830152909116604082015260600190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b600073ffffffffffffffffffffffffffffffffffffffff8416825260406020830152610bbb6040830184610aae565b949350505050565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000092909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b6000602082526109b86020830184610aae565b90815260200190565b60005b83811015610c6f578181015183820152602001610c57565b838111156109455750506000910152565b73ffffffffffffffffffffffffffffffffffffffff81168114610ca257600080fd5b5056fea2646970667358221220f989f20ee63ba083fd7bdcb2650705fcedf701647ca126824112b42de079ec4f64736f6c634300060c0033",
|
|
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x72 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x8DA5CB5B GT PUSH2 0x50 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0xBF JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0xD4 JUMPI DUP1 PUSH4 0xFB969B0A EQ PUSH2 0xE7 JUMPI PUSH2 0x72 JUMP JUMPDEST DUP1 PUSH4 0x31B905C EQ PUSH2 0x77 JUMPI DUP1 PUSH4 0x261FE679 EQ PUSH2 0x95 JUMPI DUP1 PUSH4 0x6AE4B4F7 EQ PUSH2 0xAA JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x7F PUSH2 0xFC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP2 SWAP1 PUSH2 0xC4B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xA8 PUSH2 0xA3 CALLDATASIZE PUSH1 0x4 PUSH2 0x9DB JUMP JUMPDEST PUSH2 0x120 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB2 PUSH2 0x2ED JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP2 SWAP1 PUSH2 0xC38 JUMP JUMPDEST PUSH2 0xC7 PUSH2 0x326 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP2 SWAP1 PUSH2 0xB14 JUMP JUMPDEST PUSH2 0xA8 PUSH2 0xE2 CALLDATASIZE PUSH1 0x4 PUSH2 0x99C JUMP JUMPDEST PUSH2 0x34C JUMP JUMPDEST PUSH2 0xEF PUSH2 0x4A0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8C SWAP2 SWAP1 PUSH2 0xBC3 JUMP JUMPDEST PUSH32 0x0 DUP2 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 0x168 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x17C 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 0x1A0 SWAP2 SWAP1 PUSH2 0x9BF JUMP JUMPDEST SWAP1 POP CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND EQ PUSH2 0x1D1 JUMPI PUSH2 0x1D1 PUSH2 0x1CC CALLER DUP4 PUSH2 0x724 JUMP JUMPDEST PUSH2 0x7DF JUMP JUMPDEST POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH2 0x1F8 JUMPI PUSH2 0x1F8 PUSH2 0x1CC PUSH2 0x7E7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x202 PUSH2 0x841 JUMP JUMPDEST DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND ADDRESS OR DUP2 SSTORE PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F DUP8 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP6 DUP2 MSTORE SWAP2 SWAP3 POP PUSH2 0x26C SWAP2 DUP8 SWAP2 DUP8 SWAP1 DUP8 SWAP1 DUP2 SWAP1 DUP5 ADD DUP4 DUP3 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP PUSH2 0x854 SWAP3 POP POP POP JUMP JUMPDEST DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND OR DUP2 SSTORE PUSH1 0x40 MLOAD PUSH32 0xE1B831B0E6F3AA16B4B1A6BD526B5CDEAB4940744CA6E0251F5FE5F8CAF1C81A SWAP1 PUSH2 0x2DE SWAP1 CALLER SWAP1 DUP9 SWAP1 DUP7 SWAP1 PUSH2 0xB35 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x7 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4F776E61626C6500000000000000000000000000000000000000000000000000 DUP2 MSTORE POP DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x330 PUSH2 0x841 JUMP JUMPDEST SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP SWAP1 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 0x394 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x3A8 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 0x3CC SWAP2 SWAP1 PUSH2 0x9BF JUMP JUMPDEST SWAP1 POP CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND EQ PUSH2 0x3F8 JUMPI PUSH2 0x3F8 PUSH2 0x1CC CALLER DUP4 PUSH2 0x724 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x403 PUSH2 0x841 JUMP JUMPDEST SWAP1 POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND PUSH2 0x430 JUMPI PUSH2 0x42B PUSH2 0x1CC PUSH2 0x7E7 JUMP JUMPDEST PUSH2 0x49C JUMP JUMPDEST DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND SWAP1 DUP2 OR DUP3 SSTORE PUSH1 0x40 MLOAD CALLER SWAP1 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP1 PUSH1 0x0 SWAP1 LOG3 JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 ADDRESS PUSH2 0x4AB PUSH2 0x841 JUMP JUMPDEST DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0xEE8BE1B00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP1 PUSH4 0xEE8BE1B SWAP1 PUSH2 0x56C SWAP1 PUSH32 0xF2FDE38B00000000000000000000000000000000000000000000000000000000 SWAP1 PUSH32 0x0 SWAP1 PUSH1 0x4 ADD PUSH2 0xBF0 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x586 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x59A JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xEE8BE1B00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP3 POP PUSH4 0xEE8BE1B SWAP2 POP PUSH2 0x61C SWAP1 PUSH32 0x8DA5CB5B00000000000000000000000000000000000000000000000000000000 SWAP1 PUSH32 0x0 SWAP1 PUSH1 0x4 ADD PUSH2 0xBF0 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x636 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x64A JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xEE8BE1B00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP3 POP PUSH4 0xEE8BE1B SWAP2 POP PUSH2 0x6CC SWAP1 PUSH32 0x261FE67900000000000000000000000000000000000000000000000000000000 SWAP1 PUSH32 0x0 SWAP1 PUSH1 0x4 ADD PUSH2 0xBF0 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x6E6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x6FA JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH32 0xD150751B00000000000000000000000000000000000000000000000000000000 SWAP4 POP POP POP POP SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH32 0x1DE45AD18E8A4484220A3CA14F4D977641ADDBABA5A344B1384DC2AA78A2E34D DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x75A SWAP3 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 SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP3 ADD REVERT JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x4 DUP2 MSTORE PUSH1 0x24 DUP2 ADD SWAP1 SWAP2 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH28 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xE69EDC3E00000000000000000000000000000000000000000000000000000000 OR SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x84E PUSH1 0x2 PUSH2 0x94B JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 PUSH1 0x40 MLOAD PUSH2 0x87D SWAP2 SWAP1 PUSH2 0xAF8 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 GAS DELEGATECALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x8B8 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x8BD JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP DUP2 ISZERO DUP1 PUSH2 0x8D1 JUMPI POP DUP1 MLOAD PUSH1 0x20 EQ ISZERO JUMPDEST DUP1 PUSH2 0x933 JUMPI POP DUP1 MLOAD PUSH32 0x2C64C5EF00000000000000000000000000000000000000000000000000000000 SWAP1 PUSH2 0x90E SWAP1 DUP4 ADD PUSH1 0x20 SWAP1 DUP2 ADD SWAP1 DUP5 ADD PUSH2 0xA6E JUMP JUMPDEST PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 AND EQ ISZERO JUMPDEST ISZERO PUSH2 0x945 JUMPI PUSH2 0x945 PUSH2 0x1CC DUP6 DUP4 PUSH2 0x966 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 PUSH1 0x7 DUP2 GT ISZERO PUSH2 0x95B JUMPI INVALID JUMPDEST PUSH1 0x1 ADD SWAP1 SHL SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x60 PUSH32 0xF74B11883DEDD9755C2B93D5D172E1AD0300F9D700D2A708BA05E9FD9D4D1528 DUP4 DUP4 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x75A SWAP3 SWAP2 SWAP1 PUSH2 0xB8C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x9AD JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x9B8 DUP2 PUSH2 0xC80 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x9D0 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x9B8 DUP2 PUSH2 0xC80 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x60 DUP6 DUP8 SUB SLT ISZERO PUSH2 0x9F0 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH2 0x9FB DUP2 PUSH2 0xC80 JUMP JUMPDEST SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xA17 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP2 DUP8 ADD SWAP2 POP DUP8 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xA2A JUMPI DUP5 DUP6 REVERT JUMPDEST DUP2 CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH2 0xA38 JUMPI DUP6 DUP7 REVERT JUMPDEST DUP9 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0xA49 JUMPI DUP6 DUP7 REVERT JUMPDEST PUSH1 0x20 DUP4 ADD SWAP6 POP DUP1 SWAP5 POP POP POP POP PUSH1 0x40 DUP6 ADD CALLDATALOAD PUSH2 0xA63 DUP2 PUSH2 0xC80 JUMP JUMPDEST SWAP4 SWAP7 SWAP3 SWAP6 POP SWAP1 SWAP4 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xA7F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP2 AND DUP2 EQ PUSH2 0x9B8 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0xAC6 DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0xC54 JUMP JUMPDEST PUSH1 0x1F ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 MLOAD PUSH2 0xB0A DUP2 DUP5 PUSH1 0x20 DUP8 ADD PUSH2 0xC54 JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP4 DUP5 AND DUP2 MSTORE SWAP2 DUP4 AND PUSH1 0x20 DUP4 ADD MSTORE SWAP1 SWAP2 AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP3 DUP4 AND DUP2 MSTORE SWAP2 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xBBB PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0xAAE JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP 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 DUP3 MSTORE PUSH2 0x9B8 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0xAAE JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xC6F JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xC57 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x945 JUMPI POP POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xCA2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xF9 DUP10 CALLCODE 0xE 0xE6 EXTCODESIZE LOG0 DUP4 REVERT PUSH28 0xDCB2650705FCEDF701647CA126824112B42DE079EC4F64736F6C6343 STOP MOD 0xC STOP CALLER ",
|
|
"sourceMap": "1121:3305:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1341:75;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3532:665;;;;;;:::i;:::-;;:::i;:::-;;1241:56;;;:::i;:::-;;;;;;;:::i;4299:125::-;;;:::i;:::-;;;;;;;:::i;2552:432::-;;;;;;:::i;:::-;;:::i;1787:618::-;;;:::i;:::-;;;;;;;:::i;1341:75::-;;;:::o;3532:665::-;1527:13:9;1567:4;1543:36;;;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1527:54;-1:-1:-1;1599:10:9;:19;;;;1595:180;;1638:122;:112;1695:10;1727:5;1638:35;:112::i;:::-;:120;:122::i;:::-;-1:-1:-1;3674:22:4::1;::::0;::::1;3670:110;;3712:57;:47;:45;:47::i;:57::-;3790:38;3831:30;:28;:30::i;:::-;3952:26:::0;;;::::1;3973:4;3952:26;::::0;;4023:52:::1;::::0;;::::1;;::::0;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;;3790:71;;-1:-1:-1;4023:52:4::1;::::0;4062:6;;4070:4;;;;;;4023:52;::::1;4070:4:::0;;;;4023:52;::::1;;::::0;::::1;::::0;;;;-1:-1:-1;4023:38:4::1;::::0;-1:-1:-1;;;4023:52:4:i:1;:::-;4115:21:::0;;;::::1;;::::0;::::1;;::::0;;4152:38:::1;::::0;::::1;::::0;::::1;::::0;4161:10:::1;::::0;4173:6;;4115:21;;4152:38:::1;:::i;:::-;;;;;;;;1794:1:9;3532:665:4::0;;;;:::o;1241:56::-;;;;;;;;;;;;;;;;;;;:::o;4299:125::-;4348:14;4381:30;:28;:30::i;:::-;:36;;;;-1:-1:-1;4299:125:4;:::o;2552:432::-;1527:13:9;1567:4;1543:36;;;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1527:54;-1:-1:-1;1599:10:9;:19;;;;1595:180;;1638:122;:112;1695:10;1727:5;1638:35;:112::i;:122::-;2552:432:4;2663:43:::1;2709:30;:28;:30::i;:::-;2663:76:::0;-1:-1:-1;2754:22:4::1;::::0;::::1;2750:228;;2792:57;:47;:45;:47::i;:57::-;2750:228;;;2880:26:::0;;;::::1;;::::0;::::1;::::0;;::::1;::::0;;2925:42:::1;::::0;2946:10:::1;::::0;2925:42:::1;::::0;-1:-1:-1;;2925:42:4::1;2750:228;1794:1:9;2552:432:4::0;:::o;1787:618::-;1826:14;1980:4;1933:30;:28;:30::i;:::-;:52;;;;;;;;;;;;;;;2035:106;;;;;2073:4;;2035:56;;:106;;2092:31;;2125:15;;2035:106;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2151:94:4;;;;;2189:4;;-1:-1:-1;2151:56:4;;-1:-1:-1;2151:94:4;;2208:19;;2229:15;;2151:94;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2255:96:4;;;;;2293:4;;-1:-1:-1;2255:56:4;;-1:-1:-1;2255:96:4;;2312:21;;2335:15;;2255:96;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2368:30:4;;-1:-1:-1;;;;1787:618:4;:::o;725:303:1:-;849:12;927:44;986:6;1006:5;884:137;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;725:303:1;;;;:::o;1531:170:16:-;1674:9;1668:16;1661:4;1650:9;1646:20;1639:46;1034:218:1;1152:93;;;;;;;;;;;;;;;;;;;;;;;1034:218;:::o;983:468:12:-;1028:20;1060:19;1082:77;1121:28;1082:25;:77::i;:::-;1060:99;1417:28;-1:-1:-1;;1417:28:12:o;1195:434:11:-;1321:12;1335:23;1362:6;:19;;1382:4;1362:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1320:67;;;;1402:7;1401:8;:47;;;;1425:10;:17;1446:2;1425:23;;1401:47;:114;;;-1:-1:-1;1464:32:11;;1500:15;;1464:32;;;;;;;;;;;;:::i;:::-;:51;;;;1401:114;1397:226;;;1539:73;:63;1583:6;1591:10;1539:43;:63::i;:73::-;1195:434;;;;:::o;1606:335:15:-;1698:12;922:3;1899:9;1891:18;;;;;;;;1912:1;1891:22;1890:44;;;1606:335;-1:-1:-1;;1606:335:15:o;1258:310:1:-;1378:12;1456:50;1521:6;1541:10;1413:148;;;;;;;;;:::i;780:241:-1:-;;884:2;872:9;863:7;859:23;855:32;852:2;;;-1:-1;;890:12;852:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;942:63;846:175;-1:-1;;;846:175::o;1028:263::-;;1143:2;1131:9;1122:7;1118:23;1114:32;1111:2;;;-1:-1;;1149:12;1111:2;226:6;220:13;238:33;265:5;238:33;:::i;1298:615::-;;;;;1455:2;1443:9;1434:7;1430:23;1426:32;1423:2;;;-1:-1;;1461:12;1423:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;1513:63;-1:-1;1641:2;1626:18;;1613:32;1665:18;1654:30;;;1651:2;;;-1:-1;;1687:12;1651:2;1772:6;1761:9;1757:22;;;550:3;543:4;535:6;531:17;527:27;517:2;;-1:-1;;558:12;517:2;601:6;588:20;1665:18;620:6;617:30;614:2;;;-1:-1;;650:12;614:2;745:3;1641:2;725:17;686:6;711:32;;708:41;705:2;;;-1:-1;;752:12;705:2;1641;686:6;682:17;1707:82;;;;;;;;1826:2;1869:9;1865:22;72:20;97:33;124:5;97:33;:::i;:::-;1417:496;;;;-1:-1;1417:496;;-1:-1;;1417:496::o;1920:261::-;;2034:2;2022:9;2013:7;2009:23;2005:32;2002:2;;;-1:-1;;2040:12;2002:2;366:6;360:13;7529:66;8785:5;7518:78;8761:5;8758:34;8748:2;;-1:-1;;8796:12;2574:343;;2716:5;6693:12;6978:6;6973:3;6966:19;2809:52;2854:6;7015:4;7010:3;7006:14;7015:4;2835:5;2831:16;2809:52;:::i;:::-;8559:2;8539:14;8555:7;8535:28;2873:39;;;;7015:4;2873:39;;2664:253;-1:-1;;2664:253::o;3761:271::-;;3084:5;6693:12;3195:52;3240:6;3235:3;3228:4;3221:5;3217:16;3195:52;:::i;:::-;3259:16;;;;;3895:137;-1:-1;;3895:137::o;4039:222::-;7681:42;7670:54;;;;2408:37;;4166:2;4151:18;;4137:124::o;4268:460::-;7681:42;7670:54;;;2267:58;;7670:54;;;4631:2;4616:18;;2408:37;7670:54;;;4714:2;4699:18;;2408:37;4459:2;4444:18;;4430:298::o;4735:333::-;7681:42;7670:54;;;2408:37;;7670:54;;5054:2;5039:18;;2408:37;4890:2;4875:18;;4861:207::o;5075:417::-;;7681:42;7674:5;7670:54;2415:3;2408:37;5248:2;5366;5355:9;5351:18;5344:48;5406:76;5248:2;5237:9;5233:18;5468:6;5406:76;:::i;:::-;5398:84;5219:273;-1:-1;;;;5219:273::o;5499:218::-;7529:66;7518:78;;;;2526:36;;5624:2;5609:18;;5595:122::o;5724:329::-;7529:66;7518:78;;;;2526:36;;7681:42;7670:54;6039:2;6024:18;;2408:37;5877:2;5862:18;;5848:205::o;6060:310::-;;6207:2;6228:17;6221:47;6282:78;6207:2;6196:9;6192:18;6346:6;6282:78;:::i;6377:222::-;3712:37;;;6504:2;6489:18;;6475:124::o;8195:268::-;8260:1;8267:101;8281:6;8278:1;8275:13;8267:101;;;8348:11;;;8342:18;8329:11;;;8322:39;8303:2;8296:10;8267:101;;;8383:6;8380:1;8377:13;8374:2;;;-1:-1;;8260:1;8430:16;;8423:27;8244:219::o;8576:117::-;7681:42;8663:5;7670:54;8638:5;8635:35;8625:2;;8684:1;;8674:12;8625:2;8619:74;:::o"
|
|
},
|
|
"methodIdentifiers": {
|
|
"FEATURE_NAME()": "6ae4b4f7",
|
|
"FEATURE_VERSION()": "031b905c",
|
|
"bootstrap()": "fb969b0a",
|
|
"migrate(address,bytes,address)": "261fe679",
|
|
"owner()": "8da5cb5b",
|
|
"transferOwnership(address)": "f2fde38b"
|
|
}
|
|
}
|
|
},
|
|
"sourceTreeHashHex": "0x5bff9fcb2843a654f9da0e881d7a6b087e43a04a0e92a6778666084afe8b84bc",
|
|
"sources": {
|
|
"./OwnableFeature.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 \"../errors/LibOwnableRichErrors.sol\";\nimport \"../storage/LibOwnableStorage.sol\";\nimport \"../migrations/LibBootstrap.sol\";\nimport \"../migrations/LibMigrate.sol\";\nimport \"./interfaces/IFeature.sol\";\nimport \"./interfaces/IOwnableFeature.sol\";\nimport \"./SimpleFunctionRegistryFeature.sol\";\n\n\n/// @dev Owner management features.\ncontract OwnableFeature is\n IFeature,\n IOwnableFeature,\n FixinCommon\n{\n\n /// @dev Name of this feature.\n string public constant override FEATURE_NAME = \"Ownable\";\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. The intial owner will be set to this (ZeroEx)\n /// to allow the bootstrappers to call `extend()`. Ownership should be\n /// transferred to the real owner by the bootstrapper after\n /// bootstrapping is complete.\n /// @return success Magic bytes if successful.\n function bootstrap() external returns (bytes4 success) {\n // Set the owner to ourselves to allow bootstrappers to call `extend()`.\n LibOwnableStorage.getStorage().owner = address(this);\n\n // Register feature functions.\n SimpleFunctionRegistryFeature(address(this))._extendSelf(this.transferOwnership.selector, _implementation);\n SimpleFunctionRegistryFeature(address(this))._extendSelf(this.owner.selector, _implementation);\n SimpleFunctionRegistryFeature(address(this))._extendSelf(this.migrate.selector, _implementation);\n return LibBootstrap.BOOTSTRAP_SUCCESS;\n }\n\n /// @dev Change the owner of this contract.\n /// Only directly callable by the owner.\n /// @param newOwner New owner address.\n function transferOwnership(address newOwner)\n external\n override\n onlyOwner\n {\n LibOwnableStorage.Storage storage proxyStor = LibOwnableStorage.getStorage();\n\n if (newOwner == address(0)) {\n LibOwnableRichErrors.TransferOwnerToZeroError().rrevert();\n } else {\n proxyStor.owner = newOwner;\n emit OwnershipTransferred(msg.sender, newOwner);\n }\n }\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 /// Temporarily sets the owner to ourselves so we can perform admin functions.\n /// Before returning, the owner will be set to `newOwner`.\n /// @param target The migrator contract address.\n /// @param data The call data.\n /// @param newOwner The address of the new owner.\n function migrate(address target, bytes calldata data, address newOwner)\n external\n override\n onlyOwner\n {\n if (newOwner == address(0)) {\n LibOwnableRichErrors.TransferOwnerToZeroError().rrevert();\n }\n\n LibOwnableStorage.Storage storage stor = LibOwnableStorage.getStorage();\n // The owner will be temporarily set to `address(this)` inside the call.\n stor.owner = address(this);\n\n // Perform the migration.\n LibMigrate.delegatecallMigrateFunction(target, data);\n\n // Update the owner.\n stor.owner = newOwner;\n\n emit Migrated(msg.sender, target, newOwner);\n }\n\n /// @dev Get the owner of this contract.\n /// @return owner_ The owner of this contract.\n function owner() external override view returns (address owner_) {\n return LibOwnableStorage.getStorage().owner;\n }\n}\n"
|
|
},
|
|
"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol": {
|
|
"id": 16,
|
|
"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": 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/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": 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\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": 17,
|
|
"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": 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\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/LibOwnableStorage.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\nimport \"./LibStorage.sol\";\n\n\n/// @dev Storage helpers for the `Ownable` feature.\nlibrary LibOwnableStorage {\n\n /// @dev Storage bucket for this feature.\n struct Storage {\n // The owner of this 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.Ownable\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": 15,
|
|
"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"
|
|
},
|
|
"../migrations/LibBootstrap.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 \"@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"
|
|
},
|
|
"../migrations/LibMigrate.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 \"@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol\";\nimport \"../errors/LibOwnableRichErrors.sol\";\n\n\nlibrary LibMigrate {\n\n /// @dev Magic bytes returned by a migrator to indicate success.\n /// This is `keccack('MIGRATE_SUCCESS')`.\n bytes4 internal constant MIGRATE_SUCCESS = 0x2c64c5ef;\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 delegatecallMigrateFunction(\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)) != MIGRATE_SUCCESS)\n {\n LibOwnableRichErrors.MigrateCallFailedError(target, resultData).rrevert();\n }\n }\n}\n"
|
|
},
|
|
"./interfaces/IFeature.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\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"
|
|
},
|
|
"./SimpleFunctionRegistryFeature.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\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"
|
|
},
|
|
"../storage/LibProxyStorage.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;\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/LibSimpleFunctionRegistryStorage.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;\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"
|
|
}
|
|
},
|
|
"sourceCodes": {
|
|
"./OwnableFeature.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 \"../errors/LibOwnableRichErrors.sol\";\nimport \"../storage/LibOwnableStorage.sol\";\nimport \"../migrations/LibBootstrap.sol\";\nimport \"../migrations/LibMigrate.sol\";\nimport \"./interfaces/IFeature.sol\";\nimport \"./interfaces/IOwnableFeature.sol\";\nimport \"./SimpleFunctionRegistryFeature.sol\";\n\n\n/// @dev Owner management features.\ncontract OwnableFeature is\n IFeature,\n IOwnableFeature,\n FixinCommon\n{\n\n /// @dev Name of this feature.\n string public constant override FEATURE_NAME = \"Ownable\";\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. The intial owner will be set to this (ZeroEx)\n /// to allow the bootstrappers to call `extend()`. Ownership should be\n /// transferred to the real owner by the bootstrapper after\n /// bootstrapping is complete.\n /// @return success Magic bytes if successful.\n function bootstrap() external returns (bytes4 success) {\n // Set the owner to ourselves to allow bootstrappers to call `extend()`.\n LibOwnableStorage.getStorage().owner = address(this);\n\n // Register feature functions.\n SimpleFunctionRegistryFeature(address(this))._extendSelf(this.transferOwnership.selector, _implementation);\n SimpleFunctionRegistryFeature(address(this))._extendSelf(this.owner.selector, _implementation);\n SimpleFunctionRegistryFeature(address(this))._extendSelf(this.migrate.selector, _implementation);\n return LibBootstrap.BOOTSTRAP_SUCCESS;\n }\n\n /// @dev Change the owner of this contract.\n /// Only directly callable by the owner.\n /// @param newOwner New owner address.\n function transferOwnership(address newOwner)\n external\n override\n onlyOwner\n {\n LibOwnableStorage.Storage storage proxyStor = LibOwnableStorage.getStorage();\n\n if (newOwner == address(0)) {\n LibOwnableRichErrors.TransferOwnerToZeroError().rrevert();\n } else {\n proxyStor.owner = newOwner;\n emit OwnershipTransferred(msg.sender, newOwner);\n }\n }\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 /// Temporarily sets the owner to ourselves so we can perform admin functions.\n /// Before returning, the owner will be set to `newOwner`.\n /// @param target The migrator contract address.\n /// @param data The call data.\n /// @param newOwner The address of the new owner.\n function migrate(address target, bytes calldata data, address newOwner)\n external\n override\n onlyOwner\n {\n if (newOwner == address(0)) {\n LibOwnableRichErrors.TransferOwnerToZeroError().rrevert();\n }\n\n LibOwnableStorage.Storage storage stor = LibOwnableStorage.getStorage();\n // The owner will be temporarily set to `address(this)` inside the call.\n stor.owner = address(this);\n\n // Perform the migration.\n LibMigrate.delegatecallMigrateFunction(target, data);\n\n // Update the owner.\n stor.owner = newOwner;\n\n emit Migrated(msg.sender, target, newOwner);\n }\n\n /// @dev Get the owner of this contract.\n /// @return owner_ The owner of this contract.\n function owner() external override view returns (address owner_) {\n return LibOwnableStorage.getStorage().owner;\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/LibOwnableStorage.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 `Ownable` feature.\nlibrary LibOwnableStorage {\n\n /// @dev Storage bucket for this feature.\n struct Storage {\n // The owner of this 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.Ownable\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",
|
|
"../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",
|
|
"../migrations/LibMigrate.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/LibOwnableRichErrors.sol\";\n\n\nlibrary LibMigrate {\n\n /// @dev Magic bytes returned by a migrator to indicate success.\n /// This is `keccack('MIGRATE_SUCCESS')`.\n bytes4 internal constant MIGRATE_SUCCESS = 0x2c64c5ef;\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 delegatecallMigrateFunction(\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)) != MIGRATE_SUCCESS)\n {\n LibOwnableRichErrors.MigrateCallFailedError(target, resultData).rrevert();\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",
|
|
"./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",
|
|
"../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/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"
|
|
},
|
|
"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": {}
|
|
}
|