@keep-network/tbtc-v2 1.6.0-dev.22 → 1.6.0-dev.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/BLS.json +1 -1
- package/artifacts/Bank.json +3 -3
- package/artifacts/BeaconAuthorization.json +1 -1
- package/artifacts/BeaconDkg.json +1 -1
- package/artifacts/BeaconDkgValidator.json +1 -1
- package/artifacts/BeaconInactivity.json +1 -1
- package/artifacts/BeaconSortitionPool.json +3 -3
- package/artifacts/Bridge.json +5 -5
- package/artifacts/BridgeGovernance.json +2 -2
- package/artifacts/BridgeGovernanceParameters.json +2 -2
- package/artifacts/Deposit.json +2 -2
- package/artifacts/DepositSweep.json +2 -2
- package/artifacts/DonationVault.json +3 -3
- package/artifacts/EcdsaDkgValidator.json +1 -1
- package/artifacts/EcdsaInactivity.json +1 -1
- package/artifacts/EcdsaSortitionPool.json +3 -3
- package/artifacts/Fraud.json +2 -2
- package/artifacts/LightRelay.json +3 -3
- package/artifacts/LightRelayMaintainerProxy.json +3 -3
- package/artifacts/MaintainerProxy.json +3 -3
- package/artifacts/MovingFunds.json +2 -2
- package/artifacts/NuCypherToken.json +2 -2
- package/artifacts/RandomBeacon.json +2 -2
- package/artifacts/RandomBeaconChaosnet.json +2 -2
- package/artifacts/RandomBeaconGovernance.json +2 -2
- package/artifacts/Redemption.json +2 -2
- package/artifacts/ReimbursementPool.json +2 -2
- package/artifacts/T.json +2 -2
- package/artifacts/TBTC.json +3 -3
- package/artifacts/TBTCToken.json +3 -3
- package/artifacts/TBTCVault.json +23 -23
- package/artifacts/TokenStaking.json +1 -1
- package/artifacts/TokenholderGovernor.json +9 -9
- package/artifacts/TokenholderTimelock.json +8 -8
- package/artifacts/VendingMachine.json +3 -3
- package/artifacts/VendingMachineNuCypher.json +1 -1
- package/artifacts/VendingMachineV2.json +3 -3
- package/artifacts/VendingMachineV3.json +3 -3
- package/artifacts/WalletProposalValidator.json +2 -2
- package/artifacts/WalletRegistry.json +5 -5
- package/artifacts/WalletRegistryGovernance.json +2 -2
- package/artifacts/Wallets.json +2 -2
- package/artifacts/solcInputs/{dd1c38c53a7547fe3e334d72c1e4d8e1.json → a0304263b6d192d1bcaba971e9e959e7.json} +1 -1
- package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
- package/build/contracts/bank/Bank.sol/Bank.dbg.json +1 -1
- package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.dbg.json +1 -1
- package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +1 -1
- package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +1 -1
- package/build/contracts/bridge/BridgeGovernanceParameters.sol/BridgeGovernanceParameters.dbg.json +1 -1
- package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
- package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +1 -1
- package/build/contracts/bridge/DepositSweep.sol/DepositSweep.dbg.json +1 -1
- package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.dbg.json +1 -1
- package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +1 -1
- package/build/contracts/bridge/Heartbeat.sol/Heartbeat.dbg.json +1 -1
- package/build/contracts/bridge/IRelay.sol/IRelay.dbg.json +1 -1
- package/build/contracts/bridge/MovingFunds.sol/MovingFunds.dbg.json +1 -1
- package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +1 -1
- package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +1 -1
- package/build/contracts/bridge/VendingMachine.sol/VendingMachine.dbg.json +1 -1
- package/build/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.dbg.json +1 -1
- package/build/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.dbg.json +1 -1
- package/build/contracts/bridge/WalletProposalValidator.sol/WalletProposalValidator.dbg.json +1 -1
- package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +1 -1
- package/build/contracts/integrator/AbstractTBTCDepositor.sol/AbstractTBTCDepositor.dbg.json +1 -1
- package/build/contracts/integrator/IBridge.sol/IBridge.dbg.json +1 -1
- package/build/contracts/integrator/IBridge.sol/IBridgeTypes.dbg.json +1 -1
- package/build/contracts/integrator/ITBTCVault.sol/ITBTCVault.dbg.json +1 -1
- package/build/contracts/l2/L2TBTC.sol/L2TBTC.dbg.json +1 -1
- package/build/contracts/l2/L2WormholeGateway.sol/IWormholeTokenBridge.dbg.json +1 -1
- package/build/contracts/l2/L2WormholeGateway.sol/L2WormholeGateway.dbg.json +1 -1
- package/build/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.dbg.json +1 -1
- package/build/contracts/relay/LightRelay.sol/ILightRelay.dbg.json +1 -1
- package/build/contracts/relay/LightRelay.sol/LightRelay.dbg.json +1 -1
- package/build/contracts/relay/LightRelay.sol/RelayUtils.dbg.json +1 -1
- package/build/contracts/relay/LightRelayMaintainerProxy.sol/LightRelayMaintainerProxy.dbg.json +1 -1
- package/build/contracts/test/BankStub.sol/BankStub.dbg.json +1 -1
- package/build/contracts/test/BridgeStub.sol/BridgeStub.dbg.json +1 -1
- package/build/contracts/test/HeartbeatStub.sol/HeartbeatStub.dbg.json +1 -1
- package/build/contracts/test/LightRelayStub.sol/LightRelayStub.dbg.json +1 -1
- package/build/contracts/test/ReceiveApprovalStub.sol/ReceiveApprovalStub.dbg.json +1 -1
- package/build/contracts/test/SepoliaLightRelay.sol/SepoliaLightRelay.dbg.json +1 -1
- package/build/contracts/test/SystemTestRelay.sol/SystemTestRelay.dbg.json +1 -1
- package/build/contracts/test/TestBitcoinTx.sol/TestBitcoinTx.dbg.json +1 -1
- package/build/contracts/test/TestERC20.sol/TestERC20.dbg.json +1 -1
- package/build/contracts/test/TestERC721.sol/TestERC721.dbg.json +1 -1
- package/build/contracts/test/TestEcdsaLib.sol/TestEcdsaLib.dbg.json +1 -1
- package/build/contracts/test/TestTBTCDepositor.sol/MockBridge.dbg.json +1 -1
- package/build/contracts/test/TestTBTCDepositor.sol/MockBridge.json +15 -2
- package/build/contracts/test/TestTBTCDepositor.sol/MockTBTCVault.dbg.json +1 -1
- package/build/contracts/test/TestTBTCDepositor.sol/MockTBTCVault.json +2 -2
- package/build/contracts/test/TestTBTCDepositor.sol/TestTBTCDepositor.dbg.json +1 -1
- package/build/contracts/test/TestTBTCDepositor.sol/TestTBTCDepositor.json +2 -2
- package/build/contracts/test/WormholeBridgeStub.sol/WormholeBridgeStub.dbg.json +1 -1
- package/build/contracts/token/TBTC.sol/TBTC.dbg.json +1 -1
- package/build/contracts/vault/DonationVault.sol/DonationVault.dbg.json +1 -1
- package/build/contracts/vault/IVault.sol/IVault.dbg.json +1 -1
- package/build/contracts/vault/TBTCOptimisticMinting.sol/TBTCOptimisticMinting.dbg.json +1 -1
- package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +1 -1
- package/contracts/test/TestTBTCDepositor.sol +7 -2
- package/export/artifacts/contracts/bridge/VendingMachine.sol/VendingMachine.json +6 -6
- package/export/artifacts/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.json +6 -6
- package/export/artifacts/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.json +6 -6
- package/export/artifacts/contracts/test/TestTBTCDepositor.sol/MockBridge.json +84 -55
- package/export/artifacts/contracts/test/TestTBTCDepositor.sol/MockTBTCVault.json +25 -25
- package/export/artifacts/contracts/test/TestTBTCDepositor.sol/TestTBTCDepositor.json +5 -5
- package/export/artifacts/contracts/test/WormholeBridgeStub.sol/WormholeBridgeStub.json +25 -25
- package/export/artifacts/contracts/token/TBTC.sol/TBTC.json +2 -2
- package/export/artifacts/contracts/vault/DonationVault.sol/DonationVault.json +11 -11
- package/export/artifacts/contracts/vault/TBTCVault.sol/TBTCVault.json +135 -135
- package/export/typechain/factories/MockBridge__factory.js +14 -1
- package/export/typechain/factories/MockTBTCVault__factory.js +1 -1
- package/export/typechain/factories/TestTBTCDepositor__factory.js +1 -1
- package/package.json +1 -1
|
@@ -212,8 +212,8 @@
|
|
|
212
212
|
"type": "function"
|
|
213
213
|
}
|
|
214
214
|
],
|
|
215
|
-
"bytecode": "
|
|
216
|
-
"deployedBytecode": "
|
|
215
|
+
"bytecode": "0x608060405234801561001057600080fd5b50610fb0806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063485cc9551161005b578063485cc955146100e8578063c7ba0347146100fb578063ca3a7f8c14610107578063e78cea921461011a57600080fd5b80630f36403a1461008257806331e6028c146100b257806332a280b3146100d3575b600080fd5b600154610095906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100c56100c0366004610955565b61012d565b6040519081526020016100a9565b6100e66100e136600461098e565b610142565b005b6100e66100f63660046109cc565b6101a0565b6100c56402540be40081565b6100e66101153660046109fa565b6101ae565b600054610095906001600160a01b031681565b600061013983836101ee565b90505b92915050565b600080600061015084610371565b604080518481526020810184905290810182905292955090935091507fcdb95277f6a6807a2018e2dd8d15a4ff1b5619260b5dc535eb77e90945cf6e39906060015b60405180910390a150505050565b6101aa82826105c2565b5050565b60006101bb848484610748565b90507f0f3805f24563e903dd7c191088451bda29dc93cb93085e42724fdc27f62fef968160405161019291815260200190565b6000806402540be4006102018486610a79565b67ffffffffffffffff166102159190610aa1565b90506000600160009054906101000a90046001600160a01b03166001600160a01b03166309b53f516040518163ffffffff1660e01b8152600401602060405180830381865afa15801561026c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102909190610ad5565b63ffffffff16905060008082116102a85760006102b2565b6102b28284610af9565b905060008060009054906101000a90046001600160a01b03166001600160a01b031663c42b64d06040518163ffffffff1660e01b8152600401608060405180830381865afa158015610308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032c9190610b26565b509250505060006402540be4008267ffffffffffffffff1661034e9190610aa1565b90508061035b8487610b85565b6103659190610b85565b98975050505050505050565b600080546040517fb02c43d0000000000000000000000000000000000000000000000000000000008152600481018490528291829182916001600160a01b03169063b02c43d09060240160e060405180830381865afa1580156103d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fc9190610ba3565b9050806040015163ffffffff1660000361045d5760405162461bcd60e51b815260206004820152601760248201527f4465706f736974206e6f7420696e697469616c697a656400000000000000000060448201526064015b60405180910390fd5b6001546040517f6c626aa4000000000000000000000000000000000000000000000000000000008152600481018790526000916001600160a01b031690636c626aa49060240160408051808303816000875af11580156104c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e59190610c5d565b9150508160a0015163ffffffff16600014158061050b575067ffffffffffffffff811615155b61057d5760405162461bcd60e51b815260206004820152602360248201527f4465706f736974206e6f742066696e616c697a6564206279207468652062726960448201527f64676500000000000000000000000000000000000000000000000000000000006064820152608401610454565b6402540be400826020015167ffffffffffffffff1661059c9190610aa1565b94506105b0826020015183608001516101ee565b93508160c00151925050509193909250565b6000546001600160a01b03161580156105e457506001546001600160a01b0316155b6106565760405162461bcd60e51b815260206004820152602960248201527f4162737472616374544254434465706f7369746f7220616c726561647920696e60448201527f697469616c697a656400000000000000000000000000000000000000000000006064820152608401610454565b6001600160a01b0382166106ac5760405162461bcd60e51b815260206004820152601d60248201527f42726964676520616464726573732063616e6e6f74206265207a65726f0000006044820152606401610454565b6001600160a01b0381166107025760405162461bcd60e51b815260206004820181905260248201527f544254435661756c7420616464726573732063616e6e6f74206265207a65726f6044820152606401610454565b600080546001600160a01b039384167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560018054929093169116179055565b6001546000906001600160a01b031661076760c0850160a08601610c8c565b6001600160a01b0316146107bd5760405162461bcd60e51b815260206004820152601660248201527f5661756c742061646472657373206d69736d61746368000000000000000000006044820152606401610454565b60006107dd6107cb86610866565b6107d86020870187610ca9565b6108cb565b6000546040517f86f014390000000000000000000000000000000000000000000000000000000081529192506001600160a01b0316906386f014399061082b90889088908890600401610d71565b600060405180830381600087803b15801561084557600080fd5b505af1158015610859573d6000803e3d6000fd5b5092979650505050505050565b600061013c6108786020840184610ed6565b6108856020850185610ef1565b6108926040870187610ef1565b6108a26080890160608a01610ed6565b6040516020016108b796959493929190610f38565b604051602081830303815290604052610915565b600082826040516020016108f692919091825260e01b6001600160e01b031916602082015260240190565b60408051601f1981840301815291905280516020909101209392505050565b60006020600083516020850160025afa50602060006020600060025afa5050600051919050565b67ffffffffffffffff8116811461095257600080fd5b50565b6000806040838503121561096857600080fd5b82356109738161093c565b915060208301356109838161093c565b809150509250929050565b6000602082840312156109a057600080fd5b5035919050565b6001600160a01b038116811461095257600080fd5b80356109c7816109a7565b919050565b600080604083850312156109df57600080fd5b82356109ea816109a7565b91506020830135610983816109a7565b6000806000838503610100811215610a1157600080fd5b843567ffffffffffffffff811115610a2857600080fd5b850160808188031215610a3a57600080fd5b935060c0601f1982011215610a4e57600080fd5b5060208401915060e084013590509250925092565b634e487b7160e01b600052601160045260246000fd5b67ffffffffffffffff828116828216039080821115610a9a57610a9a610a63565b5092915050565b808202811582820484141761013c5761013c610a63565b63ffffffff8116811461095257600080fd5b80516109c781610ab8565b600060208284031215610ae757600080fd5b8151610af281610ab8565b9392505050565b600082610b1657634e487b7160e01b600052601260045260246000fd5b500490565b80516109c78161093c565b60008060008060808587031215610b3c57600080fd5b8451610b478161093c565b6020860151909450610b588161093c565b6040860151909350610b698161093c565b6060860151909250610b7a81610ab8565b939692955090935050565b8181038181111561013c5761013c610a63565b80516109c7816109a7565b600060e08284031215610bb557600080fd5b60405160e0810181811067ffffffffffffffff82111715610be657634e487b7160e01b600052604160045260246000fd5b604052610bf283610b98565b8152610c0060208401610b1b565b6020820152610c1160408401610aca565b6040820152610c2260608401610b98565b6060820152610c3360808401610b1b565b6080820152610c4460a08401610aca565b60a082015260c083015160c08201528091505092915050565b60008060408385031215610c7057600080fd5b8251610c7b8161093c565b60208401519092506109838161093c565b600060208284031215610c9e57600080fd5b8135610af2816109a7565b600060208284031215610cbb57600080fd5b8135610af281610ab8565b80356001600160e01b0319811681146109c757600080fd5b6000808335601e19843603018112610cf557600080fd5b830160208101925035905067ffffffffffffffff811115610d1557600080fd5b803603821315610d2457600080fd5b9250929050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b80356bffffffffffffffffffffffff19811681146109c757600080fd5b60006101008083526001600160e01b031980610d8c88610cc6565b1682850152610d9e6020880188610cde565b92506080610120860152610db761018086018483610d2b565b925050610dc76040880188610cde565b85840360ff1901610140870152610ddf848284610d2b565b9350505080610df060608901610cc6565b166101608501525090508335610e0581610ab8565b63ffffffff811660208401525060208401357fffffffffffffffff0000000000000000000000000000000000000000000000008116808214610e4657600080fd5b80604085015250506bffffffffffffffffffffffff19610e6860408601610d54565b166060830152610e7a60608501610d54565b6bffffffffffffffffffffffff198116608084015250610e9c60808501610cc6565b6001600160e01b0319811660a084015250610eb960a085016109bc565b6001600160a01b031660c083015260e09091019190915292915050565b600060208284031215610ee857600080fd5b61013982610cc6565b6000808335601e19843603018112610f0857600080fd5b83018035915067ffffffffffffffff821115610f2357600080fd5b602001915036819003821315610d2457600080fd5b60006001600160e01b0319808916835286886004850137868301600481016000815286888237509316939092016004810193909352505060080194935050505056fea26469706673582212209d6461c5d0ad9219af91a3b2dcf49742c1d95ad3c8a0d0258c563fe110e2113d64736f6c63430008110033",
|
|
216
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063485cc9551161005b578063485cc955146100e8578063c7ba0347146100fb578063ca3a7f8c14610107578063e78cea921461011a57600080fd5b80630f36403a1461008257806331e6028c146100b257806332a280b3146100d3575b600080fd5b600154610095906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100c56100c0366004610955565b61012d565b6040519081526020016100a9565b6100e66100e136600461098e565b610142565b005b6100e66100f63660046109cc565b6101a0565b6100c56402540be40081565b6100e66101153660046109fa565b6101ae565b600054610095906001600160a01b031681565b600061013983836101ee565b90505b92915050565b600080600061015084610371565b604080518481526020810184905290810182905292955090935091507fcdb95277f6a6807a2018e2dd8d15a4ff1b5619260b5dc535eb77e90945cf6e39906060015b60405180910390a150505050565b6101aa82826105c2565b5050565b60006101bb848484610748565b90507f0f3805f24563e903dd7c191088451bda29dc93cb93085e42724fdc27f62fef968160405161019291815260200190565b6000806402540be4006102018486610a79565b67ffffffffffffffff166102159190610aa1565b90506000600160009054906101000a90046001600160a01b03166001600160a01b03166309b53f516040518163ffffffff1660e01b8152600401602060405180830381865afa15801561026c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102909190610ad5565b63ffffffff16905060008082116102a85760006102b2565b6102b28284610af9565b905060008060009054906101000a90046001600160a01b03166001600160a01b031663c42b64d06040518163ffffffff1660e01b8152600401608060405180830381865afa158015610308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032c9190610b26565b509250505060006402540be4008267ffffffffffffffff1661034e9190610aa1565b90508061035b8487610b85565b6103659190610b85565b98975050505050505050565b600080546040517fb02c43d0000000000000000000000000000000000000000000000000000000008152600481018490528291829182916001600160a01b03169063b02c43d09060240160e060405180830381865afa1580156103d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fc9190610ba3565b9050806040015163ffffffff1660000361045d5760405162461bcd60e51b815260206004820152601760248201527f4465706f736974206e6f7420696e697469616c697a656400000000000000000060448201526064015b60405180910390fd5b6001546040517f6c626aa4000000000000000000000000000000000000000000000000000000008152600481018790526000916001600160a01b031690636c626aa49060240160408051808303816000875af11580156104c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e59190610c5d565b9150508160a0015163ffffffff16600014158061050b575067ffffffffffffffff811615155b61057d5760405162461bcd60e51b815260206004820152602360248201527f4465706f736974206e6f742066696e616c697a6564206279207468652062726960448201527f64676500000000000000000000000000000000000000000000000000000000006064820152608401610454565b6402540be400826020015167ffffffffffffffff1661059c9190610aa1565b94506105b0826020015183608001516101ee565b93508160c00151925050509193909250565b6000546001600160a01b03161580156105e457506001546001600160a01b0316155b6106565760405162461bcd60e51b815260206004820152602960248201527f4162737472616374544254434465706f7369746f7220616c726561647920696e60448201527f697469616c697a656400000000000000000000000000000000000000000000006064820152608401610454565b6001600160a01b0382166106ac5760405162461bcd60e51b815260206004820152601d60248201527f42726964676520616464726573732063616e6e6f74206265207a65726f0000006044820152606401610454565b6001600160a01b0381166107025760405162461bcd60e51b815260206004820181905260248201527f544254435661756c7420616464726573732063616e6e6f74206265207a65726f6044820152606401610454565b600080546001600160a01b039384167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560018054929093169116179055565b6001546000906001600160a01b031661076760c0850160a08601610c8c565b6001600160a01b0316146107bd5760405162461bcd60e51b815260206004820152601660248201527f5661756c742061646472657373206d69736d61746368000000000000000000006044820152606401610454565b60006107dd6107cb86610866565b6107d86020870187610ca9565b6108cb565b6000546040517f86f014390000000000000000000000000000000000000000000000000000000081529192506001600160a01b0316906386f014399061082b90889088908890600401610d71565b600060405180830381600087803b15801561084557600080fd5b505af1158015610859573d6000803e3d6000fd5b5092979650505050505050565b600061013c6108786020840184610ed6565b6108856020850185610ef1565b6108926040870187610ef1565b6108a26080890160608a01610ed6565b6040516020016108b796959493929190610f38565b604051602081830303815290604052610915565b600082826040516020016108f692919091825260e01b6001600160e01b031916602082015260240190565b60408051601f1981840301815291905280516020909101209392505050565b60006020600083516020850160025afa50602060006020600060025afa5050600051919050565b67ffffffffffffffff8116811461095257600080fd5b50565b6000806040838503121561096857600080fd5b82356109738161093c565b915060208301356109838161093c565b809150509250929050565b6000602082840312156109a057600080fd5b5035919050565b6001600160a01b038116811461095257600080fd5b80356109c7816109a7565b919050565b600080604083850312156109df57600080fd5b82356109ea816109a7565b91506020830135610983816109a7565b6000806000838503610100811215610a1157600080fd5b843567ffffffffffffffff811115610a2857600080fd5b850160808188031215610a3a57600080fd5b935060c0601f1982011215610a4e57600080fd5b5060208401915060e084013590509250925092565b634e487b7160e01b600052601160045260246000fd5b67ffffffffffffffff828116828216039080821115610a9a57610a9a610a63565b5092915050565b808202811582820484141761013c5761013c610a63565b63ffffffff8116811461095257600080fd5b80516109c781610ab8565b600060208284031215610ae757600080fd5b8151610af281610ab8565b9392505050565b600082610b1657634e487b7160e01b600052601260045260246000fd5b500490565b80516109c78161093c565b60008060008060808587031215610b3c57600080fd5b8451610b478161093c565b6020860151909450610b588161093c565b6040860151909350610b698161093c565b6060860151909250610b7a81610ab8565b939692955090935050565b8181038181111561013c5761013c610a63565b80516109c7816109a7565b600060e08284031215610bb557600080fd5b60405160e0810181811067ffffffffffffffff82111715610be657634e487b7160e01b600052604160045260246000fd5b604052610bf283610b98565b8152610c0060208401610b1b565b6020820152610c1160408401610aca565b6040820152610c2260608401610b98565b6060820152610c3360808401610b1b565b6080820152610c4460a08401610aca565b60a082015260c083015160c08201528091505092915050565b60008060408385031215610c7057600080fd5b8251610c7b8161093c565b60208401519092506109838161093c565b600060208284031215610c9e57600080fd5b8135610af2816109a7565b600060208284031215610cbb57600080fd5b8135610af281610ab8565b80356001600160e01b0319811681146109c757600080fd5b6000808335601e19843603018112610cf557600080fd5b830160208101925035905067ffffffffffffffff811115610d1557600080fd5b803603821315610d2457600080fd5b9250929050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b80356bffffffffffffffffffffffff19811681146109c757600080fd5b60006101008083526001600160e01b031980610d8c88610cc6565b1682850152610d9e6020880188610cde565b92506080610120860152610db761018086018483610d2b565b925050610dc76040880188610cde565b85840360ff1901610140870152610ddf848284610d2b565b9350505080610df060608901610cc6565b166101608501525090508335610e0581610ab8565b63ffffffff811660208401525060208401357fffffffffffffffff0000000000000000000000000000000000000000000000008116808214610e4657600080fd5b80604085015250506bffffffffffffffffffffffff19610e6860408601610d54565b166060830152610e7a60608501610d54565b6bffffffffffffffffffffffff198116608084015250610e9c60808501610cc6565b6001600160e01b0319811660a084015250610eb960a085016109bc565b6001600160a01b031660c083015260e09091019190915292915050565b600060208284031215610ee857600080fd5b61013982610cc6565b6000808335601e19843603018112610f0857600080fd5b83018035915067ffffffffffffffff821115610f2357600080fd5b602001915036819003821315610d2457600080fd5b60006001600160e01b0319808916835286886004850137868301600481016000815286888237509316939092016004810193909352505060080194935050505056fea26469706673582212209d6461c5d0ad9219af91a3b2dcf49742c1d95ad3c8a0d0258c563fe110e2113d64736f6c63430008110033",
|
|
217
217
|
"linkReferences": {},
|
|
218
218
|
"deployedLinkReferences": {},
|
|
219
219
|
"devdoc": {
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
"functionDebugData": {},
|
|
227
227
|
"generatedSources": [],
|
|
228
228
|
"linkReferences": {},
|
|
229
|
-
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xFB0 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY 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 0x7D JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x485CC955 GT PUSH2 0x5B JUMPI DUP1 PUSH4 0x485CC955 EQ PUSH2 0xE8 JUMPI DUP1 PUSH4 0xC7BA0347 EQ PUSH2 0xFB JUMPI DUP1 PUSH4 0xCA3A7F8C EQ PUSH2 0x107 JUMPI DUP1 PUSH4 0xE78CEA92 EQ PUSH2 0x11A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0xF36403A EQ PUSH2 0x82 JUMPI DUP1 PUSH4 0x31E6028C EQ PUSH2 0xB2 JUMPI DUP1 PUSH4 0x32A280B3 EQ PUSH2 0xD3 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 SLOAD PUSH2 0x95 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xC5 PUSH2 0xC0 CALLDATASIZE PUSH1 0x4 PUSH2 0x955 JUMP JUMPDEST PUSH2 0x12D JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xA9 JUMP JUMPDEST PUSH2 0xE6 PUSH2 0xE1 CALLDATASIZE PUSH1 0x4 PUSH2 0x98E JUMP JUMPDEST PUSH2 0x142 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xE6 PUSH2 0xF6 CALLDATASIZE PUSH1 0x4 PUSH2 0x9CC JUMP JUMPDEST PUSH2 0x1A0 JUMP JUMPDEST PUSH2 0xC5 PUSH5 0x2540BE400 DUP2 JUMP JUMPDEST PUSH2 0xE6 PUSH2 0x115 CALLDATASIZE PUSH1 0x4 PUSH2 0x9FA JUMP JUMPDEST PUSH2 0x1AE JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x95 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x139 DUP4 DUP4 PUSH2 0x1EE JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x150 DUP5 PUSH2 0x371 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP5 DUP2 MSTORE PUSH1 0x20 DUP2 ADD DUP5 SWAP1 MSTORE SWAP1 DUP2 ADD DUP3 SWAP1 MSTORE SWAP3 SWAP6 POP SWAP1 SWAP4 POP SWAP2 POP PUSH32 0xCDB95277F6A6807A2018E2DD8D15A4FF1B5619260B5DC535EB77E90945CF6E39 SWAP1 PUSH1 0x60 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP POP POP JUMP JUMPDEST PUSH2 0x1AA DUP3 DUP3 PUSH2 0x5C2 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1BB DUP5 DUP5 DUP5 PUSH2 0x748 JUMP JUMPDEST SWAP1 POP PUSH32 0xF3805F24563E903DD7C191088451BDA29DC93CB93085E42724FDC27F62FEF96 DUP2 PUSH1 0x40 MLOAD PUSH2 0x192 SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH5 0x2540BE400 PUSH2 0x201 DUP5 DUP7 PUSH2 0xA79 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x215 SWAP2 SWAP1 PUSH2 0xAA1 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x9B53F51 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 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x26C 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 0x290 SWAP2 SWAP1 PUSH2 0xAD5 JUMP JUMPDEST PUSH4 0xFFFFFFFF AND SWAP1 POP PUSH1 0x0 DUP1 DUP3 GT PUSH2 0x2A8 JUMPI PUSH1 0x0 PUSH2 0x2B2 JUMP JUMPDEST PUSH2 0x2B2 DUP3 DUP5 PUSH2 0xAF9 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xC42B64D0 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x80 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x308 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 0x32C SWAP2 SWAP1 PUSH2 0xB26 JUMP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x0 PUSH5 0x2540BE400 DUP3 PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x34E SWAP2 SWAP1 PUSH2 0xAA1 JUMP JUMPDEST SWAP1 POP DUP1 PUSH2 0x35B DUP5 DUP8 PUSH2 0xB85 JUMP JUMPDEST PUSH2 0x365 SWAP2 SWAP1 PUSH2 0xB85 JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x40 MLOAD PUSH32 0xB02C43D000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP5 SWAP1 MSTORE DUP3 SWAP2 DUP3 SWAP2 DUP3 SWAP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0xB02C43D0 SWAP1 PUSH1 0x24 ADD PUSH1 0xE0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x3D8 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 0x3FC SWAP2 SWAP1 PUSH2 0xBA3 JUMP JUMPDEST SWAP1 POP DUP1 PUSH1 0x40 ADD MLOAD PUSH4 0xFFFFFFFF AND PUSH1 0x0 SUB PUSH2 0x45D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x17 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4465706F736974206E6F7420696E697469616C697A6564000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x40 MLOAD PUSH32 0x6C626AA400000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP8 SWAP1 MSTORE PUSH1 0x0 SWAP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x6C626AA4 SWAP1 PUSH1 0x24 ADD PUSH1 0x40 DUP1 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 GAS CALL ISZERO DUP1 ISZERO PUSH2 0x4C1 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 0x4E5 SWAP2 SWAP1 PUSH2 0xC5D JUMP JUMPDEST SWAP2 POP POP DUP2 PUSH1 0xA0 ADD MLOAD PUSH4 0xFFFFFFFF AND PUSH1 0x0 EQ ISZERO DUP1 PUSH2 0x50B JUMPI POP PUSH8 0xFFFFFFFFFFFFFFFF DUP2 AND ISZERO ISZERO JUMPDEST PUSH2 0x57D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x23 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4465706F736974206E6F742066696E616C697A65642062792074686520627269 PUSH1 0x44 DUP3 ADD MSTORE PUSH32 0x6467650000000000000000000000000000000000000000000000000000000000 PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x454 JUMP JUMPDEST PUSH5 0x2540BE400 DUP3 PUSH1 0x20 ADD MLOAD PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x59C SWAP2 SWAP1 PUSH2 0xAA1 JUMP JUMPDEST SWAP5 POP PUSH2 0x5B0 DUP3 PUSH1 0x20 ADD MLOAD DUP4 PUSH1 0x80 ADD MLOAD PUSH2 0x1EE JUMP JUMPDEST SWAP4 POP DUP2 PUSH1 0xC0 ADD MLOAD SWAP3 POP POP POP SWAP2 SWAP4 SWAP1 SWAP3 POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO DUP1 ISZERO PUSH2 0x5E4 JUMPI POP PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO JUMPDEST PUSH2 0x656 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x29 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4162737472616374544254434465706F7369746F7220616C726561647920696E PUSH1 0x44 DUP3 ADD MSTORE PUSH32 0x697469616C697A65640000000000000000000000000000000000000000000000 PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x6AC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1D PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x42726964676520616464726573732063616E6E6F74206265207A65726F000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x702 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x544254435661756C7420616464726573732063616E6E6F74206265207A65726F PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP4 DUP5 AND PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 SWAP2 DUP3 AND OR SWAP1 SWAP2 SSTORE PUSH1 0x1 DUP1 SLOAD SWAP3 SWAP1 SWAP4 AND SWAP2 AND OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x767 PUSH1 0xC0 DUP6 ADD PUSH1 0xA0 DUP7 ADD PUSH2 0xC8C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x7BD JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x16 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x5661756C742061646472657373206D69736D6174636800000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x7DD PUSH2 0x7CB DUP7 PUSH2 0x866 JUMP JUMPDEST PUSH2 0x7D8 PUSH1 0x20 DUP8 ADD DUP8 PUSH2 0xCA9 JUMP JUMPDEST PUSH2 0x8CB JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 MLOAD PUSH32 0x86F0143900000000000000000000000000000000000000000000000000000000 DUP2 MSTORE SWAP2 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x86F01439 SWAP1 PUSH2 0x82B SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0xD71 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x845 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x859 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP SWAP3 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x13C PUSH2 0x878 PUSH1 0x20 DUP5 ADD DUP5 PUSH2 0xED6 JUMP JUMPDEST PUSH2 0x885 PUSH1 0x20 DUP6 ADD DUP6 PUSH2 0xEF1 JUMP JUMPDEST PUSH2 0x892 PUSH1 0x40 DUP8 ADD DUP8 PUSH2 0xEF1 JUMP JUMPDEST PUSH2 0x8A2 PUSH1 0x80 DUP10 ADD PUSH1 0x60 DUP11 ADD PUSH2 0xED6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x8B7 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0xF38 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH2 0x915 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x8F6 SWAP3 SWAP2 SWAP1 SWAP2 DUP3 MSTORE PUSH1 0xE0 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE DUP1 MLOAD PUSH1 0x20 SWAP1 SWAP2 ADD KECCAK256 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 PUSH1 0x0 DUP4 MLOAD PUSH1 0x20 DUP6 ADD PUSH1 0x2 GAS STATICCALL POP PUSH1 0x20 PUSH1 0x0 PUSH1 0x20 PUSH1 0x0 PUSH1 0x2 GAS STATICCALL POP POP PUSH1 0x0 MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x952 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x968 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x973 DUP2 PUSH2 0x93C JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x983 DUP2 PUSH2 0x93C JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x9A0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x952 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH2 0x9C7 DUP2 PUSH2 0x9A7 JUMP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x9DF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x9EA DUP2 PUSH2 0x9A7 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x983 DUP2 PUSH2 0x9A7 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP4 DUP6 SUB PUSH2 0x100 DUP2 SLT ISZERO PUSH2 0xA11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xA28 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP6 ADD PUSH1 0x80 DUP2 DUP9 SUB SLT ISZERO PUSH2 0xA3A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 POP PUSH1 0xC0 PUSH1 0x1F NOT DUP3 ADD SLT ISZERO PUSH2 0xA4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x20 DUP5 ADD SWAP2 POP PUSH1 0xE0 DUP5 ADD CALLDATALOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP3 DUP2 AND DUP3 DUP3 AND SUB SWAP1 DUP1 DUP3 GT ISZERO PUSH2 0xA9A JUMPI PUSH2 0xA9A PUSH2 0xA63 JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 DUP3 MUL DUP2 ISZERO DUP3 DUP3 DIV DUP5 EQ OR PUSH2 0x13C JUMPI PUSH2 0x13C PUSH2 0xA63 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x952 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH2 0x9C7 DUP2 PUSH2 0xAB8 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xAE7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 MLOAD PUSH2 0xAF2 DUP2 PUSH2 0xAB8 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0xB16 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x12 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST POP DIV SWAP1 JUMP JUMPDEST DUP1 MLOAD PUSH2 0x9C7 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xB3C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 MLOAD PUSH2 0xB47 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x20 DUP7 ADD MLOAD SWAP1 SWAP5 POP PUSH2 0xB58 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x40 DUP7 ADD MLOAD SWAP1 SWAP4 POP PUSH2 0xB69 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x60 DUP7 ADD MLOAD SWAP1 SWAP3 POP PUSH2 0xB7A DUP2 PUSH2 0xAB8 JUMP JUMPDEST SWAP4 SWAP7 SWAP3 SWAP6 POP SWAP1 SWAP4 POP POP JUMP JUMPDEST DUP2 DUP2 SUB DUP2 DUP2 GT ISZERO PUSH2 0x13C JUMPI PUSH2 0x13C PUSH2 0xA63 JUMP JUMPDEST DUP1 MLOAD PUSH2 0x9C7 DUP2 PUSH2 0x9A7 JUMP JUMPDEST PUSH1 0x0 PUSH1 0xE0 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xBB5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MLOAD PUSH1 0xE0 DUP2 ADD DUP2 DUP2 LT PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT OR ISZERO PUSH2 0xBE6 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x40 MSTORE PUSH2 0xBF2 DUP4 PUSH2 0xB98 JUMP JUMPDEST DUP2 MSTORE PUSH2 0xC00 PUSH1 0x20 DUP5 ADD PUSH2 0xB1B JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0xC11 PUSH1 0x40 DUP5 ADD PUSH2 0xACA JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0xC22 PUSH1 0x60 DUP5 ADD PUSH2 0xB98 JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE PUSH2 0xC33 PUSH1 0x80 DUP5 ADD PUSH2 0xB1B JUMP JUMPDEST PUSH1 0x80 DUP3 ADD MSTORE PUSH2 0xC44 PUSH1 0xA0 DUP5 ADD PUSH2 0xACA JUMP JUMPDEST PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 DUP4 ADD MLOAD PUSH1 0xC0 DUP3 ADD MSTORE DUP1 SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xC70 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH2 0xC7B DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH2 0x983 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xC9E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xAF2 DUP2 PUSH2 0x9A7 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xCBB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xAF2 DUP2 PUSH2 0xAB8 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x9C7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0xCF5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD PUSH1 0x20 DUP2 ADD SWAP3 POP CALLDATALOAD SWAP1 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xD15 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATASIZE SUB DUP3 SGT ISZERO PUSH2 0xD24 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST DUP2 DUP4 MSTORE DUP2 DUP2 PUSH1 0x20 DUP6 ADD CALLDATACOPY POP PUSH1 0x0 DUP3 DUP3 ADD PUSH1 0x20 SWAP1 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x1F SWAP1 SWAP2 ADD PUSH1 0x1F NOT AND SWAP1 SWAP2 ADD ADD SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT DUP2 AND DUP2 EQ PUSH2 0x9C7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x100 DUP1 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP1 PUSH2 0xD8C DUP9 PUSH2 0xCC6 JUMP JUMPDEST AND DUP3 DUP6 ADD MSTORE PUSH2 0xD9E PUSH1 0x20 DUP9 ADD DUP9 PUSH2 0xCDE JUMP JUMPDEST SWAP3 POP PUSH1 0x80 PUSH2 0x120 DUP7 ADD MSTORE PUSH2 0xDB7 PUSH2 0x180 DUP7 ADD DUP5 DUP4 PUSH2 0xD2B JUMP JUMPDEST SWAP3 POP POP PUSH2 0xDC7 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0xCDE JUMP JUMPDEST DUP6 DUP5 SUB PUSH1 0xFF NOT ADD PUSH2 0x140 DUP8 ADD MSTORE PUSH2 0xDDF DUP5 DUP3 DUP5 PUSH2 0xD2B JUMP JUMPDEST SWAP4 POP POP POP DUP1 PUSH2 0xDF0 PUSH1 0x60 DUP10 ADD PUSH2 0xCC6 JUMP JUMPDEST AND PUSH2 0x160 DUP6 ADD MSTORE POP SWAP1 POP DUP4 CALLDATALOAD PUSH2 0xE05 DUP2 PUSH2 0xAB8 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 AND PUSH1 0x20 DUP5 ADD MSTORE POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH32 0xFFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000 DUP2 AND DUP1 DUP3 EQ PUSH2 0xE46 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x40 DUP6 ADD MSTORE POP POP PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT PUSH2 0xE68 PUSH1 0x40 DUP7 ADD PUSH2 0xD54 JUMP JUMPDEST AND PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0xE7A PUSH1 0x60 DUP6 ADD PUSH2 0xD54 JUMP JUMPDEST PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT DUP2 AND PUSH1 0x80 DUP5 ADD MSTORE POP PUSH2 0xE9C PUSH1 0x80 DUP6 ADD PUSH2 0xCC6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH1 0xA0 DUP5 ADD MSTORE POP PUSH2 0xEB9 PUSH1 0xA0 DUP6 ADD PUSH2 0x9BC JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0xE0 SWAP1 SWAP2 ADD SWAP2 SWAP1 SWAP2 MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xEE8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x139 DUP3 PUSH2 0xCC6 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0xF08 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0xF23 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP CALLDATASIZE DUP2 SWAP1 SUB DUP3 SGT ISZERO PUSH2 0xD24 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP1 DUP10 AND DUP4 MSTORE DUP7 DUP9 PUSH1 0x4 DUP6 ADD CALLDATACOPY DUP7 DUP4 ADD PUSH1 0x4 DUP2 ADD PUSH1 0x0 DUP2 MSTORE DUP7 DUP9 DUP3 CALLDATACOPY POP SWAP4 AND SWAP4 SWAP1 SWAP3 ADD PUSH1 0x4 DUP2 ADD SWAP4 SWAP1 SWAP4 MSTORE POP POP PUSH1 0x8 ADD SWAP5 SWAP4 POP POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH15 0x8C6FF966573DA33706BE64F26A6D3A PUSH18 0x39783F5BC2C7D33B4D523623878F2164736F PUSH13 0x63430008110033000000000000 ",
|
|
229
|
+
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xFB0 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY 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 0x7D JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x485CC955 GT PUSH2 0x5B JUMPI DUP1 PUSH4 0x485CC955 EQ PUSH2 0xE8 JUMPI DUP1 PUSH4 0xC7BA0347 EQ PUSH2 0xFB JUMPI DUP1 PUSH4 0xCA3A7F8C EQ PUSH2 0x107 JUMPI DUP1 PUSH4 0xE78CEA92 EQ PUSH2 0x11A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0xF36403A EQ PUSH2 0x82 JUMPI DUP1 PUSH4 0x31E6028C EQ PUSH2 0xB2 JUMPI DUP1 PUSH4 0x32A280B3 EQ PUSH2 0xD3 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 SLOAD PUSH2 0x95 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xC5 PUSH2 0xC0 CALLDATASIZE PUSH1 0x4 PUSH2 0x955 JUMP JUMPDEST PUSH2 0x12D JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xA9 JUMP JUMPDEST PUSH2 0xE6 PUSH2 0xE1 CALLDATASIZE PUSH1 0x4 PUSH2 0x98E JUMP JUMPDEST PUSH2 0x142 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xE6 PUSH2 0xF6 CALLDATASIZE PUSH1 0x4 PUSH2 0x9CC JUMP JUMPDEST PUSH2 0x1A0 JUMP JUMPDEST PUSH2 0xC5 PUSH5 0x2540BE400 DUP2 JUMP JUMPDEST PUSH2 0xE6 PUSH2 0x115 CALLDATASIZE PUSH1 0x4 PUSH2 0x9FA JUMP JUMPDEST PUSH2 0x1AE JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x95 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x139 DUP4 DUP4 PUSH2 0x1EE JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x150 DUP5 PUSH2 0x371 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP5 DUP2 MSTORE PUSH1 0x20 DUP2 ADD DUP5 SWAP1 MSTORE SWAP1 DUP2 ADD DUP3 SWAP1 MSTORE SWAP3 SWAP6 POP SWAP1 SWAP4 POP SWAP2 POP PUSH32 0xCDB95277F6A6807A2018E2DD8D15A4FF1B5619260B5DC535EB77E90945CF6E39 SWAP1 PUSH1 0x60 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP POP POP JUMP JUMPDEST PUSH2 0x1AA DUP3 DUP3 PUSH2 0x5C2 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1BB DUP5 DUP5 DUP5 PUSH2 0x748 JUMP JUMPDEST SWAP1 POP PUSH32 0xF3805F24563E903DD7C191088451BDA29DC93CB93085E42724FDC27F62FEF96 DUP2 PUSH1 0x40 MLOAD PUSH2 0x192 SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH5 0x2540BE400 PUSH2 0x201 DUP5 DUP7 PUSH2 0xA79 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x215 SWAP2 SWAP1 PUSH2 0xAA1 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x9B53F51 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 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x26C 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 0x290 SWAP2 SWAP1 PUSH2 0xAD5 JUMP JUMPDEST PUSH4 0xFFFFFFFF AND SWAP1 POP PUSH1 0x0 DUP1 DUP3 GT PUSH2 0x2A8 JUMPI PUSH1 0x0 PUSH2 0x2B2 JUMP JUMPDEST PUSH2 0x2B2 DUP3 DUP5 PUSH2 0xAF9 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xC42B64D0 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x80 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x308 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 0x32C SWAP2 SWAP1 PUSH2 0xB26 JUMP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x0 PUSH5 0x2540BE400 DUP3 PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x34E SWAP2 SWAP1 PUSH2 0xAA1 JUMP JUMPDEST SWAP1 POP DUP1 PUSH2 0x35B DUP5 DUP8 PUSH2 0xB85 JUMP JUMPDEST PUSH2 0x365 SWAP2 SWAP1 PUSH2 0xB85 JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x40 MLOAD PUSH32 0xB02C43D000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP5 SWAP1 MSTORE DUP3 SWAP2 DUP3 SWAP2 DUP3 SWAP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0xB02C43D0 SWAP1 PUSH1 0x24 ADD PUSH1 0xE0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x3D8 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 0x3FC SWAP2 SWAP1 PUSH2 0xBA3 JUMP JUMPDEST SWAP1 POP DUP1 PUSH1 0x40 ADD MLOAD PUSH4 0xFFFFFFFF AND PUSH1 0x0 SUB PUSH2 0x45D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x17 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4465706F736974206E6F7420696E697469616C697A6564000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x40 MLOAD PUSH32 0x6C626AA400000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP8 SWAP1 MSTORE PUSH1 0x0 SWAP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x6C626AA4 SWAP1 PUSH1 0x24 ADD PUSH1 0x40 DUP1 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 GAS CALL ISZERO DUP1 ISZERO PUSH2 0x4C1 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 0x4E5 SWAP2 SWAP1 PUSH2 0xC5D JUMP JUMPDEST SWAP2 POP POP DUP2 PUSH1 0xA0 ADD MLOAD PUSH4 0xFFFFFFFF AND PUSH1 0x0 EQ ISZERO DUP1 PUSH2 0x50B JUMPI POP PUSH8 0xFFFFFFFFFFFFFFFF DUP2 AND ISZERO ISZERO JUMPDEST PUSH2 0x57D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x23 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4465706F736974206E6F742066696E616C697A65642062792074686520627269 PUSH1 0x44 DUP3 ADD MSTORE PUSH32 0x6467650000000000000000000000000000000000000000000000000000000000 PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x454 JUMP JUMPDEST PUSH5 0x2540BE400 DUP3 PUSH1 0x20 ADD MLOAD PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x59C SWAP2 SWAP1 PUSH2 0xAA1 JUMP JUMPDEST SWAP5 POP PUSH2 0x5B0 DUP3 PUSH1 0x20 ADD MLOAD DUP4 PUSH1 0x80 ADD MLOAD PUSH2 0x1EE JUMP JUMPDEST SWAP4 POP DUP2 PUSH1 0xC0 ADD MLOAD SWAP3 POP POP POP SWAP2 SWAP4 SWAP1 SWAP3 POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO DUP1 ISZERO PUSH2 0x5E4 JUMPI POP PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO JUMPDEST PUSH2 0x656 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x29 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4162737472616374544254434465706F7369746F7220616C726561647920696E PUSH1 0x44 DUP3 ADD MSTORE PUSH32 0x697469616C697A65640000000000000000000000000000000000000000000000 PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x6AC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1D PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x42726964676520616464726573732063616E6E6F74206265207A65726F000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x702 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x544254435661756C7420616464726573732063616E6E6F74206265207A65726F PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP4 DUP5 AND PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 SWAP2 DUP3 AND OR SWAP1 SWAP2 SSTORE PUSH1 0x1 DUP1 SLOAD SWAP3 SWAP1 SWAP4 AND SWAP2 AND OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x767 PUSH1 0xC0 DUP6 ADD PUSH1 0xA0 DUP7 ADD PUSH2 0xC8C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x7BD JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x16 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x5661756C742061646472657373206D69736D6174636800000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x7DD PUSH2 0x7CB DUP7 PUSH2 0x866 JUMP JUMPDEST PUSH2 0x7D8 PUSH1 0x20 DUP8 ADD DUP8 PUSH2 0xCA9 JUMP JUMPDEST PUSH2 0x8CB JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 MLOAD PUSH32 0x86F0143900000000000000000000000000000000000000000000000000000000 DUP2 MSTORE SWAP2 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x86F01439 SWAP1 PUSH2 0x82B SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0xD71 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x845 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x859 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP SWAP3 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x13C PUSH2 0x878 PUSH1 0x20 DUP5 ADD DUP5 PUSH2 0xED6 JUMP JUMPDEST PUSH2 0x885 PUSH1 0x20 DUP6 ADD DUP6 PUSH2 0xEF1 JUMP JUMPDEST PUSH2 0x892 PUSH1 0x40 DUP8 ADD DUP8 PUSH2 0xEF1 JUMP JUMPDEST PUSH2 0x8A2 PUSH1 0x80 DUP10 ADD PUSH1 0x60 DUP11 ADD PUSH2 0xED6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x8B7 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0xF38 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH2 0x915 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x8F6 SWAP3 SWAP2 SWAP1 SWAP2 DUP3 MSTORE PUSH1 0xE0 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE DUP1 MLOAD PUSH1 0x20 SWAP1 SWAP2 ADD KECCAK256 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 PUSH1 0x0 DUP4 MLOAD PUSH1 0x20 DUP6 ADD PUSH1 0x2 GAS STATICCALL POP PUSH1 0x20 PUSH1 0x0 PUSH1 0x20 PUSH1 0x0 PUSH1 0x2 GAS STATICCALL POP POP PUSH1 0x0 MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x952 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x968 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x973 DUP2 PUSH2 0x93C JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x983 DUP2 PUSH2 0x93C JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x9A0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x952 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH2 0x9C7 DUP2 PUSH2 0x9A7 JUMP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x9DF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x9EA DUP2 PUSH2 0x9A7 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x983 DUP2 PUSH2 0x9A7 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP4 DUP6 SUB PUSH2 0x100 DUP2 SLT ISZERO PUSH2 0xA11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xA28 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP6 ADD PUSH1 0x80 DUP2 DUP9 SUB SLT ISZERO PUSH2 0xA3A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 POP PUSH1 0xC0 PUSH1 0x1F NOT DUP3 ADD SLT ISZERO PUSH2 0xA4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x20 DUP5 ADD SWAP2 POP PUSH1 0xE0 DUP5 ADD CALLDATALOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP3 DUP2 AND DUP3 DUP3 AND SUB SWAP1 DUP1 DUP3 GT ISZERO PUSH2 0xA9A JUMPI PUSH2 0xA9A PUSH2 0xA63 JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 DUP3 MUL DUP2 ISZERO DUP3 DUP3 DIV DUP5 EQ OR PUSH2 0x13C JUMPI PUSH2 0x13C PUSH2 0xA63 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x952 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH2 0x9C7 DUP2 PUSH2 0xAB8 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xAE7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 MLOAD PUSH2 0xAF2 DUP2 PUSH2 0xAB8 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0xB16 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x12 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST POP DIV SWAP1 JUMP JUMPDEST DUP1 MLOAD PUSH2 0x9C7 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xB3C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 MLOAD PUSH2 0xB47 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x20 DUP7 ADD MLOAD SWAP1 SWAP5 POP PUSH2 0xB58 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x40 DUP7 ADD MLOAD SWAP1 SWAP4 POP PUSH2 0xB69 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x60 DUP7 ADD MLOAD SWAP1 SWAP3 POP PUSH2 0xB7A DUP2 PUSH2 0xAB8 JUMP JUMPDEST SWAP4 SWAP7 SWAP3 SWAP6 POP SWAP1 SWAP4 POP POP JUMP JUMPDEST DUP2 DUP2 SUB DUP2 DUP2 GT ISZERO PUSH2 0x13C JUMPI PUSH2 0x13C PUSH2 0xA63 JUMP JUMPDEST DUP1 MLOAD PUSH2 0x9C7 DUP2 PUSH2 0x9A7 JUMP JUMPDEST PUSH1 0x0 PUSH1 0xE0 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xBB5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MLOAD PUSH1 0xE0 DUP2 ADD DUP2 DUP2 LT PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT OR ISZERO PUSH2 0xBE6 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x40 MSTORE PUSH2 0xBF2 DUP4 PUSH2 0xB98 JUMP JUMPDEST DUP2 MSTORE PUSH2 0xC00 PUSH1 0x20 DUP5 ADD PUSH2 0xB1B JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0xC11 PUSH1 0x40 DUP5 ADD PUSH2 0xACA JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0xC22 PUSH1 0x60 DUP5 ADD PUSH2 0xB98 JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE PUSH2 0xC33 PUSH1 0x80 DUP5 ADD PUSH2 0xB1B JUMP JUMPDEST PUSH1 0x80 DUP3 ADD MSTORE PUSH2 0xC44 PUSH1 0xA0 DUP5 ADD PUSH2 0xACA JUMP JUMPDEST PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 DUP4 ADD MLOAD PUSH1 0xC0 DUP3 ADD MSTORE DUP1 SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xC70 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH2 0xC7B DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH2 0x983 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xC9E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xAF2 DUP2 PUSH2 0x9A7 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xCBB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xAF2 DUP2 PUSH2 0xAB8 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x9C7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0xCF5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD PUSH1 0x20 DUP2 ADD SWAP3 POP CALLDATALOAD SWAP1 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xD15 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATASIZE SUB DUP3 SGT ISZERO PUSH2 0xD24 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST DUP2 DUP4 MSTORE DUP2 DUP2 PUSH1 0x20 DUP6 ADD CALLDATACOPY POP PUSH1 0x0 DUP3 DUP3 ADD PUSH1 0x20 SWAP1 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x1F SWAP1 SWAP2 ADD PUSH1 0x1F NOT AND SWAP1 SWAP2 ADD ADD SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT DUP2 AND DUP2 EQ PUSH2 0x9C7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x100 DUP1 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP1 PUSH2 0xD8C DUP9 PUSH2 0xCC6 JUMP JUMPDEST AND DUP3 DUP6 ADD MSTORE PUSH2 0xD9E PUSH1 0x20 DUP9 ADD DUP9 PUSH2 0xCDE JUMP JUMPDEST SWAP3 POP PUSH1 0x80 PUSH2 0x120 DUP7 ADD MSTORE PUSH2 0xDB7 PUSH2 0x180 DUP7 ADD DUP5 DUP4 PUSH2 0xD2B JUMP JUMPDEST SWAP3 POP POP PUSH2 0xDC7 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0xCDE JUMP JUMPDEST DUP6 DUP5 SUB PUSH1 0xFF NOT ADD PUSH2 0x140 DUP8 ADD MSTORE PUSH2 0xDDF DUP5 DUP3 DUP5 PUSH2 0xD2B JUMP JUMPDEST SWAP4 POP POP POP DUP1 PUSH2 0xDF0 PUSH1 0x60 DUP10 ADD PUSH2 0xCC6 JUMP JUMPDEST AND PUSH2 0x160 DUP6 ADD MSTORE POP SWAP1 POP DUP4 CALLDATALOAD PUSH2 0xE05 DUP2 PUSH2 0xAB8 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 AND PUSH1 0x20 DUP5 ADD MSTORE POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH32 0xFFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000 DUP2 AND DUP1 DUP3 EQ PUSH2 0xE46 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x40 DUP6 ADD MSTORE POP POP PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT PUSH2 0xE68 PUSH1 0x40 DUP7 ADD PUSH2 0xD54 JUMP JUMPDEST AND PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0xE7A PUSH1 0x60 DUP6 ADD PUSH2 0xD54 JUMP JUMPDEST PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT DUP2 AND PUSH1 0x80 DUP5 ADD MSTORE POP PUSH2 0xE9C PUSH1 0x80 DUP6 ADD PUSH2 0xCC6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH1 0xA0 DUP5 ADD MSTORE POP PUSH2 0xEB9 PUSH1 0xA0 DUP6 ADD PUSH2 0x9BC JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0xE0 SWAP1 SWAP2 ADD SWAP2 SWAP1 SWAP2 MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xEE8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x139 DUP3 PUSH2 0xCC6 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0xF08 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0xF23 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP CALLDATASIZE DUP2 SWAP1 SUB DUP3 SGT ISZERO PUSH2 0xD24 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP1 DUP10 AND DUP4 MSTORE DUP7 DUP9 PUSH1 0x4 DUP6 ADD CALLDATACOPY DUP7 DUP4 ADD PUSH1 0x4 DUP2 ADD PUSH1 0x0 DUP2 MSTORE DUP7 DUP9 DUP3 CALLDATACOPY POP SWAP4 AND SWAP4 SWAP1 SWAP3 ADD PUSH1 0x4 DUP2 ADD SWAP4 SWAP1 SWAP4 MSTORE POP POP PUSH1 0x8 ADD SWAP5 SWAP4 POP POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP14 PUSH5 0x61C5D0AD92 NOT 0xAF SWAP2 LOG3 0xB2 0xDC DELEGATECALL SWAP8 TIMESTAMP 0xC1 0xD9 GAS 0xD3 0xC8 LOG0 0xD0 0x25 DUP13 JUMP EXTCODEHASH 0xE1 LT 0xE2 GT RETURNDATASIZE PUSH5 0x736F6C6343 STOP ADDMOD GT STOP CALLER ",
|
|
230
230
|
"sourceMap": "331:1314:123:-:0;;;;;;;;;;;;;;;;;;;"
|
|
231
231
|
},
|
|
232
232
|
"deployedBytecode": {
|
|
@@ -10562,7 +10562,7 @@
|
|
|
10562
10562
|
],
|
|
10563
10563
|
"immutableReferences": {},
|
|
10564
10564
|
"linkReferences": {},
|
|
10565
|
-
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x7D JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x485CC955 GT PUSH2 0x5B JUMPI DUP1 PUSH4 0x485CC955 EQ PUSH2 0xE8 JUMPI DUP1 PUSH4 0xC7BA0347 EQ PUSH2 0xFB JUMPI DUP1 PUSH4 0xCA3A7F8C EQ PUSH2 0x107 JUMPI DUP1 PUSH4 0xE78CEA92 EQ PUSH2 0x11A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0xF36403A EQ PUSH2 0x82 JUMPI DUP1 PUSH4 0x31E6028C EQ PUSH2 0xB2 JUMPI DUP1 PUSH4 0x32A280B3 EQ PUSH2 0xD3 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 SLOAD PUSH2 0x95 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xC5 PUSH2 0xC0 CALLDATASIZE PUSH1 0x4 PUSH2 0x955 JUMP JUMPDEST PUSH2 0x12D JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xA9 JUMP JUMPDEST PUSH2 0xE6 PUSH2 0xE1 CALLDATASIZE PUSH1 0x4 PUSH2 0x98E JUMP JUMPDEST PUSH2 0x142 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xE6 PUSH2 0xF6 CALLDATASIZE PUSH1 0x4 PUSH2 0x9CC JUMP JUMPDEST PUSH2 0x1A0 JUMP JUMPDEST PUSH2 0xC5 PUSH5 0x2540BE400 DUP2 JUMP JUMPDEST PUSH2 0xE6 PUSH2 0x115 CALLDATASIZE PUSH1 0x4 PUSH2 0x9FA JUMP JUMPDEST PUSH2 0x1AE JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x95 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x139 DUP4 DUP4 PUSH2 0x1EE JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x150 DUP5 PUSH2 0x371 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP5 DUP2 MSTORE PUSH1 0x20 DUP2 ADD DUP5 SWAP1 MSTORE SWAP1 DUP2 ADD DUP3 SWAP1 MSTORE SWAP3 SWAP6 POP SWAP1 SWAP4 POP SWAP2 POP PUSH32 0xCDB95277F6A6807A2018E2DD8D15A4FF1B5619260B5DC535EB77E90945CF6E39 SWAP1 PUSH1 0x60 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP POP POP JUMP JUMPDEST PUSH2 0x1AA DUP3 DUP3 PUSH2 0x5C2 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1BB DUP5 DUP5 DUP5 PUSH2 0x748 JUMP JUMPDEST SWAP1 POP PUSH32 0xF3805F24563E903DD7C191088451BDA29DC93CB93085E42724FDC27F62FEF96 DUP2 PUSH1 0x40 MLOAD PUSH2 0x192 SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH5 0x2540BE400 PUSH2 0x201 DUP5 DUP7 PUSH2 0xA79 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x215 SWAP2 SWAP1 PUSH2 0xAA1 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x9B53F51 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 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x26C 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 0x290 SWAP2 SWAP1 PUSH2 0xAD5 JUMP JUMPDEST PUSH4 0xFFFFFFFF AND SWAP1 POP PUSH1 0x0 DUP1 DUP3 GT PUSH2 0x2A8 JUMPI PUSH1 0x0 PUSH2 0x2B2 JUMP JUMPDEST PUSH2 0x2B2 DUP3 DUP5 PUSH2 0xAF9 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xC42B64D0 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x80 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x308 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 0x32C SWAP2 SWAP1 PUSH2 0xB26 JUMP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x0 PUSH5 0x2540BE400 DUP3 PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x34E SWAP2 SWAP1 PUSH2 0xAA1 JUMP JUMPDEST SWAP1 POP DUP1 PUSH2 0x35B DUP5 DUP8 PUSH2 0xB85 JUMP JUMPDEST PUSH2 0x365 SWAP2 SWAP1 PUSH2 0xB85 JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x40 MLOAD PUSH32 0xB02C43D000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP5 SWAP1 MSTORE DUP3 SWAP2 DUP3 SWAP2 DUP3 SWAP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0xB02C43D0 SWAP1 PUSH1 0x24 ADD PUSH1 0xE0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x3D8 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 0x3FC SWAP2 SWAP1 PUSH2 0xBA3 JUMP JUMPDEST SWAP1 POP DUP1 PUSH1 0x40 ADD MLOAD PUSH4 0xFFFFFFFF AND PUSH1 0x0 SUB PUSH2 0x45D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x17 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4465706F736974206E6F7420696E697469616C697A6564000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x40 MLOAD PUSH32 0x6C626AA400000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP8 SWAP1 MSTORE PUSH1 0x0 SWAP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x6C626AA4 SWAP1 PUSH1 0x24 ADD PUSH1 0x40 DUP1 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 GAS CALL ISZERO DUP1 ISZERO PUSH2 0x4C1 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 0x4E5 SWAP2 SWAP1 PUSH2 0xC5D JUMP JUMPDEST SWAP2 POP POP DUP2 PUSH1 0xA0 ADD MLOAD PUSH4 0xFFFFFFFF AND PUSH1 0x0 EQ ISZERO DUP1 PUSH2 0x50B JUMPI POP PUSH8 0xFFFFFFFFFFFFFFFF DUP2 AND ISZERO ISZERO JUMPDEST PUSH2 0x57D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x23 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4465706F736974206E6F742066696E616C697A65642062792074686520627269 PUSH1 0x44 DUP3 ADD MSTORE PUSH32 0x6467650000000000000000000000000000000000000000000000000000000000 PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x454 JUMP JUMPDEST PUSH5 0x2540BE400 DUP3 PUSH1 0x20 ADD MLOAD PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x59C SWAP2 SWAP1 PUSH2 0xAA1 JUMP JUMPDEST SWAP5 POP PUSH2 0x5B0 DUP3 PUSH1 0x20 ADD MLOAD DUP4 PUSH1 0x80 ADD MLOAD PUSH2 0x1EE JUMP JUMPDEST SWAP4 POP DUP2 PUSH1 0xC0 ADD MLOAD SWAP3 POP POP POP SWAP2 SWAP4 SWAP1 SWAP3 POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO DUP1 ISZERO PUSH2 0x5E4 JUMPI POP PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO JUMPDEST PUSH2 0x656 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x29 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4162737472616374544254434465706F7369746F7220616C726561647920696E PUSH1 0x44 DUP3 ADD MSTORE PUSH32 0x697469616C697A65640000000000000000000000000000000000000000000000 PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x6AC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1D PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x42726964676520616464726573732063616E6E6F74206265207A65726F000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x702 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x544254435661756C7420616464726573732063616E6E6F74206265207A65726F PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP4 DUP5 AND PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 SWAP2 DUP3 AND OR SWAP1 SWAP2 SSTORE PUSH1 0x1 DUP1 SLOAD SWAP3 SWAP1 SWAP4 AND SWAP2 AND OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x767 PUSH1 0xC0 DUP6 ADD PUSH1 0xA0 DUP7 ADD PUSH2 0xC8C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x7BD JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x16 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x5661756C742061646472657373206D69736D6174636800000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x7DD PUSH2 0x7CB DUP7 PUSH2 0x866 JUMP JUMPDEST PUSH2 0x7D8 PUSH1 0x20 DUP8 ADD DUP8 PUSH2 0xCA9 JUMP JUMPDEST PUSH2 0x8CB JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 MLOAD PUSH32 0x86F0143900000000000000000000000000000000000000000000000000000000 DUP2 MSTORE SWAP2 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x86F01439 SWAP1 PUSH2 0x82B SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0xD71 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x845 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x859 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP SWAP3 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x13C PUSH2 0x878 PUSH1 0x20 DUP5 ADD DUP5 PUSH2 0xED6 JUMP JUMPDEST PUSH2 0x885 PUSH1 0x20 DUP6 ADD DUP6 PUSH2 0xEF1 JUMP JUMPDEST PUSH2 0x892 PUSH1 0x40 DUP8 ADD DUP8 PUSH2 0xEF1 JUMP JUMPDEST PUSH2 0x8A2 PUSH1 0x80 DUP10 ADD PUSH1 0x60 DUP11 ADD PUSH2 0xED6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x8B7 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0xF38 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH2 0x915 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x8F6 SWAP3 SWAP2 SWAP1 SWAP2 DUP3 MSTORE PUSH1 0xE0 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE DUP1 MLOAD PUSH1 0x20 SWAP1 SWAP2 ADD KECCAK256 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 PUSH1 0x0 DUP4 MLOAD PUSH1 0x20 DUP6 ADD PUSH1 0x2 GAS STATICCALL POP PUSH1 0x20 PUSH1 0x0 PUSH1 0x20 PUSH1 0x0 PUSH1 0x2 GAS STATICCALL POP POP PUSH1 0x0 MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x952 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x968 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x973 DUP2 PUSH2 0x93C JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x983 DUP2 PUSH2 0x93C JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x9A0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x952 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH2 0x9C7 DUP2 PUSH2 0x9A7 JUMP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x9DF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x9EA DUP2 PUSH2 0x9A7 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x983 DUP2 PUSH2 0x9A7 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP4 DUP6 SUB PUSH2 0x100 DUP2 SLT ISZERO PUSH2 0xA11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xA28 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP6 ADD PUSH1 0x80 DUP2 DUP9 SUB SLT ISZERO PUSH2 0xA3A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 POP PUSH1 0xC0 PUSH1 0x1F NOT DUP3 ADD SLT ISZERO PUSH2 0xA4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x20 DUP5 ADD SWAP2 POP PUSH1 0xE0 DUP5 ADD CALLDATALOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP3 DUP2 AND DUP3 DUP3 AND SUB SWAP1 DUP1 DUP3 GT ISZERO PUSH2 0xA9A JUMPI PUSH2 0xA9A PUSH2 0xA63 JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 DUP3 MUL DUP2 ISZERO DUP3 DUP3 DIV DUP5 EQ OR PUSH2 0x13C JUMPI PUSH2 0x13C PUSH2 0xA63 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x952 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH2 0x9C7 DUP2 PUSH2 0xAB8 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xAE7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 MLOAD PUSH2 0xAF2 DUP2 PUSH2 0xAB8 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0xB16 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x12 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST POP DIV SWAP1 JUMP JUMPDEST DUP1 MLOAD PUSH2 0x9C7 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xB3C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 MLOAD PUSH2 0xB47 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x20 DUP7 ADD MLOAD SWAP1 SWAP5 POP PUSH2 0xB58 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x40 DUP7 ADD MLOAD SWAP1 SWAP4 POP PUSH2 0xB69 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x60 DUP7 ADD MLOAD SWAP1 SWAP3 POP PUSH2 0xB7A DUP2 PUSH2 0xAB8 JUMP JUMPDEST SWAP4 SWAP7 SWAP3 SWAP6 POP SWAP1 SWAP4 POP POP JUMP JUMPDEST DUP2 DUP2 SUB DUP2 DUP2 GT ISZERO PUSH2 0x13C JUMPI PUSH2 0x13C PUSH2 0xA63 JUMP JUMPDEST DUP1 MLOAD PUSH2 0x9C7 DUP2 PUSH2 0x9A7 JUMP JUMPDEST PUSH1 0x0 PUSH1 0xE0 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xBB5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MLOAD PUSH1 0xE0 DUP2 ADD DUP2 DUP2 LT PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT OR ISZERO PUSH2 0xBE6 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x40 MSTORE PUSH2 0xBF2 DUP4 PUSH2 0xB98 JUMP JUMPDEST DUP2 MSTORE PUSH2 0xC00 PUSH1 0x20 DUP5 ADD PUSH2 0xB1B JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0xC11 PUSH1 0x40 DUP5 ADD PUSH2 0xACA JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0xC22 PUSH1 0x60 DUP5 ADD PUSH2 0xB98 JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE PUSH2 0xC33 PUSH1 0x80 DUP5 ADD PUSH2 0xB1B JUMP JUMPDEST PUSH1 0x80 DUP3 ADD MSTORE PUSH2 0xC44 PUSH1 0xA0 DUP5 ADD PUSH2 0xACA JUMP JUMPDEST PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 DUP4 ADD MLOAD PUSH1 0xC0 DUP3 ADD MSTORE DUP1 SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xC70 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH2 0xC7B DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH2 0x983 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xC9E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xAF2 DUP2 PUSH2 0x9A7 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xCBB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xAF2 DUP2 PUSH2 0xAB8 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x9C7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0xCF5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD PUSH1 0x20 DUP2 ADD SWAP3 POP CALLDATALOAD SWAP1 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xD15 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATASIZE SUB DUP3 SGT ISZERO PUSH2 0xD24 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST DUP2 DUP4 MSTORE DUP2 DUP2 PUSH1 0x20 DUP6 ADD CALLDATACOPY POP PUSH1 0x0 DUP3 DUP3 ADD PUSH1 0x20 SWAP1 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x1F SWAP1 SWAP2 ADD PUSH1 0x1F NOT AND SWAP1 SWAP2 ADD ADD SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT DUP2 AND DUP2 EQ PUSH2 0x9C7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x100 DUP1 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP1 PUSH2 0xD8C DUP9 PUSH2 0xCC6 JUMP JUMPDEST AND DUP3 DUP6 ADD MSTORE PUSH2 0xD9E PUSH1 0x20 DUP9 ADD DUP9 PUSH2 0xCDE JUMP JUMPDEST SWAP3 POP PUSH1 0x80 PUSH2 0x120 DUP7 ADD MSTORE PUSH2 0xDB7 PUSH2 0x180 DUP7 ADD DUP5 DUP4 PUSH2 0xD2B JUMP JUMPDEST SWAP3 POP POP PUSH2 0xDC7 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0xCDE JUMP JUMPDEST DUP6 DUP5 SUB PUSH1 0xFF NOT ADD PUSH2 0x140 DUP8 ADD MSTORE PUSH2 0xDDF DUP5 DUP3 DUP5 PUSH2 0xD2B JUMP JUMPDEST SWAP4 POP POP POP DUP1 PUSH2 0xDF0 PUSH1 0x60 DUP10 ADD PUSH2 0xCC6 JUMP JUMPDEST AND PUSH2 0x160 DUP6 ADD MSTORE POP SWAP1 POP DUP4 CALLDATALOAD PUSH2 0xE05 DUP2 PUSH2 0xAB8 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 AND PUSH1 0x20 DUP5 ADD MSTORE POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH32 0xFFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000 DUP2 AND DUP1 DUP3 EQ PUSH2 0xE46 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x40 DUP6 ADD MSTORE POP POP PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT PUSH2 0xE68 PUSH1 0x40 DUP7 ADD PUSH2 0xD54 JUMP JUMPDEST AND PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0xE7A PUSH1 0x60 DUP6 ADD PUSH2 0xD54 JUMP JUMPDEST PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT DUP2 AND PUSH1 0x80 DUP5 ADD MSTORE POP PUSH2 0xE9C PUSH1 0x80 DUP6 ADD PUSH2 0xCC6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH1 0xA0 DUP5 ADD MSTORE POP PUSH2 0xEB9 PUSH1 0xA0 DUP6 ADD PUSH2 0x9BC JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0xE0 SWAP1 SWAP2 ADD SWAP2 SWAP1 SWAP2 MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xEE8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x139 DUP3 PUSH2 0xCC6 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0xF08 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0xF23 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP CALLDATASIZE DUP2 SWAP1 SUB DUP3 SGT ISZERO PUSH2 0xD24 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP1 DUP10 AND DUP4 MSTORE DUP7 DUP9 PUSH1 0x4 DUP6 ADD CALLDATACOPY DUP7 DUP4 ADD PUSH1 0x4 DUP2 ADD PUSH1 0x0 DUP2 MSTORE DUP7 DUP9 DUP3 CALLDATACOPY POP SWAP4 AND SWAP4 SWAP1 SWAP3 ADD PUSH1 0x4 DUP2 ADD SWAP4 SWAP1 SWAP4 MSTORE POP POP PUSH1 0x8 ADD SWAP5 SWAP4 POP POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH15 0x8C6FF966573DA33706BE64F26A6D3A PUSH18 0x39783F5BC2C7D33B4D523623878F2164736F PUSH13 0x63430008110033000000000000 ",
|
|
10565
|
+
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x7D JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x485CC955 GT PUSH2 0x5B JUMPI DUP1 PUSH4 0x485CC955 EQ PUSH2 0xE8 JUMPI DUP1 PUSH4 0xC7BA0347 EQ PUSH2 0xFB JUMPI DUP1 PUSH4 0xCA3A7F8C EQ PUSH2 0x107 JUMPI DUP1 PUSH4 0xE78CEA92 EQ PUSH2 0x11A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0xF36403A EQ PUSH2 0x82 JUMPI DUP1 PUSH4 0x31E6028C EQ PUSH2 0xB2 JUMPI DUP1 PUSH4 0x32A280B3 EQ PUSH2 0xD3 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 SLOAD PUSH2 0x95 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xC5 PUSH2 0xC0 CALLDATASIZE PUSH1 0x4 PUSH2 0x955 JUMP JUMPDEST PUSH2 0x12D JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xA9 JUMP JUMPDEST PUSH2 0xE6 PUSH2 0xE1 CALLDATASIZE PUSH1 0x4 PUSH2 0x98E JUMP JUMPDEST PUSH2 0x142 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xE6 PUSH2 0xF6 CALLDATASIZE PUSH1 0x4 PUSH2 0x9CC JUMP JUMPDEST PUSH2 0x1A0 JUMP JUMPDEST PUSH2 0xC5 PUSH5 0x2540BE400 DUP2 JUMP JUMPDEST PUSH2 0xE6 PUSH2 0x115 CALLDATASIZE PUSH1 0x4 PUSH2 0x9FA JUMP JUMPDEST PUSH2 0x1AE JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH2 0x95 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x139 DUP4 DUP4 PUSH2 0x1EE JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x150 DUP5 PUSH2 0x371 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP5 DUP2 MSTORE PUSH1 0x20 DUP2 ADD DUP5 SWAP1 MSTORE SWAP1 DUP2 ADD DUP3 SWAP1 MSTORE SWAP3 SWAP6 POP SWAP1 SWAP4 POP SWAP2 POP PUSH32 0xCDB95277F6A6807A2018E2DD8D15A4FF1B5619260B5DC535EB77E90945CF6E39 SWAP1 PUSH1 0x60 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP POP POP JUMP JUMPDEST PUSH2 0x1AA DUP3 DUP3 PUSH2 0x5C2 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1BB DUP5 DUP5 DUP5 PUSH2 0x748 JUMP JUMPDEST SWAP1 POP PUSH32 0xF3805F24563E903DD7C191088451BDA29DC93CB93085E42724FDC27F62FEF96 DUP2 PUSH1 0x40 MLOAD PUSH2 0x192 SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH5 0x2540BE400 PUSH2 0x201 DUP5 DUP7 PUSH2 0xA79 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x215 SWAP2 SWAP1 PUSH2 0xAA1 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x9B53F51 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 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x26C 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 0x290 SWAP2 SWAP1 PUSH2 0xAD5 JUMP JUMPDEST PUSH4 0xFFFFFFFF AND SWAP1 POP PUSH1 0x0 DUP1 DUP3 GT PUSH2 0x2A8 JUMPI PUSH1 0x0 PUSH2 0x2B2 JUMP JUMPDEST PUSH2 0x2B2 DUP3 DUP5 PUSH2 0xAF9 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xC42B64D0 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x80 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x308 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 0x32C SWAP2 SWAP1 PUSH2 0xB26 JUMP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x0 PUSH5 0x2540BE400 DUP3 PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x34E SWAP2 SWAP1 PUSH2 0xAA1 JUMP JUMPDEST SWAP1 POP DUP1 PUSH2 0x35B DUP5 DUP8 PUSH2 0xB85 JUMP JUMPDEST PUSH2 0x365 SWAP2 SWAP1 PUSH2 0xB85 JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x40 MLOAD PUSH32 0xB02C43D000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP5 SWAP1 MSTORE DUP3 SWAP2 DUP3 SWAP2 DUP3 SWAP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0xB02C43D0 SWAP1 PUSH1 0x24 ADD PUSH1 0xE0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x3D8 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 0x3FC SWAP2 SWAP1 PUSH2 0xBA3 JUMP JUMPDEST SWAP1 POP DUP1 PUSH1 0x40 ADD MLOAD PUSH4 0xFFFFFFFF AND PUSH1 0x0 SUB PUSH2 0x45D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x17 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4465706F736974206E6F7420696E697469616C697A6564000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x40 MLOAD PUSH32 0x6C626AA400000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP8 SWAP1 MSTORE PUSH1 0x0 SWAP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x6C626AA4 SWAP1 PUSH1 0x24 ADD PUSH1 0x40 DUP1 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 GAS CALL ISZERO DUP1 ISZERO PUSH2 0x4C1 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 0x4E5 SWAP2 SWAP1 PUSH2 0xC5D JUMP JUMPDEST SWAP2 POP POP DUP2 PUSH1 0xA0 ADD MLOAD PUSH4 0xFFFFFFFF AND PUSH1 0x0 EQ ISZERO DUP1 PUSH2 0x50B JUMPI POP PUSH8 0xFFFFFFFFFFFFFFFF DUP2 AND ISZERO ISZERO JUMPDEST PUSH2 0x57D JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x23 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4465706F736974206E6F742066696E616C697A65642062792074686520627269 PUSH1 0x44 DUP3 ADD MSTORE PUSH32 0x6467650000000000000000000000000000000000000000000000000000000000 PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x454 JUMP JUMPDEST PUSH5 0x2540BE400 DUP3 PUSH1 0x20 ADD MLOAD PUSH8 0xFFFFFFFFFFFFFFFF AND PUSH2 0x59C SWAP2 SWAP1 PUSH2 0xAA1 JUMP JUMPDEST SWAP5 POP PUSH2 0x5B0 DUP3 PUSH1 0x20 ADD MLOAD DUP4 PUSH1 0x80 ADD MLOAD PUSH2 0x1EE JUMP JUMPDEST SWAP4 POP DUP2 PUSH1 0xC0 ADD MLOAD SWAP3 POP POP POP SWAP2 SWAP4 SWAP1 SWAP3 POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO DUP1 ISZERO PUSH2 0x5E4 JUMPI POP PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO JUMPDEST PUSH2 0x656 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x29 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x4162737472616374544254434465706F7369746F7220616C726561647920696E PUSH1 0x44 DUP3 ADD MSTORE PUSH32 0x697469616C697A65640000000000000000000000000000000000000000000000 PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x6AC JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1D PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x42726964676520616464726573732063616E6E6F74206265207A65726F000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x702 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x544254435661756C7420616464726573732063616E6E6F74206265207A65726F PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP4 DUP5 AND PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 SWAP2 DUP3 AND OR SWAP1 SWAP2 SSTORE PUSH1 0x1 DUP1 SLOAD SWAP3 SWAP1 SWAP4 AND SWAP2 AND OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x767 PUSH1 0xC0 DUP6 ADD PUSH1 0xA0 DUP7 ADD PUSH2 0xC8C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x7BD JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x16 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x5661756C742061646472657373206D69736D6174636800000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x454 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x7DD PUSH2 0x7CB DUP7 PUSH2 0x866 JUMP JUMPDEST PUSH2 0x7D8 PUSH1 0x20 DUP8 ADD DUP8 PUSH2 0xCA9 JUMP JUMPDEST PUSH2 0x8CB JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x40 MLOAD PUSH32 0x86F0143900000000000000000000000000000000000000000000000000000000 DUP2 MSTORE SWAP2 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x86F01439 SWAP1 PUSH2 0x82B SWAP1 DUP9 SWAP1 DUP9 SWAP1 DUP9 SWAP1 PUSH1 0x4 ADD PUSH2 0xD71 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x845 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x859 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP SWAP3 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x13C PUSH2 0x878 PUSH1 0x20 DUP5 ADD DUP5 PUSH2 0xED6 JUMP JUMPDEST PUSH2 0x885 PUSH1 0x20 DUP6 ADD DUP6 PUSH2 0xEF1 JUMP JUMPDEST PUSH2 0x892 PUSH1 0x40 DUP8 ADD DUP8 PUSH2 0xEF1 JUMP JUMPDEST PUSH2 0x8A2 PUSH1 0x80 DUP10 ADD PUSH1 0x60 DUP11 ADD PUSH2 0xED6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x8B7 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0xF38 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE PUSH2 0x915 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x8F6 SWAP3 SWAP2 SWAP1 SWAP2 DUP3 MSTORE PUSH1 0xE0 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE DUP1 MLOAD PUSH1 0x20 SWAP1 SWAP2 ADD KECCAK256 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 PUSH1 0x0 DUP4 MLOAD PUSH1 0x20 DUP6 ADD PUSH1 0x2 GAS STATICCALL POP PUSH1 0x20 PUSH1 0x0 PUSH1 0x20 PUSH1 0x0 PUSH1 0x2 GAS STATICCALL POP POP PUSH1 0x0 MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x952 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x968 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x973 DUP2 PUSH2 0x93C JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x983 DUP2 PUSH2 0x93C JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x9A0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x952 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH2 0x9C7 DUP2 PUSH2 0x9A7 JUMP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x9DF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x9EA DUP2 PUSH2 0x9A7 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x983 DUP2 PUSH2 0x9A7 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP4 DUP6 SUB PUSH2 0x100 DUP2 SLT ISZERO PUSH2 0xA11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xA28 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP6 ADD PUSH1 0x80 DUP2 DUP9 SUB SLT ISZERO PUSH2 0xA3A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 POP PUSH1 0xC0 PUSH1 0x1F NOT DUP3 ADD SLT ISZERO PUSH2 0xA4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x20 DUP5 ADD SWAP2 POP PUSH1 0xE0 DUP5 ADD CALLDATALOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP3 DUP2 AND DUP3 DUP3 AND SUB SWAP1 DUP1 DUP3 GT ISZERO PUSH2 0xA9A JUMPI PUSH2 0xA9A PUSH2 0xA63 JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 DUP3 MUL DUP2 ISZERO DUP3 DUP3 DIV DUP5 EQ OR PUSH2 0x13C JUMPI PUSH2 0x13C PUSH2 0xA63 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x952 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH2 0x9C7 DUP2 PUSH2 0xAB8 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xAE7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 MLOAD PUSH2 0xAF2 DUP2 PUSH2 0xAB8 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0xB16 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x12 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST POP DIV SWAP1 JUMP JUMPDEST DUP1 MLOAD PUSH2 0x9C7 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xB3C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 MLOAD PUSH2 0xB47 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x20 DUP7 ADD MLOAD SWAP1 SWAP5 POP PUSH2 0xB58 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x40 DUP7 ADD MLOAD SWAP1 SWAP4 POP PUSH2 0xB69 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x60 DUP7 ADD MLOAD SWAP1 SWAP3 POP PUSH2 0xB7A DUP2 PUSH2 0xAB8 JUMP JUMPDEST SWAP4 SWAP7 SWAP3 SWAP6 POP SWAP1 SWAP4 POP POP JUMP JUMPDEST DUP2 DUP2 SUB DUP2 DUP2 GT ISZERO PUSH2 0x13C JUMPI PUSH2 0x13C PUSH2 0xA63 JUMP JUMPDEST DUP1 MLOAD PUSH2 0x9C7 DUP2 PUSH2 0x9A7 JUMP JUMPDEST PUSH1 0x0 PUSH1 0xE0 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xBB5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MLOAD PUSH1 0xE0 DUP2 ADD DUP2 DUP2 LT PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT OR ISZERO PUSH2 0xBE6 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x40 MSTORE PUSH2 0xBF2 DUP4 PUSH2 0xB98 JUMP JUMPDEST DUP2 MSTORE PUSH2 0xC00 PUSH1 0x20 DUP5 ADD PUSH2 0xB1B JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0xC11 PUSH1 0x40 DUP5 ADD PUSH2 0xACA JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0xC22 PUSH1 0x60 DUP5 ADD PUSH2 0xB98 JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE PUSH2 0xC33 PUSH1 0x80 DUP5 ADD PUSH2 0xB1B JUMP JUMPDEST PUSH1 0x80 DUP3 ADD MSTORE PUSH2 0xC44 PUSH1 0xA0 DUP5 ADD PUSH2 0xACA JUMP JUMPDEST PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 DUP4 ADD MLOAD PUSH1 0xC0 DUP3 ADD MSTORE DUP1 SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xC70 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH2 0xC7B DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH2 0x983 DUP2 PUSH2 0x93C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xC9E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xAF2 DUP2 PUSH2 0x9A7 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xCBB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0xAF2 DUP2 PUSH2 0xAB8 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x9C7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0xCF5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD PUSH1 0x20 DUP2 ADD SWAP3 POP CALLDATALOAD SWAP1 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xD15 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATASIZE SUB DUP3 SGT ISZERO PUSH2 0xD24 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST DUP2 DUP4 MSTORE DUP2 DUP2 PUSH1 0x20 DUP6 ADD CALLDATACOPY POP PUSH1 0x0 DUP3 DUP3 ADD PUSH1 0x20 SWAP1 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x1F SWAP1 SWAP2 ADD PUSH1 0x1F NOT AND SWAP1 SWAP2 ADD ADD SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT DUP2 AND DUP2 EQ PUSH2 0x9C7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x100 DUP1 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP1 PUSH2 0xD8C DUP9 PUSH2 0xCC6 JUMP JUMPDEST AND DUP3 DUP6 ADD MSTORE PUSH2 0xD9E PUSH1 0x20 DUP9 ADD DUP9 PUSH2 0xCDE JUMP JUMPDEST SWAP3 POP PUSH1 0x80 PUSH2 0x120 DUP7 ADD MSTORE PUSH2 0xDB7 PUSH2 0x180 DUP7 ADD DUP5 DUP4 PUSH2 0xD2B JUMP JUMPDEST SWAP3 POP POP PUSH2 0xDC7 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0xCDE JUMP JUMPDEST DUP6 DUP5 SUB PUSH1 0xFF NOT ADD PUSH2 0x140 DUP8 ADD MSTORE PUSH2 0xDDF DUP5 DUP3 DUP5 PUSH2 0xD2B JUMP JUMPDEST SWAP4 POP POP POP DUP1 PUSH2 0xDF0 PUSH1 0x60 DUP10 ADD PUSH2 0xCC6 JUMP JUMPDEST AND PUSH2 0x160 DUP6 ADD MSTORE POP SWAP1 POP DUP4 CALLDATALOAD PUSH2 0xE05 DUP2 PUSH2 0xAB8 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 AND PUSH1 0x20 DUP5 ADD MSTORE POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH32 0xFFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000 DUP2 AND DUP1 DUP3 EQ PUSH2 0xE46 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x40 DUP6 ADD MSTORE POP POP PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT PUSH2 0xE68 PUSH1 0x40 DUP7 ADD PUSH2 0xD54 JUMP JUMPDEST AND PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0xE7A PUSH1 0x60 DUP6 ADD PUSH2 0xD54 JUMP JUMPDEST PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT DUP2 AND PUSH1 0x80 DUP5 ADD MSTORE POP PUSH2 0xE9C PUSH1 0x80 DUP6 ADD PUSH2 0xCC6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND PUSH1 0xA0 DUP5 ADD MSTORE POP PUSH2 0xEB9 PUSH1 0xA0 DUP6 ADD PUSH2 0x9BC JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0xC0 DUP4 ADD MSTORE PUSH1 0xE0 SWAP1 SWAP2 ADD SWAP2 SWAP1 SWAP2 MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xEE8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x139 DUP3 PUSH2 0xCC6 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0xF08 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0xF23 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP CALLDATASIZE DUP2 SWAP1 SUB DUP3 SGT ISZERO PUSH2 0xD24 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP1 DUP10 AND DUP4 MSTORE DUP7 DUP9 PUSH1 0x4 DUP6 ADD CALLDATACOPY DUP7 DUP4 ADD PUSH1 0x4 DUP2 ADD PUSH1 0x0 DUP2 MSTORE DUP7 DUP9 DUP3 CALLDATACOPY POP SWAP4 AND SWAP4 SWAP1 SWAP3 ADD PUSH1 0x4 DUP2 ADD SWAP4 SWAP1 SWAP4 MSTORE POP POP PUSH1 0x8 ADD SWAP5 SWAP4 POP POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP14 PUSH5 0x61C5D0AD92 NOT 0xAF SWAP2 LOG3 0xB2 0xDC DELEGATECALL SWAP8 TIMESTAMP 0xC1 0xD9 GAS 0xD3 0xC8 LOG0 0xD0 0x25 DUP13 JUMP EXTCODEHASH 0xE1 LT 0xE2 GT RETURNDATASIZE PUSH5 0x736F6C6343 STOP ADDMOD GT STOP CALLER ",
|
|
10566
10566
|
"sourceMap": "331:1314:123:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3715:27:104;;;;;-1:-1:-1;;;;;3715:27:104;;;;;;-1:-1:-1;;;;;198:55:130;;;180:74;;168:2;153:18;3715:27:104;;;;;;;;1414:229:123;;;;;;:::i;:::-;;:::i;:::-;;;934:25:130;;;922:2;907:18;1414:229:123;788:177:130;1056:352:123;;;;;;:::i;:::-;;:::i;:::-;;582:138;;;;;;:::i;:::-;;:::i;3545:51:104:-;;3590:6;3545:51;;726:324:123;;;;;;:::i;:::-;;:::i;3644:21:104:-;;;;;-1:-1:-1;;;;;3644:21:104;;;1414:229:123;1549:7;1575:61;1596:16;1614:21;1575:20;:61::i;:::-;1568:68;;1414:229;;;;;:::o;1056:352::-;1140:28;1182:18;1214:17;1244:28;1261:10;1244:16;:28::i;:::-;1287:114;;;2933:25:130;;;2989:2;2974:18;;2967:34;;;3017:18;;;3010:34;;;1126:146:123;;-1:-1:-1;1126:146:123;;-1:-1:-1;1126:146:123;-1:-1:-1;1287:114:123;;2921:2:130;2906:18;1287:114:123;;;;;;;;1116:292;;;1056:352;:::o;582:138::-;658:55;693:7;702:10;658:34;:55::i;:::-;582:138;;:::o;726:324::-;922:18;943:48;962:9;973:6;981:9;943:18;:48::i;:::-;922:69;;1006:37;1032:10;1006:37;;;;934:25:130;;922:2;907:18;;788:177;10820:920:104;10958:7;;3590:6;11151:40;11170:21;11151:16;:40;:::i;:::-;11150:75;;;;;;:::i;:::-;11122:103;;11236:20;11259:9;;;;;;;;;-1:-1:-1;;;;;11259:9:104;-1:-1:-1;;;;;11259:37:104;;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;11236:62;;;;11308:13;11339:1;11324:12;:16;:81;;11404:1;11324:81;;;11356:32;11376:12;11356:17;:32;:::i;:::-;11308:97;;11560:22;11588:6;;;;;;;;;-1:-1:-1;;;;;11588:6:104;-1:-1:-1;;;;;11588:24:104;;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;11555:59;;;;;11624:16;3590:6;11643:15;:36;;;;;;:::i;:::-;11624:55;-1:-1:-1;11624:55:104;11697:25;11717:5;11697:17;:25;:::i;:::-;:36;;;;:::i;:::-;11690:43;10820:920;-1:-1:-1;;;;;;;;10820:920:104:o;7954:807::-;8047:28;8208:6;;:49;;;;;;;;934:25:130;;;8047:28:104;;;;;;-1:-1:-1;;;;;8208:6:104;;:15;;907:18:130;;8208:49:104;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8163:94;;8275:7;:18;;;:23;;8297:1;8275:23;8267:59;;;;-1:-1:-1;;;8267:59:104;;6786:2:130;8267:59:104;;;6768:21:130;6825:2;6805:18;;;6798:30;6864:25;6844:18;;;6837:53;6907:18;;8267:59:104;;;;;;;;;8362:9;;:69;;;;;;;;934:25:130;;;8340:18:104;;-1:-1:-1;;;;;8362:9:104;;:35;;907:18:130;;8362:69:104;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8337:94;;;8463:7;:15;;;:20;;8482:1;8463:20;;:40;;;-1:-1:-1;8487:16:104;;;;;8463:40;8442:122;;;;-1:-1:-1;;;8442:122:104;;7524:2:130;8442:122:104;;;7506:21:130;7563:2;7543:18;;;7536:30;7602:34;7582:18;;;7575:62;7673:5;7653:18;;;7646:33;7696:19;;8442:122:104;7322:399:130;8442:122:104;3590:6;8598:7;:14;;;:35;;;;;;:::i;:::-;8575:58;;8657:57;8678:7;:14;;;8694:7;:19;;;8657:20;:57::i;:::-;8644:70;;8737:7;:17;;;8725:29;;8153:608;;7954:807;;;;;:::o;4393:515::-;4563:1;4544:6;-1:-1:-1;;;;;4544:6:104;4536:29;:65;;;;-1:-1:-1;4577:9:104;;-1:-1:-1;;;;;4577:9:104;4569:32;4536:65;4515:153;;;;-1:-1:-1;;;4515:153:104;;7928:2:130;4515:153:104;;;7910:21:130;7967:2;7947:18;;;7940:30;8006:34;7986:18;;;7979:62;8077:11;8057:18;;;8050:39;8106:19;;4515:153:104;7726:405:130;4515:153:104;-1:-1:-1;;;;;4687:21:104;;4679:63;;;;-1:-1:-1;;;4679:63:104;;8338:2:130;4679:63:104;;;8320:21:130;8377:2;8357:18;;;8350:30;8416:31;8396:18;;;8389:59;8465:18;;4679:63:104;8136:353:130;4679:63:104;-1:-1:-1;;;;;4760:24:104;;4752:69;;;;-1:-1:-1;;;4752:69:104;;8696:2:130;4752:69:104;;;8678:21:130;;;8715:18;;;8708:30;8774:34;8754:18;;;8747:62;8826:18;;4752:69:104;8494:356:130;4752:69:104;4832:6;:25;;-1:-1:-1;;;;;4832:25:104;;;;;;;;;;;;4867:34;;;;;;;;;;;4393:515::o;5876:801::-;6117:9;;6066:7;;-1:-1:-1;;;;;6117:9:104;6093:12;;;;;;;;:::i;:::-;-1:-1:-1;;;;;6093:34:104;;6085:69;;;;-1:-1:-1;;;6085:69:104;;9309:2:130;6085:69:104;;;9291:21:130;9348:2;9328:18;;;9321:30;9387:24;9367:18;;;9360:52;9429:18;;6085:69:104;9107:346:130;6085:69:104;6165:18;6186:117;6220:34;6244:9;6220:23;:34::i;:::-;6268:25;;;;:6;:25;:::i;:::-;6186:20;:117::i;:::-;6579:6;;:63;;;;;6165:138;;-1:-1:-1;;;;;;6579:6:104;;:33;;:63;;6613:9;;6624:6;;6632:9;;6579:63;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6660:10:104;;5876:801;-1:-1:-1;;;;;;;5876:801:104:o;12833:409::-;12957:7;12999:236;13054:14;;;;:6;:14;:::i;:::-;13090:18;;;;:6;:18;:::i;:::-;13130:19;;;;:6;:19;:::i;:::-;13171:15;;;;;;;;:::i;:::-;12999:205;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;:234;:236::i;12263:271::-;12388:7;12478:13;12493:18;12461:51;;;;;;;;14916:19:130;;;14973:3;14969:16;-1:-1:-1;;;;;;14965:89:130;14960:2;14951:12;;14944:111;15080:2;15071:12;;14761:328;12461:51:104;;;;-1:-1:-1;;12461:51:104;;;;;;;;;12451:62;;12461:51;12451:62;;;;;12263:271;-1:-1:-1;;;12263:271:104:o;9609:335:0:-;9670:11;9835:2;9829:4;9824:2;9818:9;9813:2;9809;9805:11;9802:1;9795:5;9784:54;9780:59;9893:2;9887:4;9883:2;9877:4;9874:1;9867:5;9856:40;-1:-1:-1;;9923:4:0;9917:11;;9609:335;-1:-1:-1;9609:335:0:o;265:129:130:-;350:18;343:5;339:30;332:5;329:41;319:69;;384:1;381;374:12;319:69;265:129;:::o;399:384::-;465:6;473;526:2;514:9;505:7;501:23;497:32;494:52;;;542:1;539;532:12;494:52;581:9;568:23;600:30;624:5;600:30;:::i;:::-;649:5;-1:-1:-1;706:2:130;691:18;;678:32;719;678;719;:::i;:::-;770:7;760:17;;;399:384;;;;;:::o;970:180::-;1029:6;1082:2;1070:9;1061:7;1057:23;1053:32;1050:52;;;1098:1;1095;1088:12;1050:52;-1:-1:-1;1121:23:130;;970:180;-1:-1:-1;970:180:130:o;1155:154::-;-1:-1:-1;;;;;1234:5:130;1230:54;1223:5;1220:65;1210:93;;1299:1;1296;1289:12;1314:134;1382:20;;1411:31;1382:20;1411:31;:::i;:::-;1314:134;;;:::o;1453:388::-;1521:6;1529;1582:2;1570:9;1561:7;1557:23;1553:32;1550:52;;;1598:1;1595;1588:12;1550:52;1637:9;1624:23;1656:31;1681:5;1656:31;:::i;:::-;1706:5;-1:-1:-1;1763:2:130;1748:18;;1735:32;1776:33;1735:32;1776:33;:::i;1846:632::-;1995:6;2003;2011;2055:9;2046:7;2042:23;2085:3;2081:2;2077:12;2074:32;;;2102:1;2099;2092:12;2074:32;2142:9;2129:23;2175:18;2167:6;2164:30;2161:50;;;2207:1;2204;2197:12;2161:50;2230:22;;2286:3;2268:16;;;2264:26;2261:46;;;2303:1;2300;2293:12;2261:46;2326:2;-1:-1:-1;2362:3:130;-1:-1:-1;;2344:16:130;;2340:26;2337:46;;;2379:1;2376;2369:12;2337:46;;2417:2;2406:9;2402:18;2392:28;;2467:3;2456:9;2452:19;2439:33;2429:43;;1846:632;;;;;:::o;3055:184::-;-1:-1:-1;;;3104:1:130;3097:88;3204:4;3201:1;3194:15;3228:4;3225:1;3218:15;3244:183;3312:18;3363:10;;;3351;;;3347:27;;3386:12;;;3383:38;;;3401:18;;:::i;:::-;3383:38;3244:183;;;;:::o;3432:168::-;3505:9;;;3536;;3553:15;;;3547:22;;3533:37;3523:71;;3574:18;;:::i;3605:121::-;3690:10;3683:5;3679:22;3672:5;3669:33;3659:61;;3716:1;3713;3706:12;3731:136;3809:13;;3831:30;3809:13;3831:30;:::i;3872:249::-;3941:6;3994:2;3982:9;3973:7;3969:23;3965:32;3962:52;;;4010:1;4007;4000:12;3962:52;4042:9;4036:16;4061:30;4085:5;4061:30;:::i;:::-;4110:5;3872:249;-1:-1:-1;;;3872:249:130:o;4126:274::-;4166:1;4192;4182:189;;-1:-1:-1;;;4224:1:130;4217:88;4328:4;4325:1;4318:15;4356:4;4353:1;4346:15;4182:189;-1:-1:-1;4385:9:130;;4126:274::o;4405:136::-;4483:13;;4505:30;4483:13;4505:30;:::i;4546:646::-;4639:6;4647;4655;4663;4716:3;4704:9;4695:7;4691:23;4687:33;4684:53;;;4733:1;4730;4723:12;4684:53;4765:9;4759:16;4784:30;4808:5;4784:30;:::i;:::-;4883:2;4868:18;;4862:25;4833:5;;-1:-1:-1;4896:32:130;4862:25;4896:32;:::i;:::-;4999:2;4984:18;;4978:25;4947:7;;-1:-1:-1;5012:32:130;4978:25;5012:32;:::i;:::-;5115:2;5100:18;;5094:25;5063:7;;-1:-1:-1;5128:32:130;5094:25;5128:32;:::i;:::-;4546:646;;;;-1:-1:-1;4546:646:130;;-1:-1:-1;;4546:646:130:o;5197:128::-;5264:9;;;5285:11;;;5282:37;;;5299:18;;:::i;5330:138::-;5409:13;;5431:31;5409:13;5431:31;:::i;5473:1106::-;5576:6;5629:3;5617:9;5608:7;5604:23;5600:33;5597:53;;;5646:1;5643;5636:12;5597:53;5679:2;5673:9;5721:3;5713:6;5709:16;5791:6;5779:10;5776:22;5755:18;5743:10;5740:34;5737:62;5734:242;;;-1:-1:-1;;;5829:1:130;5822:88;5933:4;5930:1;5923:15;5961:4;5958:1;5951:15;5734:242;5992:2;5985:22;6031:40;6061:9;6031:40;:::i;:::-;6023:6;6016:56;6105:48;6149:2;6138:9;6134:18;6105:48;:::i;:::-;6100:2;6092:6;6088:15;6081:73;6187:48;6231:2;6220:9;6216:18;6187:48;:::i;:::-;6182:2;6174:6;6170:15;6163:73;6269:49;6314:2;6303:9;6299:18;6269:49;:::i;:::-;6264:2;6256:6;6252:15;6245:74;6353:49;6397:3;6386:9;6382:19;6353:49;:::i;:::-;6347:3;6339:6;6335:16;6328:75;6437:49;6481:3;6470:9;6466:19;6437:49;:::i;:::-;6431:3;6423:6;6419:16;6412:75;6542:3;6531:9;6527:19;6521:26;6515:3;6507:6;6503:16;6496:52;6567:6;6557:16;;;5473:1106;;;;:::o;6936:381::-;7013:6;7021;7074:2;7062:9;7053:7;7049:23;7045:32;7042:52;;;7090:1;7087;7080:12;7042:52;7122:9;7116:16;7141:30;7165:5;7141:30;:::i;:::-;7240:2;7225:18;;7219:25;7190:5;;-1:-1:-1;7253:32:130;7219:25;7253:32;:::i;8855:247::-;8914:6;8967:2;8955:9;8946:7;8942:23;8938:32;8935:52;;;8983:1;8980;8973:12;8935:52;9022:9;9009:23;9041:31;9066:5;9041:31;:::i;9458:245::-;9516:6;9569:2;9557:9;9548:7;9544:23;9540:32;9537:52;;;9585:1;9582;9575:12;9537:52;9624:9;9611:23;9643:30;9667:5;9643:30;:::i;9708:219::-;9775:20;;-1:-1:-1;;;;;;9824:78:130;;9814:89;;9804:117;;9917:1;9914;9907:12;10087:500;10145:5;10152:6;10212:3;10199:17;10298:2;10294:7;10283:8;10267:14;10263:29;10259:43;10239:18;10235:68;10225:96;;10317:1;10314;10307:12;10225:96;10345:33;;10449:4;10436:18;;;-1:-1:-1;10397:21:130;;-1:-1:-1;10477:18:130;10466:30;;10463:50;;;10509:1;10506;10499:12;10463:50;10556:6;10540:14;10536:27;10529:5;10525:39;10522:59;;;10577:1;10574;10567:12;10522:59;10087:500;;;;;:::o;10592:266::-;10680:6;10675:3;10668:19;10732:6;10725:5;10718:4;10713:3;10709:14;10696:43;-1:-1:-1;10784:1:130;10759:16;;;10777:4;10755:27;;;10748:38;;;;10840:2;10819:15;;;-1:-1:-1;;10815:29:130;10806:39;;;10802:50;;10592:266::o;10863:185::-;10931:20;;-1:-1:-1;;10980:43:130;;10970:54;;10960:82;;11038:1;11035;11028:12;11306:2065;11594:4;11623:3;11653:2;11642:9;11635:21;-1:-1:-1;;;;;;11808:2:130;11781:25;11799:6;11781:25;:::i;:::-;11777:34;11772:2;11761:9;11757:18;11750:62;11855:57;11906:4;11898:6;11894:17;11886:6;11855:57;:::i;:::-;11821:91;;11949:4;11943:3;11932:9;11928:19;11921:33;11977:74;12046:3;12035:9;12031:19;12017:12;12003;11977:74;:::i;:::-;11963:88;;;12098:57;12149:4;12141:6;12137:17;12129:6;12098:57;:::i;:::-;12196:22;;;-1:-1:-1;;12192:37:130;12186:3;12171:19;;12164:66;12253:65;12200:6;12295:14;12279;12253:65;:::i;:::-;12239:79;;;;12397:2;12359:36;12389:4;12381:6;12377:17;12359:36;:::i;:::-;12355:45;12349:3;12334:19;;12327:74;-1:-1:-1;12418:6:130;-1:-1:-1;12446:20:130;;12475:30;12446:20;12475:30;:::i;:::-;12554:10;12547:5;12543:22;12536:4;12525:9;12521:20;12514:52;;12615:4;12607:6;12603:17;12590:31;12653:66;12644:7;12640:80;12751:2;12742:7;12739:15;12729:43;;12768:1;12765;12758:12;12729:43;12810:2;12803:4;12792:9;12788:20;12781:32;;;12898:26;12894:31;12855:37;12886:4;12878:6;12874:17;12855:37;:::i;:::-;12851:75;12844:4;12833:9;12829:20;12822:105;12958:37;12989:4;12981:6;12977:17;12958:37;:::i;:::-;-1:-1:-1;;11119:43:130;;13054:4;13039:20;;11107:56;13004;13091:36;13121:4;13113:6;13109:17;13091:36;:::i;:::-;-1:-1:-1;;;;;;9997:78:130;;13185:3;13170:19;;9985:91;13136:54;13221:36;13252:3;13244:6;13240:16;13221:36;:::i;:::-;-1:-1:-1;;;;;11240:54:130;13316:3;13301:19;;11228:67;13352:3;13337:19;;;13330:35;;;;11306:2065;;-1:-1:-1;;11306:2065:130:o;13376:184::-;13434:6;13487:2;13475:9;13466:7;13462:23;13458:32;13455:52;;;13503:1;13500;13493:12;13455:52;13526:28;13544:9;13526:28;:::i;13565:521::-;13642:4;13648:6;13708:11;13695:25;13802:2;13798:7;13787:8;13771:14;13767:29;13763:43;13743:18;13739:68;13729:96;;13821:1;13818;13811:12;13729:96;13848:33;;13900:20;;;-1:-1:-1;13943:18:130;13932:30;;13929:50;;;13975:1;13972;13965:12;13929:50;14008:4;13996:17;;-1:-1:-1;14039:14:130;14035:27;;;14025:38;;14022:58;;;14076:1;14073;14066:12;14091:665;14338:3;-1:-1:-1;;;;;;14465:2:130;14457:6;14453:15;14448:3;14441:28;14512:6;14504;14500:1;14495:3;14491:11;14478:41;14547:6;14542:3;14538:16;14581:1;14577:2;14573:10;14603:1;14599:2;14592:13;14639:6;14631;14627:2;14614:32;-1:-1:-1;14708:15:130;;14665;;;;14704:1;14696:10;;14689:35;;;;-1:-1:-1;;14748:1:130;14740:10;;;-1:-1:-1;;;;14091:665:130:o"
|
|
10567
10567
|
},
|
|
10568
10568
|
"gasEstimates": {
|
|
@@ -10591,7 +10591,7 @@
|
|
|
10591
10591
|
"tbtcVault()": "0f36403a"
|
|
10592
10592
|
}
|
|
10593
10593
|
},
|
|
10594
|
-
"metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialDepositAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tbtcAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"extraData\",\"type\":\"bytes32\"}],\"name\":\"FinalizeDepositReturned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"depositKey\",\"type\":\"uint256\"}],\"name\":\"InitializeDepositReturned\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SATOSHI_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"depositAmountSat\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositTreasuryFeeSat\",\"type\":\"uint64\"}],\"name\":\"calculateTbtcAmountPublic\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"depositKey\",\"type\":\"uint256\"}],\"name\":\"finalizeDepositPublic\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tbtcVault\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"struct IBridgeTypes.BitcoinTxInfo\",\"name\":\"fundingTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fundingOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"bytes8\",\"name\":\"blindingFactor\",\"type\":\"bytes8\"},{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"internalType\":\"bytes20\",\"name\":\"refundPubKeyHash\",\"type\":\"bytes20\"},{\"internalType\":\"bytes4\",\"name\":\"refundLocktime\",\"type\":\"bytes4\"},{\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"}],\"internalType\":\"struct IBridgeTypes.DepositRevealInfo\",\"name\":\"reveal\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"extraData\",\"type\":\"bytes32\"}],\"name\":\"initializeDepositPublic\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tbtcVault\",\"outputs\":[{\"internalType\":\"contract ITBTCVault\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"SATOSHI_MULTIPLIER()\":{\"notice\":\"Multiplier to convert satoshi to TBTC token units.\"},\"bridge()\":{\"notice\":\"Bridge contract address.\"},\"tbtcVault()\":{\"notice\":\"TBTCVault contract address.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/test/TestTBTCDepositor.sol\":\"TestTBTCDepositor\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[]},\"sources\":{\"@keep-network/bitcoin-spv-sol/contracts/BTCUtils.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\n/** @title BitcoinSPV */\\n/** @author Summa (https://summa.one) */\\n\\nimport {BytesLib} from \\\"./BytesLib.sol\\\";\\nimport {SafeMath} from \\\"./SafeMath.sol\\\";\\n\\nlibrary BTCUtils {\\n using BytesLib for bytes;\\n using SafeMath for uint256;\\n\\n // The target at minimum Difficulty. Also the target of the genesis block\\n uint256 public constant DIFF1_TARGET = 0xffff0000000000000000000000000000000000000000000000000000;\\n\\n uint256 public constant RETARGET_PERIOD = 2 * 7 * 24 * 60 * 60; // 2 weeks in seconds\\n uint256 public constant RETARGET_PERIOD_BLOCKS = 2016; // 2 weeks in blocks\\n\\n uint256 public constant ERR_BAD_ARG = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\\n\\n /* ***** */\\n /* UTILS */\\n /* ***** */\\n\\n /// @notice Determines the length of a VarInt in bytes\\n /// @dev A VarInt of >1 byte is prefixed with a flag indicating its length\\n /// @param _flag The first byte of a VarInt\\n /// @return The number of non-flag bytes in the VarInt\\n function determineVarIntDataLength(bytes memory _flag) internal pure returns (uint8) {\\n return determineVarIntDataLengthAt(_flag, 0);\\n }\\n\\n /// @notice Determines the length of a VarInt in bytes\\n /// @dev A VarInt of >1 byte is prefixed with a flag indicating its length\\n /// @param _b The byte array containing a VarInt\\n /// @param _at The position of the VarInt in the array\\n /// @return The number of non-flag bytes in the VarInt\\n function determineVarIntDataLengthAt(bytes memory _b, uint256 _at) internal pure returns (uint8) {\\n if (uint8(_b[_at]) == 0xff) {\\n return 8; // one-byte flag, 8 bytes data\\n }\\n if (uint8(_b[_at]) == 0xfe) {\\n return 4; // one-byte flag, 4 bytes data\\n }\\n if (uint8(_b[_at]) == 0xfd) {\\n return 2; // one-byte flag, 2 bytes data\\n }\\n\\n return 0; // flag is data\\n }\\n\\n /// @notice Parse a VarInt into its data length and the number it represents\\n /// @dev Useful for Parsing Vins and Vouts. Returns ERR_BAD_ARG if insufficient bytes.\\n /// Caller SHOULD explicitly handle this case (or bubble it up)\\n /// @param _b A byte-string starting with a VarInt\\n /// @return number of bytes in the encoding (not counting the tag), the encoded int\\n function parseVarInt(bytes memory _b) internal pure returns (uint256, uint256) {\\n return parseVarIntAt(_b, 0);\\n }\\n\\n /// @notice Parse a VarInt into its data length and the number it represents\\n /// @dev Useful for Parsing Vins and Vouts. Returns ERR_BAD_ARG if insufficient bytes.\\n /// Caller SHOULD explicitly handle this case (or bubble it up)\\n /// @param _b A byte-string containing a VarInt\\n /// @param _at The position of the VarInt\\n /// @return number of bytes in the encoding (not counting the tag), the encoded int\\n function parseVarIntAt(bytes memory _b, uint256 _at) internal pure returns (uint256, uint256) {\\n uint8 _dataLen = determineVarIntDataLengthAt(_b, _at);\\n\\n if (_dataLen == 0) {\\n return (0, uint8(_b[_at]));\\n }\\n if (_b.length < 1 + _dataLen + _at) {\\n return (ERR_BAD_ARG, 0);\\n }\\n uint256 _number;\\n if (_dataLen == 2) {\\n _number = reverseUint16(uint16(_b.slice2(1 + _at)));\\n } else if (_dataLen == 4) {\\n _number = reverseUint32(uint32(_b.slice4(1 + _at)));\\n } else if (_dataLen == 8) {\\n _number = reverseUint64(uint64(_b.slice8(1 + _at)));\\n }\\n return (_dataLen, _number);\\n }\\n\\n /// @notice Changes the endianness of a byte array\\n /// @dev Returns a new, backwards, bytes\\n /// @param _b The bytes to reverse\\n /// @return The reversed bytes\\n function reverseEndianness(bytes memory _b) internal pure returns (bytes memory) {\\n bytes memory _newValue = new bytes(_b.length);\\n\\n for (uint i = 0; i < _b.length; i++) {\\n _newValue[_b.length - i - 1] = _b[i];\\n }\\n\\n return _newValue;\\n }\\n\\n /// @notice Changes the endianness of a uint256\\n /// @dev https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel\\n /// @param _b The unsigned integer to reverse\\n /// @return v The reversed value\\n function reverseUint256(uint256 _b) internal pure returns (uint256 v) {\\n v = _b;\\n\\n // swap bytes\\n v = ((v >> 8) & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) |\\n ((v & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) << 8);\\n // swap 2-byte long pairs\\n v = ((v >> 16) & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) |\\n ((v & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) << 16);\\n // swap 4-byte long pairs\\n v = ((v >> 32) & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) |\\n ((v & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) << 32);\\n // swap 8-byte long pairs\\n v = ((v >> 64) & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) |\\n ((v & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) << 64);\\n // swap 16-byte long pairs\\n v = (v >> 128) | (v << 128);\\n }\\n\\n /// @notice Changes the endianness of a uint64\\n /// @param _b The unsigned integer to reverse\\n /// @return v The reversed value\\n function reverseUint64(uint64 _b) internal pure returns (uint64 v) {\\n v = _b;\\n\\n // swap bytes\\n v = ((v >> 8) & 0x00FF00FF00FF00FF) |\\n ((v & 0x00FF00FF00FF00FF) << 8);\\n // swap 2-byte long pairs\\n v = ((v >> 16) & 0x0000FFFF0000FFFF) |\\n ((v & 0x0000FFFF0000FFFF) << 16);\\n // swap 4-byte long pairs\\n v = (v >> 32) | (v << 32);\\n }\\n\\n /// @notice Changes the endianness of a uint32\\n /// @param _b The unsigned integer to reverse\\n /// @return v The reversed value\\n function reverseUint32(uint32 _b) internal pure returns (uint32 v) {\\n v = _b;\\n\\n // swap bytes\\n v = ((v >> 8) & 0x00FF00FF) |\\n ((v & 0x00FF00FF) << 8);\\n // swap 2-byte long pairs\\n v = (v >> 16) | (v << 16);\\n }\\n\\n /// @notice Changes the endianness of a uint24\\n /// @param _b The unsigned integer to reverse\\n /// @return v The reversed value\\n function reverseUint24(uint24 _b) internal pure returns (uint24 v) {\\n v = (_b << 16) | (_b & 0x00FF00) | (_b >> 16);\\n }\\n\\n /// @notice Changes the endianness of a uint16\\n /// @param _b The unsigned integer to reverse\\n /// @return v The reversed value\\n function reverseUint16(uint16 _b) internal pure returns (uint16 v) {\\n v = (_b << 8) | (_b >> 8);\\n }\\n\\n\\n /// @notice Converts big-endian bytes to a uint\\n /// @dev Traverses the byte array and sums the bytes\\n /// @param _b The big-endian bytes-encoded integer\\n /// @return The integer representation\\n function bytesToUint(bytes memory _b) internal pure returns (uint256) {\\n uint256 _number;\\n\\n for (uint i = 0; i < _b.length; i++) {\\n _number = _number + uint8(_b[i]) * (2 ** (8 * (_b.length - (i + 1))));\\n }\\n\\n return _number;\\n }\\n\\n /// @notice Get the last _num bytes from a byte array\\n /// @param _b The byte array to slice\\n /// @param _num The number of bytes to extract from the end\\n /// @return The last _num bytes of _b\\n function lastBytes(bytes memory _b, uint256 _num) internal pure returns (bytes memory) {\\n uint256 _start = _b.length.sub(_num);\\n\\n return _b.slice(_start, _num);\\n }\\n\\n /// @notice Implements bitcoin's hash160 (rmd160(sha2()))\\n /// @dev abi.encodePacked changes the return to bytes instead of bytes32\\n /// @param _b The pre-image\\n /// @return The digest\\n function hash160(bytes memory _b) internal pure returns (bytes memory) {\\n return abi.encodePacked(ripemd160(abi.encodePacked(sha256(_b))));\\n }\\n\\n /// @notice Implements bitcoin's hash160 (sha2 + ripemd160)\\n /// @dev sha2 precompile at address(2), ripemd160 at address(3)\\n /// @param _b The pre-image\\n /// @return res The digest\\n function hash160View(bytes memory _b) internal view returns (bytes20 res) {\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n pop(staticcall(gas(), 2, add(_b, 32), mload(_b), 0x00, 32))\\n pop(staticcall(gas(), 3, 0x00, 32, 0x00, 32))\\n // read from position 12 = 0c\\n res := mload(0x0c)\\n }\\n }\\n\\n /// @notice Implements bitcoin's hash256 (double sha2)\\n /// @dev abi.encodePacked changes the return to bytes instead of bytes32\\n /// @param _b The pre-image\\n /// @return The digest\\n function hash256(bytes memory _b) internal pure returns (bytes32) {\\n return sha256(abi.encodePacked(sha256(_b)));\\n }\\n\\n /// @notice Implements bitcoin's hash256 (double sha2)\\n /// @dev sha2 is precompiled smart contract located at address(2)\\n /// @param _b The pre-image\\n /// @return res The digest\\n function hash256View(bytes memory _b) internal view returns (bytes32 res) {\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n pop(staticcall(gas(), 2, add(_b, 32), mload(_b), 0x00, 32))\\n pop(staticcall(gas(), 2, 0x00, 32, 0x00, 32))\\n res := mload(0x00)\\n }\\n }\\n\\n /// @notice Implements bitcoin's hash256 on a pair of bytes32\\n /// @dev sha2 is precompiled smart contract located at address(2)\\n /// @param _a The first bytes32 of the pre-image\\n /// @param _b The second bytes32 of the pre-image\\n /// @return res The digest\\n function hash256Pair(bytes32 _a, bytes32 _b) internal view returns (bytes32 res) {\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n mstore(0x00, _a)\\n mstore(0x20, _b)\\n pop(staticcall(gas(), 2, 0x00, 64, 0x00, 32))\\n pop(staticcall(gas(), 2, 0x00, 32, 0x00, 32))\\n res := mload(0x00)\\n }\\n }\\n\\n /// @notice Implements bitcoin's hash256 (double sha2)\\n /// @dev sha2 is precompiled smart contract located at address(2)\\n /// @param _b The array containing the pre-image\\n /// @param at The start of the pre-image\\n /// @param len The length of the pre-image\\n /// @return res The digest\\n function hash256Slice(\\n bytes memory _b,\\n uint256 at,\\n uint256 len\\n ) internal view returns (bytes32 res) {\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n pop(staticcall(gas(), 2, add(_b, add(32, at)), len, 0x00, 32))\\n pop(staticcall(gas(), 2, 0x00, 32, 0x00, 32))\\n res := mload(0x00)\\n }\\n }\\n\\n /* ************ */\\n /* Legacy Input */\\n /* ************ */\\n\\n /// @notice Extracts the nth input from the vin (0-indexed)\\n /// @dev Iterates over the vin. If you need to extract several, write a custom function\\n /// @param _vin The vin as a tightly-packed byte array\\n /// @param _index The 0-indexed location of the input to extract\\n /// @return The input as a byte array\\n function extractInputAtIndex(bytes memory _vin, uint256 _index) internal pure returns (bytes memory) {\\n uint256 _varIntDataLen;\\n uint256 _nIns;\\n\\n (_varIntDataLen, _nIns) = parseVarInt(_vin);\\n require(_varIntDataLen != ERR_BAD_ARG, \\\"Read overrun during VarInt parsing\\\");\\n require(_index < _nIns, \\\"Vin read overrun\\\");\\n\\n uint256 _len = 0;\\n uint256 _offset = 1 + _varIntDataLen;\\n\\n for (uint256 _i = 0; _i < _index; _i ++) {\\n _len = determineInputLengthAt(_vin, _offset);\\n require(_len != ERR_BAD_ARG, \\\"Bad VarInt in scriptSig\\\");\\n _offset = _offset + _len;\\n }\\n\\n _len = determineInputLengthAt(_vin, _offset);\\n require(_len != ERR_BAD_ARG, \\\"Bad VarInt in scriptSig\\\");\\n return _vin.slice(_offset, _len);\\n }\\n\\n /// @notice Determines whether an input is legacy\\n /// @dev False if no scriptSig, otherwise True\\n /// @param _input The input\\n /// @return True for legacy, False for witness\\n function isLegacyInput(bytes memory _input) internal pure returns (bool) {\\n return _input[36] != hex\\\"00\\\";\\n }\\n\\n /// @notice Determines the length of a scriptSig in an input\\n /// @dev Will return 0 if passed a witness input.\\n /// @param _input The LEGACY input\\n /// @return The length of the script sig\\n function extractScriptSigLen(bytes memory _input) internal pure returns (uint256, uint256) {\\n return extractScriptSigLenAt(_input, 0);\\n }\\n\\n /// @notice Determines the length of a scriptSig in an input\\n /// starting at the specified position\\n /// @dev Will return 0 if passed a witness input.\\n /// @param _input The byte array containing the LEGACY input\\n /// @param _at The position of the input in the array\\n /// @return The length of the script sig\\n function extractScriptSigLenAt(bytes memory _input, uint256 _at) internal pure returns (uint256, uint256) {\\n if (_input.length < 37 + _at) {\\n return (ERR_BAD_ARG, 0);\\n }\\n\\n uint256 _varIntDataLen;\\n uint256 _scriptSigLen;\\n (_varIntDataLen, _scriptSigLen) = parseVarIntAt(_input, _at + 36);\\n\\n return (_varIntDataLen, _scriptSigLen);\\n }\\n\\n /// @notice Determines the length of an input from its scriptSig\\n /// @dev 36 for outpoint, 1 for scriptSig length, 4 for sequence\\n /// @param _input The input\\n /// @return The length of the input in bytes\\n function determineInputLength(bytes memory _input) internal pure returns (uint256) {\\n return determineInputLengthAt(_input, 0);\\n }\\n\\n /// @notice Determines the length of an input from its scriptSig,\\n /// starting at the specified position\\n /// @dev 36 for outpoint, 1 for scriptSig length, 4 for sequence\\n /// @param _input The byte array containing the input\\n /// @param _at The position of the input in the array\\n /// @return The length of the input in bytes\\n function determineInputLengthAt(bytes memory _input, uint256 _at) internal pure returns (uint256) {\\n uint256 _varIntDataLen;\\n uint256 _scriptSigLen;\\n (_varIntDataLen, _scriptSigLen) = extractScriptSigLenAt(_input, _at);\\n if (_varIntDataLen == ERR_BAD_ARG) {\\n return ERR_BAD_ARG;\\n }\\n\\n return 36 + 1 + _varIntDataLen + _scriptSigLen + 4;\\n }\\n\\n /// @notice Extracts the LE sequence bytes from an input\\n /// @dev Sequence is used for relative time locks\\n /// @param _input The LEGACY input\\n /// @return The sequence bytes (LE uint)\\n function extractSequenceLELegacy(bytes memory _input) internal pure returns (bytes4) {\\n uint256 _varIntDataLen;\\n uint256 _scriptSigLen;\\n (_varIntDataLen, _scriptSigLen) = extractScriptSigLen(_input);\\n require(_varIntDataLen != ERR_BAD_ARG, \\\"Bad VarInt in scriptSig\\\");\\n return _input.slice4(36 + 1 + _varIntDataLen + _scriptSigLen);\\n }\\n\\n /// @notice Extracts the sequence from the input\\n /// @dev Sequence is a 4-byte little-endian number\\n /// @param _input The LEGACY input\\n /// @return The sequence number (big-endian uint)\\n function extractSequenceLegacy(bytes memory _input) internal pure returns (uint32) {\\n uint32 _leSeqence = uint32(extractSequenceLELegacy(_input));\\n uint32 _beSequence = reverseUint32(_leSeqence);\\n return _beSequence;\\n }\\n /// @notice Extracts the VarInt-prepended scriptSig from the input in a tx\\n /// @dev Will return hex\\\"00\\\" if passed a witness input\\n /// @param _input The LEGACY input\\n /// @return The length-prepended scriptSig\\n function extractScriptSig(bytes memory _input) internal pure returns (bytes memory) {\\n uint256 _varIntDataLen;\\n uint256 _scriptSigLen;\\n (_varIntDataLen, _scriptSigLen) = extractScriptSigLen(_input);\\n require(_varIntDataLen != ERR_BAD_ARG, \\\"Bad VarInt in scriptSig\\\");\\n return _input.slice(36, 1 + _varIntDataLen + _scriptSigLen);\\n }\\n\\n\\n /* ************* */\\n /* Witness Input */\\n /* ************* */\\n\\n /// @notice Extracts the LE sequence bytes from an input\\n /// @dev Sequence is used for relative time locks\\n /// @param _input The WITNESS input\\n /// @return The sequence bytes (LE uint)\\n function extractSequenceLEWitness(bytes memory _input) internal pure returns (bytes4) {\\n return _input.slice4(37);\\n }\\n\\n /// @notice Extracts the sequence from the input in a tx\\n /// @dev Sequence is a 4-byte little-endian number\\n /// @param _input The WITNESS input\\n /// @return The sequence number (big-endian uint)\\n function extractSequenceWitness(bytes memory _input) internal pure returns (uint32) {\\n uint32 _leSeqence = uint32(extractSequenceLEWitness(_input));\\n uint32 _inputeSequence = reverseUint32(_leSeqence);\\n return _inputeSequence;\\n }\\n\\n /// @notice Extracts the outpoint from the input in a tx\\n /// @dev 32-byte tx id with 4-byte index\\n /// @param _input The input\\n /// @return The outpoint (LE bytes of prev tx hash + LE bytes of prev tx index)\\n function extractOutpoint(bytes memory _input) internal pure returns (bytes memory) {\\n return _input.slice(0, 36);\\n }\\n\\n /// @notice Extracts the outpoint tx id from an input\\n /// @dev 32-byte tx id\\n /// @param _input The input\\n /// @return The tx id (little-endian bytes)\\n function extractInputTxIdLE(bytes memory _input) internal pure returns (bytes32) {\\n return _input.slice32(0);\\n }\\n\\n /// @notice Extracts the outpoint tx id from an input\\n /// starting at the specified position\\n /// @dev 32-byte tx id\\n /// @param _input The byte array containing the input\\n /// @param _at The position of the input\\n /// @return The tx id (little-endian bytes)\\n function extractInputTxIdLeAt(bytes memory _input, uint256 _at) internal pure returns (bytes32) {\\n return _input.slice32(_at);\\n }\\n\\n /// @notice Extracts the LE tx input index from the input in a tx\\n /// @dev 4-byte tx index\\n /// @param _input The input\\n /// @return The tx index (little-endian bytes)\\n function extractTxIndexLE(bytes memory _input) internal pure returns (bytes4) {\\n return _input.slice4(32);\\n }\\n\\n /// @notice Extracts the LE tx input index from the input in a tx\\n /// starting at the specified position\\n /// @dev 4-byte tx index\\n /// @param _input The byte array containing the input\\n /// @param _at The position of the input\\n /// @return The tx index (little-endian bytes)\\n function extractTxIndexLeAt(bytes memory _input, uint256 _at) internal pure returns (bytes4) {\\n return _input.slice4(32 + _at);\\n }\\n\\n /* ****** */\\n /* Output */\\n /* ****** */\\n\\n /// @notice Determines the length of an output\\n /// @dev Works with any properly formatted output\\n /// @param _output The output\\n /// @return The length indicated by the prefix, error if invalid length\\n function determineOutputLength(bytes memory _output) internal pure returns (uint256) {\\n return determineOutputLengthAt(_output, 0);\\n }\\n\\n /// @notice Determines the length of an output\\n /// starting at the specified position\\n /// @dev Works with any properly formatted output\\n /// @param _output The byte array containing the output\\n /// @param _at The position of the output\\n /// @return The length indicated by the prefix, error if invalid length\\n function determineOutputLengthAt(bytes memory _output, uint256 _at) internal pure returns (uint256) {\\n if (_output.length < 9 + _at) {\\n return ERR_BAD_ARG;\\n }\\n uint256 _varIntDataLen;\\n uint256 _scriptPubkeyLength;\\n (_varIntDataLen, _scriptPubkeyLength) = parseVarIntAt(_output, 8 + _at);\\n\\n if (_varIntDataLen == ERR_BAD_ARG) {\\n return ERR_BAD_ARG;\\n }\\n\\n // 8-byte value, 1-byte for tag itself\\n return 8 + 1 + _varIntDataLen + _scriptPubkeyLength;\\n }\\n\\n /// @notice Extracts the output at a given index in the TxOuts vector\\n /// @dev Iterates over the vout. If you need to extract multiple, write a custom function\\n /// @param _vout The _vout to extract from\\n /// @param _index The 0-indexed location of the output to extract\\n /// @return The specified output\\n function extractOutputAtIndex(bytes memory _vout, uint256 _index) internal pure returns (bytes memory) {\\n uint256 _varIntDataLen;\\n uint256 _nOuts;\\n\\n (_varIntDataLen, _nOuts) = parseVarInt(_vout);\\n require(_varIntDataLen != ERR_BAD_ARG, \\\"Read overrun during VarInt parsing\\\");\\n require(_index < _nOuts, \\\"Vout read overrun\\\");\\n\\n uint256 _len = 0;\\n uint256 _offset = 1 + _varIntDataLen;\\n\\n for (uint256 _i = 0; _i < _index; _i ++) {\\n _len = determineOutputLengthAt(_vout, _offset);\\n require(_len != ERR_BAD_ARG, \\\"Bad VarInt in scriptPubkey\\\");\\n _offset += _len;\\n }\\n\\n _len = determineOutputLengthAt(_vout, _offset);\\n require(_len != ERR_BAD_ARG, \\\"Bad VarInt in scriptPubkey\\\");\\n return _vout.slice(_offset, _len);\\n }\\n\\n /// @notice Extracts the value bytes from the output in a tx\\n /// @dev Value is an 8-byte little-endian number\\n /// @param _output The output\\n /// @return The output value as LE bytes\\n function extractValueLE(bytes memory _output) internal pure returns (bytes8) {\\n return _output.slice8(0);\\n }\\n\\n /// @notice Extracts the value from the output in a tx\\n /// @dev Value is an 8-byte little-endian number\\n /// @param _output The output\\n /// @return The output value\\n function extractValue(bytes memory _output) internal pure returns (uint64) {\\n uint64 _leValue = uint64(extractValueLE(_output));\\n uint64 _beValue = reverseUint64(_leValue);\\n return _beValue;\\n }\\n\\n /// @notice Extracts the value from the output in a tx\\n /// @dev Value is an 8-byte little-endian number\\n /// @param _output The byte array containing the output\\n /// @param _at The starting index of the output in the array\\n /// @return The output value\\n function extractValueAt(bytes memory _output, uint256 _at) internal pure returns (uint64) {\\n uint64 _leValue = uint64(_output.slice8(_at));\\n uint64 _beValue = reverseUint64(_leValue);\\n return _beValue;\\n }\\n\\n /// @notice Extracts the data from an op return output\\n /// @dev Returns hex\\\"\\\" if no data or not an op return\\n /// @param _output The output\\n /// @return Any data contained in the opreturn output, null if not an op return\\n function extractOpReturnData(bytes memory _output) internal pure returns (bytes memory) {\\n if (_output[9] != hex\\\"6a\\\") {\\n return hex\\\"\\\";\\n }\\n bytes1 _dataLen = _output[10];\\n return _output.slice(11, uint256(uint8(_dataLen)));\\n }\\n\\n /// @notice Extracts the hash from the output script\\n /// @dev Determines type by the length prefix and validates format\\n /// @param _output The output\\n /// @return The hash committed to by the pk_script, or null for errors\\n function extractHash(bytes memory _output) internal pure returns (bytes memory) {\\n return extractHashAt(_output, 8, _output.length - 8);\\n }\\n\\n /// @notice Extracts the hash from the output script\\n /// @dev Determines type by the length prefix and validates format\\n /// @param _output The byte array containing the output\\n /// @param _at The starting index of the output script in the array\\n /// (output start + 8)\\n /// @param _len The length of the output script\\n /// (output length - 8)\\n /// @return The hash committed to by the pk_script, or null for errors\\n function extractHashAt(\\n bytes memory _output,\\n uint256 _at,\\n uint256 _len\\n ) internal pure returns (bytes memory) {\\n uint8 _scriptLen = uint8(_output[_at]);\\n\\n // don't have to worry about overflow here.\\n // if _scriptLen + 1 overflows, then output length would have to be < 1\\n // for this check to pass. if it's < 1, then we errored when assigning\\n // _scriptLen\\n if (_scriptLen + 1 != _len) {\\n return hex\\\"\\\";\\n }\\n\\n if (uint8(_output[_at + 1]) == 0) {\\n if (_scriptLen < 2) {\\n return hex\\\"\\\";\\n }\\n uint256 _payloadLen = uint8(_output[_at + 2]);\\n // Check for maliciously formatted witness outputs.\\n // No need to worry about underflow as long b/c of the `< 2` check\\n if (_payloadLen != _scriptLen - 2 || (_payloadLen != 0x20 && _payloadLen != 0x14)) {\\n return hex\\\"\\\";\\n }\\n return _output.slice(_at + 3, _payloadLen);\\n } else {\\n bytes3 _tag = _output.slice3(_at);\\n // p2pkh\\n if (_tag == hex\\\"1976a9\\\") {\\n // Check for maliciously formatted p2pkh\\n // No need to worry about underflow, b/c of _scriptLen check\\n if (uint8(_output[_at + 3]) != 0x14 ||\\n _output.slice2(_at + _len - 2) != hex\\\"88ac\\\") {\\n return hex\\\"\\\";\\n }\\n return _output.slice(_at + 4, 20);\\n //p2sh\\n } else if (_tag == hex\\\"17a914\\\") {\\n // Check for maliciously formatted p2sh\\n // No need to worry about underflow, b/c of _scriptLen check\\n if (uint8(_output[_at + _len - 1]) != 0x87) {\\n return hex\\\"\\\";\\n }\\n return _output.slice(_at + 3, 20);\\n }\\n }\\n return hex\\\"\\\"; /* NB: will trigger on OPRETURN and any non-standard that doesn't overrun */\\n }\\n\\n /* ********** */\\n /* Witness TX */\\n /* ********** */\\n\\n\\n /// @notice Checks that the vin passed up is properly formatted\\n /// @dev Consider a vin with a valid vout in its scriptsig\\n /// @param _vin Raw bytes length-prefixed input vector\\n /// @return True if it represents a validly formatted vin\\n function validateVin(bytes memory _vin) internal pure returns (bool) {\\n uint256 _varIntDataLen;\\n uint256 _nIns;\\n\\n (_varIntDataLen, _nIns) = parseVarInt(_vin);\\n\\n // Not valid if it says there are too many or no inputs\\n if (_nIns == 0 || _varIntDataLen == ERR_BAD_ARG) {\\n return false;\\n }\\n\\n uint256 _offset = 1 + _varIntDataLen;\\n\\n for (uint256 i = 0; i < _nIns; i++) {\\n // If we're at the end, but still expect more\\n if (_offset >= _vin.length) {\\n return false;\\n }\\n\\n // Grab the next input and determine its length.\\n uint256 _nextLen = determineInputLengthAt(_vin, _offset);\\n if (_nextLen == ERR_BAD_ARG) {\\n return false;\\n }\\n\\n // Increase the offset by that much\\n _offset += _nextLen;\\n }\\n\\n // Returns false if we're not exactly at the end\\n return _offset == _vin.length;\\n }\\n\\n /// @notice Checks that the vout passed up is properly formatted\\n /// @dev Consider a vout with a valid scriptpubkey\\n /// @param _vout Raw bytes length-prefixed output vector\\n /// @return True if it represents a validly formatted vout\\n function validateVout(bytes memory _vout) internal pure returns (bool) {\\n uint256 _varIntDataLen;\\n uint256 _nOuts;\\n\\n (_varIntDataLen, _nOuts) = parseVarInt(_vout);\\n\\n // Not valid if it says there are too many or no outputs\\n if (_nOuts == 0 || _varIntDataLen == ERR_BAD_ARG) {\\n return false;\\n }\\n\\n uint256 _offset = 1 + _varIntDataLen;\\n\\n for (uint256 i = 0; i < _nOuts; i++) {\\n // If we're at the end, but still expect more\\n if (_offset >= _vout.length) {\\n return false;\\n }\\n\\n // Grab the next output and determine its length.\\n // Increase the offset by that much\\n uint256 _nextLen = determineOutputLengthAt(_vout, _offset);\\n if (_nextLen == ERR_BAD_ARG) {\\n return false;\\n }\\n\\n _offset += _nextLen;\\n }\\n\\n // Returns false if we're not exactly at the end\\n return _offset == _vout.length;\\n }\\n\\n\\n\\n /* ************ */\\n /* Block Header */\\n /* ************ */\\n\\n /// @notice Extracts the transaction merkle root from a block header\\n /// @dev Use verifyHash256Merkle to verify proofs with this root\\n /// @param _header The header\\n /// @return The merkle root (little-endian)\\n function extractMerkleRootLE(bytes memory _header) internal pure returns (bytes32) {\\n return _header.slice32(36);\\n }\\n\\n /// @notice Extracts the target from a block header\\n /// @dev Target is a 256-bit number encoded as a 3-byte mantissa and 1-byte exponent\\n /// @param _header The header\\n /// @return The target threshold\\n function extractTarget(bytes memory _header) internal pure returns (uint256) {\\n return extractTargetAt(_header, 0);\\n }\\n\\n /// @notice Extracts the target from a block header\\n /// @dev Target is a 256-bit number encoded as a 3-byte mantissa and 1-byte exponent\\n /// @param _header The array containing the header\\n /// @param at The start of the header\\n /// @return The target threshold\\n function extractTargetAt(bytes memory _header, uint256 at) internal pure returns (uint256) {\\n uint24 _m = uint24(_header.slice3(72 + at));\\n uint8 _e = uint8(_header[75 + at]);\\n uint256 _mantissa = uint256(reverseUint24(_m));\\n uint _exponent = _e - 3;\\n\\n return _mantissa * (256 ** _exponent);\\n }\\n\\n /// @notice Calculate difficulty from the difficulty 1 target and current target\\n /// @dev Difficulty 1 is 0x1d00ffff on mainnet and testnet\\n /// @dev Difficulty 1 is a 256-bit number encoded as a 3-byte mantissa and 1-byte exponent\\n /// @param _target The current target\\n /// @return The block difficulty (bdiff)\\n function calculateDifficulty(uint256 _target) internal pure returns (uint256) {\\n // Difficulty 1 calculated from 0x1d00ffff\\n return DIFF1_TARGET.div(_target);\\n }\\n\\n /// @notice Extracts the previous block's hash from a block header\\n /// @dev Block headers do NOT include block number :(\\n /// @param _header The header\\n /// @return The previous block's hash (little-endian)\\n function extractPrevBlockLE(bytes memory _header) internal pure returns (bytes32) {\\n return _header.slice32(4);\\n }\\n\\n /// @notice Extracts the previous block's hash from a block header\\n /// @dev Block headers do NOT include block number :(\\n /// @param _header The array containing the header\\n /// @param at The start of the header\\n /// @return The previous block's hash (little-endian)\\n function extractPrevBlockLEAt(\\n bytes memory _header,\\n uint256 at\\n ) internal pure returns (bytes32) {\\n return _header.slice32(4 + at);\\n }\\n\\n /// @notice Extracts the timestamp from a block header\\n /// @dev Time is not 100% reliable\\n /// @param _header The header\\n /// @return The timestamp (little-endian bytes)\\n function extractTimestampLE(bytes memory _header) internal pure returns (bytes4) {\\n return _header.slice4(68);\\n }\\n\\n /// @notice Extracts the timestamp from a block header\\n /// @dev Time is not 100% reliable\\n /// @param _header The header\\n /// @return The timestamp (uint)\\n function extractTimestamp(bytes memory _header) internal pure returns (uint32) {\\n return reverseUint32(uint32(extractTimestampLE(_header)));\\n }\\n\\n /// @notice Extracts the expected difficulty from a block header\\n /// @dev Does NOT verify the work\\n /// @param _header The header\\n /// @return The difficulty as an integer\\n function extractDifficulty(bytes memory _header) internal pure returns (uint256) {\\n return calculateDifficulty(extractTarget(_header));\\n }\\n\\n /// @notice Concatenates and hashes two inputs for merkle proving\\n /// @param _a The first hash\\n /// @param _b The second hash\\n /// @return The double-sha256 of the concatenated hashes\\n function _hash256MerkleStep(bytes memory _a, bytes memory _b) internal view returns (bytes32) {\\n return hash256View(abi.encodePacked(_a, _b));\\n }\\n\\n /// @notice Concatenates and hashes two inputs for merkle proving\\n /// @param _a The first hash\\n /// @param _b The second hash\\n /// @return The double-sha256 of the concatenated hashes\\n function _hash256MerkleStep(bytes32 _a, bytes32 _b) internal view returns (bytes32) {\\n return hash256Pair(_a, _b);\\n }\\n\\n\\n /// @notice Verifies a Bitcoin-style merkle tree\\n /// @dev Leaves are 0-indexed. Inefficient version.\\n /// @param _proof The proof. Tightly packed LE sha256 hashes. The last hash is the root\\n /// @param _index The index of the leaf\\n /// @return true if the proof is valid, else false\\n function verifyHash256Merkle(bytes memory _proof, uint _index) internal view returns (bool) {\\n // Not an even number of hashes\\n if (_proof.length % 32 != 0) {\\n return false;\\n }\\n\\n // Special case for coinbase-only blocks\\n if (_proof.length == 32) {\\n return true;\\n }\\n\\n // Should never occur\\n if (_proof.length == 64) {\\n return false;\\n }\\n\\n bytes32 _root = _proof.slice32(_proof.length - 32);\\n bytes32 _current = _proof.slice32(0);\\n bytes memory _tree = _proof.slice(32, _proof.length - 64);\\n\\n return verifyHash256Merkle(_current, _tree, _root, _index);\\n }\\n\\n /// @notice Verifies a Bitcoin-style merkle tree\\n /// @dev Leaves are 0-indexed. Efficient version.\\n /// @param _leaf The leaf of the proof. LE sha256 hash.\\n /// @param _tree The intermediate nodes in the proof.\\n /// Tightly packed LE sha256 hashes.\\n /// @param _root The root of the proof. LE sha256 hash.\\n /// @param _index The index of the leaf\\n /// @return true if the proof is valid, else false\\n function verifyHash256Merkle(\\n bytes32 _leaf,\\n bytes memory _tree,\\n bytes32 _root,\\n uint _index\\n ) internal view returns (bool) {\\n // Not an even number of hashes\\n if (_tree.length % 32 != 0) {\\n return false;\\n }\\n\\n // Should never occur\\n if (_tree.length == 0) {\\n return false;\\n }\\n\\n uint _idx = _index;\\n bytes32 _current = _leaf;\\n\\n // i moves in increments of 32\\n for (uint i = 0; i < _tree.length; i += 32) {\\n if (_idx % 2 == 1) {\\n _current = _hash256MerkleStep(_tree.slice32(i), _current);\\n } else {\\n _current = _hash256MerkleStep(_current, _tree.slice32(i));\\n }\\n _idx = _idx >> 1;\\n }\\n return _current == _root;\\n }\\n\\n /*\\n NB: https://github.com/bitcoin/bitcoin/blob/78dae8caccd82cfbfd76557f1fb7d7557c7b5edb/src/pow.cpp#L49-L72\\n NB: We get a full-bitlength target from this. For comparison with\\n header-encoded targets we need to mask it with the header target\\n e.g. (full & truncated) == truncated\\n */\\n /// @notice performs the bitcoin difficulty retarget\\n /// @dev implements the Bitcoin algorithm precisely\\n /// @param _previousTarget the target of the previous period\\n /// @param _firstTimestamp the timestamp of the first block in the difficulty period\\n /// @param _secondTimestamp the timestamp of the last block in the difficulty period\\n /// @return the new period's target threshold\\n function retargetAlgorithm(\\n uint256 _previousTarget,\\n uint256 _firstTimestamp,\\n uint256 _secondTimestamp\\n ) internal pure returns (uint256) {\\n uint256 _elapsedTime = _secondTimestamp.sub(_firstTimestamp);\\n\\n // Normalize ratio to factor of 4 if very long or very short\\n if (_elapsedTime < RETARGET_PERIOD.div(4)) {\\n _elapsedTime = RETARGET_PERIOD.div(4);\\n }\\n if (_elapsedTime > RETARGET_PERIOD.mul(4)) {\\n _elapsedTime = RETARGET_PERIOD.mul(4);\\n }\\n\\n /*\\n NB: high targets e.g. ffff0020 can cause overflows here\\n so we divide it by 256**2, then multiply by 256**2 later\\n we know the target is evenly divisible by 256**2, so this isn't an issue\\n */\\n\\n uint256 _adjusted = _previousTarget.div(65536).mul(_elapsedTime);\\n return _adjusted.div(RETARGET_PERIOD).mul(65536);\\n }\\n}\\n\",\"keccak256\":\"0x439eaa97e9239705f3d31e8d39dccbad32311f1f119e295d53c65e0ae3c5a5fc\"},\"@keep-network/bitcoin-spv-sol/contracts/BytesLib.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\n/*\\n\\nhttps://github.com/GNSPS/solidity-bytes-utils/\\n\\nThis is free and unencumbered software released into the public domain.\\n\\nAnyone is free to copy, modify, publish, use, compile, sell, or\\ndistribute this software, either in source code form or as a compiled\\nbinary, for any purpose, commercial or non-commercial, and by any\\nmeans.\\n\\nIn jurisdictions that recognize copyright laws, the author or authors\\nof this software dedicate any and all copyright interest in the\\nsoftware to the public domain. We make this dedication for the benefit\\nof the public at large and to the detriment of our heirs and\\nsuccessors. We intend this dedication to be an overt act of\\nrelinquishment in perpetuity of all present and future rights to this\\nsoftware under copyright law.\\n\\nTHE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND,\\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\\nOTHER DEALINGS IN THE SOFTWARE.\\n\\nFor more information, please refer to <https://unlicense.org>\\n*/\\n\\n\\n/** @title BytesLib **/\\n/** @author https://github.com/GNSPS **/\\n\\nlibrary BytesLib {\\n function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(0x40, and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n ))\\n }\\n\\n return tempBytes;\\n }\\n\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(\\n sc,\\n add(\\n and(\\n fslot,\\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00\\n ),\\n and(mload(mc), mask)\\n )\\n )\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let mlengthmod := mod(mlength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function slice(bytes memory _bytes, uint _start, uint _length) internal pure returns (bytes memory res) {\\n if (_length == 0) {\\n return hex\\\"\\\";\\n }\\n uint _end = _start + _length;\\n require(_end > _start && _bytes.length >= _end, \\\"Slice out of bounds\\\");\\n\\n assembly {\\n // Alloc bytes array with additional 32 bytes afterspace and assign it's size\\n res := mload(0x40)\\n mstore(0x40, add(add(res, 64), _length))\\n mstore(res, _length)\\n\\n // Compute distance between source and destination pointers\\n let diff := sub(res, add(_bytes, _start))\\n\\n for {\\n let src := add(add(_bytes, 32), _start)\\n let end := add(src, _length)\\n } lt(src, end) {\\n src := add(src, 32)\\n } {\\n mstore(add(src, diff), mload(src))\\n }\\n }\\n }\\n\\n /// @notice Take a slice of the byte array, overwriting the destination.\\n /// The length of the slice will equal the length of the destination array.\\n /// @dev Make sure the destination array has afterspace if required.\\n /// @param _bytes The source array\\n /// @param _dest The destination array.\\n /// @param _start The location to start in the source array.\\n function sliceInPlace(\\n bytes memory _bytes,\\n bytes memory _dest,\\n uint _start\\n ) internal pure {\\n uint _length = _dest.length;\\n uint _end = _start + _length;\\n require(_end > _start && _bytes.length >= _end, \\\"Slice out of bounds\\\");\\n\\n assembly {\\n for {\\n let src := add(add(_bytes, 32), _start)\\n let res := add(_dest, 32)\\n let end := add(src, _length)\\n } lt(src, end) {\\n src := add(src, 32)\\n res := add(res, 32)\\n } {\\n mstore(res, mload(src))\\n }\\n }\\n }\\n\\n // Static slice functions, no bounds checking\\n /// @notice take a 32-byte slice from the specified position\\n function slice32(bytes memory _bytes, uint _start) internal pure returns (bytes32 res) {\\n assembly {\\n res := mload(add(add(_bytes, 32), _start))\\n }\\n }\\n\\n /// @notice take a 20-byte slice from the specified position\\n function slice20(bytes memory _bytes, uint _start) internal pure returns (bytes20) {\\n return bytes20(slice32(_bytes, _start));\\n }\\n\\n /// @notice take a 8-byte slice from the specified position\\n function slice8(bytes memory _bytes, uint _start) internal pure returns (bytes8) {\\n return bytes8(slice32(_bytes, _start));\\n }\\n\\n /// @notice take a 4-byte slice from the specified position\\n function slice4(bytes memory _bytes, uint _start) internal pure returns (bytes4) {\\n return bytes4(slice32(_bytes, _start));\\n }\\n\\n /// @notice take a 3-byte slice from the specified position\\n function slice3(bytes memory _bytes, uint _start) internal pure returns (bytes3) {\\n return bytes3(slice32(_bytes, _start));\\n }\\n\\n /// @notice take a 2-byte slice from the specified position\\n function slice2(bytes memory _bytes, uint _start) internal pure returns (bytes2) {\\n return bytes2(slice32(_bytes, _start));\\n }\\n\\n function toAddress(bytes memory _bytes, uint _start) internal pure returns (address) {\\n uint _totalLen = _start + 20;\\n require(_totalLen > _start && _bytes.length >= _totalLen, \\\"Address conversion out of bounds.\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint(bytes memory _bytes, uint _start) internal pure returns (uint256) {\\n uint _totalLen = _start + 32;\\n require(_totalLen > _start && _bytes.length >= _totalLen, \\\"Uint conversion out of bounds.\\\");\\n uint256 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint(mc < end) + cb == 2)\\n for {} eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function toBytes32(bytes memory _source) pure internal returns (bytes32 result) {\\n if (_source.length == 0) {\\n return 0x0;\\n }\\n\\n assembly {\\n result := mload(add(_source, 32))\\n }\\n }\\n\\n function keccak256Slice(bytes memory _bytes, uint _start, uint _length) pure internal returns (bytes32 result) {\\n uint _end = _start + _length;\\n require(_end > _start && _bytes.length >= _end, \\\"Slice out of bounds\\\");\\n\\n assembly {\\n result := keccak256(add(add(_bytes, 32), _start), _length)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x43e0f3b3b23c861bd031588bf410dfdd02e2af17941a89aa38d70e534e0380d1\"},\"@keep-network/bitcoin-spv-sol/contracts/SafeMath.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\n/*\\nThe MIT License (MIT)\\n\\nCopyright (c) 2016 Smart Contract Solutions, Inc.\\n\\nPermission is hereby granted, free of charge, to any person obtaining\\na copy of this software and associated documentation files (the\\n\\\"Software\\\"), to deal in the Software without restriction, including\\nwithout limitation the rights to use, copy, modify, merge, publish,\\ndistribute, sublicense, and/or sell copies of the Software, and to\\npermit persons to whom the Software is furnished to do so, subject to\\nthe following conditions:\\n\\nThe above copyright notice and this permission notice shall be included\\nin all copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n*/\\n\\n\\n/**\\n * @title SafeMath\\n * @dev Math operations with safety checks that throw on error\\n */\\nlibrary SafeMath {\\n\\n /**\\n * @dev Multiplies two numbers, throws on overflow.\\n */\\n function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {\\n // Gas optimization: this is cheaper than asserting 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\\n if (_a == 0) {\\n return 0;\\n }\\n\\n c = _a * _b;\\n require(c / _a == _b, \\\"Overflow during multiplication.\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Integer division of two numbers, truncating the quotient.\\n */\\n function div(uint256 _a, uint256 _b) internal pure returns (uint256) {\\n // assert(_b > 0); // Solidity automatically throws when dividing by 0\\n // uint256 c = _a / _b;\\n // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold\\n return _a / _b;\\n }\\n\\n /**\\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {\\n require(_b <= _a, \\\"Underflow during subtraction.\\\");\\n return _a - _b;\\n }\\n\\n /**\\n * @dev Adds two numbers, throws on overflow.\\n */\\n function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {\\n c = _a + _b;\\n require(c >= _a, \\\"Overflow during addition.\\\");\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0x35930d982394c7ffde439b82e5e696c5b21a6f09699d44861dfe409ef64084a3\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"contracts/integrator/AbstractTBTCDepositor.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n\\npragma solidity ^0.8.0;\\n\\nimport {BTCUtils} from \\\"@keep-network/bitcoin-spv-sol/contracts/BTCUtils.sol\\\";\\n\\nimport \\\"./IBridge.sol\\\";\\nimport \\\"./ITBTCVault.sol\\\";\\n\\n/// @title Abstract AbstractTBTCDepositor contract.\\n/// @notice This abstract contract is meant to facilitate integration of protocols\\n/// aiming to use tBTC as an underlying Bitcoin bridge.\\n///\\n/// Such an integrator is supposed to:\\n/// - Create a child contract inheriting from this abstract contract\\n/// - Call the `__AbstractTBTCDepositor_initialize` initializer function\\n/// - Use the `_initializeDeposit` and `_finalizeDeposit` as part of their\\n/// business logic in order to initialize and finalize deposits.\\n///\\n/// @dev Example usage:\\n/// ```\\n/// // Example upgradeable integrator contract.\\n/// contract ExampleTBTCIntegrator is AbstractTBTCDepositor, Initializable {\\n/// /// @custom:oz-upgrades-unsafe-allow constructor\\n/// constructor() {\\n/// // Prevents the contract from being initialized again.\\n/// _disableInitializers();\\n/// }\\n///\\n/// function initialize(\\n/// address _bridge,\\n/// address _tbtcVault\\n/// ) external initializer {\\n/// __AbstractTBTCDepositor_initialize(_bridge, _tbtcVault);\\n/// }\\n///\\n/// function startProcess(\\n/// IBridgeTypes.BitcoinTxInfo calldata fundingTx,\\n/// IBridgeTypes.DepositRevealInfo calldata reveal\\n/// ) external {\\n/// // Embed necessary context as extra data.\\n/// bytes32 extraData = ...;\\n///\\n/// uint256 depositKey = _initializeDeposit(\\n/// fundingTx,\\n/// reveal,\\n/// extraData\\n/// );\\n///\\n/// // Use the depositKey to track the process.\\n/// }\\n///\\n/// function finalizeProcess(uint256 depositKey) external {\\n/// // Ensure the function cannot be called for the same deposit\\n/// // twice.\\n///\\n/// (\\n/// uint256 initialDepositAmount,\\n/// uint256 tbtcAmount,\\n/// bytes32 extraData\\n/// ) = _finalizeDeposit(depositKey);\\n///\\n/// // Do something with the minted TBTC using context\\n/// // embedded in the extraData.\\n/// }\\n/// }\\nabstract contract AbstractTBTCDepositor {\\n using BTCUtils for bytes;\\n\\n /// @notice Multiplier to convert satoshi to TBTC token units.\\n uint256 public constant SATOSHI_MULTIPLIER = 10**10;\\n\\n /// @notice Bridge contract address.\\n IBridge public bridge;\\n /// @notice TBTCVault contract address.\\n ITBTCVault public tbtcVault;\\n\\n // Reserved storage space that allows adding more variables without affecting\\n // the storage layout of the child contracts. The convention from OpenZeppelin\\n // suggests the storage space should add up to 50 slots. If more variables are\\n // added in the upcoming versions one need to reduce the array size accordingly.\\n // See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n // slither-disable-next-line unused-state\\n uint256[47] private __gap;\\n\\n /// @notice Initializes the contract. MUST BE CALLED from the child\\n /// contract initializer.\\n // slither-disable-next-line dead-code\\n function __AbstractTBTCDepositor_initialize(\\n address _bridge,\\n address _tbtcVault\\n ) internal {\\n require(\\n address(bridge) == address(0) && address(tbtcVault) == address(0),\\n \\\"AbstractTBTCDepositor already initialized\\\"\\n );\\n\\n require(_bridge != address(0), \\\"Bridge address cannot be zero\\\");\\n require(_tbtcVault != address(0), \\\"TBTCVault address cannot be zero\\\");\\n\\n bridge = IBridge(_bridge);\\n tbtcVault = ITBTCVault(_tbtcVault);\\n }\\n\\n /// @notice Initializes a deposit by revealing it to the Bridge.\\n /// @param fundingTx Bitcoin funding transaction data, see `IBridgeTypes.BitcoinTxInfo`.\\n /// @param reveal Deposit reveal data, see `IBridgeTypes.DepositRevealInfo` struct.\\n /// @param extraData 32-byte deposit extra data.\\n /// @return depositKey Deposit key computed as\\n /// `keccak256(fundingTxHash | reveal.fundingOutputIndex)`. This\\n /// key can be used to refer to the deposit in the Bridge and\\n /// TBTCVault contracts.\\n /// @dev Requirements:\\n /// - The revealed vault address must match the TBTCVault address,\\n /// - All requirements from {Bridge#revealDepositWithExtraData}\\n /// function must be met.\\n /// @dev This function doesn't validate if a deposit has been initialized before,\\n /// as the Bridge won't allow the same deposit to be revealed twice.\\n // slither-disable-next-line dead-code\\n function _initializeDeposit(\\n IBridgeTypes.BitcoinTxInfo calldata fundingTx,\\n IBridgeTypes.DepositRevealInfo calldata reveal,\\n bytes32 extraData\\n ) internal returns (uint256) {\\n require(reveal.vault == address(tbtcVault), \\\"Vault address mismatch\\\");\\n\\n uint256 depositKey = _calculateDepositKey(\\n _calculateBitcoinTxHash(fundingTx),\\n reveal.fundingOutputIndex\\n );\\n\\n // The Bridge does not allow to reveal the same deposit twice and\\n // revealed deposits stay there forever. The transaction will revert\\n // if the deposit has already been revealed so, there is no need to do\\n // an explicit check here.\\n bridge.revealDepositWithExtraData(fundingTx, reveal, extraData);\\n\\n return depositKey;\\n }\\n\\n /// @notice Finalizes a deposit by calculating the amount of TBTC minted\\n /// for the deposit.\\n /// @param depositKey Deposit key identifying the deposit.\\n /// @return initialDepositAmount Amount of funding transaction deposit. In\\n /// TBTC token decimals precision.\\n /// @return tbtcAmount Approximate amount of TBTC minted for the deposit. In\\n /// TBTC token decimals precision.\\n /// @return extraData 32-byte deposit extra data.\\n /// @dev Requirements:\\n /// - The deposit must be initialized but not finalized\\n /// (in the context of this contract) yet.\\n /// - The deposit must be finalized on the Bridge side. That means the\\n /// deposit must be either swept or optimistically minted.\\n /// @dev THIS FUNCTION DOESN'T VALIDATE IF A DEPOSIT HAS BEEN FINALIZED BEFORE,\\n /// IT IS A RESPONSIBILITY OF THE IMPLEMENTING CONTRACT TO ENSURE THIS\\n /// FUNCTION WON'T BE CALLED TWICE FOR THE SAME DEPOSIT.\\n /// @dev IMPORTANT NOTE: The tbtcAmount returned by this function is an\\n /// approximation. See documentation of the `calculateTbtcAmount`\\n /// responsible for calculating this value for more details.\\n // slither-disable-next-line dead-code\\n function _finalizeDeposit(uint256 depositKey)\\n internal\\n returns (\\n uint256 initialDepositAmount,\\n uint256 tbtcAmount,\\n bytes32 extraData\\n )\\n {\\n IBridgeTypes.DepositRequest memory deposit = bridge.deposits(\\n depositKey\\n );\\n require(deposit.revealedAt != 0, \\\"Deposit not initialized\\\");\\n\\n (, uint64 finalizedAt) = tbtcVault.optimisticMintingRequests(\\n depositKey\\n );\\n\\n require(\\n deposit.sweptAt != 0 || finalizedAt != 0,\\n \\\"Deposit not finalized by the bridge\\\"\\n );\\n\\n initialDepositAmount = deposit.amount * SATOSHI_MULTIPLIER;\\n\\n tbtcAmount = _calculateTbtcAmount(deposit.amount, deposit.treasuryFee);\\n\\n extraData = deposit.extraData;\\n }\\n\\n /// @notice Calculates the amount of TBTC minted for the deposit.\\n /// @param depositAmountSat Deposit amount in satoshi (1e8 precision).\\n /// This is the actual amount deposited by the deposit creator, i.e.\\n /// the gross amount the Bridge's fees are cut from.\\n /// @param depositTreasuryFeeSat Deposit treasury fee in satoshi (1e8 precision).\\n /// This is an accurate value of the treasury fee that was actually\\n /// cut upon minting.\\n /// @return tbtcAmount Approximate amount of TBTC minted for the deposit.\\n /// @dev IMPORTANT NOTE: The tbtcAmount returned by this function may\\n /// not correspond to the actual amount of TBTC minted for the deposit.\\n /// Although the treasury fee cut upon minting is known precisely,\\n /// this is not the case for the optimistic minting fee and the Bitcoin\\n /// transaction fee. To overcome that problem, this function just takes\\n /// the current maximum allowed values of both fees, at the moment of deposit\\n /// finalization. For the great majority of the deposits, such an\\n /// algorithm will return a tbtcAmount slightly lesser than the\\n /// actual amount of TBTC minted for the deposit. This will cause\\n /// some TBTC to be left in the contract and ensure there is enough\\n /// liquidity to finalize the deposit. However, in some rare cases,\\n /// where the actual values of those fees change between the deposit\\n /// minting and finalization, the tbtcAmount returned by this function\\n /// may be greater than the actual amount of TBTC minted for the deposit.\\n /// If this happens and the reserve coming from previous deposits\\n /// leftovers does not provide enough liquidity, the deposit will have\\n /// to wait for finalization until the reserve is refilled by subsequent\\n /// deposits or a manual top-up. The integrator is responsible for\\n /// handling such cases.\\n // slither-disable-next-line dead-code\\n function _calculateTbtcAmount(\\n uint64 depositAmountSat,\\n uint64 depositTreasuryFeeSat\\n ) internal view virtual returns (uint256) {\\n // Both deposit amount and treasury fee are in the 1e8 satoshi precision.\\n // We need to convert them to the 1e18 TBTC precision.\\n uint256 amountSubTreasury = (depositAmountSat - depositTreasuryFeeSat) *\\n SATOSHI_MULTIPLIER;\\n\\n uint256 omFeeDivisor = tbtcVault.optimisticMintingFeeDivisor();\\n uint256 omFee = omFeeDivisor > 0\\n ? (amountSubTreasury / omFeeDivisor)\\n : 0;\\n\\n // The deposit transaction max fee is in the 1e8 satoshi precision.\\n // We need to convert them to the 1e18 TBTC precision.\\n (, , uint64 depositTxMaxFee, ) = bridge.depositParameters();\\n uint256 txMaxFee = depositTxMaxFee * SATOSHI_MULTIPLIER;\\n\\n return amountSubTreasury - omFee - txMaxFee;\\n }\\n\\n /// @notice Calculates the deposit key for the given funding transaction\\n /// hash and funding output index.\\n /// @param fundingTxHash Funding transaction hash.\\n /// @param fundingOutputIndex Funding output index.\\n /// @return depositKey Deposit key computed as\\n /// `keccak256(fundingTxHash | reveal.fundingOutputIndex)`. This\\n /// key can be used to refer to the deposit in the Bridge and\\n /// TBTCVault contracts.\\n // slither-disable-next-line dead-code\\n function _calculateDepositKey(\\n bytes32 fundingTxHash,\\n uint32 fundingOutputIndex\\n ) internal pure returns (uint256) {\\n return\\n uint256(\\n keccak256(abi.encodePacked(fundingTxHash, fundingOutputIndex))\\n );\\n }\\n\\n /// @notice Calculates the Bitcoin transaction hash for the given Bitcoin\\n /// transaction data.\\n /// @param txInfo Bitcoin transaction data, see `IBridgeTypes.BitcoinTxInfo` struct.\\n /// @return txHash Bitcoin transaction hash.\\n // slither-disable-next-line dead-code\\n function _calculateBitcoinTxHash(IBridgeTypes.BitcoinTxInfo calldata txInfo)\\n internal\\n view\\n returns (bytes32)\\n {\\n return\\n abi\\n .encodePacked(\\n txInfo.version,\\n txInfo.inputVector,\\n txInfo.outputVector,\\n txInfo.locktime\\n )\\n .hash256View();\\n }\\n}\\n\",\"keccak256\":\"0x9092454b9143f1fc2bc45faad9dec83126a0a54c743ded48a6dfb0b260fef58d\",\"license\":\"GPL-3.0-only\"},\"contracts/integrator/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n\\npragma solidity ^0.8.0;\\n\\n/// @notice Namespace which groups all types relevant to the IBridge interface.\\n/// @dev This is a mirror of the real types used in the Bridge contract.\\n/// This way, the `integrator` subpackage does not need to import\\n/// anything from the `bridge` subpackage and explicitly depend on it.\\n/// This simplifies the dependency graph for integrators.\\nlibrary IBridgeTypes {\\n /// @dev See bridge/BitcoinTx.sol#Info\\n struct BitcoinTxInfo {\\n bytes4 version;\\n bytes inputVector;\\n bytes outputVector;\\n bytes4 locktime;\\n }\\n\\n /// @dev See bridge/Deposit.sol#DepositRevealInfo\\n struct DepositRevealInfo {\\n uint32 fundingOutputIndex;\\n bytes8 blindingFactor;\\n bytes20 walletPubKeyHash;\\n bytes20 refundPubKeyHash;\\n bytes4 refundLocktime;\\n address vault;\\n }\\n\\n /// @dev See bridge/Deposit.sol#DepositRequest\\n struct DepositRequest {\\n address depositor;\\n uint64 amount;\\n uint32 revealedAt;\\n address vault;\\n uint64 treasuryFee;\\n uint32 sweptAt;\\n bytes32 extraData;\\n }\\n}\\n\\n/// @notice Interface of the Bridge contract.\\n/// @dev See bridge/Bridge.sol\\ninterface IBridge {\\n /// @dev See {Bridge#revealDepositWithExtraData}\\n function revealDepositWithExtraData(\\n IBridgeTypes.BitcoinTxInfo calldata fundingTx,\\n IBridgeTypes.DepositRevealInfo calldata reveal,\\n bytes32 extraData\\n ) external;\\n\\n /// @dev See {Bridge#deposits}\\n function deposits(uint256 depositKey)\\n external\\n view\\n returns (IBridgeTypes.DepositRequest memory);\\n\\n /// @dev See {Bridge#depositParameters}\\n function depositParameters()\\n external\\n view\\n returns (\\n uint64 depositDustThreshold,\\n uint64 depositTreasuryFeeDivisor,\\n uint64 depositTxMaxFee,\\n uint32 depositRevealAheadPeriod\\n );\\n}\\n\",\"keccak256\":\"0x4e598d96404a19609f511f10503e80f457602ad694d081df739571f67f6e0c4e\",\"license\":\"GPL-3.0-only\"},\"contracts/integrator/ITBTCVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n\\npragma solidity ^0.8.0;\\n\\n/// @notice Interface of the TBTCVault contract.\\n/// @dev See vault/TBTCVault.sol\\ninterface ITBTCVault {\\n /// @dev See {TBTCVault#optimisticMintingRequests}\\n function optimisticMintingRequests(uint256 depositKey)\\n external\\n returns (uint64 requestedAt, uint64 finalizedAt);\\n\\n /// @dev See {TBTCVault#optimisticMintingFeeDivisor}\\n function optimisticMintingFeeDivisor() external view returns (uint32);\\n}\\n\",\"keccak256\":\"0xf259d64c1040e2cbc3d17653491e45c5c3da17f575dac1c175c63c8a5308908e\",\"license\":\"GPL-3.0-only\"},\"contracts/test/TestTBTCDepositor.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity ^0.8.0;\\n\\nimport {BTCUtils} from \\\"@keep-network/bitcoin-spv-sol/contracts/BTCUtils.sol\\\";\\n\\nimport \\\"../integrator/AbstractTBTCDepositor.sol\\\";\\nimport \\\"../integrator/IBridge.sol\\\";\\nimport \\\"../integrator/ITBTCVault.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ncontract TestTBTCDepositor is AbstractTBTCDepositor {\\n event InitializeDepositReturned(uint256 depositKey);\\n\\n event FinalizeDepositReturned(\\n uint256 initialDepositAmount,\\n uint256 tbtcAmount,\\n bytes32 extraData\\n );\\n\\n function initialize(address _bridge, address _tbtcVault) external {\\n __AbstractTBTCDepositor_initialize(_bridge, _tbtcVault);\\n }\\n\\n function initializeDepositPublic(\\n IBridgeTypes.BitcoinTxInfo calldata fundingTx,\\n IBridgeTypes.DepositRevealInfo calldata reveal,\\n bytes32 extraData\\n ) external {\\n uint256 depositKey = _initializeDeposit(fundingTx, reveal, extraData);\\n emit InitializeDepositReturned(depositKey);\\n }\\n\\n function finalizeDepositPublic(uint256 depositKey) external {\\n (\\n uint256 initialDepositAmount,\\n uint256 tbtcAmount,\\n bytes32 extraData\\n ) = _finalizeDeposit(depositKey);\\n emit FinalizeDepositReturned(\\n initialDepositAmount,\\n tbtcAmount,\\n extraData\\n );\\n }\\n\\n function calculateTbtcAmountPublic(\\n uint64 depositAmountSat,\\n uint64 depositTreasuryFeeSat\\n ) external view returns (uint256) {\\n return _calculateTbtcAmount(depositAmountSat, depositTreasuryFeeSat);\\n }\\n}\\n\\ncontract MockBridge is IBridge {\\n using BTCUtils for bytes;\\n\\n mapping(uint256 => IBridgeTypes.DepositRequest) internal _deposits;\\n\\n uint64 internal _depositTreasuryFeeDivisor = 50; // 1/50 == 100 bps == 2% == 0.02\\n uint64 internal _depositTxMaxFee = 1000; // 1000 satoshi = 0.00001 BTC\\n\\n event DepositRevealed(uint256 depositKey);\\n\\n function revealDepositWithExtraData(\\n IBridgeTypes.BitcoinTxInfo calldata fundingTx,\\n IBridgeTypes.DepositRevealInfo calldata reveal,\\n bytes32 extraData\\n ) external {\\n bytes32 fundingTxHash = abi\\n .encodePacked(\\n fundingTx.version,\\n fundingTx.inputVector,\\n fundingTx.outputVector,\\n fundingTx.locktime\\n )\\n .hash256View();\\n\\n uint256 depositKey = uint256(\\n keccak256(\\n abi.encodePacked(fundingTxHash, reveal.fundingOutputIndex)\\n )\\n );\\n\\n require(\\n _deposits[depositKey].revealedAt == 0,\\n \\\"Deposit already revealed\\\"\\n );\\n\\n bytes memory fundingOutput = fundingTx\\n .outputVector\\n .extractOutputAtIndex(reveal.fundingOutputIndex);\\n\\n uint64 fundingOutputAmount = fundingOutput.extractValue();\\n\\n IBridgeTypes.DepositRequest memory request;\\n\\n request.depositor = msg.sender;\\n request.amount = fundingOutputAmount;\\n /* solhint-disable-next-line not-rely-on-time */\\n request.revealedAt = uint32(block.timestamp);\\n request.vault = reveal.vault;\\n request.treasuryFee = _depositTreasuryFeeDivisor > 0\\n ? fundingOutputAmount / _depositTreasuryFeeDivisor\\n : 0;\\n request.sweptAt = 0;\\n request.extraData = extraData;\\n\\n _deposits[depositKey] = request;\\n\\n emit DepositRevealed(depositKey);\\n }\\n\\n function sweepDeposit(uint256 depositKey) public {\\n require(_deposits[depositKey].revealedAt != 0, \\\"Deposit not revealed\\\");\\n require(_deposits[depositKey].sweptAt == 0, \\\"Deposit already swept\\\");\\n /* solhint-disable-next-line not-rely-on-time */\\n _deposits[depositKey].sweptAt = uint32(block.timestamp);\\n }\\n\\n function deposits(uint256 depositKey)\\n external\\n view\\n returns (IBridgeTypes.DepositRequest memory)\\n {\\n return _deposits[depositKey];\\n }\\n\\n function depositParameters()\\n external\\n view\\n returns (\\n uint64 depositDustThreshold,\\n uint64 depositTreasuryFeeDivisor,\\n uint64 depositTxMaxFee,\\n uint32 depositRevealAheadPeriod\\n )\\n {\\n depositDustThreshold = 0;\\n depositTreasuryFeeDivisor = 0;\\n depositTxMaxFee = _depositTxMaxFee;\\n depositRevealAheadPeriod = 0;\\n }\\n\\n function setDepositTreasuryFeeDivisor(uint64 value) external {\\n _depositTreasuryFeeDivisor = value;\\n }\\n\\n function setDepositTxMaxFee(uint64 value) external {\\n _depositTxMaxFee = value;\\n }\\n}\\n\\ncontract MockTBTCVault is ITBTCVault {\\n struct Request {\\n uint64 requestedAt;\\n uint64 finalizedAt;\\n }\\n\\n mapping(uint256 => Request) internal _requests;\\n\\n uint32 public optimisticMintingFeeDivisor = 100; // 1%\\n\\n function optimisticMintingRequests(uint256 depositKey)\\n external\\n returns (uint64 requestedAt, uint64 finalizedAt)\\n {\\n Request memory request = _requests[depositKey];\\n return (request.requestedAt, request.finalizedAt);\\n }\\n\\n /// @dev The function is virtual to allow other projects using this mock\\n /// for AbtractTBTCDepositor-based contract tests to add any custom\\n /// logic needed.\\n function createOptimisticMintingRequest(uint256 depositKey) public virtual {\\n require(\\n _requests[depositKey].requestedAt == 0,\\n \\\"Request already exists\\\"\\n );\\n /* solhint-disable-next-line not-rely-on-time */\\n _requests[depositKey].requestedAt = uint64(block.timestamp);\\n }\\n\\n /// @dev The function is virtual to allow other projects using this mock\\n /// for AbtractTBTCDepositor-based contract tests to add any custom\\n /// logic needed.\\n function finalizeOptimisticMintingRequest(uint256 depositKey)\\n public\\n virtual\\n {\\n require(\\n _requests[depositKey].requestedAt != 0,\\n \\\"Request does not exist\\\"\\n );\\n require(\\n _requests[depositKey].finalizedAt == 0,\\n \\\"Request already finalized\\\"\\n );\\n /* solhint-disable-next-line not-rely-on-time */\\n _requests[depositKey].finalizedAt = uint64(block.timestamp);\\n }\\n\\n function setOptimisticMintingFeeDivisor(uint32 value) external {\\n optimisticMintingFeeDivisor = value;\\n }\\n}\\n\",\"keccak256\":\"0x7eebb43774f325970d250ceb9e11c6f9f8996b9f2f8f5e3d529f9c5fb94e572f\",\"license\":\"GPL-3.0-only\"}},\"version\":1}",
|
|
10594
|
+
"metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialDepositAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tbtcAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"extraData\",\"type\":\"bytes32\"}],\"name\":\"FinalizeDepositReturned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"depositKey\",\"type\":\"uint256\"}],\"name\":\"InitializeDepositReturned\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SATOSHI_MULTIPLIER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"depositAmountSat\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositTreasuryFeeSat\",\"type\":\"uint64\"}],\"name\":\"calculateTbtcAmountPublic\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"depositKey\",\"type\":\"uint256\"}],\"name\":\"finalizeDepositPublic\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tbtcVault\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes4\",\"name\":\"version\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"inputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"outputVector\",\"type\":\"bytes\"},{\"internalType\":\"bytes4\",\"name\":\"locktime\",\"type\":\"bytes4\"}],\"internalType\":\"struct IBridgeTypes.BitcoinTxInfo\",\"name\":\"fundingTx\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fundingOutputIndex\",\"type\":\"uint32\"},{\"internalType\":\"bytes8\",\"name\":\"blindingFactor\",\"type\":\"bytes8\"},{\"internalType\":\"bytes20\",\"name\":\"walletPubKeyHash\",\"type\":\"bytes20\"},{\"internalType\":\"bytes20\",\"name\":\"refundPubKeyHash\",\"type\":\"bytes20\"},{\"internalType\":\"bytes4\",\"name\":\"refundLocktime\",\"type\":\"bytes4\"},{\"internalType\":\"address\",\"name\":\"vault\",\"type\":\"address\"}],\"internalType\":\"struct IBridgeTypes.DepositRevealInfo\",\"name\":\"reveal\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"extraData\",\"type\":\"bytes32\"}],\"name\":\"initializeDepositPublic\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tbtcVault\",\"outputs\":[{\"internalType\":\"contract ITBTCVault\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"SATOSHI_MULTIPLIER()\":{\"notice\":\"Multiplier to convert satoshi to TBTC token units.\"},\"bridge()\":{\"notice\":\"Bridge contract address.\"},\"tbtcVault()\":{\"notice\":\"TBTCVault contract address.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/test/TestTBTCDepositor.sol\":\"TestTBTCDepositor\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[]},\"sources\":{\"@keep-network/bitcoin-spv-sol/contracts/BTCUtils.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\n/** @title BitcoinSPV */\\n/** @author Summa (https://summa.one) */\\n\\nimport {BytesLib} from \\\"./BytesLib.sol\\\";\\nimport {SafeMath} from \\\"./SafeMath.sol\\\";\\n\\nlibrary BTCUtils {\\n using BytesLib for bytes;\\n using SafeMath for uint256;\\n\\n // The target at minimum Difficulty. Also the target of the genesis block\\n uint256 public constant DIFF1_TARGET = 0xffff0000000000000000000000000000000000000000000000000000;\\n\\n uint256 public constant RETARGET_PERIOD = 2 * 7 * 24 * 60 * 60; // 2 weeks in seconds\\n uint256 public constant RETARGET_PERIOD_BLOCKS = 2016; // 2 weeks in blocks\\n\\n uint256 public constant ERR_BAD_ARG = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\\n\\n /* ***** */\\n /* UTILS */\\n /* ***** */\\n\\n /// @notice Determines the length of a VarInt in bytes\\n /// @dev A VarInt of >1 byte is prefixed with a flag indicating its length\\n /// @param _flag The first byte of a VarInt\\n /// @return The number of non-flag bytes in the VarInt\\n function determineVarIntDataLength(bytes memory _flag) internal pure returns (uint8) {\\n return determineVarIntDataLengthAt(_flag, 0);\\n }\\n\\n /// @notice Determines the length of a VarInt in bytes\\n /// @dev A VarInt of >1 byte is prefixed with a flag indicating its length\\n /// @param _b The byte array containing a VarInt\\n /// @param _at The position of the VarInt in the array\\n /// @return The number of non-flag bytes in the VarInt\\n function determineVarIntDataLengthAt(bytes memory _b, uint256 _at) internal pure returns (uint8) {\\n if (uint8(_b[_at]) == 0xff) {\\n return 8; // one-byte flag, 8 bytes data\\n }\\n if (uint8(_b[_at]) == 0xfe) {\\n return 4; // one-byte flag, 4 bytes data\\n }\\n if (uint8(_b[_at]) == 0xfd) {\\n return 2; // one-byte flag, 2 bytes data\\n }\\n\\n return 0; // flag is data\\n }\\n\\n /// @notice Parse a VarInt into its data length and the number it represents\\n /// @dev Useful for Parsing Vins and Vouts. Returns ERR_BAD_ARG if insufficient bytes.\\n /// Caller SHOULD explicitly handle this case (or bubble it up)\\n /// @param _b A byte-string starting with a VarInt\\n /// @return number of bytes in the encoding (not counting the tag), the encoded int\\n function parseVarInt(bytes memory _b) internal pure returns (uint256, uint256) {\\n return parseVarIntAt(_b, 0);\\n }\\n\\n /// @notice Parse a VarInt into its data length and the number it represents\\n /// @dev Useful for Parsing Vins and Vouts. Returns ERR_BAD_ARG if insufficient bytes.\\n /// Caller SHOULD explicitly handle this case (or bubble it up)\\n /// @param _b A byte-string containing a VarInt\\n /// @param _at The position of the VarInt\\n /// @return number of bytes in the encoding (not counting the tag), the encoded int\\n function parseVarIntAt(bytes memory _b, uint256 _at) internal pure returns (uint256, uint256) {\\n uint8 _dataLen = determineVarIntDataLengthAt(_b, _at);\\n\\n if (_dataLen == 0) {\\n return (0, uint8(_b[_at]));\\n }\\n if (_b.length < 1 + _dataLen + _at) {\\n return (ERR_BAD_ARG, 0);\\n }\\n uint256 _number;\\n if (_dataLen == 2) {\\n _number = reverseUint16(uint16(_b.slice2(1 + _at)));\\n } else if (_dataLen == 4) {\\n _number = reverseUint32(uint32(_b.slice4(1 + _at)));\\n } else if (_dataLen == 8) {\\n _number = reverseUint64(uint64(_b.slice8(1 + _at)));\\n }\\n return (_dataLen, _number);\\n }\\n\\n /// @notice Changes the endianness of a byte array\\n /// @dev Returns a new, backwards, bytes\\n /// @param _b The bytes to reverse\\n /// @return The reversed bytes\\n function reverseEndianness(bytes memory _b) internal pure returns (bytes memory) {\\n bytes memory _newValue = new bytes(_b.length);\\n\\n for (uint i = 0; i < _b.length; i++) {\\n _newValue[_b.length - i - 1] = _b[i];\\n }\\n\\n return _newValue;\\n }\\n\\n /// @notice Changes the endianness of a uint256\\n /// @dev https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel\\n /// @param _b The unsigned integer to reverse\\n /// @return v The reversed value\\n function reverseUint256(uint256 _b) internal pure returns (uint256 v) {\\n v = _b;\\n\\n // swap bytes\\n v = ((v >> 8) & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) |\\n ((v & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) << 8);\\n // swap 2-byte long pairs\\n v = ((v >> 16) & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) |\\n ((v & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) << 16);\\n // swap 4-byte long pairs\\n v = ((v >> 32) & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) |\\n ((v & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) << 32);\\n // swap 8-byte long pairs\\n v = ((v >> 64) & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) |\\n ((v & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) << 64);\\n // swap 16-byte long pairs\\n v = (v >> 128) | (v << 128);\\n }\\n\\n /// @notice Changes the endianness of a uint64\\n /// @param _b The unsigned integer to reverse\\n /// @return v The reversed value\\n function reverseUint64(uint64 _b) internal pure returns (uint64 v) {\\n v = _b;\\n\\n // swap bytes\\n v = ((v >> 8) & 0x00FF00FF00FF00FF) |\\n ((v & 0x00FF00FF00FF00FF) << 8);\\n // swap 2-byte long pairs\\n v = ((v >> 16) & 0x0000FFFF0000FFFF) |\\n ((v & 0x0000FFFF0000FFFF) << 16);\\n // swap 4-byte long pairs\\n v = (v >> 32) | (v << 32);\\n }\\n\\n /// @notice Changes the endianness of a uint32\\n /// @param _b The unsigned integer to reverse\\n /// @return v The reversed value\\n function reverseUint32(uint32 _b) internal pure returns (uint32 v) {\\n v = _b;\\n\\n // swap bytes\\n v = ((v >> 8) & 0x00FF00FF) |\\n ((v & 0x00FF00FF) << 8);\\n // swap 2-byte long pairs\\n v = (v >> 16) | (v << 16);\\n }\\n\\n /// @notice Changes the endianness of a uint24\\n /// @param _b The unsigned integer to reverse\\n /// @return v The reversed value\\n function reverseUint24(uint24 _b) internal pure returns (uint24 v) {\\n v = (_b << 16) | (_b & 0x00FF00) | (_b >> 16);\\n }\\n\\n /// @notice Changes the endianness of a uint16\\n /// @param _b The unsigned integer to reverse\\n /// @return v The reversed value\\n function reverseUint16(uint16 _b) internal pure returns (uint16 v) {\\n v = (_b << 8) | (_b >> 8);\\n }\\n\\n\\n /// @notice Converts big-endian bytes to a uint\\n /// @dev Traverses the byte array and sums the bytes\\n /// @param _b The big-endian bytes-encoded integer\\n /// @return The integer representation\\n function bytesToUint(bytes memory _b) internal pure returns (uint256) {\\n uint256 _number;\\n\\n for (uint i = 0; i < _b.length; i++) {\\n _number = _number + uint8(_b[i]) * (2 ** (8 * (_b.length - (i + 1))));\\n }\\n\\n return _number;\\n }\\n\\n /// @notice Get the last _num bytes from a byte array\\n /// @param _b The byte array to slice\\n /// @param _num The number of bytes to extract from the end\\n /// @return The last _num bytes of _b\\n function lastBytes(bytes memory _b, uint256 _num) internal pure returns (bytes memory) {\\n uint256 _start = _b.length.sub(_num);\\n\\n return _b.slice(_start, _num);\\n }\\n\\n /// @notice Implements bitcoin's hash160 (rmd160(sha2()))\\n /// @dev abi.encodePacked changes the return to bytes instead of bytes32\\n /// @param _b The pre-image\\n /// @return The digest\\n function hash160(bytes memory _b) internal pure returns (bytes memory) {\\n return abi.encodePacked(ripemd160(abi.encodePacked(sha256(_b))));\\n }\\n\\n /// @notice Implements bitcoin's hash160 (sha2 + ripemd160)\\n /// @dev sha2 precompile at address(2), ripemd160 at address(3)\\n /// @param _b The pre-image\\n /// @return res The digest\\n function hash160View(bytes memory _b) internal view returns (bytes20 res) {\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n pop(staticcall(gas(), 2, add(_b, 32), mload(_b), 0x00, 32))\\n pop(staticcall(gas(), 3, 0x00, 32, 0x00, 32))\\n // read from position 12 = 0c\\n res := mload(0x0c)\\n }\\n }\\n\\n /// @notice Implements bitcoin's hash256 (double sha2)\\n /// @dev abi.encodePacked changes the return to bytes instead of bytes32\\n /// @param _b The pre-image\\n /// @return The digest\\n function hash256(bytes memory _b) internal pure returns (bytes32) {\\n return sha256(abi.encodePacked(sha256(_b)));\\n }\\n\\n /// @notice Implements bitcoin's hash256 (double sha2)\\n /// @dev sha2 is precompiled smart contract located at address(2)\\n /// @param _b The pre-image\\n /// @return res The digest\\n function hash256View(bytes memory _b) internal view returns (bytes32 res) {\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n pop(staticcall(gas(), 2, add(_b, 32), mload(_b), 0x00, 32))\\n pop(staticcall(gas(), 2, 0x00, 32, 0x00, 32))\\n res := mload(0x00)\\n }\\n }\\n\\n /// @notice Implements bitcoin's hash256 on a pair of bytes32\\n /// @dev sha2 is precompiled smart contract located at address(2)\\n /// @param _a The first bytes32 of the pre-image\\n /// @param _b The second bytes32 of the pre-image\\n /// @return res The digest\\n function hash256Pair(bytes32 _a, bytes32 _b) internal view returns (bytes32 res) {\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n mstore(0x00, _a)\\n mstore(0x20, _b)\\n pop(staticcall(gas(), 2, 0x00, 64, 0x00, 32))\\n pop(staticcall(gas(), 2, 0x00, 32, 0x00, 32))\\n res := mload(0x00)\\n }\\n }\\n\\n /// @notice Implements bitcoin's hash256 (double sha2)\\n /// @dev sha2 is precompiled smart contract located at address(2)\\n /// @param _b The array containing the pre-image\\n /// @param at The start of the pre-image\\n /// @param len The length of the pre-image\\n /// @return res The digest\\n function hash256Slice(\\n bytes memory _b,\\n uint256 at,\\n uint256 len\\n ) internal view returns (bytes32 res) {\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n pop(staticcall(gas(), 2, add(_b, add(32, at)), len, 0x00, 32))\\n pop(staticcall(gas(), 2, 0x00, 32, 0x00, 32))\\n res := mload(0x00)\\n }\\n }\\n\\n /* ************ */\\n /* Legacy Input */\\n /* ************ */\\n\\n /// @notice Extracts the nth input from the vin (0-indexed)\\n /// @dev Iterates over the vin. If you need to extract several, write a custom function\\n /// @param _vin The vin as a tightly-packed byte array\\n /// @param _index The 0-indexed location of the input to extract\\n /// @return The input as a byte array\\n function extractInputAtIndex(bytes memory _vin, uint256 _index) internal pure returns (bytes memory) {\\n uint256 _varIntDataLen;\\n uint256 _nIns;\\n\\n (_varIntDataLen, _nIns) = parseVarInt(_vin);\\n require(_varIntDataLen != ERR_BAD_ARG, \\\"Read overrun during VarInt parsing\\\");\\n require(_index < _nIns, \\\"Vin read overrun\\\");\\n\\n uint256 _len = 0;\\n uint256 _offset = 1 + _varIntDataLen;\\n\\n for (uint256 _i = 0; _i < _index; _i ++) {\\n _len = determineInputLengthAt(_vin, _offset);\\n require(_len != ERR_BAD_ARG, \\\"Bad VarInt in scriptSig\\\");\\n _offset = _offset + _len;\\n }\\n\\n _len = determineInputLengthAt(_vin, _offset);\\n require(_len != ERR_BAD_ARG, \\\"Bad VarInt in scriptSig\\\");\\n return _vin.slice(_offset, _len);\\n }\\n\\n /// @notice Determines whether an input is legacy\\n /// @dev False if no scriptSig, otherwise True\\n /// @param _input The input\\n /// @return True for legacy, False for witness\\n function isLegacyInput(bytes memory _input) internal pure returns (bool) {\\n return _input[36] != hex\\\"00\\\";\\n }\\n\\n /// @notice Determines the length of a scriptSig in an input\\n /// @dev Will return 0 if passed a witness input.\\n /// @param _input The LEGACY input\\n /// @return The length of the script sig\\n function extractScriptSigLen(bytes memory _input) internal pure returns (uint256, uint256) {\\n return extractScriptSigLenAt(_input, 0);\\n }\\n\\n /// @notice Determines the length of a scriptSig in an input\\n /// starting at the specified position\\n /// @dev Will return 0 if passed a witness input.\\n /// @param _input The byte array containing the LEGACY input\\n /// @param _at The position of the input in the array\\n /// @return The length of the script sig\\n function extractScriptSigLenAt(bytes memory _input, uint256 _at) internal pure returns (uint256, uint256) {\\n if (_input.length < 37 + _at) {\\n return (ERR_BAD_ARG, 0);\\n }\\n\\n uint256 _varIntDataLen;\\n uint256 _scriptSigLen;\\n (_varIntDataLen, _scriptSigLen) = parseVarIntAt(_input, _at + 36);\\n\\n return (_varIntDataLen, _scriptSigLen);\\n }\\n\\n /// @notice Determines the length of an input from its scriptSig\\n /// @dev 36 for outpoint, 1 for scriptSig length, 4 for sequence\\n /// @param _input The input\\n /// @return The length of the input in bytes\\n function determineInputLength(bytes memory _input) internal pure returns (uint256) {\\n return determineInputLengthAt(_input, 0);\\n }\\n\\n /// @notice Determines the length of an input from its scriptSig,\\n /// starting at the specified position\\n /// @dev 36 for outpoint, 1 for scriptSig length, 4 for sequence\\n /// @param _input The byte array containing the input\\n /// @param _at The position of the input in the array\\n /// @return The length of the input in bytes\\n function determineInputLengthAt(bytes memory _input, uint256 _at) internal pure returns (uint256) {\\n uint256 _varIntDataLen;\\n uint256 _scriptSigLen;\\n (_varIntDataLen, _scriptSigLen) = extractScriptSigLenAt(_input, _at);\\n if (_varIntDataLen == ERR_BAD_ARG) {\\n return ERR_BAD_ARG;\\n }\\n\\n return 36 + 1 + _varIntDataLen + _scriptSigLen + 4;\\n }\\n\\n /// @notice Extracts the LE sequence bytes from an input\\n /// @dev Sequence is used for relative time locks\\n /// @param _input The LEGACY input\\n /// @return The sequence bytes (LE uint)\\n function extractSequenceLELegacy(bytes memory _input) internal pure returns (bytes4) {\\n uint256 _varIntDataLen;\\n uint256 _scriptSigLen;\\n (_varIntDataLen, _scriptSigLen) = extractScriptSigLen(_input);\\n require(_varIntDataLen != ERR_BAD_ARG, \\\"Bad VarInt in scriptSig\\\");\\n return _input.slice4(36 + 1 + _varIntDataLen + _scriptSigLen);\\n }\\n\\n /// @notice Extracts the sequence from the input\\n /// @dev Sequence is a 4-byte little-endian number\\n /// @param _input The LEGACY input\\n /// @return The sequence number (big-endian uint)\\n function extractSequenceLegacy(bytes memory _input) internal pure returns (uint32) {\\n uint32 _leSeqence = uint32(extractSequenceLELegacy(_input));\\n uint32 _beSequence = reverseUint32(_leSeqence);\\n return _beSequence;\\n }\\n /// @notice Extracts the VarInt-prepended scriptSig from the input in a tx\\n /// @dev Will return hex\\\"00\\\" if passed a witness input\\n /// @param _input The LEGACY input\\n /// @return The length-prepended scriptSig\\n function extractScriptSig(bytes memory _input) internal pure returns (bytes memory) {\\n uint256 _varIntDataLen;\\n uint256 _scriptSigLen;\\n (_varIntDataLen, _scriptSigLen) = extractScriptSigLen(_input);\\n require(_varIntDataLen != ERR_BAD_ARG, \\\"Bad VarInt in scriptSig\\\");\\n return _input.slice(36, 1 + _varIntDataLen + _scriptSigLen);\\n }\\n\\n\\n /* ************* */\\n /* Witness Input */\\n /* ************* */\\n\\n /// @notice Extracts the LE sequence bytes from an input\\n /// @dev Sequence is used for relative time locks\\n /// @param _input The WITNESS input\\n /// @return The sequence bytes (LE uint)\\n function extractSequenceLEWitness(bytes memory _input) internal pure returns (bytes4) {\\n return _input.slice4(37);\\n }\\n\\n /// @notice Extracts the sequence from the input in a tx\\n /// @dev Sequence is a 4-byte little-endian number\\n /// @param _input The WITNESS input\\n /// @return The sequence number (big-endian uint)\\n function extractSequenceWitness(bytes memory _input) internal pure returns (uint32) {\\n uint32 _leSeqence = uint32(extractSequenceLEWitness(_input));\\n uint32 _inputeSequence = reverseUint32(_leSeqence);\\n return _inputeSequence;\\n }\\n\\n /// @notice Extracts the outpoint from the input in a tx\\n /// @dev 32-byte tx id with 4-byte index\\n /// @param _input The input\\n /// @return The outpoint (LE bytes of prev tx hash + LE bytes of prev tx index)\\n function extractOutpoint(bytes memory _input) internal pure returns (bytes memory) {\\n return _input.slice(0, 36);\\n }\\n\\n /// @notice Extracts the outpoint tx id from an input\\n /// @dev 32-byte tx id\\n /// @param _input The input\\n /// @return The tx id (little-endian bytes)\\n function extractInputTxIdLE(bytes memory _input) internal pure returns (bytes32) {\\n return _input.slice32(0);\\n }\\n\\n /// @notice Extracts the outpoint tx id from an input\\n /// starting at the specified position\\n /// @dev 32-byte tx id\\n /// @param _input The byte array containing the input\\n /// @param _at The position of the input\\n /// @return The tx id (little-endian bytes)\\n function extractInputTxIdLeAt(bytes memory _input, uint256 _at) internal pure returns (bytes32) {\\n return _input.slice32(_at);\\n }\\n\\n /// @notice Extracts the LE tx input index from the input in a tx\\n /// @dev 4-byte tx index\\n /// @param _input The input\\n /// @return The tx index (little-endian bytes)\\n function extractTxIndexLE(bytes memory _input) internal pure returns (bytes4) {\\n return _input.slice4(32);\\n }\\n\\n /// @notice Extracts the LE tx input index from the input in a tx\\n /// starting at the specified position\\n /// @dev 4-byte tx index\\n /// @param _input The byte array containing the input\\n /// @param _at The position of the input\\n /// @return The tx index (little-endian bytes)\\n function extractTxIndexLeAt(bytes memory _input, uint256 _at) internal pure returns (bytes4) {\\n return _input.slice4(32 + _at);\\n }\\n\\n /* ****** */\\n /* Output */\\n /* ****** */\\n\\n /// @notice Determines the length of an output\\n /// @dev Works with any properly formatted output\\n /// @param _output The output\\n /// @return The length indicated by the prefix, error if invalid length\\n function determineOutputLength(bytes memory _output) internal pure returns (uint256) {\\n return determineOutputLengthAt(_output, 0);\\n }\\n\\n /// @notice Determines the length of an output\\n /// starting at the specified position\\n /// @dev Works with any properly formatted output\\n /// @param _output The byte array containing the output\\n /// @param _at The position of the output\\n /// @return The length indicated by the prefix, error if invalid length\\n function determineOutputLengthAt(bytes memory _output, uint256 _at) internal pure returns (uint256) {\\n if (_output.length < 9 + _at) {\\n return ERR_BAD_ARG;\\n }\\n uint256 _varIntDataLen;\\n uint256 _scriptPubkeyLength;\\n (_varIntDataLen, _scriptPubkeyLength) = parseVarIntAt(_output, 8 + _at);\\n\\n if (_varIntDataLen == ERR_BAD_ARG) {\\n return ERR_BAD_ARG;\\n }\\n\\n // 8-byte value, 1-byte for tag itself\\n return 8 + 1 + _varIntDataLen + _scriptPubkeyLength;\\n }\\n\\n /// @notice Extracts the output at a given index in the TxOuts vector\\n /// @dev Iterates over the vout. If you need to extract multiple, write a custom function\\n /// @param _vout The _vout to extract from\\n /// @param _index The 0-indexed location of the output to extract\\n /// @return The specified output\\n function extractOutputAtIndex(bytes memory _vout, uint256 _index) internal pure returns (bytes memory) {\\n uint256 _varIntDataLen;\\n uint256 _nOuts;\\n\\n (_varIntDataLen, _nOuts) = parseVarInt(_vout);\\n require(_varIntDataLen != ERR_BAD_ARG, \\\"Read overrun during VarInt parsing\\\");\\n require(_index < _nOuts, \\\"Vout read overrun\\\");\\n\\n uint256 _len = 0;\\n uint256 _offset = 1 + _varIntDataLen;\\n\\n for (uint256 _i = 0; _i < _index; _i ++) {\\n _len = determineOutputLengthAt(_vout, _offset);\\n require(_len != ERR_BAD_ARG, \\\"Bad VarInt in scriptPubkey\\\");\\n _offset += _len;\\n }\\n\\n _len = determineOutputLengthAt(_vout, _offset);\\n require(_len != ERR_BAD_ARG, \\\"Bad VarInt in scriptPubkey\\\");\\n return _vout.slice(_offset, _len);\\n }\\n\\n /// @notice Extracts the value bytes from the output in a tx\\n /// @dev Value is an 8-byte little-endian number\\n /// @param _output The output\\n /// @return The output value as LE bytes\\n function extractValueLE(bytes memory _output) internal pure returns (bytes8) {\\n return _output.slice8(0);\\n }\\n\\n /// @notice Extracts the value from the output in a tx\\n /// @dev Value is an 8-byte little-endian number\\n /// @param _output The output\\n /// @return The output value\\n function extractValue(bytes memory _output) internal pure returns (uint64) {\\n uint64 _leValue = uint64(extractValueLE(_output));\\n uint64 _beValue = reverseUint64(_leValue);\\n return _beValue;\\n }\\n\\n /// @notice Extracts the value from the output in a tx\\n /// @dev Value is an 8-byte little-endian number\\n /// @param _output The byte array containing the output\\n /// @param _at The starting index of the output in the array\\n /// @return The output value\\n function extractValueAt(bytes memory _output, uint256 _at) internal pure returns (uint64) {\\n uint64 _leValue = uint64(_output.slice8(_at));\\n uint64 _beValue = reverseUint64(_leValue);\\n return _beValue;\\n }\\n\\n /// @notice Extracts the data from an op return output\\n /// @dev Returns hex\\\"\\\" if no data or not an op return\\n /// @param _output The output\\n /// @return Any data contained in the opreturn output, null if not an op return\\n function extractOpReturnData(bytes memory _output) internal pure returns (bytes memory) {\\n if (_output[9] != hex\\\"6a\\\") {\\n return hex\\\"\\\";\\n }\\n bytes1 _dataLen = _output[10];\\n return _output.slice(11, uint256(uint8(_dataLen)));\\n }\\n\\n /// @notice Extracts the hash from the output script\\n /// @dev Determines type by the length prefix and validates format\\n /// @param _output The output\\n /// @return The hash committed to by the pk_script, or null for errors\\n function extractHash(bytes memory _output) internal pure returns (bytes memory) {\\n return extractHashAt(_output, 8, _output.length - 8);\\n }\\n\\n /// @notice Extracts the hash from the output script\\n /// @dev Determines type by the length prefix and validates format\\n /// @param _output The byte array containing the output\\n /// @param _at The starting index of the output script in the array\\n /// (output start + 8)\\n /// @param _len The length of the output script\\n /// (output length - 8)\\n /// @return The hash committed to by the pk_script, or null for errors\\n function extractHashAt(\\n bytes memory _output,\\n uint256 _at,\\n uint256 _len\\n ) internal pure returns (bytes memory) {\\n uint8 _scriptLen = uint8(_output[_at]);\\n\\n // don't have to worry about overflow here.\\n // if _scriptLen + 1 overflows, then output length would have to be < 1\\n // for this check to pass. if it's < 1, then we errored when assigning\\n // _scriptLen\\n if (_scriptLen + 1 != _len) {\\n return hex\\\"\\\";\\n }\\n\\n if (uint8(_output[_at + 1]) == 0) {\\n if (_scriptLen < 2) {\\n return hex\\\"\\\";\\n }\\n uint256 _payloadLen = uint8(_output[_at + 2]);\\n // Check for maliciously formatted witness outputs.\\n // No need to worry about underflow as long b/c of the `< 2` check\\n if (_payloadLen != _scriptLen - 2 || (_payloadLen != 0x20 && _payloadLen != 0x14)) {\\n return hex\\\"\\\";\\n }\\n return _output.slice(_at + 3, _payloadLen);\\n } else {\\n bytes3 _tag = _output.slice3(_at);\\n // p2pkh\\n if (_tag == hex\\\"1976a9\\\") {\\n // Check for maliciously formatted p2pkh\\n // No need to worry about underflow, b/c of _scriptLen check\\n if (uint8(_output[_at + 3]) != 0x14 ||\\n _output.slice2(_at + _len - 2) != hex\\\"88ac\\\") {\\n return hex\\\"\\\";\\n }\\n return _output.slice(_at + 4, 20);\\n //p2sh\\n } else if (_tag == hex\\\"17a914\\\") {\\n // Check for maliciously formatted p2sh\\n // No need to worry about underflow, b/c of _scriptLen check\\n if (uint8(_output[_at + _len - 1]) != 0x87) {\\n return hex\\\"\\\";\\n }\\n return _output.slice(_at + 3, 20);\\n }\\n }\\n return hex\\\"\\\"; /* NB: will trigger on OPRETURN and any non-standard that doesn't overrun */\\n }\\n\\n /* ********** */\\n /* Witness TX */\\n /* ********** */\\n\\n\\n /// @notice Checks that the vin passed up is properly formatted\\n /// @dev Consider a vin with a valid vout in its scriptsig\\n /// @param _vin Raw bytes length-prefixed input vector\\n /// @return True if it represents a validly formatted vin\\n function validateVin(bytes memory _vin) internal pure returns (bool) {\\n uint256 _varIntDataLen;\\n uint256 _nIns;\\n\\n (_varIntDataLen, _nIns) = parseVarInt(_vin);\\n\\n // Not valid if it says there are too many or no inputs\\n if (_nIns == 0 || _varIntDataLen == ERR_BAD_ARG) {\\n return false;\\n }\\n\\n uint256 _offset = 1 + _varIntDataLen;\\n\\n for (uint256 i = 0; i < _nIns; i++) {\\n // If we're at the end, but still expect more\\n if (_offset >= _vin.length) {\\n return false;\\n }\\n\\n // Grab the next input and determine its length.\\n uint256 _nextLen = determineInputLengthAt(_vin, _offset);\\n if (_nextLen == ERR_BAD_ARG) {\\n return false;\\n }\\n\\n // Increase the offset by that much\\n _offset += _nextLen;\\n }\\n\\n // Returns false if we're not exactly at the end\\n return _offset == _vin.length;\\n }\\n\\n /// @notice Checks that the vout passed up is properly formatted\\n /// @dev Consider a vout with a valid scriptpubkey\\n /// @param _vout Raw bytes length-prefixed output vector\\n /// @return True if it represents a validly formatted vout\\n function validateVout(bytes memory _vout) internal pure returns (bool) {\\n uint256 _varIntDataLen;\\n uint256 _nOuts;\\n\\n (_varIntDataLen, _nOuts) = parseVarInt(_vout);\\n\\n // Not valid if it says there are too many or no outputs\\n if (_nOuts == 0 || _varIntDataLen == ERR_BAD_ARG) {\\n return false;\\n }\\n\\n uint256 _offset = 1 + _varIntDataLen;\\n\\n for (uint256 i = 0; i < _nOuts; i++) {\\n // If we're at the end, but still expect more\\n if (_offset >= _vout.length) {\\n return false;\\n }\\n\\n // Grab the next output and determine its length.\\n // Increase the offset by that much\\n uint256 _nextLen = determineOutputLengthAt(_vout, _offset);\\n if (_nextLen == ERR_BAD_ARG) {\\n return false;\\n }\\n\\n _offset += _nextLen;\\n }\\n\\n // Returns false if we're not exactly at the end\\n return _offset == _vout.length;\\n }\\n\\n\\n\\n /* ************ */\\n /* Block Header */\\n /* ************ */\\n\\n /// @notice Extracts the transaction merkle root from a block header\\n /// @dev Use verifyHash256Merkle to verify proofs with this root\\n /// @param _header The header\\n /// @return The merkle root (little-endian)\\n function extractMerkleRootLE(bytes memory _header) internal pure returns (bytes32) {\\n return _header.slice32(36);\\n }\\n\\n /// @notice Extracts the target from a block header\\n /// @dev Target is a 256-bit number encoded as a 3-byte mantissa and 1-byte exponent\\n /// @param _header The header\\n /// @return The target threshold\\n function extractTarget(bytes memory _header) internal pure returns (uint256) {\\n return extractTargetAt(_header, 0);\\n }\\n\\n /// @notice Extracts the target from a block header\\n /// @dev Target is a 256-bit number encoded as a 3-byte mantissa and 1-byte exponent\\n /// @param _header The array containing the header\\n /// @param at The start of the header\\n /// @return The target threshold\\n function extractTargetAt(bytes memory _header, uint256 at) internal pure returns (uint256) {\\n uint24 _m = uint24(_header.slice3(72 + at));\\n uint8 _e = uint8(_header[75 + at]);\\n uint256 _mantissa = uint256(reverseUint24(_m));\\n uint _exponent = _e - 3;\\n\\n return _mantissa * (256 ** _exponent);\\n }\\n\\n /// @notice Calculate difficulty from the difficulty 1 target and current target\\n /// @dev Difficulty 1 is 0x1d00ffff on mainnet and testnet\\n /// @dev Difficulty 1 is a 256-bit number encoded as a 3-byte mantissa and 1-byte exponent\\n /// @param _target The current target\\n /// @return The block difficulty (bdiff)\\n function calculateDifficulty(uint256 _target) internal pure returns (uint256) {\\n // Difficulty 1 calculated from 0x1d00ffff\\n return DIFF1_TARGET.div(_target);\\n }\\n\\n /// @notice Extracts the previous block's hash from a block header\\n /// @dev Block headers do NOT include block number :(\\n /// @param _header The header\\n /// @return The previous block's hash (little-endian)\\n function extractPrevBlockLE(bytes memory _header) internal pure returns (bytes32) {\\n return _header.slice32(4);\\n }\\n\\n /// @notice Extracts the previous block's hash from a block header\\n /// @dev Block headers do NOT include block number :(\\n /// @param _header The array containing the header\\n /// @param at The start of the header\\n /// @return The previous block's hash (little-endian)\\n function extractPrevBlockLEAt(\\n bytes memory _header,\\n uint256 at\\n ) internal pure returns (bytes32) {\\n return _header.slice32(4 + at);\\n }\\n\\n /// @notice Extracts the timestamp from a block header\\n /// @dev Time is not 100% reliable\\n /// @param _header The header\\n /// @return The timestamp (little-endian bytes)\\n function extractTimestampLE(bytes memory _header) internal pure returns (bytes4) {\\n return _header.slice4(68);\\n }\\n\\n /// @notice Extracts the timestamp from a block header\\n /// @dev Time is not 100% reliable\\n /// @param _header The header\\n /// @return The timestamp (uint)\\n function extractTimestamp(bytes memory _header) internal pure returns (uint32) {\\n return reverseUint32(uint32(extractTimestampLE(_header)));\\n }\\n\\n /// @notice Extracts the expected difficulty from a block header\\n /// @dev Does NOT verify the work\\n /// @param _header The header\\n /// @return The difficulty as an integer\\n function extractDifficulty(bytes memory _header) internal pure returns (uint256) {\\n return calculateDifficulty(extractTarget(_header));\\n }\\n\\n /// @notice Concatenates and hashes two inputs for merkle proving\\n /// @param _a The first hash\\n /// @param _b The second hash\\n /// @return The double-sha256 of the concatenated hashes\\n function _hash256MerkleStep(bytes memory _a, bytes memory _b) internal view returns (bytes32) {\\n return hash256View(abi.encodePacked(_a, _b));\\n }\\n\\n /// @notice Concatenates and hashes two inputs for merkle proving\\n /// @param _a The first hash\\n /// @param _b The second hash\\n /// @return The double-sha256 of the concatenated hashes\\n function _hash256MerkleStep(bytes32 _a, bytes32 _b) internal view returns (bytes32) {\\n return hash256Pair(_a, _b);\\n }\\n\\n\\n /// @notice Verifies a Bitcoin-style merkle tree\\n /// @dev Leaves are 0-indexed. Inefficient version.\\n /// @param _proof The proof. Tightly packed LE sha256 hashes. The last hash is the root\\n /// @param _index The index of the leaf\\n /// @return true if the proof is valid, else false\\n function verifyHash256Merkle(bytes memory _proof, uint _index) internal view returns (bool) {\\n // Not an even number of hashes\\n if (_proof.length % 32 != 0) {\\n return false;\\n }\\n\\n // Special case for coinbase-only blocks\\n if (_proof.length == 32) {\\n return true;\\n }\\n\\n // Should never occur\\n if (_proof.length == 64) {\\n return false;\\n }\\n\\n bytes32 _root = _proof.slice32(_proof.length - 32);\\n bytes32 _current = _proof.slice32(0);\\n bytes memory _tree = _proof.slice(32, _proof.length - 64);\\n\\n return verifyHash256Merkle(_current, _tree, _root, _index);\\n }\\n\\n /// @notice Verifies a Bitcoin-style merkle tree\\n /// @dev Leaves are 0-indexed. Efficient version.\\n /// @param _leaf The leaf of the proof. LE sha256 hash.\\n /// @param _tree The intermediate nodes in the proof.\\n /// Tightly packed LE sha256 hashes.\\n /// @param _root The root of the proof. LE sha256 hash.\\n /// @param _index The index of the leaf\\n /// @return true if the proof is valid, else false\\n function verifyHash256Merkle(\\n bytes32 _leaf,\\n bytes memory _tree,\\n bytes32 _root,\\n uint _index\\n ) internal view returns (bool) {\\n // Not an even number of hashes\\n if (_tree.length % 32 != 0) {\\n return false;\\n }\\n\\n // Should never occur\\n if (_tree.length == 0) {\\n return false;\\n }\\n\\n uint _idx = _index;\\n bytes32 _current = _leaf;\\n\\n // i moves in increments of 32\\n for (uint i = 0; i < _tree.length; i += 32) {\\n if (_idx % 2 == 1) {\\n _current = _hash256MerkleStep(_tree.slice32(i), _current);\\n } else {\\n _current = _hash256MerkleStep(_current, _tree.slice32(i));\\n }\\n _idx = _idx >> 1;\\n }\\n return _current == _root;\\n }\\n\\n /*\\n NB: https://github.com/bitcoin/bitcoin/blob/78dae8caccd82cfbfd76557f1fb7d7557c7b5edb/src/pow.cpp#L49-L72\\n NB: We get a full-bitlength target from this. For comparison with\\n header-encoded targets we need to mask it with the header target\\n e.g. (full & truncated) == truncated\\n */\\n /// @notice performs the bitcoin difficulty retarget\\n /// @dev implements the Bitcoin algorithm precisely\\n /// @param _previousTarget the target of the previous period\\n /// @param _firstTimestamp the timestamp of the first block in the difficulty period\\n /// @param _secondTimestamp the timestamp of the last block in the difficulty period\\n /// @return the new period's target threshold\\n function retargetAlgorithm(\\n uint256 _previousTarget,\\n uint256 _firstTimestamp,\\n uint256 _secondTimestamp\\n ) internal pure returns (uint256) {\\n uint256 _elapsedTime = _secondTimestamp.sub(_firstTimestamp);\\n\\n // Normalize ratio to factor of 4 if very long or very short\\n if (_elapsedTime < RETARGET_PERIOD.div(4)) {\\n _elapsedTime = RETARGET_PERIOD.div(4);\\n }\\n if (_elapsedTime > RETARGET_PERIOD.mul(4)) {\\n _elapsedTime = RETARGET_PERIOD.mul(4);\\n }\\n\\n /*\\n NB: high targets e.g. ffff0020 can cause overflows here\\n so we divide it by 256**2, then multiply by 256**2 later\\n we know the target is evenly divisible by 256**2, so this isn't an issue\\n */\\n\\n uint256 _adjusted = _previousTarget.div(65536).mul(_elapsedTime);\\n return _adjusted.div(RETARGET_PERIOD).mul(65536);\\n }\\n}\\n\",\"keccak256\":\"0x439eaa97e9239705f3d31e8d39dccbad32311f1f119e295d53c65e0ae3c5a5fc\"},\"@keep-network/bitcoin-spv-sol/contracts/BytesLib.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\n/*\\n\\nhttps://github.com/GNSPS/solidity-bytes-utils/\\n\\nThis is free and unencumbered software released into the public domain.\\n\\nAnyone is free to copy, modify, publish, use, compile, sell, or\\ndistribute this software, either in source code form or as a compiled\\nbinary, for any purpose, commercial or non-commercial, and by any\\nmeans.\\n\\nIn jurisdictions that recognize copyright laws, the author or authors\\nof this software dedicate any and all copyright interest in the\\nsoftware to the public domain. We make this dedication for the benefit\\nof the public at large and to the detriment of our heirs and\\nsuccessors. We intend this dedication to be an overt act of\\nrelinquishment in perpetuity of all present and future rights to this\\nsoftware under copyright law.\\n\\nTHE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND,\\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\\nOTHER DEALINGS IN THE SOFTWARE.\\n\\nFor more information, please refer to <https://unlicense.org>\\n*/\\n\\n\\n/** @title BytesLib **/\\n/** @author https://github.com/GNSPS **/\\n\\nlibrary BytesLib {\\n function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(0x40, and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n ))\\n }\\n\\n return tempBytes;\\n }\\n\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(\\n sc,\\n add(\\n and(\\n fslot,\\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00\\n ),\\n and(mload(mc), mask)\\n )\\n )\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let mlengthmod := mod(mlength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function slice(bytes memory _bytes, uint _start, uint _length) internal pure returns (bytes memory res) {\\n if (_length == 0) {\\n return hex\\\"\\\";\\n }\\n uint _end = _start + _length;\\n require(_end > _start && _bytes.length >= _end, \\\"Slice out of bounds\\\");\\n\\n assembly {\\n // Alloc bytes array with additional 32 bytes afterspace and assign it's size\\n res := mload(0x40)\\n mstore(0x40, add(add(res, 64), _length))\\n mstore(res, _length)\\n\\n // Compute distance between source and destination pointers\\n let diff := sub(res, add(_bytes, _start))\\n\\n for {\\n let src := add(add(_bytes, 32), _start)\\n let end := add(src, _length)\\n } lt(src, end) {\\n src := add(src, 32)\\n } {\\n mstore(add(src, diff), mload(src))\\n }\\n }\\n }\\n\\n /// @notice Take a slice of the byte array, overwriting the destination.\\n /// The length of the slice will equal the length of the destination array.\\n /// @dev Make sure the destination array has afterspace if required.\\n /// @param _bytes The source array\\n /// @param _dest The destination array.\\n /// @param _start The location to start in the source array.\\n function sliceInPlace(\\n bytes memory _bytes,\\n bytes memory _dest,\\n uint _start\\n ) internal pure {\\n uint _length = _dest.length;\\n uint _end = _start + _length;\\n require(_end > _start && _bytes.length >= _end, \\\"Slice out of bounds\\\");\\n\\n assembly {\\n for {\\n let src := add(add(_bytes, 32), _start)\\n let res := add(_dest, 32)\\n let end := add(src, _length)\\n } lt(src, end) {\\n src := add(src, 32)\\n res := add(res, 32)\\n } {\\n mstore(res, mload(src))\\n }\\n }\\n }\\n\\n // Static slice functions, no bounds checking\\n /// @notice take a 32-byte slice from the specified position\\n function slice32(bytes memory _bytes, uint _start) internal pure returns (bytes32 res) {\\n assembly {\\n res := mload(add(add(_bytes, 32), _start))\\n }\\n }\\n\\n /// @notice take a 20-byte slice from the specified position\\n function slice20(bytes memory _bytes, uint _start) internal pure returns (bytes20) {\\n return bytes20(slice32(_bytes, _start));\\n }\\n\\n /// @notice take a 8-byte slice from the specified position\\n function slice8(bytes memory _bytes, uint _start) internal pure returns (bytes8) {\\n return bytes8(slice32(_bytes, _start));\\n }\\n\\n /// @notice take a 4-byte slice from the specified position\\n function slice4(bytes memory _bytes, uint _start) internal pure returns (bytes4) {\\n return bytes4(slice32(_bytes, _start));\\n }\\n\\n /// @notice take a 3-byte slice from the specified position\\n function slice3(bytes memory _bytes, uint _start) internal pure returns (bytes3) {\\n return bytes3(slice32(_bytes, _start));\\n }\\n\\n /// @notice take a 2-byte slice from the specified position\\n function slice2(bytes memory _bytes, uint _start) internal pure returns (bytes2) {\\n return bytes2(slice32(_bytes, _start));\\n }\\n\\n function toAddress(bytes memory _bytes, uint _start) internal pure returns (address) {\\n uint _totalLen = _start + 20;\\n require(_totalLen > _start && _bytes.length >= _totalLen, \\\"Address conversion out of bounds.\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint(bytes memory _bytes, uint _start) internal pure returns (uint256) {\\n uint _totalLen = _start + 32;\\n require(_totalLen > _start && _bytes.length >= _totalLen, \\\"Uint conversion out of bounds.\\\");\\n uint256 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint(mc < end) + cb == 2)\\n for {} eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function toBytes32(bytes memory _source) pure internal returns (bytes32 result) {\\n if (_source.length == 0) {\\n return 0x0;\\n }\\n\\n assembly {\\n result := mload(add(_source, 32))\\n }\\n }\\n\\n function keccak256Slice(bytes memory _bytes, uint _start, uint _length) pure internal returns (bytes32 result) {\\n uint _end = _start + _length;\\n require(_end > _start && _bytes.length >= _end, \\\"Slice out of bounds\\\");\\n\\n assembly {\\n result := keccak256(add(add(_bytes, 32), _start), _length)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x43e0f3b3b23c861bd031588bf410dfdd02e2af17941a89aa38d70e534e0380d1\"},\"@keep-network/bitcoin-spv-sol/contracts/SafeMath.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\n/*\\nThe MIT License (MIT)\\n\\nCopyright (c) 2016 Smart Contract Solutions, Inc.\\n\\nPermission is hereby granted, free of charge, to any person obtaining\\na copy of this software and associated documentation files (the\\n\\\"Software\\\"), to deal in the Software without restriction, including\\nwithout limitation the rights to use, copy, modify, merge, publish,\\ndistribute, sublicense, and/or sell copies of the Software, and to\\npermit persons to whom the Software is furnished to do so, subject to\\nthe following conditions:\\n\\nThe above copyright notice and this permission notice shall be included\\nin all copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n*/\\n\\n\\n/**\\n * @title SafeMath\\n * @dev Math operations with safety checks that throw on error\\n */\\nlibrary SafeMath {\\n\\n /**\\n * @dev Multiplies two numbers, throws on overflow.\\n */\\n function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {\\n // Gas optimization: this is cheaper than asserting 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\\n if (_a == 0) {\\n return 0;\\n }\\n\\n c = _a * _b;\\n require(c / _a == _b, \\\"Overflow during multiplication.\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Integer division of two numbers, truncating the quotient.\\n */\\n function div(uint256 _a, uint256 _b) internal pure returns (uint256) {\\n // assert(_b > 0); // Solidity automatically throws when dividing by 0\\n // uint256 c = _a / _b;\\n // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold\\n return _a / _b;\\n }\\n\\n /**\\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {\\n require(_b <= _a, \\\"Underflow during subtraction.\\\");\\n return _a - _b;\\n }\\n\\n /**\\n * @dev Adds two numbers, throws on overflow.\\n */\\n function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {\\n c = _a + _b;\\n require(c >= _a, \\\"Overflow during addition.\\\");\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0x35930d982394c7ffde439b82e5e696c5b21a6f09699d44861dfe409ef64084a3\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"contracts/integrator/AbstractTBTCDepositor.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n\\npragma solidity ^0.8.0;\\n\\nimport {BTCUtils} from \\\"@keep-network/bitcoin-spv-sol/contracts/BTCUtils.sol\\\";\\n\\nimport \\\"./IBridge.sol\\\";\\nimport \\\"./ITBTCVault.sol\\\";\\n\\n/// @title Abstract AbstractTBTCDepositor contract.\\n/// @notice This abstract contract is meant to facilitate integration of protocols\\n/// aiming to use tBTC as an underlying Bitcoin bridge.\\n///\\n/// Such an integrator is supposed to:\\n/// - Create a child contract inheriting from this abstract contract\\n/// - Call the `__AbstractTBTCDepositor_initialize` initializer function\\n/// - Use the `_initializeDeposit` and `_finalizeDeposit` as part of their\\n/// business logic in order to initialize and finalize deposits.\\n///\\n/// @dev Example usage:\\n/// ```\\n/// // Example upgradeable integrator contract.\\n/// contract ExampleTBTCIntegrator is AbstractTBTCDepositor, Initializable {\\n/// /// @custom:oz-upgrades-unsafe-allow constructor\\n/// constructor() {\\n/// // Prevents the contract from being initialized again.\\n/// _disableInitializers();\\n/// }\\n///\\n/// function initialize(\\n/// address _bridge,\\n/// address _tbtcVault\\n/// ) external initializer {\\n/// __AbstractTBTCDepositor_initialize(_bridge, _tbtcVault);\\n/// }\\n///\\n/// function startProcess(\\n/// IBridgeTypes.BitcoinTxInfo calldata fundingTx,\\n/// IBridgeTypes.DepositRevealInfo calldata reveal\\n/// ) external {\\n/// // Embed necessary context as extra data.\\n/// bytes32 extraData = ...;\\n///\\n/// uint256 depositKey = _initializeDeposit(\\n/// fundingTx,\\n/// reveal,\\n/// extraData\\n/// );\\n///\\n/// // Use the depositKey to track the process.\\n/// }\\n///\\n/// function finalizeProcess(uint256 depositKey) external {\\n/// // Ensure the function cannot be called for the same deposit\\n/// // twice.\\n///\\n/// (\\n/// uint256 initialDepositAmount,\\n/// uint256 tbtcAmount,\\n/// bytes32 extraData\\n/// ) = _finalizeDeposit(depositKey);\\n///\\n/// // Do something with the minted TBTC using context\\n/// // embedded in the extraData.\\n/// }\\n/// }\\nabstract contract AbstractTBTCDepositor {\\n using BTCUtils for bytes;\\n\\n /// @notice Multiplier to convert satoshi to TBTC token units.\\n uint256 public constant SATOSHI_MULTIPLIER = 10**10;\\n\\n /// @notice Bridge contract address.\\n IBridge public bridge;\\n /// @notice TBTCVault contract address.\\n ITBTCVault public tbtcVault;\\n\\n // Reserved storage space that allows adding more variables without affecting\\n // the storage layout of the child contracts. The convention from OpenZeppelin\\n // suggests the storage space should add up to 50 slots. If more variables are\\n // added in the upcoming versions one need to reduce the array size accordingly.\\n // See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n // slither-disable-next-line unused-state\\n uint256[47] private __gap;\\n\\n /// @notice Initializes the contract. MUST BE CALLED from the child\\n /// contract initializer.\\n // slither-disable-next-line dead-code\\n function __AbstractTBTCDepositor_initialize(\\n address _bridge,\\n address _tbtcVault\\n ) internal {\\n require(\\n address(bridge) == address(0) && address(tbtcVault) == address(0),\\n \\\"AbstractTBTCDepositor already initialized\\\"\\n );\\n\\n require(_bridge != address(0), \\\"Bridge address cannot be zero\\\");\\n require(_tbtcVault != address(0), \\\"TBTCVault address cannot be zero\\\");\\n\\n bridge = IBridge(_bridge);\\n tbtcVault = ITBTCVault(_tbtcVault);\\n }\\n\\n /// @notice Initializes a deposit by revealing it to the Bridge.\\n /// @param fundingTx Bitcoin funding transaction data, see `IBridgeTypes.BitcoinTxInfo`.\\n /// @param reveal Deposit reveal data, see `IBridgeTypes.DepositRevealInfo` struct.\\n /// @param extraData 32-byte deposit extra data.\\n /// @return depositKey Deposit key computed as\\n /// `keccak256(fundingTxHash | reveal.fundingOutputIndex)`. This\\n /// key can be used to refer to the deposit in the Bridge and\\n /// TBTCVault contracts.\\n /// @dev Requirements:\\n /// - The revealed vault address must match the TBTCVault address,\\n /// - All requirements from {Bridge#revealDepositWithExtraData}\\n /// function must be met.\\n /// @dev This function doesn't validate if a deposit has been initialized before,\\n /// as the Bridge won't allow the same deposit to be revealed twice.\\n // slither-disable-next-line dead-code\\n function _initializeDeposit(\\n IBridgeTypes.BitcoinTxInfo calldata fundingTx,\\n IBridgeTypes.DepositRevealInfo calldata reveal,\\n bytes32 extraData\\n ) internal returns (uint256) {\\n require(reveal.vault == address(tbtcVault), \\\"Vault address mismatch\\\");\\n\\n uint256 depositKey = _calculateDepositKey(\\n _calculateBitcoinTxHash(fundingTx),\\n reveal.fundingOutputIndex\\n );\\n\\n // The Bridge does not allow to reveal the same deposit twice and\\n // revealed deposits stay there forever. The transaction will revert\\n // if the deposit has already been revealed so, there is no need to do\\n // an explicit check here.\\n bridge.revealDepositWithExtraData(fundingTx, reveal, extraData);\\n\\n return depositKey;\\n }\\n\\n /// @notice Finalizes a deposit by calculating the amount of TBTC minted\\n /// for the deposit.\\n /// @param depositKey Deposit key identifying the deposit.\\n /// @return initialDepositAmount Amount of funding transaction deposit. In\\n /// TBTC token decimals precision.\\n /// @return tbtcAmount Approximate amount of TBTC minted for the deposit. In\\n /// TBTC token decimals precision.\\n /// @return extraData 32-byte deposit extra data.\\n /// @dev Requirements:\\n /// - The deposit must be initialized but not finalized\\n /// (in the context of this contract) yet.\\n /// - The deposit must be finalized on the Bridge side. That means the\\n /// deposit must be either swept or optimistically minted.\\n /// @dev THIS FUNCTION DOESN'T VALIDATE IF A DEPOSIT HAS BEEN FINALIZED BEFORE,\\n /// IT IS A RESPONSIBILITY OF THE IMPLEMENTING CONTRACT TO ENSURE THIS\\n /// FUNCTION WON'T BE CALLED TWICE FOR THE SAME DEPOSIT.\\n /// @dev IMPORTANT NOTE: The tbtcAmount returned by this function is an\\n /// approximation. See documentation of the `calculateTbtcAmount`\\n /// responsible for calculating this value for more details.\\n // slither-disable-next-line dead-code\\n function _finalizeDeposit(uint256 depositKey)\\n internal\\n returns (\\n uint256 initialDepositAmount,\\n uint256 tbtcAmount,\\n bytes32 extraData\\n )\\n {\\n IBridgeTypes.DepositRequest memory deposit = bridge.deposits(\\n depositKey\\n );\\n require(deposit.revealedAt != 0, \\\"Deposit not initialized\\\");\\n\\n (, uint64 finalizedAt) = tbtcVault.optimisticMintingRequests(\\n depositKey\\n );\\n\\n require(\\n deposit.sweptAt != 0 || finalizedAt != 0,\\n \\\"Deposit not finalized by the bridge\\\"\\n );\\n\\n initialDepositAmount = deposit.amount * SATOSHI_MULTIPLIER;\\n\\n tbtcAmount = _calculateTbtcAmount(deposit.amount, deposit.treasuryFee);\\n\\n extraData = deposit.extraData;\\n }\\n\\n /// @notice Calculates the amount of TBTC minted for the deposit.\\n /// @param depositAmountSat Deposit amount in satoshi (1e8 precision).\\n /// This is the actual amount deposited by the deposit creator, i.e.\\n /// the gross amount the Bridge's fees are cut from.\\n /// @param depositTreasuryFeeSat Deposit treasury fee in satoshi (1e8 precision).\\n /// This is an accurate value of the treasury fee that was actually\\n /// cut upon minting.\\n /// @return tbtcAmount Approximate amount of TBTC minted for the deposit.\\n /// @dev IMPORTANT NOTE: The tbtcAmount returned by this function may\\n /// not correspond to the actual amount of TBTC minted for the deposit.\\n /// Although the treasury fee cut upon minting is known precisely,\\n /// this is not the case for the optimistic minting fee and the Bitcoin\\n /// transaction fee. To overcome that problem, this function just takes\\n /// the current maximum allowed values of both fees, at the moment of deposit\\n /// finalization. For the great majority of the deposits, such an\\n /// algorithm will return a tbtcAmount slightly lesser than the\\n /// actual amount of TBTC minted for the deposit. This will cause\\n /// some TBTC to be left in the contract and ensure there is enough\\n /// liquidity to finalize the deposit. However, in some rare cases,\\n /// where the actual values of those fees change between the deposit\\n /// minting and finalization, the tbtcAmount returned by this function\\n /// may be greater than the actual amount of TBTC minted for the deposit.\\n /// If this happens and the reserve coming from previous deposits\\n /// leftovers does not provide enough liquidity, the deposit will have\\n /// to wait for finalization until the reserve is refilled by subsequent\\n /// deposits or a manual top-up. The integrator is responsible for\\n /// handling such cases.\\n // slither-disable-next-line dead-code\\n function _calculateTbtcAmount(\\n uint64 depositAmountSat,\\n uint64 depositTreasuryFeeSat\\n ) internal view virtual returns (uint256) {\\n // Both deposit amount and treasury fee are in the 1e8 satoshi precision.\\n // We need to convert them to the 1e18 TBTC precision.\\n uint256 amountSubTreasury = (depositAmountSat - depositTreasuryFeeSat) *\\n SATOSHI_MULTIPLIER;\\n\\n uint256 omFeeDivisor = tbtcVault.optimisticMintingFeeDivisor();\\n uint256 omFee = omFeeDivisor > 0\\n ? (amountSubTreasury / omFeeDivisor)\\n : 0;\\n\\n // The deposit transaction max fee is in the 1e8 satoshi precision.\\n // We need to convert them to the 1e18 TBTC precision.\\n (, , uint64 depositTxMaxFee, ) = bridge.depositParameters();\\n uint256 txMaxFee = depositTxMaxFee * SATOSHI_MULTIPLIER;\\n\\n return amountSubTreasury - omFee - txMaxFee;\\n }\\n\\n /// @notice Calculates the deposit key for the given funding transaction\\n /// hash and funding output index.\\n /// @param fundingTxHash Funding transaction hash.\\n /// @param fundingOutputIndex Funding output index.\\n /// @return depositKey Deposit key computed as\\n /// `keccak256(fundingTxHash | reveal.fundingOutputIndex)`. This\\n /// key can be used to refer to the deposit in the Bridge and\\n /// TBTCVault contracts.\\n // slither-disable-next-line dead-code\\n function _calculateDepositKey(\\n bytes32 fundingTxHash,\\n uint32 fundingOutputIndex\\n ) internal pure returns (uint256) {\\n return\\n uint256(\\n keccak256(abi.encodePacked(fundingTxHash, fundingOutputIndex))\\n );\\n }\\n\\n /// @notice Calculates the Bitcoin transaction hash for the given Bitcoin\\n /// transaction data.\\n /// @param txInfo Bitcoin transaction data, see `IBridgeTypes.BitcoinTxInfo` struct.\\n /// @return txHash Bitcoin transaction hash.\\n // slither-disable-next-line dead-code\\n function _calculateBitcoinTxHash(IBridgeTypes.BitcoinTxInfo calldata txInfo)\\n internal\\n view\\n returns (bytes32)\\n {\\n return\\n abi\\n .encodePacked(\\n txInfo.version,\\n txInfo.inputVector,\\n txInfo.outputVector,\\n txInfo.locktime\\n )\\n .hash256View();\\n }\\n}\\n\",\"keccak256\":\"0x9092454b9143f1fc2bc45faad9dec83126a0a54c743ded48a6dfb0b260fef58d\",\"license\":\"GPL-3.0-only\"},\"contracts/integrator/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n\\npragma solidity ^0.8.0;\\n\\n/// @notice Namespace which groups all types relevant to the IBridge interface.\\n/// @dev This is a mirror of the real types used in the Bridge contract.\\n/// This way, the `integrator` subpackage does not need to import\\n/// anything from the `bridge` subpackage and explicitly depend on it.\\n/// This simplifies the dependency graph for integrators.\\nlibrary IBridgeTypes {\\n /// @dev See bridge/BitcoinTx.sol#Info\\n struct BitcoinTxInfo {\\n bytes4 version;\\n bytes inputVector;\\n bytes outputVector;\\n bytes4 locktime;\\n }\\n\\n /// @dev See bridge/Deposit.sol#DepositRevealInfo\\n struct DepositRevealInfo {\\n uint32 fundingOutputIndex;\\n bytes8 blindingFactor;\\n bytes20 walletPubKeyHash;\\n bytes20 refundPubKeyHash;\\n bytes4 refundLocktime;\\n address vault;\\n }\\n\\n /// @dev See bridge/Deposit.sol#DepositRequest\\n struct DepositRequest {\\n address depositor;\\n uint64 amount;\\n uint32 revealedAt;\\n address vault;\\n uint64 treasuryFee;\\n uint32 sweptAt;\\n bytes32 extraData;\\n }\\n}\\n\\n/// @notice Interface of the Bridge contract.\\n/// @dev See bridge/Bridge.sol\\ninterface IBridge {\\n /// @dev See {Bridge#revealDepositWithExtraData}\\n function revealDepositWithExtraData(\\n IBridgeTypes.BitcoinTxInfo calldata fundingTx,\\n IBridgeTypes.DepositRevealInfo calldata reveal,\\n bytes32 extraData\\n ) external;\\n\\n /// @dev See {Bridge#deposits}\\n function deposits(uint256 depositKey)\\n external\\n view\\n returns (IBridgeTypes.DepositRequest memory);\\n\\n /// @dev See {Bridge#depositParameters}\\n function depositParameters()\\n external\\n view\\n returns (\\n uint64 depositDustThreshold,\\n uint64 depositTreasuryFeeDivisor,\\n uint64 depositTxMaxFee,\\n uint32 depositRevealAheadPeriod\\n );\\n}\\n\",\"keccak256\":\"0x4e598d96404a19609f511f10503e80f457602ad694d081df739571f67f6e0c4e\",\"license\":\"GPL-3.0-only\"},\"contracts/integrator/ITBTCVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n\\npragma solidity ^0.8.0;\\n\\n/// @notice Interface of the TBTCVault contract.\\n/// @dev See vault/TBTCVault.sol\\ninterface ITBTCVault {\\n /// @dev See {TBTCVault#optimisticMintingRequests}\\n function optimisticMintingRequests(uint256 depositKey)\\n external\\n returns (uint64 requestedAt, uint64 finalizedAt);\\n\\n /// @dev See {TBTCVault#optimisticMintingFeeDivisor}\\n function optimisticMintingFeeDivisor() external view returns (uint32);\\n}\\n\",\"keccak256\":\"0xf259d64c1040e2cbc3d17653491e45c5c3da17f575dac1c175c63c8a5308908e\",\"license\":\"GPL-3.0-only\"},\"contracts/test/TestTBTCDepositor.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity ^0.8.0;\\n\\nimport {BTCUtils} from \\\"@keep-network/bitcoin-spv-sol/contracts/BTCUtils.sol\\\";\\n\\nimport \\\"../integrator/AbstractTBTCDepositor.sol\\\";\\nimport \\\"../integrator/IBridge.sol\\\";\\nimport \\\"../integrator/ITBTCVault.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ncontract TestTBTCDepositor is AbstractTBTCDepositor {\\n event InitializeDepositReturned(uint256 depositKey);\\n\\n event FinalizeDepositReturned(\\n uint256 initialDepositAmount,\\n uint256 tbtcAmount,\\n bytes32 extraData\\n );\\n\\n function initialize(address _bridge, address _tbtcVault) external {\\n __AbstractTBTCDepositor_initialize(_bridge, _tbtcVault);\\n }\\n\\n function initializeDepositPublic(\\n IBridgeTypes.BitcoinTxInfo calldata fundingTx,\\n IBridgeTypes.DepositRevealInfo calldata reveal,\\n bytes32 extraData\\n ) external {\\n uint256 depositKey = _initializeDeposit(fundingTx, reveal, extraData);\\n emit InitializeDepositReturned(depositKey);\\n }\\n\\n function finalizeDepositPublic(uint256 depositKey) external {\\n (\\n uint256 initialDepositAmount,\\n uint256 tbtcAmount,\\n bytes32 extraData\\n ) = _finalizeDeposit(depositKey);\\n emit FinalizeDepositReturned(\\n initialDepositAmount,\\n tbtcAmount,\\n extraData\\n );\\n }\\n\\n function calculateTbtcAmountPublic(\\n uint64 depositAmountSat,\\n uint64 depositTreasuryFeeSat\\n ) external view returns (uint256) {\\n return _calculateTbtcAmount(depositAmountSat, depositTreasuryFeeSat);\\n }\\n}\\n\\ncontract MockBridge is IBridge {\\n using BTCUtils for bytes;\\n\\n mapping(uint256 => IBridgeTypes.DepositRequest) internal _deposits;\\n\\n uint64 internal _depositDustThreshold = 1000000; // 1000000 satoshi = 0.01 BTC\\n uint64 internal _depositTreasuryFeeDivisor = 50; // 1/50 == 100 bps == 2% == 0.02\\n uint64 internal _depositTxMaxFee = 1000; // 1000 satoshi = 0.00001 BTC\\n\\n event DepositRevealed(uint256 depositKey);\\n\\n function revealDepositWithExtraData(\\n IBridgeTypes.BitcoinTxInfo calldata fundingTx,\\n IBridgeTypes.DepositRevealInfo calldata reveal,\\n bytes32 extraData\\n ) external {\\n bytes32 fundingTxHash = abi\\n .encodePacked(\\n fundingTx.version,\\n fundingTx.inputVector,\\n fundingTx.outputVector,\\n fundingTx.locktime\\n )\\n .hash256View();\\n\\n uint256 depositKey = uint256(\\n keccak256(\\n abi.encodePacked(fundingTxHash, reveal.fundingOutputIndex)\\n )\\n );\\n\\n require(\\n _deposits[depositKey].revealedAt == 0,\\n \\\"Deposit already revealed\\\"\\n );\\n\\n bytes memory fundingOutput = fundingTx\\n .outputVector\\n .extractOutputAtIndex(reveal.fundingOutputIndex);\\n\\n uint64 fundingOutputAmount = fundingOutput.extractValue();\\n\\n IBridgeTypes.DepositRequest memory request;\\n\\n request.depositor = msg.sender;\\n request.amount = fundingOutputAmount;\\n /* solhint-disable-next-line not-rely-on-time */\\n request.revealedAt = uint32(block.timestamp);\\n request.vault = reveal.vault;\\n request.treasuryFee = _depositTreasuryFeeDivisor > 0\\n ? fundingOutputAmount / _depositTreasuryFeeDivisor\\n : 0;\\n request.sweptAt = 0;\\n request.extraData = extraData;\\n\\n _deposits[depositKey] = request;\\n\\n emit DepositRevealed(depositKey);\\n }\\n\\n function sweepDeposit(uint256 depositKey) public {\\n require(_deposits[depositKey].revealedAt != 0, \\\"Deposit not revealed\\\");\\n require(_deposits[depositKey].sweptAt == 0, \\\"Deposit already swept\\\");\\n /* solhint-disable-next-line not-rely-on-time */\\n _deposits[depositKey].sweptAt = uint32(block.timestamp);\\n }\\n\\n function deposits(uint256 depositKey)\\n external\\n view\\n returns (IBridgeTypes.DepositRequest memory)\\n {\\n return _deposits[depositKey];\\n }\\n\\n function depositParameters()\\n external\\n view\\n returns (\\n uint64 depositDustThreshold,\\n uint64 depositTreasuryFeeDivisor,\\n uint64 depositTxMaxFee,\\n uint32 depositRevealAheadPeriod\\n )\\n {\\n depositDustThreshold = _depositDustThreshold;\\n depositTreasuryFeeDivisor = _depositTreasuryFeeDivisor;\\n depositTxMaxFee = _depositTxMaxFee;\\n depositRevealAheadPeriod = 0;\\n }\\n\\n function setDepositDustThreshold(uint64 value) external {\\n _depositDustThreshold = value;\\n }\\n\\n function setDepositTreasuryFeeDivisor(uint64 value) external {\\n _depositTreasuryFeeDivisor = value;\\n }\\n\\n function setDepositTxMaxFee(uint64 value) external {\\n _depositTxMaxFee = value;\\n }\\n}\\n\\ncontract MockTBTCVault is ITBTCVault {\\n struct Request {\\n uint64 requestedAt;\\n uint64 finalizedAt;\\n }\\n\\n mapping(uint256 => Request) internal _requests;\\n\\n uint32 public optimisticMintingFeeDivisor = 100; // 1%\\n\\n function optimisticMintingRequests(uint256 depositKey)\\n external\\n returns (uint64 requestedAt, uint64 finalizedAt)\\n {\\n Request memory request = _requests[depositKey];\\n return (request.requestedAt, request.finalizedAt);\\n }\\n\\n /// @dev The function is virtual to allow other projects using this mock\\n /// for AbtractTBTCDepositor-based contract tests to add any custom\\n /// logic needed.\\n function createOptimisticMintingRequest(uint256 depositKey) public virtual {\\n require(\\n _requests[depositKey].requestedAt == 0,\\n \\\"Request already exists\\\"\\n );\\n /* solhint-disable-next-line not-rely-on-time */\\n _requests[depositKey].requestedAt = uint64(block.timestamp);\\n }\\n\\n /// @dev The function is virtual to allow other projects using this mock\\n /// for AbtractTBTCDepositor-based contract tests to add any custom\\n /// logic needed.\\n function finalizeOptimisticMintingRequest(uint256 depositKey)\\n public\\n virtual\\n {\\n require(\\n _requests[depositKey].requestedAt != 0,\\n \\\"Request does not exist\\\"\\n );\\n require(\\n _requests[depositKey].finalizedAt == 0,\\n \\\"Request already finalized\\\"\\n );\\n /* solhint-disable-next-line not-rely-on-time */\\n _requests[depositKey].finalizedAt = uint64(block.timestamp);\\n }\\n\\n function setOptimisticMintingFeeDivisor(uint32 value) external {\\n optimisticMintingFeeDivisor = value;\\n }\\n}\\n\",\"keccak256\":\"0x325b87a52a0287e02cf63804c05d69379bc4a424fa656d93b3f285d4b4e72dfd\",\"license\":\"GPL-3.0-only\"}},\"version\":1}",
|
|
10595
10595
|
"storageLayout": {
|
|
10596
10596
|
"storage": [
|
|
10597
10597
|
{
|