diff --git a/contracts/artifacts/trails-contracts/TrailsUtils.sol/TrailsUtils.json b/contracts/artifacts/trails-contracts/TrailsUtils.sol/TrailsUtils.json new file mode 100644 index 00000000..557c337c --- /dev/null +++ b/contracts/artifacts/trails-contracts/TrailsUtils.sol/TrailsUtils.json @@ -0,0 +1 @@ +{"abi":[{"type":"receive","stateMutability":"payable"},{"type":"function","name":"handleSequenceDelegateCall","inputs":[{"name":"","type":"bytes32","internalType":"bytes32"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"data","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hydrateExecute","inputs":[{"name":"packedPayload","type":"bytes","internalType":"bytes"},{"name":"hydratePayload","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"hydrateExecuteAndSweep","inputs":[{"name":"packedPayload","type":"bytes","internalType":"bytes"},{"name":"hydratePayload","type":"bytes","internalType":"bytes"},{"name":"sweepTarget","type":"address","internalType":"address"},{"name":"tokensToSweep","type":"address[]","internalType":"address[]"},{"name":"sweepNative","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"recoverSapientSignature","inputs":[{"name":"payload","type":"tuple","internalType":"struct Payload.Decoded","components":[{"name":"kind","type":"uint8","internalType":"uint8"},{"name":"noChainId","type":"bool","internalType":"bool"},{"name":"calls","type":"tuple[]","internalType":"struct Payload.Call[]","components":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"gasLimit","type":"uint256","internalType":"uint256"},{"name":"delegateCall","type":"bool","internalType":"bool"},{"name":"onlyFallback","type":"bool","internalType":"bool"},{"name":"behaviorOnError","type":"uint256","internalType":"uint256"}]},{"name":"space","type":"uint256","internalType":"uint256"},{"name":"nonce","type":"uint256","internalType":"uint256"},{"name":"message","type":"bytes","internalType":"bytes"},{"name":"imageHash","type":"bytes32","internalType":"bytes32"},{"name":"digest","type":"bytes32","internalType":"bytes32"},{"name":"parentWallets","type":"address[]","internalType":"address[]"}]},{"name":"signature","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"imageHash","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"requireERC1155Approval","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"},{"name":"operator","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireERC1155ApprovalSelf","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"operator","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireERC721Approval","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireERC721ApprovalSelf","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireERC721Owner","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireERC721OwnerApproval","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireERC721OwnerApprovalSelf","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireERC721OwnerSelf","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinBalance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"minBalance","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinBalanceSelf","inputs":[{"name":"minBalance","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinERC1155Balance","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"minBalance","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinERC1155BalanceApproval","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"minBalance","type":"uint256","internalType":"uint256"},{"name":"operator","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinERC1155BalanceApprovalBatch","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"},{"name":"tokenIds","type":"uint256[]","internalType":"uint256[]"},{"name":"minBalances","type":"uint256[]","internalType":"uint256[]"},{"name":"operator","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinERC1155BalanceApprovalBatchSelf","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenIds","type":"uint256[]","internalType":"uint256[]"},{"name":"minBalances","type":"uint256[]","internalType":"uint256[]"},{"name":"operator","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinERC1155BalanceApprovalSelf","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"minBalance","type":"uint256","internalType":"uint256"},{"name":"operator","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinERC1155BalanceBatch","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"},{"name":"tokenIds","type":"uint256[]","internalType":"uint256[]"},{"name":"minBalances","type":"uint256[]","internalType":"uint256[]"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinERC1155BalanceBatchSelf","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenIds","type":"uint256[]","internalType":"uint256[]"},{"name":"minBalances","type":"uint256[]","internalType":"uint256[]"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinERC1155BalanceSelf","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"minBalance","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinERC20Allowance","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"},{"name":"minAllowance","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinERC20AllowanceSelf","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"},{"name":"minAllowance","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinERC20Balance","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"},{"name":"minBalance","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinERC20BalanceAllowance","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"},{"name":"minAmount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinERC20BalanceAllowanceSelf","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"},{"name":"minAmount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireMinERC20BalanceSelf","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"minBalance","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"requireNonExpired","inputs":[{"name":"expiration","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"sweep","inputs":[{"name":"sweepTarget","type":"address","internalType":"address"},{"name":"tokensToSweep","type":"address[]","internalType":"address[]"},{"name":"sweepNative","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"CallAborted","inputs":[{"name":"_opHash","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"_index","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"_returnData","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"CallFailed","inputs":[{"name":"_opHash","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"_index","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"_returnData","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"CallSkipped","inputs":[{"name":"_opHash","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"_index","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"CallSucceeded","inputs":[{"name":"_opHash","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"_index","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Sweep","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"DelegateCallFailed","inputs":[{"name":"result","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"DelegateCallNotAllowed","inputs":[{"name":"index","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC1155BalanceTooLow","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"minBalance","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC1155BatchBalanceTooLow","inputs":[{"name":"index","type":"uint256","internalType":"uint256"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"minBalance","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC1155NotApproved","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"},{"name":"operator","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20AllowanceTooLow","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"},{"name":"allowance","type":"uint256","internalType":"uint256"},{"name":"minAllowance","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20BalanceTooLow","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"minBalance","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC721NotApproved","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721NotOwner","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"owner","type":"address","internalType":"address"},{"name":"requiredOwner","type":"address","internalType":"address"}]},{"type":"error","name":"Expired","inputs":[{"name":"expiration","type":"uint256","internalType":"uint256"},{"name":"timestamp","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidKind","inputs":[{"name":"kind","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRepeatSection","inputs":[{"name":"_tindex","type":"uint256","internalType":"uint256"},{"name":"_cindex","type":"uint256","internalType":"uint256"},{"name":"_size","type":"uint256","internalType":"uint256"},{"name":"_tindex2","type":"uint256","internalType":"uint256"},{"name":"_cindex2","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"LengthMismatch","inputs":[{"name":"a","type":"uint256","internalType":"uint256"},{"name":"b","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"NativeBalanceTooLow","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"minBalance","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"NativeSweepFailed","inputs":[]},{"type":"error","name":"NonTransactionPayload","inputs":[]},{"type":"error","name":"NotEnoughGas","inputs":[{"name":"_payload","type":"tuple","internalType":"struct Payload.Decoded","components":[{"name":"kind","type":"uint8","internalType":"uint8"},{"name":"noChainId","type":"bool","internalType":"bool"},{"name":"calls","type":"tuple[]","internalType":"struct Payload.Call[]","components":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"gasLimit","type":"uint256","internalType":"uint256"},{"name":"delegateCall","type":"bool","internalType":"bool"},{"name":"onlyFallback","type":"bool","internalType":"bool"},{"name":"behaviorOnError","type":"uint256","internalType":"uint256"}]},{"name":"space","type":"uint256","internalType":"uint256"},{"name":"nonce","type":"uint256","internalType":"uint256"},{"name":"message","type":"bytes","internalType":"bytes"},{"name":"imageHash","type":"bytes32","internalType":"bytes32"},{"name":"digest","type":"bytes32","internalType":"bytes32"},{"name":"parentWallets","type":"address[]","internalType":"address[]"}]},{"name":"_index","type":"uint256","internalType":"uint256"},{"name":"_gasLeft","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OnlyDelegateCallAllowed","inputs":[]},{"type":"error","name":"Reverted","inputs":[{"name":"_payload","type":"tuple","internalType":"struct Payload.Decoded","components":[{"name":"kind","type":"uint8","internalType":"uint8"},{"name":"noChainId","type":"bool","internalType":"bool"},{"name":"calls","type":"tuple[]","internalType":"struct Payload.Call[]","components":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"gasLimit","type":"uint256","internalType":"uint256"},{"name":"delegateCall","type":"bool","internalType":"bool"},{"name":"onlyFallback","type":"bool","internalType":"bool"},{"name":"behaviorOnError","type":"uint256","internalType":"uint256"}]},{"name":"space","type":"uint256","internalType":"uint256"},{"name":"nonce","type":"uint256","internalType":"uint256"},{"name":"message","type":"bytes","internalType":"bytes"},{"name":"imageHash","type":"bytes32","internalType":"bytes32"},{"name":"digest","type":"bytes32","internalType":"bytes32"},{"name":"parentWallets","type":"address[]","internalType":"address[]"}]},{"name":"_index","type":"uint256","internalType":"uint256"},{"name":"_returnData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"UnknownHydrateDataCommand","inputs":[{"name":"flag","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"UnknownHydrateTypeCommand","inputs":[{"name":"flag","type":"uint256","internalType":"uint256"}]}],"bytecode":{"object":"0x60a08060405234602957306080526135af908161002e8239608051818181610c2d015261246b0152f35b5f80fdfe6080604052600436101561001a575b3615610018575f80fd5b005b5f3560e01c806284290d146101f7578062e79cd5146101f2578063024ea911146101ed57806303bbbd65146101e85780630cb17e5c146101e357806313792a4a146101de57806318c9003a146101d95780631c0bdfab146101d45780632ab793d7146101cf5780632f2227ba146101ca578063317df1e8146101c5578063333f790d146101c0578063372618cb146101bb57806342ab921e146101b6578063476a5f40146101b15780634c4e814c146101ac578063505c7ed3146101a75780636d42cf03146101a25780636ef1f0dd1461019d5780637f29d5381461019857806380df36a0146101935780638d0a9ea71461018e5780639c8d8ea114610189578063a7b7ec5a14610184578063ac38d0891461017f578063cda38f4c1461017a578063e246466a14610175578063f38bce1514610170578063fdc254281461016b5763fe08e7ca0361000e576110e9565b61105f565b61103b565b611022565b61100b565b610fb0565b610f3e565b610f19565b610f02565b610e51565b610ddc565b610dc3565b610d4d565b610cf6565b610bdb565b610b47565b610b2d565b610ae4565b610aa9565b610a42565b6109f9565b6109a2565b61097d565b61088e565b61047c565b6103fc565b6103b5565b610309565b6102b4565b61021e565b73ffffffffffffffffffffffffffffffffffffffff81160361021a57565b5f80fd5b3461021a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5761001860043561025c816101fc565b6024356044359133906113f7565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc606091011261021a576004356102a0816101fc565b906024356102ad816101fc565b9060443590565b3461021a576100186102c53661026a565b916102d183338361151b565b339061161c565b9181601f8401121561021a5782359167ffffffffffffffff831161021a576020808501948460051b01011161021a57565b3461021a5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57600435610344816101fc565b60243590610351826101fc565b60443567ffffffffffffffff811161021a576103719036906004016102d8565b92909160643567ffffffffffffffff811161021a576100189461039b6103b09236906004016102d8565b91608435966103a9886101fc565b86866118ac565b611a61565b3461021a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a576100186004356103f3816101fc565b60243590611b4e565b3461021a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5761001860043561043a816101fc565b60243590610447826101fc565b3390611a61565b9181601f8401121561021a5782359167ffffffffffffffff831161021a576020838186019501011161021a57565b3461021a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760043567ffffffffffffffff811161021a57806004016101207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc833603011261021a5760243567ffffffffffffffff811161021a5761050e90369060040161044e565b909160ff61051b82611103565b166108665761053a60648501356084860135905f5260205260405f2090565b61054660248601611111565b156108525761055c905f525f60205260405f2090565b9193925b60445f9401925b610571848461111e565b905085101561069e57610696600191866105958161058f898961111e565b9061119f565b6106866105a1826111e4565b61065a6020840135936060810135906105bc60808201611111565b60c06105ca60a08401611111565b92013592604051978896602088019a8b93909796959273ffffffffffffffffffffffffffffffffffffffff60e09693610100875260046101008801527f63616c6c0000000000000000000000000000000000000000000000000000000061012088015261014087019a602088015216604086015260608501526080840152151560a0830152151560c08201520152565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261123c565b519020905f5260205260405f2090565b940193610567565b93509391905f5b8381106106b757604051858152602090f35b9360808361070561ffff6106dd6106f2969798998b60019092919283013560f81c920190565b90968793918c81013560f01c91600290910190565b9216918b81013560f01c91600290910190565b9061073a836107306107268c61058f607f61ffff8998169a169a8b9261111e565b604081019061127d565b82880192916112ce565b909890961615610838575060038101966001918c019182013560f01c95913560f81c9491856107698c8c61111e565b610773929161119f565b604081016107809161127d565b888781019161078e936112ce565b929091369061079c92611320565b805190602001209136906107af92611320565b80519060200120036107e357916107cc93916107d9969593611c67565b905f5260205260405f2090565b935b9291906106a5565b6040517feacd10be000000000000000000000000000000000000000000000000000000008152600481019190915260248101919091526044810182905260648101839052608481018490528060a481015b0390fd5b9691905061084c959492506107cc93611ba5565b936107db565b5f9081524660205260409020919392610560565b7f3c28730f000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461021a5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a576004356108c9816101fc565b60243567ffffffffffffffff811161021a576108e99036906004016102d8565b9160443567ffffffffffffffff811161021a57610018936109116104479236906004016102d8565b916064359561091f876101fc565b33866118ac565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc608091011261021a5760043561095c816101fc565b90602435610969816101fc565b90604435610976816101fc565b9060643590565b3461021a5761001861098e36610926565b9261099d848483959495611ce6565b611e06565b3461021a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a576100186004356109e0816101fc565b6024356109ec816101fc565b604435916103b0836101fc565b3461021a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57610018600435610a37816101fc565b602435903390611ce6565b3461021a5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57610018600435610a80816101fc565b602435610a8c816101fc565b608435916103b0606435604435610aa2866101fc565b84846113f7565b3461021a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5761001860043533611b4e565b3461021a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57610018600435610b22816101fc565b60243590339061151b565b3461021a57610018610b3e36610926565b9291909161161c565b3461021a5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57600435610b82816101fc565b602435610b8e816101fc565b60443567ffffffffffffffff811161021a57610bae9036906004016102d8565b606435939167ffffffffffffffff851161021a57610bd36100189536906004016102d8565b9490936118ac565b3461021a5760c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760a43567ffffffffffffffff811161021a57610c2a90369060040161044e565b907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff81163014610cce57825f939284936040519283928337810184815203915af4610c88611356565b9015610c9057005b610834906040519182917ff7a01e4d000000000000000000000000000000000000000000000000000000008352602060048401526024830190611385565b7f827e6c75000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461021a5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57610018600435610d34816101fc565b602435610d40816101fc565b60443590606435926113f7565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760043567ffffffffffffffff811161021a57610d9790369060040161044e565b6024359167ffffffffffffffff831161021a57610dbb61001893369060040161044e565b9290916121af565b3461021a57610018610dd43661026a565b91339061161c565b3461021a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760043580421015610e1857005b7faa2fd925000000000000000000000000000000000000000000000000000000005f526004524260245260445ffd5b8015150361021a57565b60a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760043567ffffffffffffffff811161021a57610e9b90369060040161044e565b9060243567ffffffffffffffff811161021a57610ebc90369060040161044e565b92604435610ec9816101fc565b6064359467ffffffffffffffff861161021a57610eed6100189636906004016102d8565b94909360843596610efd88610e47565b6113c8565b3461021a57610018610f133661026a565b9161151b565b3461021a57610018610f2a36610926565b92610f3984848395949561151b565b61161c565b3461021a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57600435610f79816101fc565b6024359067ffffffffffffffff821161021a57610f9d6100189236906004016102d8565b9060443592610fab84610e47565b612532565b3461021a5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57610018600435610fee816101fc565b60643590610447604435602435611004856101fc565b33846113f7565b3461021a5761001861101c3661026a565b91611ce6565b3461021a576100186110333661026a565b913390611e06565b3461021a5761001861104c3661026a565b91611058833383611ce6565b3390611e06565b3461021a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760043561109a816101fc565b60243567ffffffffffffffff811161021a576110ba9036906004016102d8565b916044359267ffffffffffffffff841161021a576110df6100189436906004016102d8565b93909233906118ac565b3461021a576100186110fa36610926565b92919091611e06565b3560ff8116810361021a5790565b3561111b81610e47565b90565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561021a570180359067ffffffffffffffff821161021a57602001918160051b3603831361021a57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b91908110156111df5760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff218136030182121561021a570190565b611172565b3561111b816101fc565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60e0810190811067ffffffffffffffff82111761123757604052565b6111ee565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761123757604052565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561021a570180359067ffffffffffffffff821161021a5760200191813603831361021a57565b9093929384831161021a57841161021a578101920390565b67ffffffffffffffff811161123757601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b92919261132c826112e6565b9161133a604051938461123c565b82948184528183011161021a578281602093845f960137010152565b3d15611380573d90611367826112e6565b91611375604051938461123c565b82523d5f602084013e565b606090565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b916113db979695949391610fab936121af565b565b9081602091031261021a575190565b6040513d5f823e3d90fd5b91929092604051907efdd58e00000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff8516600483015280602483015260208260448173ffffffffffffffffffffffffffffffffffffffff88165afa918215611516575f926114e5575b5082821061147f575050505050565b6040517fbf8ee56100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff948516600482015294909316602485015260448401929092526064830191909152608482015260a490fd5b61150891925060203d60201161150f575b611500818361123c565b8101906113dd565b905f611470565b503d6114f6565b6113ec565b919091604051917f70a0823100000000000000000000000000000000000000000000000000000000835273ffffffffffffffffffffffffffffffffffffffff8416600484015260208360248173ffffffffffffffffffffffffffffffffffffffff86165afa928315611516575f936115fb575b5080831061159c5750505050565b60606040519485947f7684050d00000000000000000000000000000000000000000000000000000000865273ffffffffffffffffffffffffffffffffffffffff6004870192816080850197168452166020830152604082015201520390fd5b61161591935060203d60201161150f57611500818361123c565b915f61158e565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015284811660248301529190911693929091602083604481885afa928315611516575f936116f5575b50838310611695575050505050565b60a495509073ffffffffffffffffffffffffffffffffffffffff8092604051967f73cf338a000000000000000000000000000000000000000000000000000000008852600488015216602486015216604484015260648301526084820152fd5b61170f91935060203d60201161150f57611500818361123c565b915f611686565b67ffffffffffffffff81116112375760051b60200190565b9061173882611716565b611745604051918261123c565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06117738294611716565b0190602036910137565b80518210156111df5760209160051b010190565b60208183031261021a5780519067ffffffffffffffff821161021a57019080601f8301121561021a5781516117c581611716565b926117d3604051948561123c565b81845260208085019260051b82010192831161021a57602001905b8282106117fb5750505090565b81518152602091820191016117ee565b604081016040825282518091526020606083019301905f5b8181106118705750505060208183039101528281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831161021a5760209260051b809284830137010190565b825173ffffffffffffffffffffffffffffffffffffffff16855260209485019490920191600101611823565b91908110156111df5760051b0190565b9190939293858503611a1a579084916118c48361172e565b905f5b8481106119df575050925f929173ffffffffffffffffffffffffffffffffffffffff61192395604051968795869485937f4e1273f40000000000000000000000000000000000000000000000000000000085526004850161180b565b0392165afa908115611516575f916119bd575b505f5b838110611947575050505050565b611951818361177d565b5161195d82878661189c565b351161196b57600101611939565b82611985828761197e826119ba9761177d565b519361189c565b7fe3758044000000000000000000000000000000000000000000000000000000005f5260049290925260245235604452606490565b5ffd5b6119d991503d805f833e6119d1818361123c565b810190611791565b5f611936565b82939450611a0f826119f4836001959661177d565b9073ffffffffffffffffffffffffffffffffffffffff169052565b0190869392916118c7565b7fab8b67c6000000000000000000000000000000000000000000000000000000005f526004859052602486905260445ffd5b9081602091031261021a575161111b81610e47565b6040517fe985e9c500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015284811660248301529190911690602081604481855afa908115611516575f91611b1f575b5015611ad357505050565b73ffffffffffffffffffffffffffffffffffffffff929183917f628b17c6000000000000000000000000000000000000000000000000000000005f52600452166024521660445260645ffd5b611b41915060203d602011611b47575b611b39818361123c565b810190611a4c565b5f611ac8565b503d611b2f565b803190828210611b5d57505050565b73ffffffffffffffffffffffffffffffffffffffff907f1afe1f42000000000000000000000000000000000000000000000000000000005f521660045260245260445260645ffd5b92611c61917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6101009380604051978895602087019a60808c52600e60a08901527f7374617469632d73656374696f6e00000000000000000000000000000000000060c08901526040880152606087015260c060808701528160e0870152868601375f8582860101520116810103017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261123c565b51902090565b939192909260405193602085019560c08752600e60e08701527f7265706561742d73656374696f6e00000000000000000000000000000000000061010087015260408601526060850152608084015260a083015260c08201526101008152611c616101208261123c565b9081602091031261021a575161111b816101fc565b906040517f6352211e00000000000000000000000000000000000000000000000000000000815283600482015260208160248173ffffffffffffffffffffffffffffffffffffffff87165afa908115611516575f91611dd7575b5073ffffffffffffffffffffffffffffffffffffffff821673ffffffffffffffffffffffffffffffffffffffff821603611d7a5750505050565b6040517f9108eb1400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152602481019490945282166044840152166064820152608490fd5b611df9915060203d602011611dff575b611df1818361123c565b810190611cd1565b5f611d40565b503d611de7565b919073ffffffffffffffffffffffffffffffffffffffff83166040517f081812fc00000000000000000000000000000000000000000000000000000000815260208180611e5b89600483019190602083019252565b0381855afa908115611516575f91611f87575b5073ffffffffffffffffffffffffffffffffffffffff808516911614159081611efa575b50611e9d5750505050565b6040517f6a7e2cc800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152602481019490945282166044840152166064820152608490fd5b6040517fe985e9c500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152851660248201529150602090829060449082905afa908115611516575f91611f68575b50155f611e92565b611f81915060203d602011611b4757611b39818361123c565b5f611f60565b611fa0915060203d602011611dff57611df1818361123c565b5f611e6e565b9080602083519182815201916020808360051b8301019401925f915b838310611fd157505050505090565b9091929394602080827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0856001950301865288519073ffffffffffffffffffffffffffffffffffffffff8251168152828201518382015260c080612044604085015160e0604086015260e0850190611385565b936060810151606085015260808101511515608085015260a0810151151560a0850152015191015297019301930191939290611fc2565b90602080835192838152019201905f5b8181106120985750505090565b825173ffffffffffffffffffffffffffffffffffffffff1684526020938401939092019160010161208b565b805160ff16825261111b916020828101511515908201526101006121226120fc60408501516101206040860152610120850190611fa6565b606085015160608501526080850151608085015260a085015184820360a0860152611385565b9260c081015160c084015260e081015160e084015201519061010081840391015261207b565b612160604092959493956060835260608301906120c4565b9460208201520152565b61111b9392606092825260208201528160408201520190611385565b61219c61111b94926060835260608301906120c4565b9260208201526040818403910152611385565b906121b991612864565b6121e46121c582612b25565b6121d0368686611320565b60208151910120905f5260205260405f2090565b916121ef8482612c31565b915f926040850192835151975f5b898110612211575b50505050505050505050565b80841461251b575b61222481875161177d565b519661223360a0890151151590565b80612513575b6124d357505f9660608101518015908115806124ca575b61249257608083018051151580612453575b6124265751156123dd57906122a39161228f845173ffffffffffffffffffffffffffffffffffffffff1690565b91156123d857505a5b604084015191613042565b156122e6575b50604080518a815260208101839052600192917f5a589b1d8062f33451d29cae3dabd9b2e36c62aee644178c600977ca8dda661a91a15b016121fd565b60c00180511561239b57600181511461235c5751600214612307575f6122a9565b9796505050505050507fc2c704302430fe0dc8d95f272e2f4e54bbbc51a3327fd5d75ab41f9fc8fd129b925061234a61233e613053565b6040519384938461216a565b0390a15f808080808080808080612205565b5087610834612369613053565b6040519384937f7f6b0bb100000000000000000000000000000000000000000000000000000000855260048501612186565b509550600180967f115f347c00e69f252cd6b63c4f81022a9564c6befe8aa719cb74640a4a306f0d818b6123d061233e613053565b0390a16122e0565b612298565b61241b916123ff845173ffffffffffffffffffffffffffffffffffffffff1690565b916020850151915f1461242057505a905b604085015192613031565b6122a3565b90612410565b7f230d1ccc000000000000000000000000000000000000000000000000000000005f52600485905260245ffd5b5073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163014612262565b838b6108345a6040519384937f2139527400000000000000000000000000000000000000000000000000000000855260048501612148565b50805a10612250565b604080518b815260208101849052919850600192917f9ae934bf8a986157c889a24c3b3fa85e74b7e4ee4b1f8fc6e7362cb4c1d19d8b91819081016123d0565b508015612239565b9192819361252a92868a612c96565b929091612219565b9092919073ffffffffffffffffffffffffffffffffffffffff8116612733575033925b5f5b8281106125f8575050506125685750565b479081612573575050565b5f80808085855af1612583611356565b50156125d05760405191825273ffffffffffffffffffffffffffffffffffffffff16905f907fed679328aebf74ede77ae09efcf36e90244f83643dadac1c2d9f0b21a46f6ab790602090a3565b7f16b452f7000000000000000000000000000000000000000000000000000000005f5260045ffd5b61262a61261161261161260c84878761189c565b6111e4565b73ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529190602090839060249082905afa8015611516576001925f91612715575b5080612682575b5001612557565b61269d818861269861261161260c878b8b61189c565b61306d565b73ffffffffffffffffffffffffffffffffffffffff6126c061260c84888861189c565b167fed679328aebf74ede77ae09efcf36e90244f83643dadac1c2d9f0b21a46f6ab76040518061270c73ffffffffffffffffffffffffffffffffffffffff8c1695829190602083019252565b0390a35f61267b565b61272d915060203d811161150f57611500818361123c565b5f612674565b92612555565b60405190610120820182811067ffffffffffffffff821117611237576040526060610100835f81525f60208201528260408201525f838201525f60808201528260a08201525f60c08201525f60e08201520152565b9061279882611716565b6127a5604051918261123c565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06127d38294611716565b01905f5b8281106127e357505050565b6020906040516127f28161121b565b5f81525f83820152606060408201525f60608201525f60808201525f60a08201525f60c0820152828285010152016127d7565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9190820180921161285f57565b612825565b91909161286f612739565b5f815292600190823560f81c827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81831601612b0e57505f60608701525b60076128bc60ff831660011c90565b1680612abd575b50601081811603612a8857506001925b6128dc8461278e565b92604087019384525f905b8582106128f657505050505050565b8281013560f81c90600101909181600180851603612a66575061293a3061291e83895161177d565b519073ffffffffffffffffffffffffffffffffffffffff169052565b600280841614612a46575b6004808416146129f8575b6008808416146129c5575b6129ae6129a860c0856129878a608061297e8860108060019c9d1614935161177d565b51019015159052565b61299e8a60a061297e88602080871614935161177d565b1660061c60031690565b60ff1690565b60c06129bb83895161177d565b51015201906128e7565b6001916129ae906129a89060c0908781013590602001969060606129ea878d5161177d565b51015295945050505061295b565b90612a40908481013560e81c90600301612a39612a20612a188484612852565b838a8a6112ce565b91906040612a2f888d5161177d565b5101923691611320565b9052612852565b90612950565b90838101359060200191906020612a5e83895161177d565b510152612945565b612a8392508481013560601c90601401929061291e83895161177d565b61293a565b602090811603612aaa5761ffff918381013560f01c906002015b9216926128d3565b60ff918381013560f81c90600101612aa2565b612b01919385929190928160031b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001821b019185013590610100031c16920190565b929060808701525f6128c3565b80850135606090811c9088015260140192506128ad565b602081015115612c165761065a611c61612bd45f5b60405160208101917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f83527f4aa45ca7ad825ceb1bf35643f0a58c295239df563b1b565c2485f96477c5631860408301527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de606083015260808201523060a082015260a08152612bcb60c08261123c565b51902093613179565b60405192839160208301958690916042927f19010000000000000000000000000000000000000000000000000000000000008352600283015260228201520190565b61065a611c61612bd446612b3a565b908210156111df570190565b919015612c42576001913560f81c90565b5f91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461285f5760010190565b9492612cb190949291945b8581013560f81c91600190910190565b60ff8216818115612faa5750918785612cdb8694858b600f612cd4829a60041c90565b9716613352565b9095908060048611612f30575060028101959082013560f01c94869060018103612d275750505050916040612d1a612d229482612cb19895015161177d565b5101516133e1565b612ca1565b60028103612d555750505050916040612d4a612d229482612cb19895015161177d565b5101519131916133c8565b94959460038103612e3c57505050604080612da5602094612d9b73ffffffffffffffffffffffffffffffffffffffff9899612dfb9660149092919283013560601c920190565b999094015161177d565b510151966040519586809481937f70a082310000000000000000000000000000000000000000000000000000000083526004830191909173ffffffffffffffffffffffffffffffffffffffff6020820193169052565b0392165afa90811561151657612cb194612d22935f93612e1c575b506133c8565b612e3591935060203d811161150f57611500818361123c565b915f612e16565b919291600414612e57575b505050505050612cb19150612ca1565b612f05959650612ea7602094612e9d60ff60409686612e868997612e969960149092919283013560601c920190565b90988183013560f81c9160010190565b9316613352565b999095015161177d565b5101516040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff988916600482015292881660248401529691948592839182906044820190565b0392165afa90811561151657612cb194612f25935f93612e1c57506133c8565b865f85858983612e47565b96955050505050600581145f14612f58575090612d22612cb19261291e8660408b015161177d565b60068103612f7f575090612cb191316020612f778660408b015161177d565b510152612ca1565b7ff024a3e2000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b975050505091929050838281105f1461300a57612ffa612fd46129a8926130069561300095612c25565b357fff000000000000000000000000000000000000000000000000000000000000001690565b60f81c90565b92612c69565b9190565b5050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90565b915f9391849360208451940192f190565b915f9291839260208351930191f490565b3d90604051916020818401016040528083525f602084013e565b9173ffffffffffffffffffffffffffffffffffffffff604051927fa9059cbb000000000000000000000000000000000000000000000000000000005f521660045260245260205f60448180865af160015f5114811615613117575b604091909152156130d65750565b7f5274afe7000000000000000000000000000000000000000000000000000000005f5273ffffffffffffffffffffffffffffffffffffffff1660045260245ffd5b600181151661312d573d15833b151516166130c8565b503d5f823e3d90fd5b80516020909101905f5b81811061314d5750505090565b825173ffffffffffffffffffffffffffffffffffffffff16845260209384019390920191600101613140565b6101008101516040516131948161065a602082018095613136565b519020906131a3815160ff1690565b60ff81168061321c57505090611c616131bf604084015161343f565b9261065a60806060830151920151936040519485936020850197889094939260809260a08301967f11e1e4079a79a66e4ade50033cfe2678cdd5341d2dfe5ef9513edb1a0be147a284526020840152604083015260608201520152565b6001810361327a57505060a001518051602091820120604080517fe19a3b94fc3c7ece3f890d98a99bc422615537a08dea0603fa8425867d87d46693810193845290810191909152606081019290925290611c61816080810161065a565b600281036132d057505060c00151604080517f11fdeb7e8373a1aa96bfac8d0ea91526b2c5d15e5cee20e0543e780258f3e8e460208201908152918101929092526060820192909252611c61816080810161065a565b600303613324575060e00151604080517fe19a3b94fc3c7ece3f890d98a99bc422615537a08dea0603fa8425867d87d46660208201908152918101929092526060820192909252611c61816080810161065a565b7f04818320000000000000000000000000000000000000000000000000000000005f5260ff1660045260245ffd5b929392600f16915081613366575050309190565b60018203613375575050339190565b60028203613384575050329190565b6003829492146133ba57837f324dd124000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b81013560601c925060140190565b908151602082019082821091111761021a570160200152565b908151601482019082821091111761021a576020910101906bffffffffffffffffffffffff8251169060601b179052565b80516020909101905f5b8181106134295750505090565b825184526020938401939092019160010161341c565b9081517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061348561346f83611716565b9261347d604051948561123c565b808452611716565b013660208301375f5b835181101561356057806134a46001928661177d565b5173ffffffffffffffffffffffffffffffffffffffff81511690602081015190604081015160208151910120906060810151608082015115159060c060a08401511515930151936040519560208701977f0603985259a953da1f65a522f589c17bd1d0117ec1d3abb7c0788aef251ef437895260408801526060870152608086015260a085015260c084015260e0830152610100820152610100815261354c6101208261123c565b519020613559828561177d565b520161348e565b50909150604051611c618161065a60208201809561341256fea2646970667358221220a71302c1229d67897efb0ef833a703c8223d89df73ebf6079a4df6272b8fc02c64736f6c634300081e0033","sourceMap":"610:71:42:-:0;;;;;;;2496:4:43;2488:13;;610:71:42;;;;;;2488:13:43;610:71:42;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x6080604052600436101561001a575b3615610018575f80fd5b005b5f3560e01c806284290d146101f7578062e79cd5146101f2578063024ea911146101ed57806303bbbd65146101e85780630cb17e5c146101e357806313792a4a146101de57806318c9003a146101d95780631c0bdfab146101d45780632ab793d7146101cf5780632f2227ba146101ca578063317df1e8146101c5578063333f790d146101c0578063372618cb146101bb57806342ab921e146101b6578063476a5f40146101b15780634c4e814c146101ac578063505c7ed3146101a75780636d42cf03146101a25780636ef1f0dd1461019d5780637f29d5381461019857806380df36a0146101935780638d0a9ea71461018e5780639c8d8ea114610189578063a7b7ec5a14610184578063ac38d0891461017f578063cda38f4c1461017a578063e246466a14610175578063f38bce1514610170578063fdc254281461016b5763fe08e7ca0361000e576110e9565b61105f565b61103b565b611022565b61100b565b610fb0565b610f3e565b610f19565b610f02565b610e51565b610ddc565b610dc3565b610d4d565b610cf6565b610bdb565b610b47565b610b2d565b610ae4565b610aa9565b610a42565b6109f9565b6109a2565b61097d565b61088e565b61047c565b6103fc565b6103b5565b610309565b6102b4565b61021e565b73ffffffffffffffffffffffffffffffffffffffff81160361021a57565b5f80fd5b3461021a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5761001860043561025c816101fc565b6024356044359133906113f7565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc606091011261021a576004356102a0816101fc565b906024356102ad816101fc565b9060443590565b3461021a576100186102c53661026a565b916102d183338361151b565b339061161c565b9181601f8401121561021a5782359167ffffffffffffffff831161021a576020808501948460051b01011161021a57565b3461021a5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57600435610344816101fc565b60243590610351826101fc565b60443567ffffffffffffffff811161021a576103719036906004016102d8565b92909160643567ffffffffffffffff811161021a576100189461039b6103b09236906004016102d8565b91608435966103a9886101fc565b86866118ac565b611a61565b3461021a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a576100186004356103f3816101fc565b60243590611b4e565b3461021a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5761001860043561043a816101fc565b60243590610447826101fc565b3390611a61565b9181601f8401121561021a5782359167ffffffffffffffff831161021a576020838186019501011161021a57565b3461021a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760043567ffffffffffffffff811161021a57806004016101207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc833603011261021a5760243567ffffffffffffffff811161021a5761050e90369060040161044e565b909160ff61051b82611103565b166108665761053a60648501356084860135905f5260205260405f2090565b61054660248601611111565b156108525761055c905f525f60205260405f2090565b9193925b60445f9401925b610571848461111e565b905085101561069e57610696600191866105958161058f898961111e565b9061119f565b6106866105a1826111e4565b61065a6020840135936060810135906105bc60808201611111565b60c06105ca60a08401611111565b92013592604051978896602088019a8b93909796959273ffffffffffffffffffffffffffffffffffffffff60e09693610100875260046101008801527f63616c6c0000000000000000000000000000000000000000000000000000000061012088015261014087019a602088015216604086015260608501526080840152151560a0830152151560c08201520152565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261123c565b519020905f5260205260405f2090565b940193610567565b93509391905f5b8381106106b757604051858152602090f35b9360808361070561ffff6106dd6106f2969798998b60019092919283013560f81c920190565b90968793918c81013560f01c91600290910190565b9216918b81013560f01c91600290910190565b9061073a836107306107268c61058f607f61ffff8998169a169a8b9261111e565b604081019061127d565b82880192916112ce565b909890961615610838575060038101966001918c019182013560f01c95913560f81c9491856107698c8c61111e565b610773929161119f565b604081016107809161127d565b888781019161078e936112ce565b929091369061079c92611320565b805190602001209136906107af92611320565b80519060200120036107e357916107cc93916107d9969593611c67565b905f5260205260405f2090565b935b9291906106a5565b6040517feacd10be000000000000000000000000000000000000000000000000000000008152600481019190915260248101919091526044810182905260648101839052608481018490528060a481015b0390fd5b9691905061084c959492506107cc93611ba5565b936107db565b5f9081524660205260409020919392610560565b7f3c28730f000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461021a5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a576004356108c9816101fc565b60243567ffffffffffffffff811161021a576108e99036906004016102d8565b9160443567ffffffffffffffff811161021a57610018936109116104479236906004016102d8565b916064359561091f876101fc565b33866118ac565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc608091011261021a5760043561095c816101fc565b90602435610969816101fc565b90604435610976816101fc565b9060643590565b3461021a5761001861098e36610926565b9261099d848483959495611ce6565b611e06565b3461021a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a576100186004356109e0816101fc565b6024356109ec816101fc565b604435916103b0836101fc565b3461021a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57610018600435610a37816101fc565b602435903390611ce6565b3461021a5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57610018600435610a80816101fc565b602435610a8c816101fc565b608435916103b0606435604435610aa2866101fc565b84846113f7565b3461021a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5761001860043533611b4e565b3461021a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57610018600435610b22816101fc565b60243590339061151b565b3461021a57610018610b3e36610926565b9291909161161c565b3461021a5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57600435610b82816101fc565b602435610b8e816101fc565b60443567ffffffffffffffff811161021a57610bae9036906004016102d8565b606435939167ffffffffffffffff851161021a57610bd36100189536906004016102d8565b9490936118ac565b3461021a5760c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760a43567ffffffffffffffff811161021a57610c2a90369060040161044e565b907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff81163014610cce57825f939284936040519283928337810184815203915af4610c88611356565b9015610c9057005b610834906040519182917ff7a01e4d000000000000000000000000000000000000000000000000000000008352602060048401526024830190611385565b7f827e6c75000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461021a5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57610018600435610d34816101fc565b602435610d40816101fc565b60443590606435926113f7565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760043567ffffffffffffffff811161021a57610d9790369060040161044e565b6024359167ffffffffffffffff831161021a57610dbb61001893369060040161044e565b9290916121af565b3461021a57610018610dd43661026a565b91339061161c565b3461021a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760043580421015610e1857005b7faa2fd925000000000000000000000000000000000000000000000000000000005f526004524260245260445ffd5b8015150361021a57565b60a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760043567ffffffffffffffff811161021a57610e9b90369060040161044e565b9060243567ffffffffffffffff811161021a57610ebc90369060040161044e565b92604435610ec9816101fc565b6064359467ffffffffffffffff861161021a57610eed6100189636906004016102d8565b94909360843596610efd88610e47565b6113c8565b3461021a57610018610f133661026a565b9161151b565b3461021a57610018610f2a36610926565b92610f3984848395949561151b565b61161c565b3461021a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57600435610f79816101fc565b6024359067ffffffffffffffff821161021a57610f9d6100189236906004016102d8565b9060443592610fab84610e47565b612532565b3461021a5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57610018600435610fee816101fc565b60643590610447604435602435611004856101fc565b33846113f7565b3461021a5761001861101c3661026a565b91611ce6565b3461021a576100186110333661026a565b913390611e06565b3461021a5761001861104c3661026a565b91611058833383611ce6565b3390611e06565b3461021a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760043561109a816101fc565b60243567ffffffffffffffff811161021a576110ba9036906004016102d8565b916044359267ffffffffffffffff841161021a576110df6100189436906004016102d8565b93909233906118ac565b3461021a576100186110fa36610926565b92919091611e06565b3560ff8116810361021a5790565b3561111b81610e47565b90565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561021a570180359067ffffffffffffffff821161021a57602001918160051b3603831361021a57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b91908110156111df5760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff218136030182121561021a570190565b611172565b3561111b816101fc565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60e0810190811067ffffffffffffffff82111761123757604052565b6111ee565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761123757604052565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561021a570180359067ffffffffffffffff821161021a5760200191813603831361021a57565b9093929384831161021a57841161021a578101920390565b67ffffffffffffffff811161123757601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b92919261132c826112e6565b9161133a604051938461123c565b82948184528183011161021a578281602093845f960137010152565b3d15611380573d90611367826112e6565b91611375604051938461123c565b82523d5f602084013e565b606090565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b916113db979695949391610fab936121af565b565b9081602091031261021a575190565b6040513d5f823e3d90fd5b91929092604051907efdd58e00000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff8516600483015280602483015260208260448173ffffffffffffffffffffffffffffffffffffffff88165afa918215611516575f926114e5575b5082821061147f575050505050565b6040517fbf8ee56100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff948516600482015294909316602485015260448401929092526064830191909152608482015260a490fd5b61150891925060203d60201161150f575b611500818361123c565b8101906113dd565b905f611470565b503d6114f6565b6113ec565b919091604051917f70a0823100000000000000000000000000000000000000000000000000000000835273ffffffffffffffffffffffffffffffffffffffff8416600484015260208360248173ffffffffffffffffffffffffffffffffffffffff86165afa928315611516575f936115fb575b5080831061159c5750505050565b60606040519485947f7684050d00000000000000000000000000000000000000000000000000000000865273ffffffffffffffffffffffffffffffffffffffff6004870192816080850197168452166020830152604082015201520390fd5b61161591935060203d60201161150f57611500818361123c565b915f61158e565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015284811660248301529190911693929091602083604481885afa928315611516575f936116f5575b50838310611695575050505050565b60a495509073ffffffffffffffffffffffffffffffffffffffff8092604051967f73cf338a000000000000000000000000000000000000000000000000000000008852600488015216602486015216604484015260648301526084820152fd5b61170f91935060203d60201161150f57611500818361123c565b915f611686565b67ffffffffffffffff81116112375760051b60200190565b9061173882611716565b611745604051918261123c565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06117738294611716565b0190602036910137565b80518210156111df5760209160051b010190565b60208183031261021a5780519067ffffffffffffffff821161021a57019080601f8301121561021a5781516117c581611716565b926117d3604051948561123c565b81845260208085019260051b82010192831161021a57602001905b8282106117fb5750505090565b81518152602091820191016117ee565b604081016040825282518091526020606083019301905f5b8181106118705750505060208183039101528281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831161021a5760209260051b809284830137010190565b825173ffffffffffffffffffffffffffffffffffffffff16855260209485019490920191600101611823565b91908110156111df5760051b0190565b9190939293858503611a1a579084916118c48361172e565b905f5b8481106119df575050925f929173ffffffffffffffffffffffffffffffffffffffff61192395604051968795869485937f4e1273f40000000000000000000000000000000000000000000000000000000085526004850161180b565b0392165afa908115611516575f916119bd575b505f5b838110611947575050505050565b611951818361177d565b5161195d82878661189c565b351161196b57600101611939565b82611985828761197e826119ba9761177d565b519361189c565b7fe3758044000000000000000000000000000000000000000000000000000000005f5260049290925260245235604452606490565b5ffd5b6119d991503d805f833e6119d1818361123c565b810190611791565b5f611936565b82939450611a0f826119f4836001959661177d565b9073ffffffffffffffffffffffffffffffffffffffff169052565b0190869392916118c7565b7fab8b67c6000000000000000000000000000000000000000000000000000000005f526004859052602486905260445ffd5b9081602091031261021a575161111b81610e47565b6040517fe985e9c500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015284811660248301529190911690602081604481855afa908115611516575f91611b1f575b5015611ad357505050565b73ffffffffffffffffffffffffffffffffffffffff929183917f628b17c6000000000000000000000000000000000000000000000000000000005f52600452166024521660445260645ffd5b611b41915060203d602011611b47575b611b39818361123c565b810190611a4c565b5f611ac8565b503d611b2f565b803190828210611b5d57505050565b73ffffffffffffffffffffffffffffffffffffffff907f1afe1f42000000000000000000000000000000000000000000000000000000005f521660045260245260445260645ffd5b92611c61917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6101009380604051978895602087019a60808c52600e60a08901527f7374617469632d73656374696f6e00000000000000000000000000000000000060c08901526040880152606087015260c060808701528160e0870152868601375f8582860101520116810103017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261123c565b51902090565b939192909260405193602085019560c08752600e60e08701527f7265706561742d73656374696f6e00000000000000000000000000000000000061010087015260408601526060850152608084015260a083015260c08201526101008152611c616101208261123c565b9081602091031261021a575161111b816101fc565b906040517f6352211e00000000000000000000000000000000000000000000000000000000815283600482015260208160248173ffffffffffffffffffffffffffffffffffffffff87165afa908115611516575f91611dd7575b5073ffffffffffffffffffffffffffffffffffffffff821673ffffffffffffffffffffffffffffffffffffffff821603611d7a5750505050565b6040517f9108eb1400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152602481019490945282166044840152166064820152608490fd5b611df9915060203d602011611dff575b611df1818361123c565b810190611cd1565b5f611d40565b503d611de7565b919073ffffffffffffffffffffffffffffffffffffffff83166040517f081812fc00000000000000000000000000000000000000000000000000000000815260208180611e5b89600483019190602083019252565b0381855afa908115611516575f91611f87575b5073ffffffffffffffffffffffffffffffffffffffff808516911614159081611efa575b50611e9d5750505050565b6040517f6a7e2cc800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152602481019490945282166044840152166064820152608490fd5b6040517fe985e9c500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152851660248201529150602090829060449082905afa908115611516575f91611f68575b50155f611e92565b611f81915060203d602011611b4757611b39818361123c565b5f611f60565b611fa0915060203d602011611dff57611df1818361123c565b5f611e6e565b9080602083519182815201916020808360051b8301019401925f915b838310611fd157505050505090565b9091929394602080827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0856001950301865288519073ffffffffffffffffffffffffffffffffffffffff8251168152828201518382015260c080612044604085015160e0604086015260e0850190611385565b936060810151606085015260808101511515608085015260a0810151151560a0850152015191015297019301930191939290611fc2565b90602080835192838152019201905f5b8181106120985750505090565b825173ffffffffffffffffffffffffffffffffffffffff1684526020938401939092019160010161208b565b805160ff16825261111b916020828101511515908201526101006121226120fc60408501516101206040860152610120850190611fa6565b606085015160608501526080850151608085015260a085015184820360a0860152611385565b9260c081015160c084015260e081015160e084015201519061010081840391015261207b565b612160604092959493956060835260608301906120c4565b9460208201520152565b61111b9392606092825260208201528160408201520190611385565b61219c61111b94926060835260608301906120c4565b9260208201526040818403910152611385565b906121b991612864565b6121e46121c582612b25565b6121d0368686611320565b60208151910120905f5260205260405f2090565b916121ef8482612c31565b915f926040850192835151975f5b898110612211575b50505050505050505050565b80841461251b575b61222481875161177d565b519661223360a0890151151590565b80612513575b6124d357505f9660608101518015908115806124ca575b61249257608083018051151580612453575b6124265751156123dd57906122a39161228f845173ffffffffffffffffffffffffffffffffffffffff1690565b91156123d857505a5b604084015191613042565b156122e6575b50604080518a815260208101839052600192917f5a589b1d8062f33451d29cae3dabd9b2e36c62aee644178c600977ca8dda661a91a15b016121fd565b60c00180511561239b57600181511461235c5751600214612307575f6122a9565b9796505050505050507fc2c704302430fe0dc8d95f272e2f4e54bbbc51a3327fd5d75ab41f9fc8fd129b925061234a61233e613053565b6040519384938461216a565b0390a15f808080808080808080612205565b5087610834612369613053565b6040519384937f7f6b0bb100000000000000000000000000000000000000000000000000000000855260048501612186565b509550600180967f115f347c00e69f252cd6b63c4f81022a9564c6befe8aa719cb74640a4a306f0d818b6123d061233e613053565b0390a16122e0565b612298565b61241b916123ff845173ffffffffffffffffffffffffffffffffffffffff1690565b916020850151915f1461242057505a905b604085015192613031565b6122a3565b90612410565b7f230d1ccc000000000000000000000000000000000000000000000000000000005f52600485905260245ffd5b5073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163014612262565b838b6108345a6040519384937f2139527400000000000000000000000000000000000000000000000000000000855260048501612148565b50805a10612250565b604080518b815260208101849052919850600192917f9ae934bf8a986157c889a24c3b3fa85e74b7e4ee4b1f8fc6e7362cb4c1d19d8b91819081016123d0565b508015612239565b9192819361252a92868a612c96565b929091612219565b9092919073ffffffffffffffffffffffffffffffffffffffff8116612733575033925b5f5b8281106125f8575050506125685750565b479081612573575050565b5f80808085855af1612583611356565b50156125d05760405191825273ffffffffffffffffffffffffffffffffffffffff16905f907fed679328aebf74ede77ae09efcf36e90244f83643dadac1c2d9f0b21a46f6ab790602090a3565b7f16b452f7000000000000000000000000000000000000000000000000000000005f5260045ffd5b61262a61261161261161260c84878761189c565b6111e4565b73ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529190602090839060249082905afa8015611516576001925f91612715575b5080612682575b5001612557565b61269d818861269861261161260c878b8b61189c565b61306d565b73ffffffffffffffffffffffffffffffffffffffff6126c061260c84888861189c565b167fed679328aebf74ede77ae09efcf36e90244f83643dadac1c2d9f0b21a46f6ab76040518061270c73ffffffffffffffffffffffffffffffffffffffff8c1695829190602083019252565b0390a35f61267b565b61272d915060203d811161150f57611500818361123c565b5f612674565b92612555565b60405190610120820182811067ffffffffffffffff821117611237576040526060610100835f81525f60208201528260408201525f838201525f60808201528260a08201525f60c08201525f60e08201520152565b9061279882611716565b6127a5604051918261123c565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06127d38294611716565b01905f5b8281106127e357505050565b6020906040516127f28161121b565b5f81525f83820152606060408201525f60608201525f60808201525f60a08201525f60c0820152828285010152016127d7565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9190820180921161285f57565b612825565b91909161286f612739565b5f815292600190823560f81c827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81831601612b0e57505f60608701525b60076128bc60ff831660011c90565b1680612abd575b50601081811603612a8857506001925b6128dc8461278e565b92604087019384525f905b8582106128f657505050505050565b8281013560f81c90600101909181600180851603612a66575061293a3061291e83895161177d565b519073ffffffffffffffffffffffffffffffffffffffff169052565b600280841614612a46575b6004808416146129f8575b6008808416146129c5575b6129ae6129a860c0856129878a608061297e8860108060019c9d1614935161177d565b51019015159052565b61299e8a60a061297e88602080871614935161177d565b1660061c60031690565b60ff1690565b60c06129bb83895161177d565b51015201906128e7565b6001916129ae906129a89060c0908781013590602001969060606129ea878d5161177d565b51015295945050505061295b565b90612a40908481013560e81c90600301612a39612a20612a188484612852565b838a8a6112ce565b91906040612a2f888d5161177d565b5101923691611320565b9052612852565b90612950565b90838101359060200191906020612a5e83895161177d565b510152612945565b612a8392508481013560601c90601401929061291e83895161177d565b61293a565b602090811603612aaa5761ffff918381013560f01c906002015b9216926128d3565b60ff918381013560f81c90600101612aa2565b612b01919385929190928160031b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001821b019185013590610100031c16920190565b929060808701525f6128c3565b80850135606090811c9088015260140192506128ad565b602081015115612c165761065a611c61612bd45f5b60405160208101917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f83527f4aa45ca7ad825ceb1bf35643f0a58c295239df563b1b565c2485f96477c5631860408301527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de606083015260808201523060a082015260a08152612bcb60c08261123c565b51902093613179565b60405192839160208301958690916042927f19010000000000000000000000000000000000000000000000000000000000008352600283015260228201520190565b61065a611c61612bd446612b3a565b908210156111df570190565b919015612c42576001913560f81c90565b5f91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461285f5760010190565b9492612cb190949291945b8581013560f81c91600190910190565b60ff8216818115612faa5750918785612cdb8694858b600f612cd4829a60041c90565b9716613352565b9095908060048611612f30575060028101959082013560f01c94869060018103612d275750505050916040612d1a612d229482612cb19895015161177d565b5101516133e1565b612ca1565b60028103612d555750505050916040612d4a612d229482612cb19895015161177d565b5101519131916133c8565b94959460038103612e3c57505050604080612da5602094612d9b73ffffffffffffffffffffffffffffffffffffffff9899612dfb9660149092919283013560601c920190565b999094015161177d565b510151966040519586809481937f70a082310000000000000000000000000000000000000000000000000000000083526004830191909173ffffffffffffffffffffffffffffffffffffffff6020820193169052565b0392165afa90811561151657612cb194612d22935f93612e1c575b506133c8565b612e3591935060203d811161150f57611500818361123c565b915f612e16565b919291600414612e57575b505050505050612cb19150612ca1565b612f05959650612ea7602094612e9d60ff60409686612e868997612e969960149092919283013560601c920190565b90988183013560f81c9160010190565b9316613352565b999095015161177d565b5101516040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff988916600482015292881660248401529691948592839182906044820190565b0392165afa90811561151657612cb194612f25935f93612e1c57506133c8565b865f85858983612e47565b96955050505050600581145f14612f58575090612d22612cb19261291e8660408b015161177d565b60068103612f7f575090612cb191316020612f778660408b015161177d565b510152612ca1565b7ff024a3e2000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b975050505091929050838281105f1461300a57612ffa612fd46129a8926130069561300095612c25565b357fff000000000000000000000000000000000000000000000000000000000000001690565b60f81c90565b92612c69565b9190565b5050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90565b915f9391849360208451940192f190565b915f9291839260208351930191f490565b3d90604051916020818401016040528083525f602084013e565b9173ffffffffffffffffffffffffffffffffffffffff604051927fa9059cbb000000000000000000000000000000000000000000000000000000005f521660045260245260205f60448180865af160015f5114811615613117575b604091909152156130d65750565b7f5274afe7000000000000000000000000000000000000000000000000000000005f5273ffffffffffffffffffffffffffffffffffffffff1660045260245ffd5b600181151661312d573d15833b151516166130c8565b503d5f823e3d90fd5b80516020909101905f5b81811061314d5750505090565b825173ffffffffffffffffffffffffffffffffffffffff16845260209384019390920191600101613140565b6101008101516040516131948161065a602082018095613136565b519020906131a3815160ff1690565b60ff81168061321c57505090611c616131bf604084015161343f565b9261065a60806060830151920151936040519485936020850197889094939260809260a08301967f11e1e4079a79a66e4ade50033cfe2678cdd5341d2dfe5ef9513edb1a0be147a284526020840152604083015260608201520152565b6001810361327a57505060a001518051602091820120604080517fe19a3b94fc3c7ece3f890d98a99bc422615537a08dea0603fa8425867d87d46693810193845290810191909152606081019290925290611c61816080810161065a565b600281036132d057505060c00151604080517f11fdeb7e8373a1aa96bfac8d0ea91526b2c5d15e5cee20e0543e780258f3e8e460208201908152918101929092526060820192909252611c61816080810161065a565b600303613324575060e00151604080517fe19a3b94fc3c7ece3f890d98a99bc422615537a08dea0603fa8425867d87d46660208201908152918101929092526060820192909252611c61816080810161065a565b7f04818320000000000000000000000000000000000000000000000000000000005f5260ff1660045260245ffd5b929392600f16915081613366575050309190565b60018203613375575050339190565b60028203613384575050329190565b6003829492146133ba57837f324dd124000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b81013560601c925060140190565b908151602082019082821091111761021a570160200152565b908151601482019082821091111761021a576020910101906bffffffffffffffffffffffff8251169060601b179052565b80516020909101905f5b8181106134295750505090565b825184526020938401939092019160010161341c565b9081517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061348561346f83611716565b9261347d604051948561123c565b808452611716565b013660208301375f5b835181101561356057806134a46001928661177d565b5173ffffffffffffffffffffffffffffffffffffffff81511690602081015190604081015160208151910120906060810151608082015115159060c060a08401511515930151936040519560208701977f0603985259a953da1f65a522f589c17bd1d0117ec1d3abb7c0788aef251ef437895260408801526060870152608086015260a085015260c084015260e0830152610100820152610100815261354c6101208261123c565b519020613559828561177d565b520161348e565b50909150604051611c618161065a60208201809561341256fea2646970667358221220a71302c1229d67897efb0ef833a703c8223d89df73ebf6079a4df6272b8fc02c64736f6c634300081e0033","sourceMap":"610:71:42:-:0;;;;;;;;;-1:-1:-1;610:71:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;;;;;;:::o;:::-;;;;;;;;;;;;;;;9366:10:45;610:71:42;;;;;:::i;:::-;;;;;9345:10:45;;9366;;:::i;610:71:42:-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;:::o;:::-;;;;6981:9:45;610:71:42;;;:::i;:::-;6899:10:45;6911:9;6899:10;;6911:9;;:::i;:::-;6899:10;6981:9;;:::i;610:71:42:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;12041:8:45;610:71:42;;11985:11:45;610:71:42;;;;;;:::i;:::-;;;;;;;;:::i;:::-;11985:11:45;;;:::i;:::-;12041:8;:::i;610:71:42:-;;;;;;;;;;;4978:10:45;610:71:42;;;;;:::i;:::-;;;4978:10:45;;:::i;610:71:42:-;;;;;;;;;;;10574:8:45;610:71:42;;;;;:::i;:::-;;;;;;;:::i;:::-;10562:10:45;10574:8;;:::i;610:71:42:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2066:12:44;;610:71:42;2066:12:44;;;:::i;:::-;610:71:42;2062:92:44;;2203:67;2231:13;;;610:71:42;2255:13:44;;;610:71:42;2203:67:44;545:85:41;;;;;;;461:173;;2203:67:44;2301:17;610:71:42;2301:17:44;;;:::i;:::-;610:71:42;;;2335:37:44;;-1:-1:-1;545:85:41;-1:-1:-1;545:85:41;;;-1:-1:-1;545:85:41;461:173;;2335:37:44;2297:159;;;;2548:13;-1:-1:-1;2548:13:44;;2524:369;2570:3;2548:13;;;;:::i;:::-;2544:24;;;;;;;2647:237;2321:4:28;2614:13:44;;:16;:13;;;;;:::i;:::-;:16;;:::i;:::-;2717:145;2754:7;;;:::i;:::-;2717:145;610:71:42;2763:10:44;;610:71:42;2775:13:44;2231;2775;;610:71:42;2790:17:44;;2255:13;2790:17;;;:::i;:::-;2828:20;2809:17;;;;;:::i;:::-;2828:20;;610:71:42;;;;2717:145:44;;;610:71:42;2717:145:44;;;;2321:4:28;;;;;;610:71:42;2321:4:28;;;;;;;;;;;;;;;;;;;;;;;610:71:42;;2321:4:28;;;;;;;610:71:42;2321:4:28;;;610:71:42;;;2321:4:28;;;;610:71:42;;2321:4:28;;;;;610:71:42;2321:4:28;2717:145:44;;;;;;;;;:::i;:::-;2321:4:28;2694:180:44;;2647:237;545:85:41;;;;;;;461:173;;2647:237:44;2570:3;2321:4:28;2529:13:44;;;2544:24;;;;;;-1:-1:-1;3041:25:44;;;;;;610:71:42;;;;;;;;3034:1201:44;683:254:40;2255:13:44;683:254:40;941:256;2321:4:28;683:254:40;941:256;683:254;;;;;798:135;683:254;;;;798:135;;;;;;;683:254;;;941:256;;;;;1058:135;;;;;;;;;;;;941:256;;2321:4:28;;;1058:135:40;;;;;;;;;;;;941:256;;3191:45:44;3452:48;3191:45;3452:26;:21;3191:45;3452:13;3412:4;2321::28;3191:45:44;2321:4:28;;3403:13:44;;3452;;;;:::i;:21::-;610:71:42;3452:26:44;;;;:::i;:::-;2321:4:28;;;;;3452:48:44;:::i;:::-;3365:13;;;;;3364:20;2255:13;;-1:-1:-1;1058:135:40;;;;798;;;;1058;;;;;;;798;;;;;610:71:42;798:135:40;3730:13:44;;;;:::i;:::-;:22;;;;:::i;:::-;610:71:42;3730:27:44;;;;;:::i;:::-;2321:4:28;;;;3730:51:44;;;;:::i;:::-;610:71:42;;;;2321:4:28;;;;:::i;:::-;;;;610:71:42;2321:4:28;3797:18:44;610:71:42;;2321:4:28;;;;:::i;:::-;;;;610:71:42;2321:4:28;3819:19:44;3797:41;3793:141;;3979:54;;;;3953:81;3979:54;;;;:::i;:::-;3953:81;545:85:41;;;;;;;461:173;;3953:81:44;3511:716;;3034:1201;;;;;3793:141;610:71:42;;3861:60:44;;;610:71:42;3861:60:44;;610:71:42;;;;2321:4:28;;;610:71:42;;;;2321:4:28;;;610:71:42;;;2321:4:28;;;610:71:42;;;2321:4:28;;;610:71:42;;;;2321:4:28;;;3861:60:44;;;;3511:716;4176:39;;;;4150:66;4176:39;;;;;;;:::i;4150:66::-;3511:716;;;2297:159;545:85:41;;;;2434:13:44;545:85:41;;;;;2297:159:44;;;;;2062:92;2124:23;-1:-1:-1;2124:23:44;610:71:42;-1:-1:-1;2124:23:44;610:71:42;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;12570:8:45;610:71:42;;12509:11:45;610:71:42;;;;;;:::i;:::-;;;;;;;;:::i;:::-;12487:10:45;12509:11;;:::i;610:71:42:-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;:::o;:::-;;;;8401:7:45;610:71:42;;;:::i;:::-;8341:7:45;;;;;;;;;:::i;:::-;8401;:::i;610:71:42:-;;;;;;;;;;;10317:8:45;610:71:42;;;;;:::i;:::-;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;7442:7:45;610:71:42;;;;;:::i;:::-;;;7430:10:45;;7442:7;;:::i;610:71:42:-;;;;;;;;;;;11048:8:45;610:71:42;;;;;:::i;:::-;;;;;;:::i;:::-;;;;10993:10:45;610:71:42;;;;;;;:::i;:::-;10993:10:45;;;:::i;610:71:42:-;;;;;;;;;;;5180:10:45;610:71:42;;5168:10:45;5180;:::i;610:71:42:-;;;;;;;;;;;5643:10:45;610:71:42;;;;;:::i;:::-;;;5631:10:45;;5643;;:::i;610:71:42:-;;;;5928:12:45;610:71:42;;;:::i;:::-;5928:12:45;;;;;:::i;610:71:42:-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;9716:11:45;610:71:42;;;;;;:::i;:::-;9716:11:45;;;;:::i;610:71:42:-;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3565:4:43;;610:71:42;;;3556:4:43;3548:21;3544:74;;610:71:42;-1:-1:-1;610:71:42;;;;;;2321:4:28;;;;;;;;;;3661:23:43;;;;;;:::i;:::-;3694:8;;3690:62;;610:71:42;3690:62:43;610:71:42;;;;3719:26:43;;;;;;610:71:42;;3719:26:43;;610:71:42;;;;;;:::i;3544:74:43:-;3586:25;-1:-1:-1;3586:25:43;610:71:42;-1:-1:-1;3586:25:43;610:71:42;;;;;;;;;;;9082:10:45;610:71:42;;;;;:::i;:::-;;;;;;:::i;:::-;;;;;;9082:10:45;;:::i;610:71:42:-;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;3275:14:43;610:71:42;;;;;;:::i;:::-;3275:14:43;;;;:::i;610:71:42:-;;;;6214:12:45;610:71:42;;;:::i;:::-;6193:10:45;;6214:12;;:::i;610:71:42:-;;;;;;;;;;;;;4698:15:45;;:29;;4694:93;;610:71:42;4694:93:45;4744:36;-1:-1:-1;4744:36:45;610:71:42;;4698:15:45;610:71:42;;;-1:-1:-1;4744:36:45;610:71:42;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;5412:10:45;610:71:42;;;:::i;:::-;5412:10:45;;:::i;610:71:42:-;;;;6602:9:45;610:71:42;;;:::i;:::-;6537:9:45;;;;;;;;;:::i;:::-;6602;:::i;610:71:42:-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;946:11:46;610:71:42;;;;;;:::i;:::-;;;;;;;;:::i;:::-;946:11:46;:::i;610:71:42:-;;;;;;;;;;;11517:8:45;610:71:42;;;;;:::i;:::-;;;;11457:10:45;610:71:42;;;;;;;:::i;:::-;11436:10:45;11457;;:::i;610:71:42:-;;;;7213:7:45;610:71:42;;;:::i;:::-;7213:7:45;;:::i;610:71:42:-;;;;8011:7:45;610:71:42;;;:::i;:::-;7990:10:45;;8011:7;;:::i;610:71:42:-;;;;8800:7:45;610:71:42;;;:::i;:::-;8723:10:45;8735:7;8723:10;;8735:7;;:::i;:::-;8723:10;8800:7;;:::i;610:71:42:-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;10056:11:45;610:71:42;;;;;;:::i;:::-;10034:10:45;;;;10056:11;;:::i;610:71:42:-;;;;7727:7:45;610:71:42;;;:::i;:::-;7727:7:45;;;;;:::i;610:71:42:-;;;;;;;;;;:::o;2321:4:28:-;;;;;:::i;:::-;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;;610:71:42;2321:4:28;;;;;;;;;;;;;:::o;:::-;;:::i;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;:::o;:::-;;;;;;;:::i;:::-;610:71:42;2321:4:28;610:71:42;;2321:4:28;;;:::i;:::-;;;;;;;;;;;;;;;;;-1:-1:-1;2321:4:28;;;;;;:::o;610:71:42:-;;;;;;;;;;:::i;:::-;;2321:4:28;610:71:42;;2321:4:28;;;:::i;:::-;610:71:42;;;-1:-1:-1;610:71:42;;;;:::o;:::-;;;:::o;:::-;;2321:4:28;;;610:71:42;;2321:4:28;;;;;;;;610:71:42;2321:4:28;;;610:71:42;-1:-1:-1;610:71:42;;;;;;2321:4:28;;610:71:42;;;:::o;4178:317:43:-;;4478:11;4178:317;;;;;;4422:14;4178:317;4422:14;:::i;4478:11::-;4178:317::o;610:71:42:-;;;;;;;;;;;:::o;:::-;;;;;;;;;;3252:302:45;;;;;610:71:42;;3391:41:45;610:71:42;3391:41:45;;610:71:42;;;3391:41:45;;;2321:4:28;610:71:42;;;;;;;3391:41:45;610:71:42;;;;3391:41:45;;;;;;;-1:-1:-1;3391:41:45;;;3252:302;3442:20;;;;3438:112;;3252:302;;;;;:::o;3438:112::-;610:71:42;;3479:64:45;;;610:71:42;;;;3391:41:45;3479:64;;2321:4:28;610:71:42;;;;;;;2321:4:28;610:71:42;;;;;;;;;;;;;;;;;;;;3861:60:44;3391:41:45;;;;;610:71:42;3391:41:45;610:71:42;3391:41:45;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;;;:::i;2074:261::-;;;;610:71:42;;2194:30:45;610:71:42;2194:30:45;;610:71:42;;;2194:30:45;;;2321:4:28;610:71:42;;2194:30:45;610:71:42;;;;2194:30:45;;;;;;;-1:-1:-1;2194:30:45;;;2074:261;2234:20;;;;2230:101;;2074:261;;;;:::o;2230:101::-;610:71:42;;;2271:53:45;;;;;;610:71:42;2194:30:45;2271:53;;;610:71:42;;;;;;2321:4:28;;610:71:42;;;;2321:4:28;610:71:42;;;;;;2271:53:45;;;2194:30;;;;;610:71:42;2194:30:45;610:71:42;2194:30:45;;;;;;;:::i;:::-;;;;;2339:312;610:71:42;;;2482:39:45;;610:71:42;;;;2482:39:45;;;2321:4:28;610:71:42;;;;;;2321:4:28;610:71:42;;;;;;;;2482:39:45;610:71:42;;;;2482:39:45;;;;;;;-1:-1:-1;2482:39:45;;;2339:312;2531:24;;;;2527:120;;2339:312;;;;;:::o;2527:120::-;2572:68;610:71:42;;;;;;;;2572:68:45;;;;2482:39;2572:68;;2321:4:28;610:71:42;;;;2321:4:28;610:71:42;;;;2321:4:28;610:71:42;;;;;;;;2572:68:45;2482:39;;;;;;;;;;;;;;;:::i;:::-;;;;;610:71:42;;;;;;;;;;;:::o;:::-;;;;;:::i;:::-;2321:4:28;610:71:42;;2321:4:28;;;:::i;:::-;610:71:42;;;;;;;;:::i;:::-;;;;;;;;:::o;:::-;2321:4:28;;610:71:42;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2321:4:28;610:71:42;;2321:4:28;;;:::i;:::-;610:71:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;2321:4:28;;;;;;;;;;;610:71:42;;;;;;;;;;;2321:4:28;610:71:42;;;;;;2321:4:28;;;610:71:42;;;;;2321:4:28;610:71:42;;;2321:4:28;;;;;610:71:42;;;;:::o;:::-;;;;;2321:4:28;;;610:71:42;;;;;;;;;;;;;;;;;;;;;;;;:::o;3558:718:45:-;;;;;;3732:37;;;3728:116;;3916:21;;;;;;:::i;:::-;3948:13;3960:1;3963:10;;;;;;610:71:42;;;3960:1:45;610:71:42;;;4048:50:45;610:71:42;;;4048:50:45;;;;;;;610:71:42;4048:50:45;;;;;;:::i;:::-;;610:71:42;;4048:50:45;;;;;;;3960:1;4048:50;;;3943:71;4109:13;3960:1;4124:10;;;;;;3558:718;;;;;:::o;4136:3::-;4153:11;;;;:::i;:::-;610:71:42;4167:14:45;;;;;:::i;:::-;610:71:42;-1:-1:-1;4149:117:45;;2321:4:28;;4109:13:45;;4149:117;4229:11;4242:14;4229:11;;;;4200:57;4229:11;;:::i;:::-;610:71:42;4242:14:45;;:::i;:::-;4200:57;3960:1;4200:57;4048:50;610:71:42;;;;;;;;;;;;4200:57:45;3960:1;4200:57;4048:50;;;;;;3960:1;4048:50;;;;;;:::i;:::-;;;;;:::i;:::-;;;;3975:3;3988:19;;;;;;;;2321:4:28;3988:19:45;;;:::i;:::-;610:71:42;;;;;;3988:19:45;2321:4:28;3948:13:45;;;;;;;3728:116;3786:51;;;;610:71:42;;;;;;;;3960:1:45;4200:57;610:71:42;;;;;;;;;;;;;:::i;4280:258:45:-;610:71:42;;;4398:49:45;;610:71:42;;;;4398:49:45;;;2321:4:28;610:71:42;;;;;;2321:4:28;610:71:42;;;;;4398:49:45;610:71:42;;;;4398:49:45;;;;;;;-1:-1:-1;4398:49:45;;;4280:258;4457:11;;4453:81;;4280:258;;;:::o;4453:81::-;610:71:42;4485:42:45;;;;;-1:-1:-1;4485:42:45;4398:49;2321:4:28;610:71:42;;2321:4:28;610:71:42;;2321:4:28;610:71:42;-1:-1:-1;4485:42:45;4398:49;;;;;;;;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;1852:218;1952:13;;1975:20;;;;1971:95;;1852:218;;;:::o;1971:95::-;610:71:42;2012:47:45;;;;610:71:42;2012:47:45;2321:4:28;610:71:42;;;;;2012:47:45;;4530:194:44;;4665:53;4530:194;610:71:42;2321:4:28;;4530:194:44;610:71:42;;;4665:53:44;;;;;;610:71:42;;;;;;;;2321:4:28;610:71:42;2321:4:28;;;610:71:42;;;;;;;;;2321:4:28;610:71:42;;;;;;;;2321:4:28;;;;;-1:-1:-1;2321:4:28;;;;;;;;610:71:42;;4665:53:44;;610:71:42;4665:53:44;;;;;;:::i;:::-;2321:4:28;4655:64:44;;4530:194;:::o;4269:257::-;;;;;;610:71:42;;4447:73:44;;;;610:71:42;;;;;;;;2321:4:28;610:71:42;2321:4:28;;;610:71:42;;;;;;;;;;;;;;;;;;;;;2321:4:28;4447:73:44;;;;;;:::i;610:71:42:-;;;;;;;;;;;;;:::i;2655:262:45:-;;610:71:42;;;2774:31:45;;;;;;610:71:42;;;2774:31:45;610:71:42;;;;2774:31:45;;;;;;;-1:-1:-1;2774:31:45;;;2655:262;610:71:42;;;;;;;2815:22:45;2811:102;;2655:262;;;;:::o;2811:102::-;610:71:42;;2854:52:45;;;610:71:42;;;;2774:31:45;2854:52;;2321:4:28;610:71:42;;;;;;;;;;;;2321:4:28;610:71:42;;;;2321:4:28;610:71:42;;3861:60:44;2774:31:45;;;;610:71:42;2774:31:45;610:71:42;2774:31:45;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;2921:327;;;610:71:42;;;;;;3055:35:45;;;;;;;;;;610:71:42;;;;;;;;3055:35:45;;;;;;;;;;;-1:-1:-1;3055:35:45;;;2921:327;610:71:42;;;;;;;3100:19:45;;:71;;;;2921:327;3096:148;;;2921:327;;;;:::o;3096:148::-;610:71:42;;3188:49:45;;;610:71:42;;;;3055:35:45;3188:49;;2321:4:28;610:71:42;;;;;;;;;;;;2321:4:28;610:71:42;;;;2321:4:28;610:71:42;;3861:60:44;3100:71:45;610::42;;;3124:47:45;;610:71:42;;;;3055:35:45;3124:47;;2321:4:28;610:71:42;;;;;2321:4:28;610:71:42;-1:-1:-1;3055:35:45;;610:71:42;;;;;;3124:47:45;;;;;;;-1:-1:-1;3124:47:45;;;3100:71;3123:48;;3100:71;;;3124:47;;;;3055:35;3124:47;3055:35;3124:47;;;;;;;:::i;:::-;;;;3055:35;;;;;;;;;;;;;;:::i;:::-;;;;610:71:42;;;2321:4:28;;;;;;;;610:71:42;2321:4:28;610:71:42;;;;;;;2321:4:28;;610:71:42;-1:-1:-1;610:71:42;;;;;;;;;;;;;:::o;:::-;;;;;;2321:4:28;610:71:42;;;;;;;;;;;;;;;;;2321:4:28;;610:71:42;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2321:4:28;610:71:42;;;;;;;;;2321:4:28;610:71:42;;;;;;;;;;;;;;;;;;;2321:4:28;;;;;;;;;;;610:71:42;-1:-1:-1;610:71:42;;;;;;;;;;:::o;:::-;;;;;2321:4:28;;;610:71:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2321:4:28;610:71:42;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;:::o;2657:4:28:-;;;;;;610:71:42;;2657:4:28;;;610:71:42;2657:4:28;;;;;;;;:::i;2763:::-;;;;;;;;;;;;;:::i;:::-;;;;;610:71:42;2763:4:28;;;;;;;;:::i;4499:2310:43:-;;4724:38;4499:2310;4724:38;:::i;:::-;4839:54;4785:21;;;:::i;:::-;2321:4:28;;;;;:::i;:::-;;;;;;4867:25:43;4839:54;545:85:41;;;;;;;461:173;;4839:54:43;4935:33;;;;;:::i;:::-;4974:22;4991:5;5022:13;;;;;;;2321:4:28;5053:13:43;4991:5;5068:12;;;;;;5048:1757;4499:2310;;;;;;;;;;:::o;5082:3::-;5099:11;;;5095:104;;5082:3;5234:16;:13;;;:16;:::i;:::-;;5360:17;610:71:42;5360:17:43;;;610:71:42;;;;;;5360:31:43;;;5082:3;5356:117;;5551:17;4991:5;5596:13;;;;610:71:42;5621:13:43;;;;;:37;;;5082:3;5617:110;;5739:17;;;610:71:42;;;;5739:42:43;;;5082:3;5735:166;;610:71:42;;5933:17:43;;610:71:42;5974:79:43;610:71:42;;;;;;;;;6005:36:43;;;;6021:9;;6005:36;5022:13;6043:9;;;5974:79;;:::i;:::-;6194:8;6190:555;;5929:253;-1:-1:-1;5022:13:43;610:71:42;;;;;;;;;;;2321:4:28;;610:71:42;6758:40:43;;;5053:13;2321:4:28;5053:13:43;;6190:555;6218:20;;610:71:42;;6218:53:43;6214:195;;2321:4:28;610:71:42;;6423:56:43;6419:141;;610:71:42;2867:4:28;6574:55:43;6570:167;;6190:555;;;6570:167;6687:21;;;;;;;;;6648:61;6687:21;;6648:61;6687:21;;:::i;:::-;5022:13;610:71:42;6648:61:43;;;;;:::i;:::-;;;;6721:5;;;;;;;;;;;;6419:141;6527:21;;6500:49;6527:21;;:::i;:::-;5022:13;610:71:42;6500:49:43;;;;;;;;;;:::i;6214:195::-;6285:16;;;2321:4:28;6285:16:43;6356:21;6318:60;6356:21;;6318:60;6356:21;;:::i;6318:60::-;;;;6390:8;;6005:36;;;5929:253;6090:83;610:71:42;;;;;;;;;6113:10:43;2321:4:28;6113:10:43;;610:71:42;6125:36:43;;;;;6141:9;;6125:36;;5022:13;6163:9;;;6090:83;;:::i;:::-;5929:253;;6125:36;;;;5735:166;5867:25;4991:5;5867:25;;610:71:42;;;;3960:1:45;4200:57;5739:42:43;5777:4;610:71:42;5777:4:43;610:71:42;5768:4:43;5760:21;5739:42;;5617:110;5708:9;;5677:41;5708:9;5022:13;610:71:42;5677:41:43;;;;;;;;;;:::i;5621:37::-;5638:9;;;:20;5621:37;;5356:117;5022:13;610:71:42;;;;;;;;;;;;;-1:-1:-1;2321:4:28;;610:71:42;5408:38:43;;610:71:42;;;;5408:38:43;610:71:42;5360:31:43;5381:10;;;5360:31;;5095:104;5141:49;;;;;;;;;:::i;:::-;5122:68;;5095:104;;;967:1027:46;;;;;610:71:42;;;;;1225:10:46;;1197:52;;1220:1;1323:24;;;;;;1666:318;;;;;967:1027;:::o;1666:318::-;1711:21;1746:11;;1742:234;;1666:318;967:1027;:::o;1742:234::-;1220:1;1789:39;;;;;;;;;:::i;:::-;;1844:8;1840:67;;610:71:42;;;;;;;;1220:1:46;;1923:42;;610:71:42;;1923:42:46;967:1027::o;1840:67::-;1875:19;1220:1;1875:19;1382:49;1220:1;1875:19;1349:3;1382:34;:24;1389:16;;;;;;:::i;:::-;;:::i;:::-;610:71:42;;;;1382:34:46;610:71:42;;;1382:49:46;;1425:4;1382:49;;;2321:4:28;610:71:42;;1382:49:46;;610:71:42;;;;;;1382:49:46;;;;;;2321:4:28;1382:49:46;1220:1;1382:49;;;1349:3;1445:11;;1441:167;;1349:3;;2321:4:28;1308:13:46;;1441:167;1524:7;1477:16;;1470:24;1477:16;;;;;;:::i;1470:24::-;1524:7;:::i;:::-;610:71:42;1555:16:46;;;;;;:::i;:::-;610:71:42;1549:48:46;610:71:42;;;1549:48:46;610:71:42;;;1549:48:46;;610:71:42;;;;;;;;1549:48:46;;;;1441:167;;;1382:49;;;;;;;;;;;;;;:::i;:::-;;;;1197:52;;;;610:71:42;;;2321:4:28;610:71:42;2321:4:28;;;;;;;;;;;610:71:42;2321:4:28;610:71:42;;;-1:-1:-1;610:71:42;;-1:-1:-1;610:71:42;;;;;;;;;-1:-1:-1;610:71:42;;;;-1:-1:-1;610:71:42;;;;;;;;;-1:-1:-1;610:71:42;;;;-1:-1:-1;610:71:42;;;;;;:::o;:::-;;;;;:::i;:::-;2321:4:28;610:71:42;;2321:4:28;;;:::i;:::-;610:71:42;;;;;;;;:::i;:::-;;;-1:-1:-1;610:71:42;;;;;;;;;:::o;:::-;;;;;2321:4:28;;;:::i;:::-;-1:-1:-1;610:71:42;;-1:-1:-1;610:71:42;;;;;;;;;-1:-1:-1;610:71:42;;;;-1:-1:-1;610:71:42;;;;-1:-1:-1;610:71:42;;;;-1:-1:-1;610:71:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;:::i;4827:2701:28:-;;;;610:71:42;;:::i;:::-;;;;;566:109:40;;;;;;;5131:25:28;:17;;;:25;5144:4;;5166:14;2321:4;5166:14;;;610:71:42;5127:140:28;5364:4;5345:15;610:71:42;;;;;;;5345:15:28;5344:24;5379:13;5375:122;;5127:140;-1:-1:-1;5603:4:28;5590:17;;;:25;5603:4;;5625:12;5144:4;5586:320;;5951:20;;;:::i;:::-;5934:14;;;;:37;;;2321:4;5978:1546;5998:12;;;;;;4827:2701;;;;;;:::o;6012:3::-;798:135:40;;;;;;;;;6044:44:28;;;5144:4;6195:12;;;:20;5144:4;;6282;6251:36;6282:4;6251:17;:14;;;:17;:::i;:::-;;610:71:42;;;;;;6251:36:28;6497:4;6489:12;;;:20;6485:109;;6191:226;6672:4;6664:12;;;:20;6660:287;;6191:226;7033:4;7025:12;;;:20;7021:112;;6191:226;7462:55;7498:19;7507:4;7243:12;7209:55;7243:12;7209:30;:17;7243:12;5603:4;7243:12;5144:4;7243:12;;;:20;7209:14;;:17;:::i;:::-;;:30;610:71:42;;;;;;7209:55:28;7332;7366:12;7332:30;:17;7366:12;7374:4;7366:12;;;:20;7332:14;;:17;:::i;:55::-;7499:12;610:71:42;;;;;;7498:19:28;610:71:42;;;;7462:55:28;7507:4;7462:17;:14;;;:17;:::i;:::-;;:33;610:71:42;2321:4:28;5983:13;;;7021:112;5144:4;;7462:55;;7498:19;;7507:4;;2102:103:40;;;;;;;7058:14:28;;:26;:17;:14;;;:17;:::i;:::-;;:26;610:71:42;7021:112:28;;;;;;;;6660:287;1201:256:40;6915:23:28;;1318:135:40;;;;;;;;;2321:4:28;6867:38;6882:22;1318:135:40;;6882:22:28;:::i;:::-;6867:38;;;;:::i;:::-;6842:14;;5934;6842:17;:14;;;:17;:::i;:::-;;:22;2321:4;;;;:::i;:::-;6842:63;;6915:23;:::i;:::-;6660:287;;;6485:109;1983:226:40;2102:103;;;;;;;6522:14:28;;7374:4;6522:17;:14;;;:17;:::i;:::-;;:23;610:71:42;6485:109:28;;6191:226;6347:61;;-1:-1:-1;1840:135:40;;;;;;;;;6348:14:28;;:17;:14;;;:17;:::i;6347:61::-;6191:226;;5586:320;5747:4;5734:17;;;:25;5747:4;;2321;;1058:135:40;;;;;;;;;941:256;5771:48:28;2321:4;5730:170;5586:320;;5730:170;610:71:42;;798:135:40;;;;;;;;;683:254;;5375:122:28;2213:380:40;;;;;;;;2363:226;;;;;;;;;;;;;;;;;;;2213:380;;;5426:64:28;;5427:14;;;610:71:42;5375:122:28;;;5127:140;1840:135:40;;;;;;;;5206:14:28;;;610:71:42;1840:135:40;;;-1:-1:-1;5127:140:28;;9532:274;9650:18;;;610:71:42;;1206:48:28;;9752;;9711:18;-1:-1:-1;1206:48:28;610:71:42;;9650:18:28;1077:202;;610:71:42;539:66:28;610:71:42;;709:66:28;610:71:42;868:66:28;;610:71:42;868:66:28;;;;610:71:42;868:66:28;;;610:71:42;9678:4:28;868:66;;;2321:4;868:66;1077:202;;;;;;:::i;:::-;2321:4;1060:225;;9711:18;;:::i;:::-;610:71:42;;9752:48:28;;;9650:18;9752:48;;;;610:71:42;;;;;;;;;;;;;;;;;;1206:48:28;9752;;9711:18;1240:13;1206:48;;610:71:42;;;;;;;;;:::o;6813:251:43:-;;;6936:26;6932:76;;610:71:42;7039:17:43;;610:71:42;;6813:251:43;:::o;6932:76::-;6961:1;;-1:-1:-1;6983:17:43;;6972:29::o;1932:4::-;;;;;;;;;:::o;7068:2940::-;;;683:254:40;7068:2940:43;;;;;7297:2394;798:135:40;;;;;;;;;;;;683:254;;610:71:42;;;7318:49:43;7380:27;;7376:57;;7510:9;;;;7620:54;7510:9;;;;7554:4;7510:9;;;610:71:42;;;;7510:9:43;7547:11;;7620:54;:::i;:::-;7595:79;;;;7518:1;7687:45;;7518:1;;-1:-1:-1;1058:135:40;;;;;;;;;;;;;1804:4:43;7892:37;;1804:4;;8017:13;;;;;;:21;8067:12;8017:13;;683:254:40;8017:13:43;;;;:21;:::i;:::-;;:26;;8067:12;:::i;:::-;7297:2394;;7888:1367;1865:4;8101:37;;1865:4;;8222:13;;;;;;:21;8272:20;8222:13;;683:254:40;8222:13:43;;;;:21;:::i;:::-;;:26;;8272:20;;;;:::i;8097:1158::-;8314:43;;;1932:4;8314:43;;1932:4;;3162:307:40;;;8548:13:43;3162:307:40;8548:21:43;8598:37;3162:307:40;;610:71:42;3162:307:40;;8598:37:43;3162:307:40;1840:135;1721:258;;;;1840:135;;;;;;;1721:258;;3162:307;8548:13:43;;;;;:21;:::i;:::-;;:26;;610:71:42;8548:13:43;610:71:42;8598:37:43;;;;;;610:71:42;8598:37:43;;7518:1;8598:37;;610:71:42;;;;;;;;;2321:4:28;;610:71:42;8598:37:43;;610:71:42;;8598:37:43;;;;;;;683:254:40;8598:37:43;;;-1:-1:-1;8598:37:43;;;8310:945;8598:37;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;;;;;8310:945;8657:45;;;7518:1;8657:45;8653:602;;8310:945;;;;;;;683:254:40;8310:945:43;;7297:2394;;8653:602;9197:46;3162:307:40;;;9147:21:43;9197:46;3162:307:40;9078:56:43;610:71:42;9147:13:43;3162:307:40;;;;;683:254;3162:307;1840:135;1721:258;;;;1840:135;;;;;;;1721:258;;3162:307;683:254;;798:135;;;;;;;;;;683:254;;610:71:42;;9078:56:43;:::i;:::-;9147:13;;;;;:21;:::i;:::-;;:26;;:13;610:71:42;;9197:46:43;;610:71:42;;;;7518:1:43;9197:46;;2321:4:28;610:71:42;;;;;;2321:4:28;9147:26:43;610:71:42;;;;;;;;;;;;;9197:46:43;;610:71:42;;9197:46:43;;;;;;;683:254:40;9197:46:43;;;-1:-1:-1;9197:46:43;;;;;:::i;:::-;8653:602;;;;;;;;7683:2002;9273:27;;;;;;;2052:4;9273:27;;9269:416;2052:4;;;9379:13;;:39;683:254:40;9379:13:43;:21;:13;;;;;:21;:::i;9269:416::-;2106:4;9437:30;;2106:4;;9589:20;;683:254:40;9589:20:43;;9559:27;:21;:13;;;;;:21;:::i;:::-;;:27;610:71:42;7297:2394:43;;9433:252;9641:35;-1:-1:-1;9641:35:43;5867:25;610:71:42;;3960:1:45;4200:57;7376::43;7419:5;;;;;;;;;9780:30;;;;9776:198;9789:21;;;9843:22;;9837:29;9843:22;9875:8;9843:22;9829:38;9843:22;;:::i;:::-;;610:71:42;;;;9843:22:43;610:71:42;;;;9829:38:43;9875:8;;:::i;:::-;9980:23;7068:2940;:::o;9776:198::-;9941:26;;;9950:17;7068:2940;:::o;1431:196:41:-;;1538:85;1431:196;;;;1538:85;;;;;;;1431:196;:::o;1997:192::-;;2098:87;1997:192;;;;2098:87;;;;;;;1997:192;:::o;758:271::-;825:200;;;;;;;;;;;;;;;;;;;;758:271::o;1219:204:5:-;;8544:1067;;;;8509:24;-1:-1:-1;8544:1067:5;;;;;;;-1:-1:-1;8544:1067:5;;;;;;1338:4;-1:-1:-1;8544:1067:5;;;;;;;1219:204;8544:1067;;;;;1305:38;1301:116;;1219:204;:::o;1301:116::-;1366:40;-1:-1:-1;1366:40:5;8544:1067;610:71:42;8544:1067:5;2321:4:28;610:71:42;3960:1:45;4200:57;8544:1067:5;1338:4;8544:1067;;;;;;;;;;;;;;;;;;-1:-1:-1;8544:1067:5;;;;;610:71:42;2321:4:28;;;;;;;610:71:42;;;;;;;;;;;:::o;:::-;;;;;2321:4:28;;;610:71:42;;;;;;;;;;;;8246:1282:28;8384:22;;;;610:71:42;;8367:40:28;;610:71:42;8367:40:28;;;610:71:42;;;:::i;8367:40:28:-;2321:4;8357:51;;610:71:42;;;;;;;;;;;;8419:34:28;610:71:42;;8493:14:28;;;8680:82;8483:25;610:71:42;8493:14:28;;;8483:25;:::i;:::-;8718:14;8680:82;8734:14;8718;;;610:71:42;8734:14:28;;610:71:42;;;;8680:82:28;;;8367:40;8680:82;;;;1799:66;;;;;;;;;610:71:42;1799:66:28;610:71:42;;1799:66:28;;;610:71:42;1799:66:28;;;610:71:42;1799:66:28;;;610:71:42;1799:66:28;610:71:42;1799:66:28;8415:1109;2763:4;8780:29;;2763:4;;-1:-1:-1;;8966:16:28;;;2321:4;;8367:40;2321:4;;;8956:27;610:71:42;;;1979:66:28;8927:70;;;610:71:42;;;1979:66:28;;;610:71:42;;;;1979:66:28;;;610:71:42;;;;8927:70:28;;610:71:42;1979:66:28;;;8927:70;1979:66;8776:748;2867:4;9015:35;;2867:4;;-1:-1:-1;;9184:18:28;;1979:66;610:71:42;;;2174:66:28;8367:40;9149:67;;610:71:42;;;1979:66:28;;;610:71:42;;;;1979:66:28;;;610:71:42;;;;9149:67:28;610:71:42;1979:66:28;;;9149:67;1979:66;9011:513;2556:4;9234:28;2556:4;;-1:-1:-1;9411:15:28;;1979:66;610:71:42;;;1979:66:28;8367:40;9382:58;;610:71:42;;;1979:66:28;;;610:71:42;;;;1979:66:28;;;610:71:42;;;;9382:58:28;610:71:42;1979:66:28;;;9382:58;1979:66;9230:294;9491:26;610:71:42;9491:26:28;610:71:42;;9491:26:28;610:71:42;2556:4:28;3960:1:45;4200:57;10012:701:43;;;;10190:4;10183:11;;-1:-1:-1;10204:30:43;;;10260:4;;;10244:30;;:::o;10200:460::-;1804:4;10291:40;;1804:4;;10349:10;;;10341:27;;:::o;10287:373::-;1865:4;10385:44;;1865:4;;10447:9;;;10439:26;;:::o;10381:279::-;1932:4;10482:37;;;;10478:182;;10381:279;10672:36;1716:4;10672:36;5867:25;610:71:42;;1716:4:43;10672:36;10478:182;1840:135:40;;;;;;-1:-1:-1;1840:135:40;;;10624:29:43:o;1452:342:48:-;;1544:246;;;;;;;;;;;;;;;;;;1452:342::o;449:825::-;;542:728;;;;;;;;;;;;;;;;;;;;;;;;;;;;;449:825::o;610:71:42:-;2321:4:28;;;;;;;610:71:42;;;;;;;;;;;:::o;:::-;;;;;2321:4:28;610:71:42;;;;;;;;;;;;7788:454:28;;2321:4;;610:71:42;;;;;:::i;:::-;;2321:4:28;610:71:42;;2321:4:28;;;:::i;:::-;610:71:42;;;;:::i;:::-;;;;;;;-1:-1:-1;8132:3:28;2321:4;;8114:16;;;;;8170:8;;2321:4;8170:8;;;:::i;:::-;;610:71:42;;;;7676:7:28;610:71:42;7676:7:28;;610:71:42;7695:6:28;610:71:42;7695:6:28;;;610:71:42;2321:4:28;;;;7685:17;7704:10;;;;610:71:42;7716:14:28;;;610:71:42;;;7732:14:28;7748:17;7732:14;;;610:71:42;;;7748:17:28;;610:71:42;;;;7635:138:28;610:71:42;7635:138:28;;610:71:42;1478:66:28;610:71:42;;;1478:66:28;;2321:4;7704:10;1478:66;;610:71:42;7716:14:28;1478:66;;610:71:42;7732:14:28;1478:66;;610:71:42;7748:17:28;1478:66;;2321:4;1478:66;;;2321:4;1478:66;;;610:71:42;1478:66:28;7635:138;;;;;;:::i;:::-;2321:4;7618:161;;8145:34;;;;:::i;:::-;610:71:42;2321:4:28;8099:13;;8114:16;;;;;610:71:42;;8208:28:28;;610:71:42;;8208:28:28;;610:71:42;;;:::i","linkReferences":{},"immutableReferences":{"43970":[{"start":3117,"length":32},{"start":9323,"length":32}]}},"methodIdentifiers":{"handleSequenceDelegateCall(bytes32,uint256,uint256,uint256,uint256,bytes)":"4c4e814c","hydrateExecute(bytes,bytes)":"6d42cf03","hydrateExecuteAndSweep(bytes,bytes,address,address[],bool)":"80df36a0","recoverSapientSignature((uint8,bool,(address,uint256,bytes,uint256,bool,bool,uint256)[],uint256,uint256,bytes,bytes32,bytes32,address[]),bytes)":"13792a4a","requireERC1155Approval(address,address,address)":"2ab793d7","requireERC1155ApprovalSelf(address,address)":"0cb17e5c","requireERC721Approval(address,address,address,uint256)":"fe08e7ca","requireERC721ApprovalSelf(address,address,uint256)":"e246466a","requireERC721Owner(address,address,uint256)":"cda38f4c","requireERC721OwnerApproval(address,address,address,uint256)":"1c0bdfab","requireERC721OwnerApprovalSelf(address,address,uint256)":"f38bce15","requireERC721OwnerSelf(address,uint256)":"2f2227ba","requireMinBalance(address,uint256)":"03bbbd65","requireMinBalanceSelf(uint256)":"333f790d","requireMinERC1155Balance(address,address,uint256,uint256)":"505c7ed3","requireMinERC1155BalanceApproval(address,address,uint256,uint256,address)":"317df1e8","requireMinERC1155BalanceApprovalBatch(address,address,uint256[],uint256[],address)":"024ea911","requireMinERC1155BalanceApprovalBatchSelf(address,uint256[],uint256[],address)":"18c9003a","requireMinERC1155BalanceApprovalSelf(address,uint256,uint256,address)":"ac38d089","requireMinERC1155BalanceBatch(address,address,uint256[],uint256[])":"476a5f40","requireMinERC1155BalanceBatchSelf(address,uint256[],uint256[])":"fdc25428","requireMinERC1155BalanceSelf(address,uint256,uint256)":"0084290d","requireMinERC20Allowance(address,address,address,uint256)":"42ab921e","requireMinERC20AllowanceSelf(address,address,uint256)":"6ef1f0dd","requireMinERC20Balance(address,address,uint256)":"8d0a9ea7","requireMinERC20BalanceAllowance(address,address,address,uint256)":"9c8d8ea1","requireMinERC20BalanceAllowanceSelf(address,address,uint256)":"00e79cd5","requireMinERC20BalanceSelf(address,uint256)":"372618cb","requireNonExpired(uint256)":"7f29d538","sweep(address,address[],bool)":"a7b7ec5a"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"result\",\"type\":\"bytes\"}],\"name\":\"DelegateCallFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"DelegateCallNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minBalance\",\"type\":\"uint256\"}],\"name\":\"ERC1155BalanceTooLow\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minBalance\",\"type\":\"uint256\"}],\"name\":\"ERC1155BatchBalanceTooLow\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC1155NotApproved\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAllowance\",\"type\":\"uint256\"}],\"name\":\"ERC20AllowanceTooLow\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minBalance\",\"type\":\"uint256\"}],\"name\":\"ERC20BalanceTooLow\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC721NotApproved\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"requiredOwner\",\"type\":\"address\"}],\"name\":\"ERC721NotOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"Expired\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"}],\"name\":\"InvalidKind\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tindex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_cindex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_size\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_tindex2\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_cindex2\",\"type\":\"uint256\"}],\"name\":\"InvalidRepeatSection\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"a\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"b\",\"type\":\"uint256\"}],\"name\":\"LengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minBalance\",\"type\":\"uint256\"}],\"name\":\"NativeBalanceTooLow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NativeSweepFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NonTransactionPayload\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"noChainId\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"delegateCall\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"onlyFallback\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"behaviorOnError\",\"type\":\"uint256\"}],\"internalType\":\"struct Payload.Call[]\",\"name\":\"calls\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"space\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"imageHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"digest\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parentWallets\",\"type\":\"address[]\"}],\"internalType\":\"struct Payload.Decoded\",\"name\":\"_payload\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLeft\",\"type\":\"uint256\"}],\"name\":\"NotEnoughGas\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyDelegateCallAllowed\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"noChainId\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"delegateCall\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"onlyFallback\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"behaviorOnError\",\"type\":\"uint256\"}],\"internalType\":\"struct Payload.Call[]\",\"name\":\"calls\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"space\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"imageHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"digest\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parentWallets\",\"type\":\"address[]\"}],\"internalType\":\"struct Payload.Decoded\",\"name\":\"_payload\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_returnData\",\"type\":\"bytes\"}],\"name\":\"Reverted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"flag\",\"type\":\"uint256\"}],\"name\":\"UnknownHydrateDataCommand\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"flag\",\"type\":\"uint256\"}],\"name\":\"UnknownHydrateTypeCommand\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_opHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_returnData\",\"type\":\"bytes\"}],\"name\":\"CallAborted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_opHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_returnData\",\"type\":\"bytes\"}],\"name\":\"CallFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_opHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"CallSkipped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_opHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"CallSucceeded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Sweep\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"handleSequenceDelegateCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"packedPayload\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"hydratePayload\",\"type\":\"bytes\"}],\"name\":\"hydrateExecute\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"packedPayload\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"hydratePayload\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sweepTarget\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"tokensToSweep\",\"type\":\"address[]\"},{\"internalType\":\"bool\",\"name\":\"sweepNative\",\"type\":\"bool\"}],\"name\":\"hydrateExecuteAndSweep\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"noChainId\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"delegateCall\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"onlyFallback\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"behaviorOnError\",\"type\":\"uint256\"}],\"internalType\":\"struct Payload.Call[]\",\"name\":\"calls\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"space\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"imageHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"digest\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parentWallets\",\"type\":\"address[]\"}],\"internalType\":\"struct Payload.Decoded\",\"name\":\"payload\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"recoverSapientSignature\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"imageHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"requireERC1155Approval\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"requireERC1155ApprovalSelf\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"requireERC721Approval\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"requireERC721ApprovalSelf\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"requireERC721Owner\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"requireERC721OwnerApproval\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"requireERC721OwnerApprovalSelf\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"requireERC721OwnerSelf\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minBalance\",\"type\":\"uint256\"}],\"name\":\"requireMinBalance\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minBalance\",\"type\":\"uint256\"}],\"name\":\"requireMinBalanceSelf\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minBalance\",\"type\":\"uint256\"}],\"name\":\"requireMinERC1155Balance\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minBalance\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"requireMinERC1155BalanceApproval\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minBalances\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"requireMinERC1155BalanceApprovalBatch\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minBalances\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"requireMinERC1155BalanceApprovalBatchSelf\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minBalance\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"requireMinERC1155BalanceApprovalSelf\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minBalances\",\"type\":\"uint256[]\"}],\"name\":\"requireMinERC1155BalanceBatch\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minBalances\",\"type\":\"uint256[]\"}],\"name\":\"requireMinERC1155BalanceBatchSelf\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minBalance\",\"type\":\"uint256\"}],\"name\":\"requireMinERC1155BalanceSelf\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minAllowance\",\"type\":\"uint256\"}],\"name\":\"requireMinERC20Allowance\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minAllowance\",\"type\":\"uint256\"}],\"name\":\"requireMinERC20AllowanceSelf\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minBalance\",\"type\":\"uint256\"}],\"name\":\"requireMinERC20Balance\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minAmount\",\"type\":\"uint256\"}],\"name\":\"requireMinERC20BalanceAllowance\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minAmount\",\"type\":\"uint256\"}],\"name\":\"requireMinERC20BalanceAllowanceSelf\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minBalance\",\"type\":\"uint256\"}],\"name\":\"requireMinERC20BalanceSelf\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"}],\"name\":\"requireNonExpired\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sweepTarget\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"tokensToSweep\",\"type\":\"address[]\"},{\"internalType\":\"bool\",\"name\":\"sweepNative\",\"type\":\"bool\"}],\"name\":\"sweep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract intentionally contains no additional logic; it simply inherits: - {MalleableSapient} for malleable commitments - {HydrateProxy} for hydrate + execute flows - {RequireUtils} for precondition checks\",\"errors\":{\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"handleSequenceDelegateCall(bytes32,uint256,uint256,uint256,uint256,bytes)\":{\"details\":\"Delegate calls are allowed to all functions on this contract\",\"params\":{\"_data\":\"The data\",\"_index\":\"The index\",\"_numCalls\":\"The number of calls\",\"_opHash\":\"The operation hash\",\"_space\":\"The space\",\"_startingGas\":\"The starting gas\"}},\"hydrateExecute(bytes,bytes)\":{\"details\":\"`hydratePayload` is a byte stream grouped by call index: - Starts with a 1-byte `tindex` (the call to hydrate). - Followed by commands for that call. Each command starts with a 1-byte `flag`. - A `SIGNAL_NEXT_HYDRATE` (0x00) ends the current call's section; if more bytes remain, the next byte is the next `tindex`. - The supported command flags are the `HYDRATE_*` constants in this file.\",\"params\":{\"hydratePayload\":\"The hydrate payload to use.\",\"packedPayload\":\"The packed payload to hydrate.\"}},\"hydrateExecuteAndSweep(bytes,bytes,address,address[],bool)\":{\"params\":{\"hydratePayload\":\"The hydrate payload to use.\",\"packedPayload\":\"The packed payload to hydrate and execute.\",\"sweepNative\":\"Whether to sweep native tokens\",\"sweepTarget\":\"The address to sweep the remaining funds to.\",\"tokensToSweep\":\"Token list to sweep (each full balance of this contract).\"}},\"recoverSapientSignature((uint8,bool,(address,uint256,bytes,uint256,bool,bool,uint256)[],uint256,uint256,bytes,bytes32,bytes32,address[]),bytes)\":{\"details\":\"Computes the `imageHash` for a transaction payload with a malleable `data` commitment.\",\"params\":{\"payload\":\"The payload to recover the signature from\",\"signature\":\"The signature to recover the image hash from\"},\"returns\":{\"imageHash\":\"The recovered image hash\"}},\"sweep(address,address[],bool)\":{\"params\":{\"sweepNative\":\"Whether to sweep native tokens\",\"sweepTarget\":\"The address to sweep the balances to\",\"tokensToSweep\":\"The tokens to sweep\"}}},\"title\":\"TrailsUtils\",\"version\":1},\"userdoc\":{\"errors\":{\"DelegateCallFailed(bytes)\":[{\"notice\":\"Delegate call failed.\"}],\"DelegateCallNotAllowed(uint256)\":[{\"notice\":\"Delegatecall is requested from the HydrateProxy's context.\"}],\"ERC1155BalanceTooLow(address,address,uint256,uint256,uint256)\":[{\"notice\":\"The ERC1155 balance is too low.\"}],\"ERC1155BatchBalanceTooLow(uint256,uint256,uint256)\":[{\"notice\":\"The ERC1155 batch balance is too low.\"}],\"ERC1155NotApproved(address,address,address)\":[{\"notice\":\"The ERC1155 is not approved.\"}],\"ERC20AllowanceTooLow(address,address,address,uint256,uint256)\":[{\"notice\":\"The ERC20 allowance is too low.\"}],\"ERC20BalanceTooLow(address,address,uint256,uint256)\":[{\"notice\":\"The ERC20 balance is too low.\"}],\"ERC721NotApproved(address,uint256,address,address)\":[{\"notice\":\"The ERC721 is not approved.\"}],\"ERC721NotOwner(address,uint256,address,address)\":[{\"notice\":\"The ERC721 is not owned.\"}],\"Expired(uint256,uint256)\":[{\"notice\":\"The transaction is expired.\"}],\"InvalidKind(uint8)\":[{\"notice\":\"Error thrown when the kind is invalid\"}],\"LengthMismatch(uint256,uint256)\":[{\"notice\":\"The length mismatch.\"}],\"NativeBalanceTooLow(address,uint256,uint256)\":[{\"notice\":\"The native balance is too low.\"}],\"NativeSweepFailed()\":[{\"notice\":\"Error thrown when a native sweep fails\"}],\"NotEnoughGas((uint8,bool,(address,uint256,bytes,uint256,bool,bool,uint256)[],uint256,uint256,bytes,bytes32,bytes32,address[]),uint256,uint256)\":[{\"notice\":\"Error thrown when there is not enough gas\"}],\"OnlyDelegateCallAllowed()\":[{\"notice\":\"Call context is required to be the HydrateProxy but is not.\"}],\"Reverted((uint8,bool,(address,uint256,bytes,uint256,bool,bool,uint256)[],uint256,uint256,bytes,bytes32,bytes32,address[]),uint256,bytes)\":[{\"notice\":\"Error thrown when a call reverts\"}],\"UnknownHydrateDataCommand(uint256)\":[{\"notice\":\"An unknown hydration data flag is encountered.\"}],\"UnknownHydrateTypeCommand(uint256)\":[{\"notice\":\"An unknown hydration type flag is encountered.\"}]},\"events\":{\"CallAborted(bytes32,uint256,bytes)\":{\"notice\":\"Emitted when a call is aborted\"},\"CallFailed(bytes32,uint256,bytes)\":{\"notice\":\"Emitted when a call fails\"},\"CallSkipped(bytes32,uint256)\":{\"notice\":\"Emitted when a call is skipped\"},\"CallSucceeded(bytes32,uint256)\":{\"notice\":\"Emitted when a call succeeds\"},\"Sweep(address,address,uint256)\":{\"notice\":\"Event emitted when a balance is swept\"}},\"kind\":\"user\",\"methods\":{\"handleSequenceDelegateCall(bytes32,uint256,uint256,uint256,uint256,bytes)\":{\"notice\":\"Handle a sequence delegate call\"},\"hydrateExecute(bytes,bytes)\":{\"notice\":\"Hydrates `packedPayload` using `hydratePayload` and then executes the batch.\"},\"hydrateExecuteAndSweep(bytes,bytes,address,address[],bool)\":{\"notice\":\"Hydrates and executes, then sweeps remaining funds to a recipient.\"},\"recoverSapientSignature((uint8,bool,(address,uint256,bytes,uint256,bool,bool,uint256)[],uint256,uint256,bytes,bytes32,bytes32,address[]),bytes)\":{\"notice\":\"Recovers the image hash of a given signature\"},\"requireERC1155Approval(address,address,address)\":{\"notice\":\"Reverts if `operator` is not approved for all of `owner`'s tokens on `token` (ERC1155).\"},\"requireERC1155ApprovalSelf(address,address)\":{\"notice\":\"Reverts if `operator` is not approved for all of `msg.sender`'s tokens on `token` (ERC1155).\"},\"requireERC721Approval(address,address,address,uint256)\":{\"notice\":\"Reverts if `spender` is not approved to transfer `tokenId` from `owner` on `token` (ERC721).\"},\"requireERC721ApprovalSelf(address,address,uint256)\":{\"notice\":\"Reverts if `spender` is not approved to transfer `tokenId` from `msg.sender` on `token` (ERC721).\"},\"requireERC721Owner(address,address,uint256)\":{\"notice\":\"Reverts if `owner` is not the owner of `tokenId` on `token` (ERC721).\"},\"requireERC721OwnerApproval(address,address,address,uint256)\":{\"notice\":\"Reverts if `owner` is not the owner of `tokenId` on `token` (ERC721) or `spender` is not approved to transfer `tokenId` from `owner` on `token`.\"},\"requireERC721OwnerApprovalSelf(address,address,uint256)\":{\"notice\":\"Reverts if `msg.sender` is not the owner of `tokenId` on `token` (ERC721) or `spender` is not approved to transfer `tokenId` from `msg.sender` on `token`.\"},\"requireERC721OwnerSelf(address,uint256)\":{\"notice\":\"Reverts if `msg.sender` is not the owner of `tokenId` on `token` (ERC721).\"},\"requireMinBalance(address,uint256)\":{\"notice\":\"Reverts if `owner` has less than `minBalance` native tokens.\"},\"requireMinBalanceSelf(uint256)\":{\"notice\":\"Reverts if `msg.sender` has less than `minBalance` native tokens.\"},\"requireMinERC1155Balance(address,address,uint256,uint256)\":{\"notice\":\"Reverts if `owner` has less than `minBalance` of `tokenId` on `token` (ERC1155).\"},\"requireMinERC1155BalanceApproval(address,address,uint256,uint256,address)\":{\"notice\":\"Reverts if `owner` has less than `minBalance` of `tokenId` on `token` (ERC1155) or `operator` is not approved to transfer `tokenId` from `owner` on `token` (ERC1155).\"},\"requireMinERC1155BalanceApprovalBatch(address,address,uint256[],uint256[],address)\":{\"notice\":\"Reverts if any `tokenIds[i]` balance of `owner` is below `minBalances[i]` (ERC1155 batch) or `operator` is not approved to transfer `tokenIds[i]` from `owner` on `token` (ERC1155).\"},\"requireMinERC1155BalanceApprovalBatchSelf(address,uint256[],uint256[],address)\":{\"notice\":\"Reverts if any `tokenIds[i]` balance of `msg.sender` is below `minBalances[i]` (ERC1155 batch) or `operator` is not approved to transfer `tokenIds[i]` from `msg.sender` on `token` (ERC1155).\"},\"requireMinERC1155BalanceApprovalSelf(address,uint256,uint256,address)\":{\"notice\":\"Reverts if `msg.sender` has less than `minBalance` of `tokenId` on `token` (ERC1155) or `operator` is not approved to transfer `tokenId` from `msg.sender` on `token` (ERC1155).\"},\"requireMinERC1155BalanceBatch(address,address,uint256[],uint256[])\":{\"notice\":\"Reverts if any `tokenIds[i]` balance of `owner` is below `minBalances[i]` (ERC1155 batch).\"},\"requireMinERC1155BalanceBatchSelf(address,uint256[],uint256[])\":{\"notice\":\"Reverts if any `tokenIds[i]` balance of `msg.sender` is below `minBalances[i]` (ERC1155 batch).\"},\"requireMinERC1155BalanceSelf(address,uint256,uint256)\":{\"notice\":\"Reverts if `msg.sender` has less than `minBalance` of `tokenId` on `token` (ERC1155).\"},\"requireMinERC20Allowance(address,address,address,uint256)\":{\"notice\":\"Reverts if `owner` has granted `spender` less than `minAllowance` for `token`.\"},\"requireMinERC20AllowanceSelf(address,address,uint256)\":{\"notice\":\"Reverts if `msg.sender` has granted `spender` less than `minAllowance` for `token`.\"},\"requireMinERC20Balance(address,address,uint256)\":{\"notice\":\"Reverts if `owner` has less than `minBalance` of `token`.\"},\"requireMinERC20BalanceAllowance(address,address,address,uint256)\":{\"notice\":\"Reverts if `owner` has less than `minAmount` of `token` or granted `spender` less than `minAmount` for `token`.\"},\"requireMinERC20BalanceAllowanceSelf(address,address,uint256)\":{\"notice\":\"Reverts if `msg.sender` has less than `minAmount` of `token` or granted `spender` less than `minAmount` for `token`.\"},\"requireMinERC20BalanceSelf(address,uint256)\":{\"notice\":\"Reverts if `msg.sender` has less than `minBalance` of `token`.\"},\"requireNonExpired(uint256)\":{\"notice\":\"Reverts if `block.timestamp` is greater than or equal to `expiration`.\"},\"sweep(address,address[],bool)\":{\"notice\":\"Sweeps balances to a target address\"}},\"notice\":\"Convenience contract that bundles multiple utility modules under a single deployed address.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/TrailsUtils.sol\":\"TrailsUtils\"},\"evmVersion\":\"prague\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":4294967295},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":account-abstraction/=lib/wallet-contracts-v3/lib/account-abstraction/contracts/\",\":erc2470-libs/=lib/wallet-contracts-v3/lib/erc2470-libs/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/\",\":halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":trails-test/=test/\",\":wallet-contracts-v3-external/=../wallet-contracts-v3/src/\",\":wallet-contracts-v3/=lib/wallet-contracts-v3/src/\"],\"viaIR\":true},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol\":{\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://da5e832b40fc5c3145d3781e2e5fa60ac2052c9d08af7e300dc8ab80c4343100\",\"dweb:/ipfs/QmTzf7N5ZUdh5raqtzbM11yexiUoLC9z3Ws632MCuycq1d\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1c299900ac4ec268d4570ecef0d697a3013cd11a6eb74e295ee3fbc945056037\",\"dweb:/ipfs/Qmab9owJoxcA7vJT5XNayCMaUR1qxqj1NDzzisduwaJMcZ\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol\":{\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1bb2332a7ee26dd0b0de9b7fe266749f54820c99ab6a3bcb6f7e6b751d47ee2d\",\"dweb:/ipfs/QmcRWpaBeCYkhy68PR3B4AgD7asuQk7PwkWxrvJbZcikLF\"]},\"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol\":{\"keccak256\":\"0xf189f9b417fe1931e1ab706838aff1128528694a9fcdb5ff7665197f2ca57d09\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2ff0143c836c8c9f85d13708733c09e21251395847fccfb518bf3b556726a840\",\"dweb:/ipfs/QmP69sjjrQrhYAsvCSSB69Bx66SiUPdQUqdzMYnf4wANHm\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303\",\"dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x869c06fcfd4e33df584f63c033467c3d4f5e51bdf78bc69d0eeef5c07e395ad9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://436721c3801101a789b998f14f161de63edb64229ff307b0951a97a964f07168\",\"dweb:/ipfs/QmaFWLRmVXFL629AyThz8Nc8W7RakZBVGo14AWB2WLyKcP\"]},\"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0xf78f05f3b8c9f75570e85300d7b4600d7f6f6a198449273f31d44c1641adb46f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e28b872613b45e0e801d4995aa4380be2531147bfe2d85c1d6275f1de514fba3\",\"dweb:/ipfs/QmeeFcfShHYaS3BdgVj78nxR28ZaVUwbvr66ud8bT6kzw9\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617\",\"dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u\"]},\"lib/wallet-contracts-v3/src/modules/Calls.sol\":{\"keccak256\":\"0xd3377786c934649567774cc07e4b29196e9192e5cd5267e94e270a924b87ba36\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e2540650137b16ad9e924077992b0f5e1790074bd5de638a3a92362c1df890ea\",\"dweb:/ipfs/QmYqWZ9x1HJHDvHgDGNKFTymqj8BQjnZLMQ7TydV9Wb8qX\"]},\"lib/wallet-contracts-v3/src/modules/Nonce.sol\":{\"keccak256\":\"0x56fbf6dc9b34ab60ae8a32ffb6f583c003bb8f4a5223ce704e982400fa403fab\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://492f53628633b862702cf8f9b726067a722c94028133a8a4c4fcf3d0e73ad803\",\"dweb:/ipfs/QmTHNy4XbH47YZaqKDpknb5aApjRH9HVAREHN7N5vEFWEV\"]},\"lib/wallet-contracts-v3/src/modules/Payload.sol\":{\"keccak256\":\"0x03b3dc2a4a556d3007671e910813dc4703ecb16f5bc2c6645e4c0d8512f2d76a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://9b41263156d5a310a48038e8c3871e9acdb806c018bc952d1a56efed62954e17\",\"dweb:/ipfs/QmaiuTbQgaiCvtN2V6roe4RTi6hHV85mNZpWKqvKA8ofqw\"]},\"lib/wallet-contracts-v3/src/modules/ReentrancyGuard.sol\":{\"keccak256\":\"0x566e105b1a53f49cf099037f3cb4a9739522d72739dc65f1169b97e4fbe07b32\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d811a16613746e5290eab76eb4055d98a1e64e1086632697d09b0a3759a6bac5\",\"dweb:/ipfs/QmPJ33JvAxwn1sTCNvYG2TWsFo991KND2ia8JcvZ26Dge9\"]},\"lib/wallet-contracts-v3/src/modules/Storage.sol\":{\"keccak256\":\"0xa6bc516642ea99194f3ac4375853daee3190272c4006d1e32f84ba88ec30173f\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://209ba57704f952514910c54896df70197c695c2b4eeb1166a2c6ed29380741da\",\"dweb:/ipfs/QmNmQpemo7qQxb2aDXdFooE6xNW1cp7gXGYa8xUUcJ4WWn\"]},\"lib/wallet-contracts-v3/src/modules/auth/BaseAuth.sol\":{\"keccak256\":\"0xbf2e40def03fcb5f4a5129b2f5803e21951325b92e00126cbe1427b7c25cfefd\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://b560905fcc4b957d27c2abed78a1e82529c89fa472e91b3d108fbfd91aa7c3f7\",\"dweb:/ipfs/QmRjLLtTWE6dFX2kBQCgLz7ossfMxhAFgDC8Jx9XuGL6Wy\"]},\"lib/wallet-contracts-v3/src/modules/auth/BaseSig.sol\":{\"keccak256\":\"0x394ed24efe7a4468966e51f649f754bbb66dfffc0574499ec758dc1a5a8e1caa\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://ff4abc523d721df1680d6809c382fbf20b9e5cc17e5bdfd8f623ca7cf00061c8\",\"dweb:/ipfs/QmUXnDME7rDCLvhvFVN7eLFjHbH955DWNmWefLxEyDV4W3\"]},\"lib/wallet-contracts-v3/src/modules/auth/SelfAuth.sol\":{\"keccak256\":\"0x4d517af51c3af39a19a4ed00f3fc89e965e45942c264189085bc24f1987a526c\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://1be166f75d2821e305b6906c34311a62629b1b3c90ac306d775e7330f23d5b42\",\"dweb:/ipfs/QmYFLASBDFzcTXioV5459qvQ1NGaqzWMoLzGJeMas3Lg5W\"]},\"lib/wallet-contracts-v3/src/modules/interfaces/IAuth.sol\":{\"keccak256\":\"0xf6fa30af2ec91d5fbeac17c9b1f2aa73b7883c9ac98745605007e57666394b91\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://6e90a87978519462f9612f4a17e38fddc1c7bcf700ff834a1de7dce326f30353\",\"dweb:/ipfs/QmXmWAsRRK6t4jPs4VcXrouyokxdALM28D3odX7ub48WEp\"]},\"lib/wallet-contracts-v3/src/modules/interfaces/ICheckpointer.sol\":{\"keccak256\":\"0xa9ae32596a0bc2d6676b48826e9edaf6e97ee2f3f222e9ad7058be3ba1718513\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://0f3a846233ba32fd7b89aac58415d969c4fa72f846e4a2c8e1be38b8d2eeb6a1\",\"dweb:/ipfs/Qma5HMU9LCMXtzmevvZFU9mGH2fDgw5V11WQpez5QhCc7t\"]},\"lib/wallet-contracts-v3/src/modules/interfaces/IDelegatedExtension.sol\":{\"keccak256\":\"0xa2ae897e90fd70dd4a9e172bc04d019ba9c512e72c2df65fcb6daf87dd5ceb90\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://cdf4b7c3dfb0aef6c9dbe8b2a0542018dc756ef2252d7101bcb3186192da0a11\",\"dweb:/ipfs/QmPHCVu1DJ7fBrPBYA5y3hoF3a3XFEBwYCZ1ErGaxPhcYL\"]},\"lib/wallet-contracts-v3/src/modules/interfaces/IERC1271.sol\":{\"keccak256\":\"0xb33a198eb641c43c3ab89705f693e342ad87fcc28bfa48d63b5ed105968434c9\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://a1abd7475b239c551d34325466804b09e587b62559faf9109ad1ac019eb57a6b\",\"dweb:/ipfs/Qmd3MDHAmpFpLXdHY5Tnb7niJjPDr5hEnc4d63tpyFGmgF\"]},\"lib/wallet-contracts-v3/src/modules/interfaces/IPartialAuth.sol\":{\"keccak256\":\"0x0d1aa021615d8e90696e71a9468331457a1babfa2ffe169654b7456e5bcb7a73\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://bbacd149a6358ab0d4b9c588d2e3a55fc71ed4723269150d7b91ca70092f6519\",\"dweb:/ipfs/QmUSwtrYCrRcRFsy5rCzdMPrw1FCU7ZoeXdsW6kK9yc8FK\"]},\"lib/wallet-contracts-v3/src/modules/interfaces/ISapient.sol\":{\"keccak256\":\"0x3668daa83a61af054146345e53e571daf403f9bca9c3cc702f6f1cb655770359\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://13aa453c7021c83d305ac7d714a93f78a03a8cc0032cb06cf54d5ebf09100489\",\"dweb:/ipfs/QmSxar3KETtMzHXQuqQA9b8iK8cG3Z62EpWSeu8hhKW2xn\"]},\"lib/wallet-contracts-v3/src/utils/LibBytes.sol\":{\"keccak256\":\"0x4fe0b4786b2157e12384b90ae9daa1009b74b2547a8a24b800a8b998278c874b\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://065129e32d1a318e89fb7587e136c33177a7848393f9055c0ac601b84741cd8c\",\"dweb:/ipfs/QmVWucfHSHRJriRFNoJqoeDcVB4fDfqbccM8KPBmwcxVu3\"]},\"lib/wallet-contracts-v3/src/utils/LibOptim.sol\":{\"keccak256\":\"0x1d1e2234eec89069c3f8d59e370fd3470faaef9c1641cd722bae83f4e4921bde\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://4c3d8b24e6c11fcea3462017b2df71ed4b9b32b2dab8a591cc91afc0b6c8dd81\",\"dweb:/ipfs/QmXtrdWcNTfaYHodKRovkdDyRCQJcffDUZQAdgQCJNoq2x\"]},\"src/TrailsUtils.sol\":{\"keccak256\":\"0x554136e5806e5e99c7b9c2f266b22734f7256ccb0f903bc9e6186c58443397fe\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://cc46eb3c6e517279c0983d9fa3746f29dbfcd72005ef570099b298fecf5537cb\",\"dweb:/ipfs/QmdRD11ZxAV3GNbRdN3iX38uXQ5XwSWCWG6yVmayZvG29Y\"]},\"src/modules/HydrateProxy.sol\":{\"keccak256\":\"0xcd19bc63b7aeb042f07569ac641e8a60d564ac34bf442994cd47e13ea185109f\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://7746da9b41924e187355d53d0a40c587c033577482b1133db510488f96c250cb\",\"dweb:/ipfs/QmWPrmyXAyBAr4SaJz1qLrHWSGvyccfVv76hHmDiYumDBz\"]},\"src/modules/MalleableSapient.sol\":{\"keccak256\":\"0x83c1e78971f053ea482cdcb0bf1a695426e1bc065cca6cfa733397c62c4a1c8b\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://598b14afb51a7ff7598e117340231e1035a8886b94bc662d253c54766721aee5\",\"dweb:/ipfs/QmY6UyUoTBiZ1BbHLv24PMyq9wjuVzMLXNnXv28ZnZKYHF\"]},\"src/modules/RequireUtils.sol\":{\"keccak256\":\"0xe69d913ece1b4406b3cc0d2d9dc285747afdcdcd54a65874c26748a3414a5cd9\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://bbc78441aab7015167c69bc27e7b8d99402e784239d4a61cda05d4a72714bc3c\",\"dweb:/ipfs/QmRWHtwt2NDkKaioA61U1J6AHSjg2sWzsidXifUy7NTbQt\"]},\"src/modules/Sweepable.sol\":{\"keccak256\":\"0x2acd05b8e4dab42bab4f448ca9d6b0cc705f281a055c3c0132f2db376d04d591\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://6434d3861fa1dc0b716eb8af862855963ef44c9049c5a160f891e3625ae593d0\",\"dweb:/ipfs/QmaS7ZPxg1rMYYk1Hho6rF8bHfcxhdGp3iHZFJBThu7i1D\"]},\"src/utils/ReplaceBytes.sol\":{\"keccak256\":\"0xb2123b6a149480333fa113f914962351cd1f84c3bf6decd6dc85d8e6f692ba1f\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://9c283b95243c2dc8569f098e3dcf035b0db3c611f5bd5ce6a643617f0c3e9de4\",\"dweb:/ipfs/QmbQUKSxFCQBxCj4YSqtPtuQWKc2fqYm7WE81Lbd4EkVUb\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.30+commit.73712a01"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"type":"error","name":"DelegateCallFailed"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"type":"error","name":"DelegateCallNotAllowed"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"minBalance","type":"uint256"}],"type":"error","name":"ERC1155BalanceTooLow"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"minBalance","type":"uint256"}],"type":"error","name":"ERC1155BatchBalanceTooLow"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"type":"error","name":"ERC1155NotApproved"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"minAllowance","type":"uint256"}],"type":"error","name":"ERC20AllowanceTooLow"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"minBalance","type":"uint256"}],"type":"error","name":"ERC20BalanceTooLow"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"type":"error","name":"ERC721NotApproved"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"requiredOwner","type":"address"}],"type":"error","name":"ERC721NotOwner"},{"inputs":[{"internalType":"uint256","name":"expiration","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"type":"error","name":"Expired"},{"inputs":[{"internalType":"uint8","name":"kind","type":"uint8"}],"type":"error","name":"InvalidKind"},{"inputs":[{"internalType":"uint256","name":"_tindex","type":"uint256"},{"internalType":"uint256","name":"_cindex","type":"uint256"},{"internalType":"uint256","name":"_size","type":"uint256"},{"internalType":"uint256","name":"_tindex2","type":"uint256"},{"internalType":"uint256","name":"_cindex2","type":"uint256"}],"type":"error","name":"InvalidRepeatSection"},{"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"type":"error","name":"LengthMismatch"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"minBalance","type":"uint256"}],"type":"error","name":"NativeBalanceTooLow"},{"inputs":[],"type":"error","name":"NativeSweepFailed"},{"inputs":[],"type":"error","name":"NonTransactionPayload"},{"inputs":[{"internalType":"struct Payload.Decoded","name":"_payload","type":"tuple","components":[{"internalType":"uint8","name":"kind","type":"uint8"},{"internalType":"bool","name":"noChainId","type":"bool"},{"internalType":"struct Payload.Call[]","name":"calls","type":"tuple[]","components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"bool","name":"delegateCall","type":"bool"},{"internalType":"bool","name":"onlyFallback","type":"bool"},{"internalType":"uint256","name":"behaviorOnError","type":"uint256"}]},{"internalType":"uint256","name":"space","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes32","name":"imageHash","type":"bytes32"},{"internalType":"bytes32","name":"digest","type":"bytes32"},{"internalType":"address[]","name":"parentWallets","type":"address[]"}]},{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"uint256","name":"_gasLeft","type":"uint256"}],"type":"error","name":"NotEnoughGas"},{"inputs":[],"type":"error","name":"OnlyDelegateCallAllowed"},{"inputs":[{"internalType":"struct Payload.Decoded","name":"_payload","type":"tuple","components":[{"internalType":"uint8","name":"kind","type":"uint8"},{"internalType":"bool","name":"noChainId","type":"bool"},{"internalType":"struct Payload.Call[]","name":"calls","type":"tuple[]","components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"bool","name":"delegateCall","type":"bool"},{"internalType":"bool","name":"onlyFallback","type":"bool"},{"internalType":"uint256","name":"behaviorOnError","type":"uint256"}]},{"internalType":"uint256","name":"space","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes32","name":"imageHash","type":"bytes32"},{"internalType":"bytes32","name":"digest","type":"bytes32"},{"internalType":"address[]","name":"parentWallets","type":"address[]"}]},{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"bytes","name":"_returnData","type":"bytes"}],"type":"error","name":"Reverted"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"type":"error","name":"SafeERC20FailedOperation"},{"inputs":[{"internalType":"uint256","name":"flag","type":"uint256"}],"type":"error","name":"UnknownHydrateDataCommand"},{"inputs":[{"internalType":"uint256","name":"flag","type":"uint256"}],"type":"error","name":"UnknownHydrateTypeCommand"},{"inputs":[{"internalType":"bytes32","name":"_opHash","type":"bytes32","indexed":false},{"internalType":"uint256","name":"_index","type":"uint256","indexed":false},{"internalType":"bytes","name":"_returnData","type":"bytes","indexed":false}],"type":"event","name":"CallAborted","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"_opHash","type":"bytes32","indexed":false},{"internalType":"uint256","name":"_index","type":"uint256","indexed":false},{"internalType":"bytes","name":"_returnData","type":"bytes","indexed":false}],"type":"event","name":"CallFailed","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"_opHash","type":"bytes32","indexed":false},{"internalType":"uint256","name":"_index","type":"uint256","indexed":false}],"type":"event","name":"CallSkipped","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"_opHash","type":"bytes32","indexed":false},{"internalType":"uint256","name":"_index","type":"uint256","indexed":false}],"type":"event","name":"CallSucceeded","anonymous":false},{"inputs":[{"internalType":"address","name":"token","type":"address","indexed":true},{"internalType":"address","name":"recipient","type":"address","indexed":true},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Sweep","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"stateMutability":"nonpayable","type":"function","name":"handleSequenceDelegateCall"},{"inputs":[{"internalType":"bytes","name":"packedPayload","type":"bytes"},{"internalType":"bytes","name":"hydratePayload","type":"bytes"}],"stateMutability":"payable","type":"function","name":"hydrateExecute"},{"inputs":[{"internalType":"bytes","name":"packedPayload","type":"bytes"},{"internalType":"bytes","name":"hydratePayload","type":"bytes"},{"internalType":"address","name":"sweepTarget","type":"address"},{"internalType":"address[]","name":"tokensToSweep","type":"address[]"},{"internalType":"bool","name":"sweepNative","type":"bool"}],"stateMutability":"payable","type":"function","name":"hydrateExecuteAndSweep"},{"inputs":[{"internalType":"struct Payload.Decoded","name":"payload","type":"tuple","components":[{"internalType":"uint8","name":"kind","type":"uint8"},{"internalType":"bool","name":"noChainId","type":"bool"},{"internalType":"struct Payload.Call[]","name":"calls","type":"tuple[]","components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"bool","name":"delegateCall","type":"bool"},{"internalType":"bool","name":"onlyFallback","type":"bool"},{"internalType":"uint256","name":"behaviorOnError","type":"uint256"}]},{"internalType":"uint256","name":"space","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes32","name":"imageHash","type":"bytes32"},{"internalType":"bytes32","name":"digest","type":"bytes32"},{"internalType":"address[]","name":"parentWallets","type":"address[]"}]},{"internalType":"bytes","name":"signature","type":"bytes"}],"stateMutability":"view","type":"function","name":"recoverSapientSignature","outputs":[{"internalType":"bytes32","name":"imageHash","type":"bytes32"}]},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"view","type":"function","name":"requireERC1155Approval"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"view","type":"function","name":"requireERC1155ApprovalSelf"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireERC721Approval"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireERC721ApprovalSelf"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireERC721Owner"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireERC721OwnerApproval"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireERC721OwnerApprovalSelf"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireERC721OwnerSelf"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"minBalance","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireMinBalance"},{"inputs":[{"internalType":"uint256","name":"minBalance","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireMinBalanceSelf"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minBalance","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireMinERC1155Balance"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minBalance","type":"uint256"},{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"view","type":"function","name":"requireMinERC1155BalanceApproval"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"minBalances","type":"uint256[]"},{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"view","type":"function","name":"requireMinERC1155BalanceApprovalBatch"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"minBalances","type":"uint256[]"},{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"view","type":"function","name":"requireMinERC1155BalanceApprovalBatchSelf"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minBalance","type":"uint256"},{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"view","type":"function","name":"requireMinERC1155BalanceApprovalSelf"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"minBalances","type":"uint256[]"}],"stateMutability":"view","type":"function","name":"requireMinERC1155BalanceBatch"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"minBalances","type":"uint256[]"}],"stateMutability":"view","type":"function","name":"requireMinERC1155BalanceBatchSelf"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minBalance","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireMinERC1155BalanceSelf"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"minAllowance","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireMinERC20Allowance"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"minAllowance","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireMinERC20AllowanceSelf"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"minBalance","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireMinERC20Balance"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"minAmount","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireMinERC20BalanceAllowance"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"minAmount","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireMinERC20BalanceAllowanceSelf"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"minBalance","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireMinERC20BalanceSelf"},{"inputs":[{"internalType":"uint256","name":"expiration","type":"uint256"}],"stateMutability":"view","type":"function","name":"requireNonExpired"},{"inputs":[{"internalType":"address","name":"sweepTarget","type":"address"},{"internalType":"address[]","name":"tokensToSweep","type":"address[]"},{"internalType":"bool","name":"sweepNative","type":"bool"}],"stateMutability":"nonpayable","type":"function","name":"sweep"},{"inputs":[],"stateMutability":"payable","type":"receive"}],"devdoc":{"kind":"dev","methods":{"handleSequenceDelegateCall(bytes32,uint256,uint256,uint256,uint256,bytes)":{"details":"Delegate calls are allowed to all functions on this contract","params":{"_data":"The data","_index":"The index","_numCalls":"The number of calls","_opHash":"The operation hash","_space":"The space","_startingGas":"The starting gas"}},"hydrateExecute(bytes,bytes)":{"details":"`hydratePayload` is a byte stream grouped by call index: - Starts with a 1-byte `tindex` (the call to hydrate). - Followed by commands for that call. Each command starts with a 1-byte `flag`. - A `SIGNAL_NEXT_HYDRATE` (0x00) ends the current call's section; if more bytes remain, the next byte is the next `tindex`. - The supported command flags are the `HYDRATE_*` constants in this file.","params":{"hydratePayload":"The hydrate payload to use.","packedPayload":"The packed payload to hydrate."}},"hydrateExecuteAndSweep(bytes,bytes,address,address[],bool)":{"params":{"hydratePayload":"The hydrate payload to use.","packedPayload":"The packed payload to hydrate and execute.","sweepNative":"Whether to sweep native tokens","sweepTarget":"The address to sweep the remaining funds to.","tokensToSweep":"Token list to sweep (each full balance of this contract)."}},"recoverSapientSignature((uint8,bool,(address,uint256,bytes,uint256,bool,bool,uint256)[],uint256,uint256,bytes,bytes32,bytes32,address[]),bytes)":{"details":"Computes the `imageHash` for a transaction payload with a malleable `data` commitment.","params":{"payload":"The payload to recover the signature from","signature":"The signature to recover the image hash from"},"returns":{"imageHash":"The recovered image hash"}},"sweep(address,address[],bool)":{"params":{"sweepNative":"Whether to sweep native tokens","sweepTarget":"The address to sweep the balances to","tokensToSweep":"The tokens to sweep"}}},"version":1},"userdoc":{"kind":"user","methods":{"handleSequenceDelegateCall(bytes32,uint256,uint256,uint256,uint256,bytes)":{"notice":"Handle a sequence delegate call"},"hydrateExecute(bytes,bytes)":{"notice":"Hydrates `packedPayload` using `hydratePayload` and then executes the batch."},"hydrateExecuteAndSweep(bytes,bytes,address,address[],bool)":{"notice":"Hydrates and executes, then sweeps remaining funds to a recipient."},"recoverSapientSignature((uint8,bool,(address,uint256,bytes,uint256,bool,bool,uint256)[],uint256,uint256,bytes,bytes32,bytes32,address[]),bytes)":{"notice":"Recovers the image hash of a given signature"},"requireERC1155Approval(address,address,address)":{"notice":"Reverts if `operator` is not approved for all of `owner`'s tokens on `token` (ERC1155)."},"requireERC1155ApprovalSelf(address,address)":{"notice":"Reverts if `operator` is not approved for all of `msg.sender`'s tokens on `token` (ERC1155)."},"requireERC721Approval(address,address,address,uint256)":{"notice":"Reverts if `spender` is not approved to transfer `tokenId` from `owner` on `token` (ERC721)."},"requireERC721ApprovalSelf(address,address,uint256)":{"notice":"Reverts if `spender` is not approved to transfer `tokenId` from `msg.sender` on `token` (ERC721)."},"requireERC721Owner(address,address,uint256)":{"notice":"Reverts if `owner` is not the owner of `tokenId` on `token` (ERC721)."},"requireERC721OwnerApproval(address,address,address,uint256)":{"notice":"Reverts if `owner` is not the owner of `tokenId` on `token` (ERC721) or `spender` is not approved to transfer `tokenId` from `owner` on `token`."},"requireERC721OwnerApprovalSelf(address,address,uint256)":{"notice":"Reverts if `msg.sender` is not the owner of `tokenId` on `token` (ERC721) or `spender` is not approved to transfer `tokenId` from `msg.sender` on `token`."},"requireERC721OwnerSelf(address,uint256)":{"notice":"Reverts if `msg.sender` is not the owner of `tokenId` on `token` (ERC721)."},"requireMinBalance(address,uint256)":{"notice":"Reverts if `owner` has less than `minBalance` native tokens."},"requireMinBalanceSelf(uint256)":{"notice":"Reverts if `msg.sender` has less than `minBalance` native tokens."},"requireMinERC1155Balance(address,address,uint256,uint256)":{"notice":"Reverts if `owner` has less than `minBalance` of `tokenId` on `token` (ERC1155)."},"requireMinERC1155BalanceApproval(address,address,uint256,uint256,address)":{"notice":"Reverts if `owner` has less than `minBalance` of `tokenId` on `token` (ERC1155) or `operator` is not approved to transfer `tokenId` from `owner` on `token` (ERC1155)."},"requireMinERC1155BalanceApprovalBatch(address,address,uint256[],uint256[],address)":{"notice":"Reverts if any `tokenIds[i]` balance of `owner` is below `minBalances[i]` (ERC1155 batch) or `operator` is not approved to transfer `tokenIds[i]` from `owner` on `token` (ERC1155)."},"requireMinERC1155BalanceApprovalBatchSelf(address,uint256[],uint256[],address)":{"notice":"Reverts if any `tokenIds[i]` balance of `msg.sender` is below `minBalances[i]` (ERC1155 batch) or `operator` is not approved to transfer `tokenIds[i]` from `msg.sender` on `token` (ERC1155)."},"requireMinERC1155BalanceApprovalSelf(address,uint256,uint256,address)":{"notice":"Reverts if `msg.sender` has less than `minBalance` of `tokenId` on `token` (ERC1155) or `operator` is not approved to transfer `tokenId` from `msg.sender` on `token` (ERC1155)."},"requireMinERC1155BalanceBatch(address,address,uint256[],uint256[])":{"notice":"Reverts if any `tokenIds[i]` balance of `owner` is below `minBalances[i]` (ERC1155 batch)."},"requireMinERC1155BalanceBatchSelf(address,uint256[],uint256[])":{"notice":"Reverts if any `tokenIds[i]` balance of `msg.sender` is below `minBalances[i]` (ERC1155 batch)."},"requireMinERC1155BalanceSelf(address,uint256,uint256)":{"notice":"Reverts if `msg.sender` has less than `minBalance` of `tokenId` on `token` (ERC1155)."},"requireMinERC20Allowance(address,address,address,uint256)":{"notice":"Reverts if `owner` has granted `spender` less than `minAllowance` for `token`."},"requireMinERC20AllowanceSelf(address,address,uint256)":{"notice":"Reverts if `msg.sender` has granted `spender` less than `minAllowance` for `token`."},"requireMinERC20Balance(address,address,uint256)":{"notice":"Reverts if `owner` has less than `minBalance` of `token`."},"requireMinERC20BalanceAllowance(address,address,address,uint256)":{"notice":"Reverts if `owner` has less than `minAmount` of `token` or granted `spender` less than `minAmount` for `token`."},"requireMinERC20BalanceAllowanceSelf(address,address,uint256)":{"notice":"Reverts if `msg.sender` has less than `minAmount` of `token` or granted `spender` less than `minAmount` for `token`."},"requireMinERC20BalanceSelf(address,uint256)":{"notice":"Reverts if `msg.sender` has less than `minBalance` of `token`."},"requireNonExpired(uint256)":{"notice":"Reverts if `block.timestamp` is greater than or equal to `expiration`."},"sweep(address,address[],bool)":{"notice":"Sweeps balances to a target address"}},"version":1}},"settings":{"remappings":["@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","account-abstraction/=lib/wallet-contracts-v3/lib/account-abstraction/contracts/","erc2470-libs/=lib/wallet-contracts-v3/lib/erc2470-libs/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/","halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/","openzeppelin-contracts/=lib/openzeppelin-contracts/","trails-test/=test/","wallet-contracts-v3-external/=../wallet-contracts-v3/src/","wallet-contracts-v3/=lib/wallet-contracts-v3/src/"],"optimizer":{"enabled":true,"runs":4294967295},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/TrailsUtils.sol":"TrailsUtils"},"evmVersion":"prague","libraries":{},"viaIR":true},"sources":{"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"keccak256":"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d","urls":["bzz-raw://da5e832b40fc5c3145d3781e2e5fa60ac2052c9d08af7e300dc8ab80c4343100","dweb:/ipfs/QmTzf7N5ZUdh5raqtzbM11yexiUoLC9z3Ws632MCuycq1d"],"license":"MIT"},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"keccak256":"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc","urls":["bzz-raw://1c299900ac4ec268d4570ecef0d697a3013cd11a6eb74e295ee3fbc945056037","dweb:/ipfs/Qmab9owJoxcA7vJT5XNayCMaUR1qxqj1NDzzisduwaJMcZ"],"license":"MIT"},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"keccak256":"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44","urls":["bzz-raw://1bb2332a7ee26dd0b0de9b7fe266749f54820c99ab6a3bcb6f7e6b751d47ee2d","dweb:/ipfs/QmcRWpaBeCYkhy68PR3B4AgD7asuQk7PwkWxrvJbZcikLF"],"license":"MIT"},"lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol":{"keccak256":"0xf189f9b417fe1931e1ab706838aff1128528694a9fcdb5ff7665197f2ca57d09","urls":["bzz-raw://2ff0143c836c8c9f85d13708733c09e21251395847fccfb518bf3b556726a840","dweb:/ipfs/QmP69sjjrQrhYAsvCSSB69Bx66SiUPdQUqdzMYnf4wANHm"],"license":"MIT"},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"keccak256":"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2","urls":["bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303","dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV"],"license":"MIT"},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"keccak256":"0x869c06fcfd4e33df584f63c033467c3d4f5e51bdf78bc69d0eeef5c07e395ad9","urls":["bzz-raw://436721c3801101a789b998f14f161de63edb64229ff307b0951a97a964f07168","dweb:/ipfs/QmaFWLRmVXFL629AyThz8Nc8W7RakZBVGo14AWB2WLyKcP"],"license":"MIT"},"lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol":{"keccak256":"0xf78f05f3b8c9f75570e85300d7b4600d7f6f6a198449273f31d44c1641adb46f","urls":["bzz-raw://e28b872613b45e0e801d4995aa4380be2531147bfe2d85c1d6275f1de514fba3","dweb:/ipfs/QmeeFcfShHYaS3BdgVj78nxR28ZaVUwbvr66ud8bT6kzw9"],"license":"MIT"},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c","urls":["bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617","dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u"],"license":"MIT"},"lib/wallet-contracts-v3/src/modules/Calls.sol":{"keccak256":"0xd3377786c934649567774cc07e4b29196e9192e5cd5267e94e270a924b87ba36","urls":["bzz-raw://e2540650137b16ad9e924077992b0f5e1790074bd5de638a3a92362c1df890ea","dweb:/ipfs/QmYqWZ9x1HJHDvHgDGNKFTymqj8BQjnZLMQ7TydV9Wb8qX"],"license":"Apache-2.0"},"lib/wallet-contracts-v3/src/modules/Nonce.sol":{"keccak256":"0x56fbf6dc9b34ab60ae8a32ffb6f583c003bb8f4a5223ce704e982400fa403fab","urls":["bzz-raw://492f53628633b862702cf8f9b726067a722c94028133a8a4c4fcf3d0e73ad803","dweb:/ipfs/QmTHNy4XbH47YZaqKDpknb5aApjRH9HVAREHN7N5vEFWEV"],"license":"Apache-2.0"},"lib/wallet-contracts-v3/src/modules/Payload.sol":{"keccak256":"0x03b3dc2a4a556d3007671e910813dc4703ecb16f5bc2c6645e4c0d8512f2d76a","urls":["bzz-raw://9b41263156d5a310a48038e8c3871e9acdb806c018bc952d1a56efed62954e17","dweb:/ipfs/QmaiuTbQgaiCvtN2V6roe4RTi6hHV85mNZpWKqvKA8ofqw"],"license":"Apache-2.0"},"lib/wallet-contracts-v3/src/modules/ReentrancyGuard.sol":{"keccak256":"0x566e105b1a53f49cf099037f3cb4a9739522d72739dc65f1169b97e4fbe07b32","urls":["bzz-raw://d811a16613746e5290eab76eb4055d98a1e64e1086632697d09b0a3759a6bac5","dweb:/ipfs/QmPJ33JvAxwn1sTCNvYG2TWsFo991KND2ia8JcvZ26Dge9"],"license":"MIT"},"lib/wallet-contracts-v3/src/modules/Storage.sol":{"keccak256":"0xa6bc516642ea99194f3ac4375853daee3190272c4006d1e32f84ba88ec30173f","urls":["bzz-raw://209ba57704f952514910c54896df70197c695c2b4eeb1166a2c6ed29380741da","dweb:/ipfs/QmNmQpemo7qQxb2aDXdFooE6xNW1cp7gXGYa8xUUcJ4WWn"],"license":"Apache-2.0"},"lib/wallet-contracts-v3/src/modules/auth/BaseAuth.sol":{"keccak256":"0xbf2e40def03fcb5f4a5129b2f5803e21951325b92e00126cbe1427b7c25cfefd","urls":["bzz-raw://b560905fcc4b957d27c2abed78a1e82529c89fa472e91b3d108fbfd91aa7c3f7","dweb:/ipfs/QmRjLLtTWE6dFX2kBQCgLz7ossfMxhAFgDC8Jx9XuGL6Wy"],"license":"Apache-2.0"},"lib/wallet-contracts-v3/src/modules/auth/BaseSig.sol":{"keccak256":"0x394ed24efe7a4468966e51f649f754bbb66dfffc0574499ec758dc1a5a8e1caa","urls":["bzz-raw://ff4abc523d721df1680d6809c382fbf20b9e5cc17e5bdfd8f623ca7cf00061c8","dweb:/ipfs/QmUXnDME7rDCLvhvFVN7eLFjHbH955DWNmWefLxEyDV4W3"],"license":"Apache-2.0"},"lib/wallet-contracts-v3/src/modules/auth/SelfAuth.sol":{"keccak256":"0x4d517af51c3af39a19a4ed00f3fc89e965e45942c264189085bc24f1987a526c","urls":["bzz-raw://1be166f75d2821e305b6906c34311a62629b1b3c90ac306d775e7330f23d5b42","dweb:/ipfs/QmYFLASBDFzcTXioV5459qvQ1NGaqzWMoLzGJeMas3Lg5W"],"license":"Apache-2.0"},"lib/wallet-contracts-v3/src/modules/interfaces/IAuth.sol":{"keccak256":"0xf6fa30af2ec91d5fbeac17c9b1f2aa73b7883c9ac98745605007e57666394b91","urls":["bzz-raw://6e90a87978519462f9612f4a17e38fddc1c7bcf700ff834a1de7dce326f30353","dweb:/ipfs/QmXmWAsRRK6t4jPs4VcXrouyokxdALM28D3odX7ub48WEp"],"license":"Apache-2.0"},"lib/wallet-contracts-v3/src/modules/interfaces/ICheckpointer.sol":{"keccak256":"0xa9ae32596a0bc2d6676b48826e9edaf6e97ee2f3f222e9ad7058be3ba1718513","urls":["bzz-raw://0f3a846233ba32fd7b89aac58415d969c4fa72f846e4a2c8e1be38b8d2eeb6a1","dweb:/ipfs/Qma5HMU9LCMXtzmevvZFU9mGH2fDgw5V11WQpez5QhCc7t"],"license":"Apache-2.0"},"lib/wallet-contracts-v3/src/modules/interfaces/IDelegatedExtension.sol":{"keccak256":"0xa2ae897e90fd70dd4a9e172bc04d019ba9c512e72c2df65fcb6daf87dd5ceb90","urls":["bzz-raw://cdf4b7c3dfb0aef6c9dbe8b2a0542018dc756ef2252d7101bcb3186192da0a11","dweb:/ipfs/QmPHCVu1DJ7fBrPBYA5y3hoF3a3XFEBwYCZ1ErGaxPhcYL"],"license":"Apache-2.0"},"lib/wallet-contracts-v3/src/modules/interfaces/IERC1271.sol":{"keccak256":"0xb33a198eb641c43c3ab89705f693e342ad87fcc28bfa48d63b5ed105968434c9","urls":["bzz-raw://a1abd7475b239c551d34325466804b09e587b62559faf9109ad1ac019eb57a6b","dweb:/ipfs/Qmd3MDHAmpFpLXdHY5Tnb7niJjPDr5hEnc4d63tpyFGmgF"],"license":"Apache-2.0"},"lib/wallet-contracts-v3/src/modules/interfaces/IPartialAuth.sol":{"keccak256":"0x0d1aa021615d8e90696e71a9468331457a1babfa2ffe169654b7456e5bcb7a73","urls":["bzz-raw://bbacd149a6358ab0d4b9c588d2e3a55fc71ed4723269150d7b91ca70092f6519","dweb:/ipfs/QmUSwtrYCrRcRFsy5rCzdMPrw1FCU7ZoeXdsW6kK9yc8FK"],"license":"Apache-2.0"},"lib/wallet-contracts-v3/src/modules/interfaces/ISapient.sol":{"keccak256":"0x3668daa83a61af054146345e53e571daf403f9bca9c3cc702f6f1cb655770359","urls":["bzz-raw://13aa453c7021c83d305ac7d714a93f78a03a8cc0032cb06cf54d5ebf09100489","dweb:/ipfs/QmSxar3KETtMzHXQuqQA9b8iK8cG3Z62EpWSeu8hhKW2xn"],"license":"Apache-2.0"},"lib/wallet-contracts-v3/src/utils/LibBytes.sol":{"keccak256":"0x4fe0b4786b2157e12384b90ae9daa1009b74b2547a8a24b800a8b998278c874b","urls":["bzz-raw://065129e32d1a318e89fb7587e136c33177a7848393f9055c0ac601b84741cd8c","dweb:/ipfs/QmVWucfHSHRJriRFNoJqoeDcVB4fDfqbccM8KPBmwcxVu3"],"license":"Apache-2.0"},"lib/wallet-contracts-v3/src/utils/LibOptim.sol":{"keccak256":"0x1d1e2234eec89069c3f8d59e370fd3470faaef9c1641cd722bae83f4e4921bde","urls":["bzz-raw://4c3d8b24e6c11fcea3462017b2df71ed4b9b32b2dab8a591cc91afc0b6c8dd81","dweb:/ipfs/QmXtrdWcNTfaYHodKRovkdDyRCQJcffDUZQAdgQCJNoq2x"],"license":"Apache-2.0"},"src/TrailsUtils.sol":{"keccak256":"0x554136e5806e5e99c7b9c2f266b22734f7256ccb0f903bc9e6186c58443397fe","urls":["bzz-raw://cc46eb3c6e517279c0983d9fa3746f29dbfcd72005ef570099b298fecf5537cb","dweb:/ipfs/QmdRD11ZxAV3GNbRdN3iX38uXQ5XwSWCWG6yVmayZvG29Y"],"license":"Apache-2.0"},"src/modules/HydrateProxy.sol":{"keccak256":"0xcd19bc63b7aeb042f07569ac641e8a60d564ac34bf442994cd47e13ea185109f","urls":["bzz-raw://7746da9b41924e187355d53d0a40c587c033577482b1133db510488f96c250cb","dweb:/ipfs/QmWPrmyXAyBAr4SaJz1qLrHWSGvyccfVv76hHmDiYumDBz"],"license":"Apache-2.0"},"src/modules/MalleableSapient.sol":{"keccak256":"0x83c1e78971f053ea482cdcb0bf1a695426e1bc065cca6cfa733397c62c4a1c8b","urls":["bzz-raw://598b14afb51a7ff7598e117340231e1035a8886b94bc662d253c54766721aee5","dweb:/ipfs/QmY6UyUoTBiZ1BbHLv24PMyq9wjuVzMLXNnXv28ZnZKYHF"],"license":"Apache-2.0"},"src/modules/RequireUtils.sol":{"keccak256":"0xe69d913ece1b4406b3cc0d2d9dc285747afdcdcd54a65874c26748a3414a5cd9","urls":["bzz-raw://bbc78441aab7015167c69bc27e7b8d99402e784239d4a61cda05d4a72714bc3c","dweb:/ipfs/QmRWHtwt2NDkKaioA61U1J6AHSjg2sWzsidXifUy7NTbQt"],"license":"Apache-2.0"},"src/modules/Sweepable.sol":{"keccak256":"0x2acd05b8e4dab42bab4f448ca9d6b0cc705f281a055c3c0132f2db376d04d591","urls":["bzz-raw://6434d3861fa1dc0b716eb8af862855963ef44c9049c5a160f891e3625ae593d0","dweb:/ipfs/QmaS7ZPxg1rMYYk1Hho6rF8bHfcxhdGp3iHZFJBThu7i1D"],"license":"Apache-2.0"},"src/utils/ReplaceBytes.sol":{"keccak256":"0xb2123b6a149480333fa113f914962351cd1f84c3bf6decd6dc85d8e6f692ba1f","urls":["bzz-raw://9c283b95243c2dc8569f098e3dcf035b0db3c611f5bd5ce6a643617f0c3e9de4","dweb:/ipfs/QmbQUKSxFCQBxCj4YSqtPtuQWKc2fqYm7WE81Lbd4EkVUb"],"license":"Apache-2.0"}},"version":1},"ast":{"absolutePath":"src/TrailsUtils.sol","id":43880,"exportedSymbols":{"HydrateProxy":[44706],"MalleableSapient":[45063],"RequireUtils":[46032],"TrailsUtils":[43879]},"nodeType":"SourceUnit","src":"39:643:42","nodes":[{"id":43865,"nodeType":"PragmaDirective","src":"39:24:42","nodes":[],"literals":["solidity","^","0.8",".27"]},{"id":43867,"nodeType":"ImportDirective","src":"65:66:42","nodes":[],"absolutePath":"src/modules/MalleableSapient.sol","file":"src/modules/MalleableSapient.sol","nameLocation":"-1:-1:-1","scope":43880,"sourceUnit":45064,"symbolAliases":[{"foreign":{"id":43866,"name":"MalleableSapient","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45063,"src":"73:16:42","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":43869,"nodeType":"ImportDirective","src":"132:58:42","nodes":[],"absolutePath":"src/modules/HydrateProxy.sol","file":"src/modules/HydrateProxy.sol","nameLocation":"-1:-1:-1","scope":43880,"sourceUnit":44707,"symbolAliases":[{"foreign":{"id":43868,"name":"HydrateProxy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":44706,"src":"140:12:42","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":43871,"nodeType":"ImportDirective","src":"191:58:42","nodes":[],"absolutePath":"src/modules/RequireUtils.sol","file":"src/modules/RequireUtils.sol","nameLocation":"-1:-1:-1","scope":43880,"sourceUnit":46033,"symbolAliases":[{"foreign":{"id":43870,"name":"RequireUtils","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":46032,"src":"199:12:42","typeDescriptions":{}},"nameLocation":"-1:-1:-1"}],"unitAlias":""},{"id":43879,"nodeType":"ContractDefinition","src":"610:71:42","nodes":[],"abstract":false,"baseContracts":[{"baseName":{"id":43873,"name":"MalleableSapient","nameLocations":["634:16:42"],"nodeType":"IdentifierPath","referencedDeclaration":45063,"src":"634:16:42"},"id":43874,"nodeType":"InheritanceSpecifier","src":"634:16:42"},{"baseName":{"id":43875,"name":"HydrateProxy","nameLocations":["652:12:42"],"nodeType":"IdentifierPath","referencedDeclaration":44706,"src":"652:12:42"},"id":43876,"nodeType":"InheritanceSpecifier","src":"652:12:42"},{"baseName":{"id":43877,"name":"RequireUtils","nameLocations":["666:12:42"],"nodeType":"IdentifierPath","referencedDeclaration":46032,"src":"666:12:42"},"id":43878,"nodeType":"InheritanceSpecifier","src":"666:12:42"}],"canonicalName":"TrailsUtils","contractDependencies":[],"contractKind":"contract","documentation":{"id":43872,"nodeType":"StructuredDocumentation","src":"251:359:42","text":"@title TrailsUtils\n @notice Convenience contract that bundles multiple utility modules under a single deployed address.\n @dev This contract intentionally contains no additional logic; it simply inherits:\n - {MalleableSapient} for malleable commitments\n - {HydrateProxy} for hydrate + execute flows\n - {RequireUtils} for precondition checks"},"fullyImplemented":true,"linearizedBaseContracts":[43879,46032,44706,43517,46194,45063,43593],"name":"TrailsUtils","nameLocation":"619:11:42","scope":43880,"usedErrors":[302,39984,40002,40425,43913,43918,43923,43926,43931,44721,44733,45079,45090,45103,45114,45125,45138,45145,45154,45163,45172,46046],"usedEvents":[39949,39958,39967,39974,46055]}],"license":"Apache-2.0"},"id":42} \ No newline at end of file diff --git a/contracts/contracts.go b/contracts/contracts.go index 2e3a35f4..36b35491 100644 --- a/contracts/contracts.go +++ b/contracts/contracts.go @@ -18,6 +18,7 @@ import ( seqsale721v0 "github.com/0xsequence/go-sequence/contracts/gen/seq_sale/erc721v0" "github.com/0xsequence/go-sequence/contracts/gen/supply" "github.com/0xsequence/go-sequence/contracts/gen/tokens" + trailsutils "github.com/0xsequence/go-sequence/contracts/gen/trailsutils" v1Factory "github.com/0xsequence/go-sequence/contracts/gen/v1/walletfactory" v1Estimator "github.com/0xsequence/go-sequence/contracts/gen/v1/walletgasestimator" v1Guest "github.com/0xsequence/go-sequence/contracts/gen/v1/walletguest" @@ -43,6 +44,7 @@ var GasEstimator, IERC1271, ISapient, ISapientCompact, + TrailsUtils, ERC20Mock, IERC20, IERC721, @@ -131,6 +133,7 @@ func init() { IERC1271 = artifact("IERC1271", ierc1271.IERC1271ABI, "") ISapient = artifact("ISapient", isapient.ISapientABI, "") ISapientCompact = artifact("ISapientCompact", isapient.ISapientCompactABI, "") + TrailsUtils = artifact("TRAILS_UTILS", trailsutils.TrailsUtilsABI, trailsutils.TrailsUtilsBin) IERC20 = artifact("IERC20", tokens.IERC20ABI, "") IERC721 = artifact("IERC721", tokens.IERC721ABI, "") diff --git a/contracts/gen/gen.go b/contracts/gen/gen.go index 664afa5e..1502fdb9 100644 --- a/contracts/gen/gen.go +++ b/contracts/gen/gen.go @@ -76,6 +76,11 @@ //go:generate go run github.com/0xsequence/ethkit/cmd/ethkit abigen --pkg=isapient --type=ISapient --outFile=./isapient/isapient.gen.go --artifactsFile=../artifacts/wallet-contracts-v3/ISapient.sol/ISapient.json //go:generate go run github.com/0xsequence/ethkit/cmd/ethkit abigen --pkg=isapient --type=ISapientCompact --outFile=./isapient/isapientcompact.gen.go --artifactsFile=../artifacts/wallet-contracts-v3/ISapient.sol/ISapientCompact.json +// +// trails +// +//go:generate go run github.com/0xsequence/ethkit/cmd/ethkit abigen --pkg=trailsutils --type=TrailsUtils --outFile=./trailsutils/trails_utils.gen.go --artifactsFile=../artifacts/trails-contracts/TrailsUtils.sol/TrailsUtils.json + // // sequence marketplace // diff --git a/contracts/gen/trailsutils/trails_utils.gen.go b/contracts/gen/trailsutils/trails_utils.gen.go new file mode 100644 index 00000000..dd55143e --- /dev/null +++ b/contracts/gen/trailsutils/trails_utils.gen.go @@ -0,0 +1,1784 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package trailsutils + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/0xsequence/ethkit/go-ethereum" + "github.com/0xsequence/ethkit/go-ethereum/accounts/abi" + "github.com/0xsequence/ethkit/go-ethereum/accounts/abi/bind" + "github.com/0xsequence/ethkit/go-ethereum/common" + "github.com/0xsequence/ethkit/go-ethereum/core/types" + "github.com/0xsequence/ethkit/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// PayloadCall is an auto generated low-level Go binding around an user-defined struct. +type PayloadCall struct { + To common.Address + Value *big.Int + Data []byte + GasLimit *big.Int + DelegateCall bool + OnlyFallback bool + BehaviorOnError *big.Int +} + +// PayloadDecoded is an auto generated low-level Go binding around an user-defined struct. +type PayloadDecoded struct { + Kind uint8 + NoChainId bool + Calls []PayloadCall + Space *big.Int + Nonce *big.Int + Message []byte + ImageHash [32]byte + Digest [32]byte + ParentWallets []common.Address +} + +// TrailsUtilsMetaData contains all meta data concerning the TrailsUtils contract. +var TrailsUtilsMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"handleSequenceDelegateCall\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"hydrateExecute\",\"inputs\":[{\"name\":\"packedPayload\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"hydratePayload\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"hydrateExecuteAndSweep\",\"inputs\":[{\"name\":\"packedPayload\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"hydratePayload\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"sweepTarget\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokensToSweep\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"sweepNative\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"recoverSapientSignature\",\"inputs\":[{\"name\":\"payload\",\"type\":\"tuple\",\"internalType\":\"structPayload.Decoded\",\"components\":[{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"noChainId\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"calls\",\"type\":\"tuple[]\",\"internalType\":\"structPayload.Call[]\",\"components\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"gasLimit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"delegateCall\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"onlyFallback\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"behaviorOnError\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"space\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"message\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"imageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"digest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"parentWallets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}]},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"imageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireERC1155Approval\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireERC1155ApprovalSelf\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireERC721Approval\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireERC721ApprovalSelf\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireERC721Owner\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireERC721OwnerApproval\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireERC721OwnerApprovalSelf\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireERC721OwnerSelf\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinBalance\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minBalance\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinBalanceSelf\",\"inputs\":[{\"name\":\"minBalance\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinERC1155Balance\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minBalance\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinERC1155BalanceApproval\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minBalance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinERC1155BalanceApprovalBatch\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenIds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"minBalances\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinERC1155BalanceApprovalBatchSelf\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenIds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"minBalances\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinERC1155BalanceApprovalSelf\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minBalance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinERC1155BalanceBatch\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenIds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"minBalances\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinERC1155BalanceBatchSelf\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenIds\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"minBalances\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinERC1155BalanceSelf\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minBalance\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinERC20Allowance\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minAllowance\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinERC20AllowanceSelf\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minAllowance\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinERC20Balance\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minBalance\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinERC20BalanceAllowance\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinERC20BalanceAllowanceSelf\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireMinERC20BalanceSelf\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"minBalance\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"requireNonExpired\",\"inputs\":[{\"name\":\"expiration\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sweep\",\"inputs\":[{\"name\":\"sweepTarget\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokensToSweep\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"sweepNative\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"CallAborted\",\"inputs\":[{\"name\":\"_opHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"_index\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"_returnData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CallFailed\",\"inputs\":[{\"name\":\"_opHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"_index\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"_returnData\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CallSkipped\",\"inputs\":[{\"name\":\"_opHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"_index\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CallSucceeded\",\"inputs\":[{\"name\":\"_opHash\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"_index\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Sweep\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"DelegateCallFailed\",\"inputs\":[{\"name\":\"result\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"DelegateCallNotAllowed\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ERC1155BalanceTooLow\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minBalance\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ERC1155BatchBalanceTooLow\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minBalance\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ERC1155NotApproved\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC20AllowanceTooLow\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"allowance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minAllowance\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ERC20BalanceTooLow\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minBalance\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ERC721NotApproved\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC721NotOwner\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tokenId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"requiredOwner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"Expired\",\"inputs\":[{\"name\":\"expiration\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"timestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"InvalidKind\",\"inputs\":[{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]},{\"type\":\"error\",\"name\":\"InvalidRepeatSection\",\"inputs\":[{\"name\":\"_tindex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_cindex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_size\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_tindex2\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_cindex2\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"LengthMismatch\",\"inputs\":[{\"name\":\"a\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"b\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"NativeBalanceTooLow\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minBalance\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"NativeSweepFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NonTransactionPayload\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotEnoughGas\",\"inputs\":[{\"name\":\"_payload\",\"type\":\"tuple\",\"internalType\":\"structPayload.Decoded\",\"components\":[{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"noChainId\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"calls\",\"type\":\"tuple[]\",\"internalType\":\"structPayload.Call[]\",\"components\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"gasLimit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"delegateCall\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"onlyFallback\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"behaviorOnError\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"space\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"message\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"imageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"digest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"parentWallets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}]},{\"name\":\"_index\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_gasLeft\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"OnlyDelegateCallAllowed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"Reverted\",\"inputs\":[{\"name\":\"_payload\",\"type\":\"tuple\",\"internalType\":\"structPayload.Decoded\",\"components\":[{\"name\":\"kind\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"noChainId\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"calls\",\"type\":\"tuple[]\",\"internalType\":\"structPayload.Call[]\",\"components\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"gasLimit\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"delegateCall\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"onlyFallback\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"behaviorOnError\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"space\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"message\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"imageHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"digest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"parentWallets\",\"type\":\"address[]\",\"internalType\":\"address[]\"}]},{\"name\":\"_index\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_returnData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"SafeERC20FailedOperation\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"UnknownHydrateDataCommand\",\"inputs\":[{\"name\":\"flag\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"UnknownHydrateTypeCommand\",\"inputs\":[{\"name\":\"flag\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]", + Bin: "0x60a08060405234602957306080526135af908161002e8239608051818181610c2d015261246b0152f35b5f80fdfe6080604052600436101561001a575b3615610018575f80fd5b005b5f3560e01c806284290d146101f7578062e79cd5146101f2578063024ea911146101ed57806303bbbd65146101e85780630cb17e5c146101e357806313792a4a146101de57806318c9003a146101d95780631c0bdfab146101d45780632ab793d7146101cf5780632f2227ba146101ca578063317df1e8146101c5578063333f790d146101c0578063372618cb146101bb57806342ab921e146101b6578063476a5f40146101b15780634c4e814c146101ac578063505c7ed3146101a75780636d42cf03146101a25780636ef1f0dd1461019d5780637f29d5381461019857806380df36a0146101935780638d0a9ea71461018e5780639c8d8ea114610189578063a7b7ec5a14610184578063ac38d0891461017f578063cda38f4c1461017a578063e246466a14610175578063f38bce1514610170578063fdc254281461016b5763fe08e7ca0361000e576110e9565b61105f565b61103b565b611022565b61100b565b610fb0565b610f3e565b610f19565b610f02565b610e51565b610ddc565b610dc3565b610d4d565b610cf6565b610bdb565b610b47565b610b2d565b610ae4565b610aa9565b610a42565b6109f9565b6109a2565b61097d565b61088e565b61047c565b6103fc565b6103b5565b610309565b6102b4565b61021e565b73ffffffffffffffffffffffffffffffffffffffff81160361021a57565b5f80fd5b3461021a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5761001860043561025c816101fc565b6024356044359133906113f7565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc606091011261021a576004356102a0816101fc565b906024356102ad816101fc565b9060443590565b3461021a576100186102c53661026a565b916102d183338361151b565b339061161c565b9181601f8401121561021a5782359167ffffffffffffffff831161021a576020808501948460051b01011161021a57565b3461021a5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57600435610344816101fc565b60243590610351826101fc565b60443567ffffffffffffffff811161021a576103719036906004016102d8565b92909160643567ffffffffffffffff811161021a576100189461039b6103b09236906004016102d8565b91608435966103a9886101fc565b86866118ac565b611a61565b3461021a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a576100186004356103f3816101fc565b60243590611b4e565b3461021a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5761001860043561043a816101fc565b60243590610447826101fc565b3390611a61565b9181601f8401121561021a5782359167ffffffffffffffff831161021a576020838186019501011161021a57565b3461021a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760043567ffffffffffffffff811161021a57806004016101207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc833603011261021a5760243567ffffffffffffffff811161021a5761050e90369060040161044e565b909160ff61051b82611103565b166108665761053a60648501356084860135905f5260205260405f2090565b61054660248601611111565b156108525761055c905f525f60205260405f2090565b9193925b60445f9401925b610571848461111e565b905085101561069e57610696600191866105958161058f898961111e565b9061119f565b6106866105a1826111e4565b61065a6020840135936060810135906105bc60808201611111565b60c06105ca60a08401611111565b92013592604051978896602088019a8b93909796959273ffffffffffffffffffffffffffffffffffffffff60e09693610100875260046101008801527f63616c6c0000000000000000000000000000000000000000000000000000000061012088015261014087019a602088015216604086015260608501526080840152151560a0830152151560c08201520152565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261123c565b519020905f5260205260405f2090565b940193610567565b93509391905f5b8381106106b757604051858152602090f35b9360808361070561ffff6106dd6106f2969798998b60019092919283013560f81c920190565b90968793918c81013560f01c91600290910190565b9216918b81013560f01c91600290910190565b9061073a836107306107268c61058f607f61ffff8998169a169a8b9261111e565b604081019061127d565b82880192916112ce565b909890961615610838575060038101966001918c019182013560f01c95913560f81c9491856107698c8c61111e565b610773929161119f565b604081016107809161127d565b888781019161078e936112ce565b929091369061079c92611320565b805190602001209136906107af92611320565b80519060200120036107e357916107cc93916107d9969593611c67565b905f5260205260405f2090565b935b9291906106a5565b6040517feacd10be000000000000000000000000000000000000000000000000000000008152600481019190915260248101919091526044810182905260648101839052608481018490528060a481015b0390fd5b9691905061084c959492506107cc93611ba5565b936107db565b5f9081524660205260409020919392610560565b7f3c28730f000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461021a5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a576004356108c9816101fc565b60243567ffffffffffffffff811161021a576108e99036906004016102d8565b9160443567ffffffffffffffff811161021a57610018936109116104479236906004016102d8565b916064359561091f876101fc565b33866118ac565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc608091011261021a5760043561095c816101fc565b90602435610969816101fc565b90604435610976816101fc565b9060643590565b3461021a5761001861098e36610926565b9261099d848483959495611ce6565b611e06565b3461021a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a576100186004356109e0816101fc565b6024356109ec816101fc565b604435916103b0836101fc565b3461021a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57610018600435610a37816101fc565b602435903390611ce6565b3461021a5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57610018600435610a80816101fc565b602435610a8c816101fc565b608435916103b0606435604435610aa2866101fc565b84846113f7565b3461021a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5761001860043533611b4e565b3461021a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57610018600435610b22816101fc565b60243590339061151b565b3461021a57610018610b3e36610926565b9291909161161c565b3461021a5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57600435610b82816101fc565b602435610b8e816101fc565b60443567ffffffffffffffff811161021a57610bae9036906004016102d8565b606435939167ffffffffffffffff851161021a57610bd36100189536906004016102d8565b9490936118ac565b3461021a5760c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760a43567ffffffffffffffff811161021a57610c2a90369060040161044e565b907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff81163014610cce57825f939284936040519283928337810184815203915af4610c88611356565b9015610c9057005b610834906040519182917ff7a01e4d000000000000000000000000000000000000000000000000000000008352602060048401526024830190611385565b7f827e6c75000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461021a5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57610018600435610d34816101fc565b602435610d40816101fc565b60443590606435926113f7565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760043567ffffffffffffffff811161021a57610d9790369060040161044e565b6024359167ffffffffffffffff831161021a57610dbb61001893369060040161044e565b9290916121af565b3461021a57610018610dd43661026a565b91339061161c565b3461021a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760043580421015610e1857005b7faa2fd925000000000000000000000000000000000000000000000000000000005f526004524260245260445ffd5b8015150361021a57565b60a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760043567ffffffffffffffff811161021a57610e9b90369060040161044e565b9060243567ffffffffffffffff811161021a57610ebc90369060040161044e565b92604435610ec9816101fc565b6064359467ffffffffffffffff861161021a57610eed6100189636906004016102d8565b94909360843596610efd88610e47565b6113c8565b3461021a57610018610f133661026a565b9161151b565b3461021a57610018610f2a36610926565b92610f3984848395949561151b565b61161c565b3461021a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57600435610f79816101fc565b6024359067ffffffffffffffff821161021a57610f9d6100189236906004016102d8565b9060443592610fab84610e47565b612532565b3461021a5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a57610018600435610fee816101fc565b60643590610447604435602435611004856101fc565b33846113f7565b3461021a5761001861101c3661026a565b91611ce6565b3461021a576100186110333661026a565b913390611e06565b3461021a5761001861104c3661026a565b91611058833383611ce6565b3390611e06565b3461021a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021a5760043561109a816101fc565b60243567ffffffffffffffff811161021a576110ba9036906004016102d8565b916044359267ffffffffffffffff841161021a576110df6100189436906004016102d8565b93909233906118ac565b3461021a576100186110fa36610926565b92919091611e06565b3560ff8116810361021a5790565b3561111b81610e47565b90565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561021a570180359067ffffffffffffffff821161021a57602001918160051b3603831361021a57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b91908110156111df5760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff218136030182121561021a570190565b611172565b3561111b816101fc565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60e0810190811067ffffffffffffffff82111761123757604052565b6111ee565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761123757604052565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561021a570180359067ffffffffffffffff821161021a5760200191813603831361021a57565b9093929384831161021a57841161021a578101920390565b67ffffffffffffffff811161123757601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b92919261132c826112e6565b9161133a604051938461123c565b82948184528183011161021a578281602093845f960137010152565b3d15611380573d90611367826112e6565b91611375604051938461123c565b82523d5f602084013e565b606090565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b916113db979695949391610fab936121af565b565b9081602091031261021a575190565b6040513d5f823e3d90fd5b91929092604051907efdd58e00000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff8516600483015280602483015260208260448173ffffffffffffffffffffffffffffffffffffffff88165afa918215611516575f926114e5575b5082821061147f575050505050565b6040517fbf8ee56100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff948516600482015294909316602485015260448401929092526064830191909152608482015260a490fd5b61150891925060203d60201161150f575b611500818361123c565b8101906113dd565b905f611470565b503d6114f6565b6113ec565b919091604051917f70a0823100000000000000000000000000000000000000000000000000000000835273ffffffffffffffffffffffffffffffffffffffff8416600484015260208360248173ffffffffffffffffffffffffffffffffffffffff86165afa928315611516575f936115fb575b5080831061159c5750505050565b60606040519485947f7684050d00000000000000000000000000000000000000000000000000000000865273ffffffffffffffffffffffffffffffffffffffff6004870192816080850197168452166020830152604082015201520390fd5b61161591935060203d60201161150f57611500818361123c565b915f61158e565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015284811660248301529190911693929091602083604481885afa928315611516575f936116f5575b50838310611695575050505050565b60a495509073ffffffffffffffffffffffffffffffffffffffff8092604051967f73cf338a000000000000000000000000000000000000000000000000000000008852600488015216602486015216604484015260648301526084820152fd5b61170f91935060203d60201161150f57611500818361123c565b915f611686565b67ffffffffffffffff81116112375760051b60200190565b9061173882611716565b611745604051918261123c565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06117738294611716565b0190602036910137565b80518210156111df5760209160051b010190565b60208183031261021a5780519067ffffffffffffffff821161021a57019080601f8301121561021a5781516117c581611716565b926117d3604051948561123c565b81845260208085019260051b82010192831161021a57602001905b8282106117fb5750505090565b81518152602091820191016117ee565b604081016040825282518091526020606083019301905f5b8181106118705750505060208183039101528281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831161021a5760209260051b809284830137010190565b825173ffffffffffffffffffffffffffffffffffffffff16855260209485019490920191600101611823565b91908110156111df5760051b0190565b9190939293858503611a1a579084916118c48361172e565b905f5b8481106119df575050925f929173ffffffffffffffffffffffffffffffffffffffff61192395604051968795869485937f4e1273f40000000000000000000000000000000000000000000000000000000085526004850161180b565b0392165afa908115611516575f916119bd575b505f5b838110611947575050505050565b611951818361177d565b5161195d82878661189c565b351161196b57600101611939565b82611985828761197e826119ba9761177d565b519361189c565b7fe3758044000000000000000000000000000000000000000000000000000000005f5260049290925260245235604452606490565b5ffd5b6119d991503d805f833e6119d1818361123c565b810190611791565b5f611936565b82939450611a0f826119f4836001959661177d565b9073ffffffffffffffffffffffffffffffffffffffff169052565b0190869392916118c7565b7fab8b67c6000000000000000000000000000000000000000000000000000000005f526004859052602486905260445ffd5b9081602091031261021a575161111b81610e47565b6040517fe985e9c500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015284811660248301529190911690602081604481855afa908115611516575f91611b1f575b5015611ad357505050565b73ffffffffffffffffffffffffffffffffffffffff929183917f628b17c6000000000000000000000000000000000000000000000000000000005f52600452166024521660445260645ffd5b611b41915060203d602011611b47575b611b39818361123c565b810190611a4c565b5f611ac8565b503d611b2f565b803190828210611b5d57505050565b73ffffffffffffffffffffffffffffffffffffffff907f1afe1f42000000000000000000000000000000000000000000000000000000005f521660045260245260445260645ffd5b92611c61917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6101009380604051978895602087019a60808c52600e60a08901527f7374617469632d73656374696f6e00000000000000000000000000000000000060c08901526040880152606087015260c060808701528160e0870152868601375f8582860101520116810103017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261123c565b51902090565b939192909260405193602085019560c08752600e60e08701527f7265706561742d73656374696f6e00000000000000000000000000000000000061010087015260408601526060850152608084015260a083015260c08201526101008152611c616101208261123c565b9081602091031261021a575161111b816101fc565b906040517f6352211e00000000000000000000000000000000000000000000000000000000815283600482015260208160248173ffffffffffffffffffffffffffffffffffffffff87165afa908115611516575f91611dd7575b5073ffffffffffffffffffffffffffffffffffffffff821673ffffffffffffffffffffffffffffffffffffffff821603611d7a5750505050565b6040517f9108eb1400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152602481019490945282166044840152166064820152608490fd5b611df9915060203d602011611dff575b611df1818361123c565b810190611cd1565b5f611d40565b503d611de7565b919073ffffffffffffffffffffffffffffffffffffffff83166040517f081812fc00000000000000000000000000000000000000000000000000000000815260208180611e5b89600483019190602083019252565b0381855afa908115611516575f91611f87575b5073ffffffffffffffffffffffffffffffffffffffff808516911614159081611efa575b50611e9d5750505050565b6040517f6a7e2cc800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152602481019490945282166044840152166064820152608490fd5b6040517fe985e9c500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152851660248201529150602090829060449082905afa908115611516575f91611f68575b50155f611e92565b611f81915060203d602011611b4757611b39818361123c565b5f611f60565b611fa0915060203d602011611dff57611df1818361123c565b5f611e6e565b9080602083519182815201916020808360051b8301019401925f915b838310611fd157505050505090565b9091929394602080827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0856001950301865288519073ffffffffffffffffffffffffffffffffffffffff8251168152828201518382015260c080612044604085015160e0604086015260e0850190611385565b936060810151606085015260808101511515608085015260a0810151151560a0850152015191015297019301930191939290611fc2565b90602080835192838152019201905f5b8181106120985750505090565b825173ffffffffffffffffffffffffffffffffffffffff1684526020938401939092019160010161208b565b805160ff16825261111b916020828101511515908201526101006121226120fc60408501516101206040860152610120850190611fa6565b606085015160608501526080850151608085015260a085015184820360a0860152611385565b9260c081015160c084015260e081015160e084015201519061010081840391015261207b565b612160604092959493956060835260608301906120c4565b9460208201520152565b61111b9392606092825260208201528160408201520190611385565b61219c61111b94926060835260608301906120c4565b9260208201526040818403910152611385565b906121b991612864565b6121e46121c582612b25565b6121d0368686611320565b60208151910120905f5260205260405f2090565b916121ef8482612c31565b915f926040850192835151975f5b898110612211575b50505050505050505050565b80841461251b575b61222481875161177d565b519661223360a0890151151590565b80612513575b6124d357505f9660608101518015908115806124ca575b61249257608083018051151580612453575b6124265751156123dd57906122a39161228f845173ffffffffffffffffffffffffffffffffffffffff1690565b91156123d857505a5b604084015191613042565b156122e6575b50604080518a815260208101839052600192917f5a589b1d8062f33451d29cae3dabd9b2e36c62aee644178c600977ca8dda661a91a15b016121fd565b60c00180511561239b57600181511461235c5751600214612307575f6122a9565b9796505050505050507fc2c704302430fe0dc8d95f272e2f4e54bbbc51a3327fd5d75ab41f9fc8fd129b925061234a61233e613053565b6040519384938461216a565b0390a15f808080808080808080612205565b5087610834612369613053565b6040519384937f7f6b0bb100000000000000000000000000000000000000000000000000000000855260048501612186565b509550600180967f115f347c00e69f252cd6b63c4f81022a9564c6befe8aa719cb74640a4a306f0d818b6123d061233e613053565b0390a16122e0565b612298565b61241b916123ff845173ffffffffffffffffffffffffffffffffffffffff1690565b916020850151915f1461242057505a905b604085015192613031565b6122a3565b90612410565b7f230d1ccc000000000000000000000000000000000000000000000000000000005f52600485905260245ffd5b5073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163014612262565b838b6108345a6040519384937f2139527400000000000000000000000000000000000000000000000000000000855260048501612148565b50805a10612250565b604080518b815260208101849052919850600192917f9ae934bf8a986157c889a24c3b3fa85e74b7e4ee4b1f8fc6e7362cb4c1d19d8b91819081016123d0565b508015612239565b9192819361252a92868a612c96565b929091612219565b9092919073ffffffffffffffffffffffffffffffffffffffff8116612733575033925b5f5b8281106125f8575050506125685750565b479081612573575050565b5f80808085855af1612583611356565b50156125d05760405191825273ffffffffffffffffffffffffffffffffffffffff16905f907fed679328aebf74ede77ae09efcf36e90244f83643dadac1c2d9f0b21a46f6ab790602090a3565b7f16b452f7000000000000000000000000000000000000000000000000000000005f5260045ffd5b61262a61261161261161260c84878761189c565b6111e4565b73ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529190602090839060249082905afa8015611516576001925f91612715575b5080612682575b5001612557565b61269d818861269861261161260c878b8b61189c565b61306d565b73ffffffffffffffffffffffffffffffffffffffff6126c061260c84888861189c565b167fed679328aebf74ede77ae09efcf36e90244f83643dadac1c2d9f0b21a46f6ab76040518061270c73ffffffffffffffffffffffffffffffffffffffff8c1695829190602083019252565b0390a35f61267b565b61272d915060203d811161150f57611500818361123c565b5f612674565b92612555565b60405190610120820182811067ffffffffffffffff821117611237576040526060610100835f81525f60208201528260408201525f838201525f60808201528260a08201525f60c08201525f60e08201520152565b9061279882611716565b6127a5604051918261123c565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06127d38294611716565b01905f5b8281106127e357505050565b6020906040516127f28161121b565b5f81525f83820152606060408201525f60608201525f60808201525f60a08201525f60c0820152828285010152016127d7565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9190820180921161285f57565b612825565b91909161286f612739565b5f815292600190823560f81c827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81831601612b0e57505f60608701525b60076128bc60ff831660011c90565b1680612abd575b50601081811603612a8857506001925b6128dc8461278e565b92604087019384525f905b8582106128f657505050505050565b8281013560f81c90600101909181600180851603612a66575061293a3061291e83895161177d565b519073ffffffffffffffffffffffffffffffffffffffff169052565b600280841614612a46575b6004808416146129f8575b6008808416146129c5575b6129ae6129a860c0856129878a608061297e8860108060019c9d1614935161177d565b51019015159052565b61299e8a60a061297e88602080871614935161177d565b1660061c60031690565b60ff1690565b60c06129bb83895161177d565b51015201906128e7565b6001916129ae906129a89060c0908781013590602001969060606129ea878d5161177d565b51015295945050505061295b565b90612a40908481013560e81c90600301612a39612a20612a188484612852565b838a8a6112ce565b91906040612a2f888d5161177d565b5101923691611320565b9052612852565b90612950565b90838101359060200191906020612a5e83895161177d565b510152612945565b612a8392508481013560601c90601401929061291e83895161177d565b61293a565b602090811603612aaa5761ffff918381013560f01c906002015b9216926128d3565b60ff918381013560f81c90600101612aa2565b612b01919385929190928160031b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001821b019185013590610100031c16920190565b929060808701525f6128c3565b80850135606090811c9088015260140192506128ad565b602081015115612c165761065a611c61612bd45f5b60405160208101917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f83527f4aa45ca7ad825ceb1bf35643f0a58c295239df563b1b565c2485f96477c5631860408301527f2a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de606083015260808201523060a082015260a08152612bcb60c08261123c565b51902093613179565b60405192839160208301958690916042927f19010000000000000000000000000000000000000000000000000000000000008352600283015260228201520190565b61065a611c61612bd446612b3a565b908210156111df570190565b919015612c42576001913560f81c90565b5f91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461285f5760010190565b9492612cb190949291945b8581013560f81c91600190910190565b60ff8216818115612faa5750918785612cdb8694858b600f612cd4829a60041c90565b9716613352565b9095908060048611612f30575060028101959082013560f01c94869060018103612d275750505050916040612d1a612d229482612cb19895015161177d565b5101516133e1565b612ca1565b60028103612d555750505050916040612d4a612d229482612cb19895015161177d565b5101519131916133c8565b94959460038103612e3c57505050604080612da5602094612d9b73ffffffffffffffffffffffffffffffffffffffff9899612dfb9660149092919283013560601c920190565b999094015161177d565b510151966040519586809481937f70a082310000000000000000000000000000000000000000000000000000000083526004830191909173ffffffffffffffffffffffffffffffffffffffff6020820193169052565b0392165afa90811561151657612cb194612d22935f93612e1c575b506133c8565b612e3591935060203d811161150f57611500818361123c565b915f612e16565b919291600414612e57575b505050505050612cb19150612ca1565b612f05959650612ea7602094612e9d60ff60409686612e868997612e969960149092919283013560601c920190565b90988183013560f81c9160010190565b9316613352565b999095015161177d565b5101516040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff988916600482015292881660248401529691948592839182906044820190565b0392165afa90811561151657612cb194612f25935f93612e1c57506133c8565b865f85858983612e47565b96955050505050600581145f14612f58575090612d22612cb19261291e8660408b015161177d565b60068103612f7f575090612cb191316020612f778660408b015161177d565b510152612ca1565b7ff024a3e2000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b975050505091929050838281105f1461300a57612ffa612fd46129a8926130069561300095612c25565b357fff000000000000000000000000000000000000000000000000000000000000001690565b60f81c90565b92612c69565b9190565b5050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90565b915f9391849360208451940192f190565b915f9291839260208351930191f490565b3d90604051916020818401016040528083525f602084013e565b9173ffffffffffffffffffffffffffffffffffffffff604051927fa9059cbb000000000000000000000000000000000000000000000000000000005f521660045260245260205f60448180865af160015f5114811615613117575b604091909152156130d65750565b7f5274afe7000000000000000000000000000000000000000000000000000000005f5273ffffffffffffffffffffffffffffffffffffffff1660045260245ffd5b600181151661312d573d15833b151516166130c8565b503d5f823e3d90fd5b80516020909101905f5b81811061314d5750505090565b825173ffffffffffffffffffffffffffffffffffffffff16845260209384019390920191600101613140565b6101008101516040516131948161065a602082018095613136565b519020906131a3815160ff1690565b60ff81168061321c57505090611c616131bf604084015161343f565b9261065a60806060830151920151936040519485936020850197889094939260809260a08301967f11e1e4079a79a66e4ade50033cfe2678cdd5341d2dfe5ef9513edb1a0be147a284526020840152604083015260608201520152565b6001810361327a57505060a001518051602091820120604080517fe19a3b94fc3c7ece3f890d98a99bc422615537a08dea0603fa8425867d87d46693810193845290810191909152606081019290925290611c61816080810161065a565b600281036132d057505060c00151604080517f11fdeb7e8373a1aa96bfac8d0ea91526b2c5d15e5cee20e0543e780258f3e8e460208201908152918101929092526060820192909252611c61816080810161065a565b600303613324575060e00151604080517fe19a3b94fc3c7ece3f890d98a99bc422615537a08dea0603fa8425867d87d46660208201908152918101929092526060820192909252611c61816080810161065a565b7f04818320000000000000000000000000000000000000000000000000000000005f5260ff1660045260245ffd5b929392600f16915081613366575050309190565b60018203613375575050339190565b60028203613384575050329190565b6003829492146133ba57837f324dd124000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b81013560601c925060140190565b908151602082019082821091111761021a570160200152565b908151601482019082821091111761021a576020910101906bffffffffffffffffffffffff8251169060601b179052565b80516020909101905f5b8181106134295750505090565b825184526020938401939092019160010161341c565b9081517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061348561346f83611716565b9261347d604051948561123c565b808452611716565b013660208301375f5b835181101561356057806134a46001928661177d565b5173ffffffffffffffffffffffffffffffffffffffff81511690602081015190604081015160208151910120906060810151608082015115159060c060a08401511515930151936040519560208701977f0603985259a953da1f65a522f589c17bd1d0117ec1d3abb7c0788aef251ef437895260408801526060870152608086015260a085015260c084015260e0830152610100820152610100815261354c6101208261123c565b519020613559828561177d565b520161348e565b50909150604051611c618161065a60208201809561341256fea2646970667358221220a71302c1229d67897efb0ef833a703c8223d89df73ebf6079a4df6272b8fc02c64736f6c634300081e0033", +} + +// TrailsUtilsABI is the input ABI used to generate the binding from. +// Deprecated: Use TrailsUtilsMetaData.ABI instead. +var TrailsUtilsABI = TrailsUtilsMetaData.ABI + +// TrailsUtilsBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use TrailsUtilsMetaData.Bin instead. +var TrailsUtilsBin = TrailsUtilsMetaData.Bin + +// DeployTrailsUtils deploys a new Ethereum contract, binding an instance of TrailsUtils to it. +func DeployTrailsUtils(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *TrailsUtils, error) { + parsed, err := TrailsUtilsMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(TrailsUtilsBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &TrailsUtils{TrailsUtilsCaller: TrailsUtilsCaller{contract: contract}, TrailsUtilsTransactor: TrailsUtilsTransactor{contract: contract}, TrailsUtilsFilterer: TrailsUtilsFilterer{contract: contract}}, nil +} + +// TrailsUtils is an auto generated Go binding around an Ethereum contract. +type TrailsUtils struct { + TrailsUtilsCaller // Read-only binding to the contract + TrailsUtilsTransactor // Write-only binding to the contract + TrailsUtilsFilterer // Log filterer for contract events +} + +// TrailsUtilsCaller is an auto generated read-only Go binding around an Ethereum contract. +type TrailsUtilsCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TrailsUtilsTransactor is an auto generated write-only Go binding around an Ethereum contract. +type TrailsUtilsTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TrailsUtilsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type TrailsUtilsFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TrailsUtilsSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type TrailsUtilsSession struct { + Contract *TrailsUtils // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TrailsUtilsCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type TrailsUtilsCallerSession struct { + Contract *TrailsUtilsCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// TrailsUtilsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type TrailsUtilsTransactorSession struct { + Contract *TrailsUtilsTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TrailsUtilsRaw is an auto generated low-level Go binding around an Ethereum contract. +type TrailsUtilsRaw struct { + Contract *TrailsUtils // Generic contract binding to access the raw methods on +} + +// TrailsUtilsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type TrailsUtilsCallerRaw struct { + Contract *TrailsUtilsCaller // Generic read-only contract binding to access the raw methods on +} + +// TrailsUtilsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type TrailsUtilsTransactorRaw struct { + Contract *TrailsUtilsTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewTrailsUtils creates a new instance of TrailsUtils, bound to a specific deployed contract. +func NewTrailsUtils(address common.Address, backend bind.ContractBackend) (*TrailsUtils, error) { + contract, err := bindTrailsUtils(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &TrailsUtils{TrailsUtilsCaller: TrailsUtilsCaller{contract: contract}, TrailsUtilsTransactor: TrailsUtilsTransactor{contract: contract}, TrailsUtilsFilterer: TrailsUtilsFilterer{contract: contract}}, nil +} + +// NewTrailsUtilsCaller creates a new read-only instance of TrailsUtils, bound to a specific deployed contract. +func NewTrailsUtilsCaller(address common.Address, caller bind.ContractCaller) (*TrailsUtilsCaller, error) { + contract, err := bindTrailsUtils(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &TrailsUtilsCaller{contract: contract}, nil +} + +// NewTrailsUtilsTransactor creates a new write-only instance of TrailsUtils, bound to a specific deployed contract. +func NewTrailsUtilsTransactor(address common.Address, transactor bind.ContractTransactor) (*TrailsUtilsTransactor, error) { + contract, err := bindTrailsUtils(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &TrailsUtilsTransactor{contract: contract}, nil +} + +// NewTrailsUtilsFilterer creates a new log filterer instance of TrailsUtils, bound to a specific deployed contract. +func NewTrailsUtilsFilterer(address common.Address, filterer bind.ContractFilterer) (*TrailsUtilsFilterer, error) { + contract, err := bindTrailsUtils(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &TrailsUtilsFilterer{contract: contract}, nil +} + +// bindTrailsUtils binds a generic wrapper to an already deployed contract. +func bindTrailsUtils(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := TrailsUtilsMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_TrailsUtils *TrailsUtilsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TrailsUtils.Contract.TrailsUtilsCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_TrailsUtils *TrailsUtilsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TrailsUtils.Contract.TrailsUtilsTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TrailsUtils *TrailsUtilsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TrailsUtils.Contract.TrailsUtilsTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_TrailsUtils *TrailsUtilsCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TrailsUtils.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_TrailsUtils *TrailsUtilsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TrailsUtils.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TrailsUtils *TrailsUtilsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TrailsUtils.Contract.contract.Transact(opts, method, params...) +} + +// RecoverSapientSignature is a free data retrieval call binding the contract method 0x13792a4a. +// +// Solidity: function recoverSapientSignature((uint8,bool,(address,uint256,bytes,uint256,bool,bool,uint256)[],uint256,uint256,bytes,bytes32,bytes32,address[]) payload, bytes signature) view returns(bytes32 imageHash) +func (_TrailsUtils *TrailsUtilsCaller) RecoverSapientSignature(opts *bind.CallOpts, payload PayloadDecoded, signature []byte) ([32]byte, error) { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "recoverSapientSignature", payload, signature) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// RecoverSapientSignature is a free data retrieval call binding the contract method 0x13792a4a. +// +// Solidity: function recoverSapientSignature((uint8,bool,(address,uint256,bytes,uint256,bool,bool,uint256)[],uint256,uint256,bytes,bytes32,bytes32,address[]) payload, bytes signature) view returns(bytes32 imageHash) +func (_TrailsUtils *TrailsUtilsSession) RecoverSapientSignature(payload PayloadDecoded, signature []byte) ([32]byte, error) { + return _TrailsUtils.Contract.RecoverSapientSignature(&_TrailsUtils.CallOpts, payload, signature) +} + +// RecoverSapientSignature is a free data retrieval call binding the contract method 0x13792a4a. +// +// Solidity: function recoverSapientSignature((uint8,bool,(address,uint256,bytes,uint256,bool,bool,uint256)[],uint256,uint256,bytes,bytes32,bytes32,address[]) payload, bytes signature) view returns(bytes32 imageHash) +func (_TrailsUtils *TrailsUtilsCallerSession) RecoverSapientSignature(payload PayloadDecoded, signature []byte) ([32]byte, error) { + return _TrailsUtils.Contract.RecoverSapientSignature(&_TrailsUtils.CallOpts, payload, signature) +} + +// RequireERC1155Approval is a free data retrieval call binding the contract method 0x2ab793d7. +// +// Solidity: function requireERC1155Approval(address token, address owner, address operator) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireERC1155Approval(opts *bind.CallOpts, token common.Address, owner common.Address, operator common.Address) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireERC1155Approval", token, owner, operator) + + if err != nil { + return err + } + + return err + +} + +// RequireERC1155Approval is a free data retrieval call binding the contract method 0x2ab793d7. +// +// Solidity: function requireERC1155Approval(address token, address owner, address operator) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireERC1155Approval(token common.Address, owner common.Address, operator common.Address) error { + return _TrailsUtils.Contract.RequireERC1155Approval(&_TrailsUtils.CallOpts, token, owner, operator) +} + +// RequireERC1155Approval is a free data retrieval call binding the contract method 0x2ab793d7. +// +// Solidity: function requireERC1155Approval(address token, address owner, address operator) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireERC1155Approval(token common.Address, owner common.Address, operator common.Address) error { + return _TrailsUtils.Contract.RequireERC1155Approval(&_TrailsUtils.CallOpts, token, owner, operator) +} + +// RequireERC1155ApprovalSelf is a free data retrieval call binding the contract method 0x0cb17e5c. +// +// Solidity: function requireERC1155ApprovalSelf(address token, address operator) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireERC1155ApprovalSelf(opts *bind.CallOpts, token common.Address, operator common.Address) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireERC1155ApprovalSelf", token, operator) + + if err != nil { + return err + } + + return err + +} + +// RequireERC1155ApprovalSelf is a free data retrieval call binding the contract method 0x0cb17e5c. +// +// Solidity: function requireERC1155ApprovalSelf(address token, address operator) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireERC1155ApprovalSelf(token common.Address, operator common.Address) error { + return _TrailsUtils.Contract.RequireERC1155ApprovalSelf(&_TrailsUtils.CallOpts, token, operator) +} + +// RequireERC1155ApprovalSelf is a free data retrieval call binding the contract method 0x0cb17e5c. +// +// Solidity: function requireERC1155ApprovalSelf(address token, address operator) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireERC1155ApprovalSelf(token common.Address, operator common.Address) error { + return _TrailsUtils.Contract.RequireERC1155ApprovalSelf(&_TrailsUtils.CallOpts, token, operator) +} + +// RequireERC721Approval is a free data retrieval call binding the contract method 0xfe08e7ca. +// +// Solidity: function requireERC721Approval(address token, address owner, address spender, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireERC721Approval(opts *bind.CallOpts, token common.Address, owner common.Address, spender common.Address, tokenId *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireERC721Approval", token, owner, spender, tokenId) + + if err != nil { + return err + } + + return err + +} + +// RequireERC721Approval is a free data retrieval call binding the contract method 0xfe08e7ca. +// +// Solidity: function requireERC721Approval(address token, address owner, address spender, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireERC721Approval(token common.Address, owner common.Address, spender common.Address, tokenId *big.Int) error { + return _TrailsUtils.Contract.RequireERC721Approval(&_TrailsUtils.CallOpts, token, owner, spender, tokenId) +} + +// RequireERC721Approval is a free data retrieval call binding the contract method 0xfe08e7ca. +// +// Solidity: function requireERC721Approval(address token, address owner, address spender, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireERC721Approval(token common.Address, owner common.Address, spender common.Address, tokenId *big.Int) error { + return _TrailsUtils.Contract.RequireERC721Approval(&_TrailsUtils.CallOpts, token, owner, spender, tokenId) +} + +// RequireERC721ApprovalSelf is a free data retrieval call binding the contract method 0xe246466a. +// +// Solidity: function requireERC721ApprovalSelf(address token, address spender, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireERC721ApprovalSelf(opts *bind.CallOpts, token common.Address, spender common.Address, tokenId *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireERC721ApprovalSelf", token, spender, tokenId) + + if err != nil { + return err + } + + return err + +} + +// RequireERC721ApprovalSelf is a free data retrieval call binding the contract method 0xe246466a. +// +// Solidity: function requireERC721ApprovalSelf(address token, address spender, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireERC721ApprovalSelf(token common.Address, spender common.Address, tokenId *big.Int) error { + return _TrailsUtils.Contract.RequireERC721ApprovalSelf(&_TrailsUtils.CallOpts, token, spender, tokenId) +} + +// RequireERC721ApprovalSelf is a free data retrieval call binding the contract method 0xe246466a. +// +// Solidity: function requireERC721ApprovalSelf(address token, address spender, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireERC721ApprovalSelf(token common.Address, spender common.Address, tokenId *big.Int) error { + return _TrailsUtils.Contract.RequireERC721ApprovalSelf(&_TrailsUtils.CallOpts, token, spender, tokenId) +} + +// RequireERC721Owner is a free data retrieval call binding the contract method 0xcda38f4c. +// +// Solidity: function requireERC721Owner(address token, address owner, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireERC721Owner(opts *bind.CallOpts, token common.Address, owner common.Address, tokenId *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireERC721Owner", token, owner, tokenId) + + if err != nil { + return err + } + + return err + +} + +// RequireERC721Owner is a free data retrieval call binding the contract method 0xcda38f4c. +// +// Solidity: function requireERC721Owner(address token, address owner, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireERC721Owner(token common.Address, owner common.Address, tokenId *big.Int) error { + return _TrailsUtils.Contract.RequireERC721Owner(&_TrailsUtils.CallOpts, token, owner, tokenId) +} + +// RequireERC721Owner is a free data retrieval call binding the contract method 0xcda38f4c. +// +// Solidity: function requireERC721Owner(address token, address owner, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireERC721Owner(token common.Address, owner common.Address, tokenId *big.Int) error { + return _TrailsUtils.Contract.RequireERC721Owner(&_TrailsUtils.CallOpts, token, owner, tokenId) +} + +// RequireERC721OwnerApproval is a free data retrieval call binding the contract method 0x1c0bdfab. +// +// Solidity: function requireERC721OwnerApproval(address token, address owner, address spender, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireERC721OwnerApproval(opts *bind.CallOpts, token common.Address, owner common.Address, spender common.Address, tokenId *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireERC721OwnerApproval", token, owner, spender, tokenId) + + if err != nil { + return err + } + + return err + +} + +// RequireERC721OwnerApproval is a free data retrieval call binding the contract method 0x1c0bdfab. +// +// Solidity: function requireERC721OwnerApproval(address token, address owner, address spender, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireERC721OwnerApproval(token common.Address, owner common.Address, spender common.Address, tokenId *big.Int) error { + return _TrailsUtils.Contract.RequireERC721OwnerApproval(&_TrailsUtils.CallOpts, token, owner, spender, tokenId) +} + +// RequireERC721OwnerApproval is a free data retrieval call binding the contract method 0x1c0bdfab. +// +// Solidity: function requireERC721OwnerApproval(address token, address owner, address spender, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireERC721OwnerApproval(token common.Address, owner common.Address, spender common.Address, tokenId *big.Int) error { + return _TrailsUtils.Contract.RequireERC721OwnerApproval(&_TrailsUtils.CallOpts, token, owner, spender, tokenId) +} + +// RequireERC721OwnerApprovalSelf is a free data retrieval call binding the contract method 0xf38bce15. +// +// Solidity: function requireERC721OwnerApprovalSelf(address token, address spender, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireERC721OwnerApprovalSelf(opts *bind.CallOpts, token common.Address, spender common.Address, tokenId *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireERC721OwnerApprovalSelf", token, spender, tokenId) + + if err != nil { + return err + } + + return err + +} + +// RequireERC721OwnerApprovalSelf is a free data retrieval call binding the contract method 0xf38bce15. +// +// Solidity: function requireERC721OwnerApprovalSelf(address token, address spender, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireERC721OwnerApprovalSelf(token common.Address, spender common.Address, tokenId *big.Int) error { + return _TrailsUtils.Contract.RequireERC721OwnerApprovalSelf(&_TrailsUtils.CallOpts, token, spender, tokenId) +} + +// RequireERC721OwnerApprovalSelf is a free data retrieval call binding the contract method 0xf38bce15. +// +// Solidity: function requireERC721OwnerApprovalSelf(address token, address spender, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireERC721OwnerApprovalSelf(token common.Address, spender common.Address, tokenId *big.Int) error { + return _TrailsUtils.Contract.RequireERC721OwnerApprovalSelf(&_TrailsUtils.CallOpts, token, spender, tokenId) +} + +// RequireERC721OwnerSelf is a free data retrieval call binding the contract method 0x2f2227ba. +// +// Solidity: function requireERC721OwnerSelf(address token, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireERC721OwnerSelf(opts *bind.CallOpts, token common.Address, tokenId *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireERC721OwnerSelf", token, tokenId) + + if err != nil { + return err + } + + return err + +} + +// RequireERC721OwnerSelf is a free data retrieval call binding the contract method 0x2f2227ba. +// +// Solidity: function requireERC721OwnerSelf(address token, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireERC721OwnerSelf(token common.Address, tokenId *big.Int) error { + return _TrailsUtils.Contract.RequireERC721OwnerSelf(&_TrailsUtils.CallOpts, token, tokenId) +} + +// RequireERC721OwnerSelf is a free data retrieval call binding the contract method 0x2f2227ba. +// +// Solidity: function requireERC721OwnerSelf(address token, uint256 tokenId) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireERC721OwnerSelf(token common.Address, tokenId *big.Int) error { + return _TrailsUtils.Contract.RequireERC721OwnerSelf(&_TrailsUtils.CallOpts, token, tokenId) +} + +// RequireMinBalance is a free data retrieval call binding the contract method 0x03bbbd65. +// +// Solidity: function requireMinBalance(address owner, uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinBalance(opts *bind.CallOpts, owner common.Address, minBalance *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinBalance", owner, minBalance) + + if err != nil { + return err + } + + return err + +} + +// RequireMinBalance is a free data retrieval call binding the contract method 0x03bbbd65. +// +// Solidity: function requireMinBalance(address owner, uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinBalance(owner common.Address, minBalance *big.Int) error { + return _TrailsUtils.Contract.RequireMinBalance(&_TrailsUtils.CallOpts, owner, minBalance) +} + +// RequireMinBalance is a free data retrieval call binding the contract method 0x03bbbd65. +// +// Solidity: function requireMinBalance(address owner, uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinBalance(owner common.Address, minBalance *big.Int) error { + return _TrailsUtils.Contract.RequireMinBalance(&_TrailsUtils.CallOpts, owner, minBalance) +} + +// RequireMinBalanceSelf is a free data retrieval call binding the contract method 0x333f790d. +// +// Solidity: function requireMinBalanceSelf(uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinBalanceSelf(opts *bind.CallOpts, minBalance *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinBalanceSelf", minBalance) + + if err != nil { + return err + } + + return err + +} + +// RequireMinBalanceSelf is a free data retrieval call binding the contract method 0x333f790d. +// +// Solidity: function requireMinBalanceSelf(uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinBalanceSelf(minBalance *big.Int) error { + return _TrailsUtils.Contract.RequireMinBalanceSelf(&_TrailsUtils.CallOpts, minBalance) +} + +// RequireMinBalanceSelf is a free data retrieval call binding the contract method 0x333f790d. +// +// Solidity: function requireMinBalanceSelf(uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinBalanceSelf(minBalance *big.Int) error { + return _TrailsUtils.Contract.RequireMinBalanceSelf(&_TrailsUtils.CallOpts, minBalance) +} + +// RequireMinERC1155Balance is a free data retrieval call binding the contract method 0x505c7ed3. +// +// Solidity: function requireMinERC1155Balance(address token, address owner, uint256 tokenId, uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinERC1155Balance(opts *bind.CallOpts, token common.Address, owner common.Address, tokenId *big.Int, minBalance *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinERC1155Balance", token, owner, tokenId, minBalance) + + if err != nil { + return err + } + + return err + +} + +// RequireMinERC1155Balance is a free data retrieval call binding the contract method 0x505c7ed3. +// +// Solidity: function requireMinERC1155Balance(address token, address owner, uint256 tokenId, uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinERC1155Balance(token common.Address, owner common.Address, tokenId *big.Int, minBalance *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC1155Balance(&_TrailsUtils.CallOpts, token, owner, tokenId, minBalance) +} + +// RequireMinERC1155Balance is a free data retrieval call binding the contract method 0x505c7ed3. +// +// Solidity: function requireMinERC1155Balance(address token, address owner, uint256 tokenId, uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinERC1155Balance(token common.Address, owner common.Address, tokenId *big.Int, minBalance *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC1155Balance(&_TrailsUtils.CallOpts, token, owner, tokenId, minBalance) +} + +// RequireMinERC1155BalanceApproval is a free data retrieval call binding the contract method 0x317df1e8. +// +// Solidity: function requireMinERC1155BalanceApproval(address token, address owner, uint256 tokenId, uint256 minBalance, address operator) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinERC1155BalanceApproval(opts *bind.CallOpts, token common.Address, owner common.Address, tokenId *big.Int, minBalance *big.Int, operator common.Address) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinERC1155BalanceApproval", token, owner, tokenId, minBalance, operator) + + if err != nil { + return err + } + + return err + +} + +// RequireMinERC1155BalanceApproval is a free data retrieval call binding the contract method 0x317df1e8. +// +// Solidity: function requireMinERC1155BalanceApproval(address token, address owner, uint256 tokenId, uint256 minBalance, address operator) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinERC1155BalanceApproval(token common.Address, owner common.Address, tokenId *big.Int, minBalance *big.Int, operator common.Address) error { + return _TrailsUtils.Contract.RequireMinERC1155BalanceApproval(&_TrailsUtils.CallOpts, token, owner, tokenId, minBalance, operator) +} + +// RequireMinERC1155BalanceApproval is a free data retrieval call binding the contract method 0x317df1e8. +// +// Solidity: function requireMinERC1155BalanceApproval(address token, address owner, uint256 tokenId, uint256 minBalance, address operator) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinERC1155BalanceApproval(token common.Address, owner common.Address, tokenId *big.Int, minBalance *big.Int, operator common.Address) error { + return _TrailsUtils.Contract.RequireMinERC1155BalanceApproval(&_TrailsUtils.CallOpts, token, owner, tokenId, minBalance, operator) +} + +// RequireMinERC1155BalanceApprovalBatch is a free data retrieval call binding the contract method 0x024ea911. +// +// Solidity: function requireMinERC1155BalanceApprovalBatch(address token, address owner, uint256[] tokenIds, uint256[] minBalances, address operator) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinERC1155BalanceApprovalBatch(opts *bind.CallOpts, token common.Address, owner common.Address, tokenIds []*big.Int, minBalances []*big.Int, operator common.Address) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinERC1155BalanceApprovalBatch", token, owner, tokenIds, minBalances, operator) + + if err != nil { + return err + } + + return err + +} + +// RequireMinERC1155BalanceApprovalBatch is a free data retrieval call binding the contract method 0x024ea911. +// +// Solidity: function requireMinERC1155BalanceApprovalBatch(address token, address owner, uint256[] tokenIds, uint256[] minBalances, address operator) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinERC1155BalanceApprovalBatch(token common.Address, owner common.Address, tokenIds []*big.Int, minBalances []*big.Int, operator common.Address) error { + return _TrailsUtils.Contract.RequireMinERC1155BalanceApprovalBatch(&_TrailsUtils.CallOpts, token, owner, tokenIds, minBalances, operator) +} + +// RequireMinERC1155BalanceApprovalBatch is a free data retrieval call binding the contract method 0x024ea911. +// +// Solidity: function requireMinERC1155BalanceApprovalBatch(address token, address owner, uint256[] tokenIds, uint256[] minBalances, address operator) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinERC1155BalanceApprovalBatch(token common.Address, owner common.Address, tokenIds []*big.Int, minBalances []*big.Int, operator common.Address) error { + return _TrailsUtils.Contract.RequireMinERC1155BalanceApprovalBatch(&_TrailsUtils.CallOpts, token, owner, tokenIds, minBalances, operator) +} + +// RequireMinERC1155BalanceApprovalBatchSelf is a free data retrieval call binding the contract method 0x18c9003a. +// +// Solidity: function requireMinERC1155BalanceApprovalBatchSelf(address token, uint256[] tokenIds, uint256[] minBalances, address operator) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinERC1155BalanceApprovalBatchSelf(opts *bind.CallOpts, token common.Address, tokenIds []*big.Int, minBalances []*big.Int, operator common.Address) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinERC1155BalanceApprovalBatchSelf", token, tokenIds, minBalances, operator) + + if err != nil { + return err + } + + return err + +} + +// RequireMinERC1155BalanceApprovalBatchSelf is a free data retrieval call binding the contract method 0x18c9003a. +// +// Solidity: function requireMinERC1155BalanceApprovalBatchSelf(address token, uint256[] tokenIds, uint256[] minBalances, address operator) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinERC1155BalanceApprovalBatchSelf(token common.Address, tokenIds []*big.Int, minBalances []*big.Int, operator common.Address) error { + return _TrailsUtils.Contract.RequireMinERC1155BalanceApprovalBatchSelf(&_TrailsUtils.CallOpts, token, tokenIds, minBalances, operator) +} + +// RequireMinERC1155BalanceApprovalBatchSelf is a free data retrieval call binding the contract method 0x18c9003a. +// +// Solidity: function requireMinERC1155BalanceApprovalBatchSelf(address token, uint256[] tokenIds, uint256[] minBalances, address operator) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinERC1155BalanceApprovalBatchSelf(token common.Address, tokenIds []*big.Int, minBalances []*big.Int, operator common.Address) error { + return _TrailsUtils.Contract.RequireMinERC1155BalanceApprovalBatchSelf(&_TrailsUtils.CallOpts, token, tokenIds, minBalances, operator) +} + +// RequireMinERC1155BalanceApprovalSelf is a free data retrieval call binding the contract method 0xac38d089. +// +// Solidity: function requireMinERC1155BalanceApprovalSelf(address token, uint256 tokenId, uint256 minBalance, address operator) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinERC1155BalanceApprovalSelf(opts *bind.CallOpts, token common.Address, tokenId *big.Int, minBalance *big.Int, operator common.Address) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinERC1155BalanceApprovalSelf", token, tokenId, minBalance, operator) + + if err != nil { + return err + } + + return err + +} + +// RequireMinERC1155BalanceApprovalSelf is a free data retrieval call binding the contract method 0xac38d089. +// +// Solidity: function requireMinERC1155BalanceApprovalSelf(address token, uint256 tokenId, uint256 minBalance, address operator) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinERC1155BalanceApprovalSelf(token common.Address, tokenId *big.Int, minBalance *big.Int, operator common.Address) error { + return _TrailsUtils.Contract.RequireMinERC1155BalanceApprovalSelf(&_TrailsUtils.CallOpts, token, tokenId, minBalance, operator) +} + +// RequireMinERC1155BalanceApprovalSelf is a free data retrieval call binding the contract method 0xac38d089. +// +// Solidity: function requireMinERC1155BalanceApprovalSelf(address token, uint256 tokenId, uint256 minBalance, address operator) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinERC1155BalanceApprovalSelf(token common.Address, tokenId *big.Int, minBalance *big.Int, operator common.Address) error { + return _TrailsUtils.Contract.RequireMinERC1155BalanceApprovalSelf(&_TrailsUtils.CallOpts, token, tokenId, minBalance, operator) +} + +// RequireMinERC1155BalanceBatch is a free data retrieval call binding the contract method 0x476a5f40. +// +// Solidity: function requireMinERC1155BalanceBatch(address token, address owner, uint256[] tokenIds, uint256[] minBalances) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinERC1155BalanceBatch(opts *bind.CallOpts, token common.Address, owner common.Address, tokenIds []*big.Int, minBalances []*big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinERC1155BalanceBatch", token, owner, tokenIds, minBalances) + + if err != nil { + return err + } + + return err + +} + +// RequireMinERC1155BalanceBatch is a free data retrieval call binding the contract method 0x476a5f40. +// +// Solidity: function requireMinERC1155BalanceBatch(address token, address owner, uint256[] tokenIds, uint256[] minBalances) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinERC1155BalanceBatch(token common.Address, owner common.Address, tokenIds []*big.Int, minBalances []*big.Int) error { + return _TrailsUtils.Contract.RequireMinERC1155BalanceBatch(&_TrailsUtils.CallOpts, token, owner, tokenIds, minBalances) +} + +// RequireMinERC1155BalanceBatch is a free data retrieval call binding the contract method 0x476a5f40. +// +// Solidity: function requireMinERC1155BalanceBatch(address token, address owner, uint256[] tokenIds, uint256[] minBalances) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinERC1155BalanceBatch(token common.Address, owner common.Address, tokenIds []*big.Int, minBalances []*big.Int) error { + return _TrailsUtils.Contract.RequireMinERC1155BalanceBatch(&_TrailsUtils.CallOpts, token, owner, tokenIds, minBalances) +} + +// RequireMinERC1155BalanceBatchSelf is a free data retrieval call binding the contract method 0xfdc25428. +// +// Solidity: function requireMinERC1155BalanceBatchSelf(address token, uint256[] tokenIds, uint256[] minBalances) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinERC1155BalanceBatchSelf(opts *bind.CallOpts, token common.Address, tokenIds []*big.Int, minBalances []*big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinERC1155BalanceBatchSelf", token, tokenIds, minBalances) + + if err != nil { + return err + } + + return err + +} + +// RequireMinERC1155BalanceBatchSelf is a free data retrieval call binding the contract method 0xfdc25428. +// +// Solidity: function requireMinERC1155BalanceBatchSelf(address token, uint256[] tokenIds, uint256[] minBalances) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinERC1155BalanceBatchSelf(token common.Address, tokenIds []*big.Int, minBalances []*big.Int) error { + return _TrailsUtils.Contract.RequireMinERC1155BalanceBatchSelf(&_TrailsUtils.CallOpts, token, tokenIds, minBalances) +} + +// RequireMinERC1155BalanceBatchSelf is a free data retrieval call binding the contract method 0xfdc25428. +// +// Solidity: function requireMinERC1155BalanceBatchSelf(address token, uint256[] tokenIds, uint256[] minBalances) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinERC1155BalanceBatchSelf(token common.Address, tokenIds []*big.Int, minBalances []*big.Int) error { + return _TrailsUtils.Contract.RequireMinERC1155BalanceBatchSelf(&_TrailsUtils.CallOpts, token, tokenIds, minBalances) +} + +// RequireMinERC1155BalanceSelf is a free data retrieval call binding the contract method 0x0084290d. +// +// Solidity: function requireMinERC1155BalanceSelf(address token, uint256 tokenId, uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinERC1155BalanceSelf(opts *bind.CallOpts, token common.Address, tokenId *big.Int, minBalance *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinERC1155BalanceSelf", token, tokenId, minBalance) + + if err != nil { + return err + } + + return err + +} + +// RequireMinERC1155BalanceSelf is a free data retrieval call binding the contract method 0x0084290d. +// +// Solidity: function requireMinERC1155BalanceSelf(address token, uint256 tokenId, uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinERC1155BalanceSelf(token common.Address, tokenId *big.Int, minBalance *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC1155BalanceSelf(&_TrailsUtils.CallOpts, token, tokenId, minBalance) +} + +// RequireMinERC1155BalanceSelf is a free data retrieval call binding the contract method 0x0084290d. +// +// Solidity: function requireMinERC1155BalanceSelf(address token, uint256 tokenId, uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinERC1155BalanceSelf(token common.Address, tokenId *big.Int, minBalance *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC1155BalanceSelf(&_TrailsUtils.CallOpts, token, tokenId, minBalance) +} + +// RequireMinERC20Allowance is a free data retrieval call binding the contract method 0x42ab921e. +// +// Solidity: function requireMinERC20Allowance(address token, address owner, address spender, uint256 minAllowance) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinERC20Allowance(opts *bind.CallOpts, token common.Address, owner common.Address, spender common.Address, minAllowance *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinERC20Allowance", token, owner, spender, minAllowance) + + if err != nil { + return err + } + + return err + +} + +// RequireMinERC20Allowance is a free data retrieval call binding the contract method 0x42ab921e. +// +// Solidity: function requireMinERC20Allowance(address token, address owner, address spender, uint256 minAllowance) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinERC20Allowance(token common.Address, owner common.Address, spender common.Address, minAllowance *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC20Allowance(&_TrailsUtils.CallOpts, token, owner, spender, minAllowance) +} + +// RequireMinERC20Allowance is a free data retrieval call binding the contract method 0x42ab921e. +// +// Solidity: function requireMinERC20Allowance(address token, address owner, address spender, uint256 minAllowance) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinERC20Allowance(token common.Address, owner common.Address, spender common.Address, minAllowance *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC20Allowance(&_TrailsUtils.CallOpts, token, owner, spender, minAllowance) +} + +// RequireMinERC20AllowanceSelf is a free data retrieval call binding the contract method 0x6ef1f0dd. +// +// Solidity: function requireMinERC20AllowanceSelf(address token, address spender, uint256 minAllowance) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinERC20AllowanceSelf(opts *bind.CallOpts, token common.Address, spender common.Address, minAllowance *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinERC20AllowanceSelf", token, spender, minAllowance) + + if err != nil { + return err + } + + return err + +} + +// RequireMinERC20AllowanceSelf is a free data retrieval call binding the contract method 0x6ef1f0dd. +// +// Solidity: function requireMinERC20AllowanceSelf(address token, address spender, uint256 minAllowance) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinERC20AllowanceSelf(token common.Address, spender common.Address, minAllowance *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC20AllowanceSelf(&_TrailsUtils.CallOpts, token, spender, minAllowance) +} + +// RequireMinERC20AllowanceSelf is a free data retrieval call binding the contract method 0x6ef1f0dd. +// +// Solidity: function requireMinERC20AllowanceSelf(address token, address spender, uint256 minAllowance) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinERC20AllowanceSelf(token common.Address, spender common.Address, minAllowance *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC20AllowanceSelf(&_TrailsUtils.CallOpts, token, spender, minAllowance) +} + +// RequireMinERC20Balance is a free data retrieval call binding the contract method 0x8d0a9ea7. +// +// Solidity: function requireMinERC20Balance(address token, address owner, uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinERC20Balance(opts *bind.CallOpts, token common.Address, owner common.Address, minBalance *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinERC20Balance", token, owner, minBalance) + + if err != nil { + return err + } + + return err + +} + +// RequireMinERC20Balance is a free data retrieval call binding the contract method 0x8d0a9ea7. +// +// Solidity: function requireMinERC20Balance(address token, address owner, uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinERC20Balance(token common.Address, owner common.Address, minBalance *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC20Balance(&_TrailsUtils.CallOpts, token, owner, minBalance) +} + +// RequireMinERC20Balance is a free data retrieval call binding the contract method 0x8d0a9ea7. +// +// Solidity: function requireMinERC20Balance(address token, address owner, uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinERC20Balance(token common.Address, owner common.Address, minBalance *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC20Balance(&_TrailsUtils.CallOpts, token, owner, minBalance) +} + +// RequireMinERC20BalanceAllowance is a free data retrieval call binding the contract method 0x9c8d8ea1. +// +// Solidity: function requireMinERC20BalanceAllowance(address token, address owner, address spender, uint256 minAmount) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinERC20BalanceAllowance(opts *bind.CallOpts, token common.Address, owner common.Address, spender common.Address, minAmount *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinERC20BalanceAllowance", token, owner, spender, minAmount) + + if err != nil { + return err + } + + return err + +} + +// RequireMinERC20BalanceAllowance is a free data retrieval call binding the contract method 0x9c8d8ea1. +// +// Solidity: function requireMinERC20BalanceAllowance(address token, address owner, address spender, uint256 minAmount) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinERC20BalanceAllowance(token common.Address, owner common.Address, spender common.Address, minAmount *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC20BalanceAllowance(&_TrailsUtils.CallOpts, token, owner, spender, minAmount) +} + +// RequireMinERC20BalanceAllowance is a free data retrieval call binding the contract method 0x9c8d8ea1. +// +// Solidity: function requireMinERC20BalanceAllowance(address token, address owner, address spender, uint256 minAmount) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinERC20BalanceAllowance(token common.Address, owner common.Address, spender common.Address, minAmount *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC20BalanceAllowance(&_TrailsUtils.CallOpts, token, owner, spender, minAmount) +} + +// RequireMinERC20BalanceAllowanceSelf is a free data retrieval call binding the contract method 0x00e79cd5. +// +// Solidity: function requireMinERC20BalanceAllowanceSelf(address token, address spender, uint256 minAmount) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinERC20BalanceAllowanceSelf(opts *bind.CallOpts, token common.Address, spender common.Address, minAmount *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinERC20BalanceAllowanceSelf", token, spender, minAmount) + + if err != nil { + return err + } + + return err + +} + +// RequireMinERC20BalanceAllowanceSelf is a free data retrieval call binding the contract method 0x00e79cd5. +// +// Solidity: function requireMinERC20BalanceAllowanceSelf(address token, address spender, uint256 minAmount) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinERC20BalanceAllowanceSelf(token common.Address, spender common.Address, minAmount *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC20BalanceAllowanceSelf(&_TrailsUtils.CallOpts, token, spender, minAmount) +} + +// RequireMinERC20BalanceAllowanceSelf is a free data retrieval call binding the contract method 0x00e79cd5. +// +// Solidity: function requireMinERC20BalanceAllowanceSelf(address token, address spender, uint256 minAmount) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinERC20BalanceAllowanceSelf(token common.Address, spender common.Address, minAmount *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC20BalanceAllowanceSelf(&_TrailsUtils.CallOpts, token, spender, minAmount) +} + +// RequireMinERC20BalanceSelf is a free data retrieval call binding the contract method 0x372618cb. +// +// Solidity: function requireMinERC20BalanceSelf(address token, uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireMinERC20BalanceSelf(opts *bind.CallOpts, token common.Address, minBalance *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireMinERC20BalanceSelf", token, minBalance) + + if err != nil { + return err + } + + return err + +} + +// RequireMinERC20BalanceSelf is a free data retrieval call binding the contract method 0x372618cb. +// +// Solidity: function requireMinERC20BalanceSelf(address token, uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireMinERC20BalanceSelf(token common.Address, minBalance *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC20BalanceSelf(&_TrailsUtils.CallOpts, token, minBalance) +} + +// RequireMinERC20BalanceSelf is a free data retrieval call binding the contract method 0x372618cb. +// +// Solidity: function requireMinERC20BalanceSelf(address token, uint256 minBalance) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireMinERC20BalanceSelf(token common.Address, minBalance *big.Int) error { + return _TrailsUtils.Contract.RequireMinERC20BalanceSelf(&_TrailsUtils.CallOpts, token, minBalance) +} + +// RequireNonExpired is a free data retrieval call binding the contract method 0x7f29d538. +// +// Solidity: function requireNonExpired(uint256 expiration) view returns() +func (_TrailsUtils *TrailsUtilsCaller) RequireNonExpired(opts *bind.CallOpts, expiration *big.Int) error { + var out []interface{} + err := _TrailsUtils.contract.Call(opts, &out, "requireNonExpired", expiration) + + if err != nil { + return err + } + + return err + +} + +// RequireNonExpired is a free data retrieval call binding the contract method 0x7f29d538. +// +// Solidity: function requireNonExpired(uint256 expiration) view returns() +func (_TrailsUtils *TrailsUtilsSession) RequireNonExpired(expiration *big.Int) error { + return _TrailsUtils.Contract.RequireNonExpired(&_TrailsUtils.CallOpts, expiration) +} + +// RequireNonExpired is a free data retrieval call binding the contract method 0x7f29d538. +// +// Solidity: function requireNonExpired(uint256 expiration) view returns() +func (_TrailsUtils *TrailsUtilsCallerSession) RequireNonExpired(expiration *big.Int) error { + return _TrailsUtils.Contract.RequireNonExpired(&_TrailsUtils.CallOpts, expiration) +} + +// HandleSequenceDelegateCall is a paid mutator transaction binding the contract method 0x4c4e814c. +// +// Solidity: function handleSequenceDelegateCall(bytes32 , uint256 , uint256 , uint256 , uint256 , bytes data) returns() +func (_TrailsUtils *TrailsUtilsTransactor) HandleSequenceDelegateCall(opts *bind.TransactOpts, arg0 [32]byte, arg1 *big.Int, arg2 *big.Int, arg3 *big.Int, arg4 *big.Int, data []byte) (*types.Transaction, error) { + return _TrailsUtils.contract.Transact(opts, "handleSequenceDelegateCall", arg0, arg1, arg2, arg3, arg4, data) +} + +// HandleSequenceDelegateCall is a paid mutator transaction binding the contract method 0x4c4e814c. +// +// Solidity: function handleSequenceDelegateCall(bytes32 , uint256 , uint256 , uint256 , uint256 , bytes data) returns() +func (_TrailsUtils *TrailsUtilsSession) HandleSequenceDelegateCall(arg0 [32]byte, arg1 *big.Int, arg2 *big.Int, arg3 *big.Int, arg4 *big.Int, data []byte) (*types.Transaction, error) { + return _TrailsUtils.Contract.HandleSequenceDelegateCall(&_TrailsUtils.TransactOpts, arg0, arg1, arg2, arg3, arg4, data) +} + +// HandleSequenceDelegateCall is a paid mutator transaction binding the contract method 0x4c4e814c. +// +// Solidity: function handleSequenceDelegateCall(bytes32 , uint256 , uint256 , uint256 , uint256 , bytes data) returns() +func (_TrailsUtils *TrailsUtilsTransactorSession) HandleSequenceDelegateCall(arg0 [32]byte, arg1 *big.Int, arg2 *big.Int, arg3 *big.Int, arg4 *big.Int, data []byte) (*types.Transaction, error) { + return _TrailsUtils.Contract.HandleSequenceDelegateCall(&_TrailsUtils.TransactOpts, arg0, arg1, arg2, arg3, arg4, data) +} + +// HydrateExecute is a paid mutator transaction binding the contract method 0x6d42cf03. +// +// Solidity: function hydrateExecute(bytes packedPayload, bytes hydratePayload) payable returns() +func (_TrailsUtils *TrailsUtilsTransactor) HydrateExecute(opts *bind.TransactOpts, packedPayload []byte, hydratePayload []byte) (*types.Transaction, error) { + return _TrailsUtils.contract.Transact(opts, "hydrateExecute", packedPayload, hydratePayload) +} + +// HydrateExecute is a paid mutator transaction binding the contract method 0x6d42cf03. +// +// Solidity: function hydrateExecute(bytes packedPayload, bytes hydratePayload) payable returns() +func (_TrailsUtils *TrailsUtilsSession) HydrateExecute(packedPayload []byte, hydratePayload []byte) (*types.Transaction, error) { + return _TrailsUtils.Contract.HydrateExecute(&_TrailsUtils.TransactOpts, packedPayload, hydratePayload) +} + +// HydrateExecute is a paid mutator transaction binding the contract method 0x6d42cf03. +// +// Solidity: function hydrateExecute(bytes packedPayload, bytes hydratePayload) payable returns() +func (_TrailsUtils *TrailsUtilsTransactorSession) HydrateExecute(packedPayload []byte, hydratePayload []byte) (*types.Transaction, error) { + return _TrailsUtils.Contract.HydrateExecute(&_TrailsUtils.TransactOpts, packedPayload, hydratePayload) +} + +// HydrateExecuteAndSweep is a paid mutator transaction binding the contract method 0x80df36a0. +// +// Solidity: function hydrateExecuteAndSweep(bytes packedPayload, bytes hydratePayload, address sweepTarget, address[] tokensToSweep, bool sweepNative) payable returns() +func (_TrailsUtils *TrailsUtilsTransactor) HydrateExecuteAndSweep(opts *bind.TransactOpts, packedPayload []byte, hydratePayload []byte, sweepTarget common.Address, tokensToSweep []common.Address, sweepNative bool) (*types.Transaction, error) { + return _TrailsUtils.contract.Transact(opts, "hydrateExecuteAndSweep", packedPayload, hydratePayload, sweepTarget, tokensToSweep, sweepNative) +} + +// HydrateExecuteAndSweep is a paid mutator transaction binding the contract method 0x80df36a0. +// +// Solidity: function hydrateExecuteAndSweep(bytes packedPayload, bytes hydratePayload, address sweepTarget, address[] tokensToSweep, bool sweepNative) payable returns() +func (_TrailsUtils *TrailsUtilsSession) HydrateExecuteAndSweep(packedPayload []byte, hydratePayload []byte, sweepTarget common.Address, tokensToSweep []common.Address, sweepNative bool) (*types.Transaction, error) { + return _TrailsUtils.Contract.HydrateExecuteAndSweep(&_TrailsUtils.TransactOpts, packedPayload, hydratePayload, sweepTarget, tokensToSweep, sweepNative) +} + +// HydrateExecuteAndSweep is a paid mutator transaction binding the contract method 0x80df36a0. +// +// Solidity: function hydrateExecuteAndSweep(bytes packedPayload, bytes hydratePayload, address sweepTarget, address[] tokensToSweep, bool sweepNative) payable returns() +func (_TrailsUtils *TrailsUtilsTransactorSession) HydrateExecuteAndSweep(packedPayload []byte, hydratePayload []byte, sweepTarget common.Address, tokensToSweep []common.Address, sweepNative bool) (*types.Transaction, error) { + return _TrailsUtils.Contract.HydrateExecuteAndSweep(&_TrailsUtils.TransactOpts, packedPayload, hydratePayload, sweepTarget, tokensToSweep, sweepNative) +} + +// Sweep is a paid mutator transaction binding the contract method 0xa7b7ec5a. +// +// Solidity: function sweep(address sweepTarget, address[] tokensToSweep, bool sweepNative) returns() +func (_TrailsUtils *TrailsUtilsTransactor) Sweep(opts *bind.TransactOpts, sweepTarget common.Address, tokensToSweep []common.Address, sweepNative bool) (*types.Transaction, error) { + return _TrailsUtils.contract.Transact(opts, "sweep", sweepTarget, tokensToSweep, sweepNative) +} + +// Sweep is a paid mutator transaction binding the contract method 0xa7b7ec5a. +// +// Solidity: function sweep(address sweepTarget, address[] tokensToSweep, bool sweepNative) returns() +func (_TrailsUtils *TrailsUtilsSession) Sweep(sweepTarget common.Address, tokensToSweep []common.Address, sweepNative bool) (*types.Transaction, error) { + return _TrailsUtils.Contract.Sweep(&_TrailsUtils.TransactOpts, sweepTarget, tokensToSweep, sweepNative) +} + +// Sweep is a paid mutator transaction binding the contract method 0xa7b7ec5a. +// +// Solidity: function sweep(address sweepTarget, address[] tokensToSweep, bool sweepNative) returns() +func (_TrailsUtils *TrailsUtilsTransactorSession) Sweep(sweepTarget common.Address, tokensToSweep []common.Address, sweepNative bool) (*types.Transaction, error) { + return _TrailsUtils.Contract.Sweep(&_TrailsUtils.TransactOpts, sweepTarget, tokensToSweep, sweepNative) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_TrailsUtils *TrailsUtilsTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TrailsUtils.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_TrailsUtils *TrailsUtilsSession) Receive() (*types.Transaction, error) { + return _TrailsUtils.Contract.Receive(&_TrailsUtils.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_TrailsUtils *TrailsUtilsTransactorSession) Receive() (*types.Transaction, error) { + return _TrailsUtils.Contract.Receive(&_TrailsUtils.TransactOpts) +} + +// TrailsUtilsCallAbortedIterator is returned from FilterCallAborted and is used to iterate over the raw logs and unpacked data for CallAborted events raised by the TrailsUtils contract. +type TrailsUtilsCallAbortedIterator struct { + Event *TrailsUtilsCallAborted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TrailsUtilsCallAbortedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TrailsUtilsCallAborted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TrailsUtilsCallAborted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TrailsUtilsCallAbortedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TrailsUtilsCallAbortedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TrailsUtilsCallAborted represents a CallAborted event raised by the TrailsUtils contract. +type TrailsUtilsCallAborted struct { + OpHash [32]byte + Index *big.Int + ReturnData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallAborted is a free log retrieval operation binding the contract event 0xc2c704302430fe0dc8d95f272e2f4e54bbbc51a3327fd5d75ab41f9fc8fd129b. +// +// Solidity: event CallAborted(bytes32 _opHash, uint256 _index, bytes _returnData) +func (_TrailsUtils *TrailsUtilsFilterer) FilterCallAborted(opts *bind.FilterOpts) (*TrailsUtilsCallAbortedIterator, error) { + + logs, sub, err := _TrailsUtils.contract.FilterLogs(opts, "CallAborted") + if err != nil { + return nil, err + } + return &TrailsUtilsCallAbortedIterator{contract: _TrailsUtils.contract, event: "CallAborted", logs: logs, sub: sub}, nil +} + +// WatchCallAborted is a free log subscription operation binding the contract event 0xc2c704302430fe0dc8d95f272e2f4e54bbbc51a3327fd5d75ab41f9fc8fd129b. +// +// Solidity: event CallAborted(bytes32 _opHash, uint256 _index, bytes _returnData) +func (_TrailsUtils *TrailsUtilsFilterer) WatchCallAborted(opts *bind.WatchOpts, sink chan<- *TrailsUtilsCallAborted) (event.Subscription, error) { + + logs, sub, err := _TrailsUtils.contract.WatchLogs(opts, "CallAborted") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TrailsUtilsCallAborted) + if err := _TrailsUtils.contract.UnpackLog(event, "CallAborted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCallAborted is a log parse operation binding the contract event 0xc2c704302430fe0dc8d95f272e2f4e54bbbc51a3327fd5d75ab41f9fc8fd129b. +// +// Solidity: event CallAborted(bytes32 _opHash, uint256 _index, bytes _returnData) +func (_TrailsUtils *TrailsUtilsFilterer) ParseCallAborted(log types.Log) (*TrailsUtilsCallAborted, error) { + event := new(TrailsUtilsCallAborted) + if err := _TrailsUtils.contract.UnpackLog(event, "CallAborted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TrailsUtilsCallFailedIterator is returned from FilterCallFailed and is used to iterate over the raw logs and unpacked data for CallFailed events raised by the TrailsUtils contract. +type TrailsUtilsCallFailedIterator struct { + Event *TrailsUtilsCallFailed // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TrailsUtilsCallFailedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TrailsUtilsCallFailed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TrailsUtilsCallFailed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TrailsUtilsCallFailedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TrailsUtilsCallFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TrailsUtilsCallFailed represents a CallFailed event raised by the TrailsUtils contract. +type TrailsUtilsCallFailed struct { + OpHash [32]byte + Index *big.Int + ReturnData []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallFailed is a free log retrieval operation binding the contract event 0x115f347c00e69f252cd6b63c4f81022a9564c6befe8aa719cb74640a4a306f0d. +// +// Solidity: event CallFailed(bytes32 _opHash, uint256 _index, bytes _returnData) +func (_TrailsUtils *TrailsUtilsFilterer) FilterCallFailed(opts *bind.FilterOpts) (*TrailsUtilsCallFailedIterator, error) { + + logs, sub, err := _TrailsUtils.contract.FilterLogs(opts, "CallFailed") + if err != nil { + return nil, err + } + return &TrailsUtilsCallFailedIterator{contract: _TrailsUtils.contract, event: "CallFailed", logs: logs, sub: sub}, nil +} + +// WatchCallFailed is a free log subscription operation binding the contract event 0x115f347c00e69f252cd6b63c4f81022a9564c6befe8aa719cb74640a4a306f0d. +// +// Solidity: event CallFailed(bytes32 _opHash, uint256 _index, bytes _returnData) +func (_TrailsUtils *TrailsUtilsFilterer) WatchCallFailed(opts *bind.WatchOpts, sink chan<- *TrailsUtilsCallFailed) (event.Subscription, error) { + + logs, sub, err := _TrailsUtils.contract.WatchLogs(opts, "CallFailed") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TrailsUtilsCallFailed) + if err := _TrailsUtils.contract.UnpackLog(event, "CallFailed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCallFailed is a log parse operation binding the contract event 0x115f347c00e69f252cd6b63c4f81022a9564c6befe8aa719cb74640a4a306f0d. +// +// Solidity: event CallFailed(bytes32 _opHash, uint256 _index, bytes _returnData) +func (_TrailsUtils *TrailsUtilsFilterer) ParseCallFailed(log types.Log) (*TrailsUtilsCallFailed, error) { + event := new(TrailsUtilsCallFailed) + if err := _TrailsUtils.contract.UnpackLog(event, "CallFailed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TrailsUtilsCallSkippedIterator is returned from FilterCallSkipped and is used to iterate over the raw logs and unpacked data for CallSkipped events raised by the TrailsUtils contract. +type TrailsUtilsCallSkippedIterator struct { + Event *TrailsUtilsCallSkipped // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TrailsUtilsCallSkippedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TrailsUtilsCallSkipped) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TrailsUtilsCallSkipped) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TrailsUtilsCallSkippedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TrailsUtilsCallSkippedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TrailsUtilsCallSkipped represents a CallSkipped event raised by the TrailsUtils contract. +type TrailsUtilsCallSkipped struct { + OpHash [32]byte + Index *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallSkipped is a free log retrieval operation binding the contract event 0x9ae934bf8a986157c889a24c3b3fa85e74b7e4ee4b1f8fc6e7362cb4c1d19d8b. +// +// Solidity: event CallSkipped(bytes32 _opHash, uint256 _index) +func (_TrailsUtils *TrailsUtilsFilterer) FilterCallSkipped(opts *bind.FilterOpts) (*TrailsUtilsCallSkippedIterator, error) { + + logs, sub, err := _TrailsUtils.contract.FilterLogs(opts, "CallSkipped") + if err != nil { + return nil, err + } + return &TrailsUtilsCallSkippedIterator{contract: _TrailsUtils.contract, event: "CallSkipped", logs: logs, sub: sub}, nil +} + +// WatchCallSkipped is a free log subscription operation binding the contract event 0x9ae934bf8a986157c889a24c3b3fa85e74b7e4ee4b1f8fc6e7362cb4c1d19d8b. +// +// Solidity: event CallSkipped(bytes32 _opHash, uint256 _index) +func (_TrailsUtils *TrailsUtilsFilterer) WatchCallSkipped(opts *bind.WatchOpts, sink chan<- *TrailsUtilsCallSkipped) (event.Subscription, error) { + + logs, sub, err := _TrailsUtils.contract.WatchLogs(opts, "CallSkipped") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TrailsUtilsCallSkipped) + if err := _TrailsUtils.contract.UnpackLog(event, "CallSkipped", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCallSkipped is a log parse operation binding the contract event 0x9ae934bf8a986157c889a24c3b3fa85e74b7e4ee4b1f8fc6e7362cb4c1d19d8b. +// +// Solidity: event CallSkipped(bytes32 _opHash, uint256 _index) +func (_TrailsUtils *TrailsUtilsFilterer) ParseCallSkipped(log types.Log) (*TrailsUtilsCallSkipped, error) { + event := new(TrailsUtilsCallSkipped) + if err := _TrailsUtils.contract.UnpackLog(event, "CallSkipped", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TrailsUtilsCallSucceededIterator is returned from FilterCallSucceeded and is used to iterate over the raw logs and unpacked data for CallSucceeded events raised by the TrailsUtils contract. +type TrailsUtilsCallSucceededIterator struct { + Event *TrailsUtilsCallSucceeded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TrailsUtilsCallSucceededIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TrailsUtilsCallSucceeded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TrailsUtilsCallSucceeded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TrailsUtilsCallSucceededIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TrailsUtilsCallSucceededIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TrailsUtilsCallSucceeded represents a CallSucceeded event raised by the TrailsUtils contract. +type TrailsUtilsCallSucceeded struct { + OpHash [32]byte + Index *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallSucceeded is a free log retrieval operation binding the contract event 0x5a589b1d8062f33451d29cae3dabd9b2e36c62aee644178c600977ca8dda661a. +// +// Solidity: event CallSucceeded(bytes32 _opHash, uint256 _index) +func (_TrailsUtils *TrailsUtilsFilterer) FilterCallSucceeded(opts *bind.FilterOpts) (*TrailsUtilsCallSucceededIterator, error) { + + logs, sub, err := _TrailsUtils.contract.FilterLogs(opts, "CallSucceeded") + if err != nil { + return nil, err + } + return &TrailsUtilsCallSucceededIterator{contract: _TrailsUtils.contract, event: "CallSucceeded", logs: logs, sub: sub}, nil +} + +// WatchCallSucceeded is a free log subscription operation binding the contract event 0x5a589b1d8062f33451d29cae3dabd9b2e36c62aee644178c600977ca8dda661a. +// +// Solidity: event CallSucceeded(bytes32 _opHash, uint256 _index) +func (_TrailsUtils *TrailsUtilsFilterer) WatchCallSucceeded(opts *bind.WatchOpts, sink chan<- *TrailsUtilsCallSucceeded) (event.Subscription, error) { + + logs, sub, err := _TrailsUtils.contract.WatchLogs(opts, "CallSucceeded") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TrailsUtilsCallSucceeded) + if err := _TrailsUtils.contract.UnpackLog(event, "CallSucceeded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCallSucceeded is a log parse operation binding the contract event 0x5a589b1d8062f33451d29cae3dabd9b2e36c62aee644178c600977ca8dda661a. +// +// Solidity: event CallSucceeded(bytes32 _opHash, uint256 _index) +func (_TrailsUtils *TrailsUtilsFilterer) ParseCallSucceeded(log types.Log) (*TrailsUtilsCallSucceeded, error) { + event := new(TrailsUtilsCallSucceeded) + if err := _TrailsUtils.contract.UnpackLog(event, "CallSucceeded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TrailsUtilsSweepIterator is returned from FilterSweep and is used to iterate over the raw logs and unpacked data for Sweep events raised by the TrailsUtils contract. +type TrailsUtilsSweepIterator struct { + Event *TrailsUtilsSweep // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TrailsUtilsSweepIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TrailsUtilsSweep) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TrailsUtilsSweep) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TrailsUtilsSweepIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TrailsUtilsSweepIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TrailsUtilsSweep represents a Sweep event raised by the TrailsUtils contract. +type TrailsUtilsSweep struct { + Token common.Address + Recipient common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSweep is a free log retrieval operation binding the contract event 0xed679328aebf74ede77ae09efcf36e90244f83643dadac1c2d9f0b21a46f6ab7. +// +// Solidity: event Sweep(address indexed token, address indexed recipient, uint256 amount) +func (_TrailsUtils *TrailsUtilsFilterer) FilterSweep(opts *bind.FilterOpts, token []common.Address, recipient []common.Address) (*TrailsUtilsSweepIterator, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _TrailsUtils.contract.FilterLogs(opts, "Sweep", tokenRule, recipientRule) + if err != nil { + return nil, err + } + return &TrailsUtilsSweepIterator{contract: _TrailsUtils.contract, event: "Sweep", logs: logs, sub: sub}, nil +} + +// WatchSweep is a free log subscription operation binding the contract event 0xed679328aebf74ede77ae09efcf36e90244f83643dadac1c2d9f0b21a46f6ab7. +// +// Solidity: event Sweep(address indexed token, address indexed recipient, uint256 amount) +func (_TrailsUtils *TrailsUtilsFilterer) WatchSweep(opts *bind.WatchOpts, sink chan<- *TrailsUtilsSweep, token []common.Address, recipient []common.Address) (event.Subscription, error) { + + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _TrailsUtils.contract.WatchLogs(opts, "Sweep", tokenRule, recipientRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TrailsUtilsSweep) + if err := _TrailsUtils.contract.UnpackLog(event, "Sweep", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSweep is a log parse operation binding the contract event 0xed679328aebf74ede77ae09efcf36e90244f83643dadac1c2d9f0b21a46f6ab7. +// +// Solidity: event Sweep(address indexed token, address indexed recipient, uint256 amount) +func (_TrailsUtils *TrailsUtilsFilterer) ParseSweep(log types.Log) (*TrailsUtilsSweep, error) { + event := new(TrailsUtilsSweep) + if err := _TrailsUtils.contract.UnpackLog(event, "Sweep", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/go.work.sum b/go.work.sum index 1f3c2225..cfc47b58 100644 --- a/go.work.sum +++ b/go.work.sum @@ -47,6 +47,7 @@ cloud.google.com/go/storage v1.44.0/go.mod h1:wpPblkIuMP5jCB/E48Pz9zIo2S/zD8g+IT dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/0xsequence/ethkit v1.27.11 h1:fWcABQx1WIH4SWvesCuKBJ+D4XdwZcIGWGSYnBCM+VU= @@ -70,14 +71,17 @@ github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy86 github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= +github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs= github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78= github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/ProtonMail/go-crypto v1.1.5/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= +github.com/ProtonMail/go-crypto v1.3.0 h1:ILq8+Sf5If5DCpHQp4PbZdS1J7HDFRXz/+xKBiRGFrw= github.com/ProtonMail/go-crypto v1.3.0/go.mod h1:9whxjD8Rbs29b4XWbB8irEcE8KHMqaR2e7GWU1R+/PE= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -104,6 +108,7 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cloudflare/circl v1.6.0/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= +github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -125,6 +130,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo= github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s= github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= github.com/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ= github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= @@ -154,10 +160,12 @@ github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66D github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM= github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU= github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys= github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= github.com/go-git/go-git/v5 v5.13.2/go.mod h1:hWdW5P4YZRjmpGHwRH2v3zkWcNl6HeXaXQEMGb3NJ9A= +github.com/go-git/go-git/v5 v5.16.2 h1:fT6ZIOjE5iEnkzKyxTHK1W4HGAsPhqEqiSAssSO77hM= github.com/go-git/go-git/v5 v5.16.2/go.mod h1:4Ge4alE/5gPs30F2H1esi2gPd69R0C39lolkucHBOp8= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -176,6 +184,7 @@ github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -267,6 +276,7 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -282,6 +292,7 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kevinburke/ssh_config v1.4.0 h1:6xxtP5bZ2E4NF5tuQulISpTO2z8XbtH8cg1PWkxoFkQ= github.com/kevinburke/ssh_config v1.4.0/go.mod h1:q2RIzfka+BXARoNexmF9gkxEX7DmvbW9P4hIVx2Kg4M= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= @@ -323,6 +334,7 @@ github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCko github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A= +github.com/pjbgf/sha1cd v0.5.0 h1:a+UkboSi1znleCDUNT3M5YxjOnN1fz2FhN48FlwCxs0= github.com/pjbgf/sha1cd v0.5.0/go.mod h1:lhpGlyHLpQZoxMv8HcgXvZEhcGs0PG/vsZnEJ7H0iCM= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -349,6 +361,7 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= +github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= @@ -360,6 +373,7 @@ github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= +github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8= github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY= github.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -370,6 +384,7 @@ github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= @@ -393,6 +408,7 @@ github.com/webrpc/gen-dart v0.1.1/go.mod h1:yq0ThW3ANNulJLyR50jx1aZMEVBDp19VUHuc github.com/webrpc/gen-golang v0.14.8 h1:nIzRezd2Nidxz+Iwsv/anW/8POjwRJALgIJkO+NUaFo= github.com/webrpc/gen-golang v0.14.8/go.mod h1:qy1qEWMlTvrRzjSuQLy+176RqNaX1ymUULDtlo7Dapo= github.com/webrpc/gen-golang v0.18.2/go.mod h1:t8tIVL/AQhaMteA31xNbzWUrumiMXc7OcKmnNALpnAM= +github.com/webrpc/gen-golang v0.21.0 h1:eQuv7x7nZQfT9zFyAOE6d2dc2zT+znOlelsy8LnGRn0= github.com/webrpc/gen-golang v0.21.0/go.mod h1:t8tIVL/AQhaMteA31xNbzWUrumiMXc7OcKmnNALpnAM= github.com/webrpc/gen-javascript v0.13.0 h1:tw7U1xueUjZz3cQAAA4/DZ90BHydkQKiJC4VXd/j2hg= github.com/webrpc/gen-javascript v0.13.0/go.mod h1:5EhapSJgzbiWrIGlqzZN9Lg9mE9209wwX+Du2dgn4EU= @@ -401,10 +417,12 @@ github.com/webrpc/gen-kotlin v0.1.0/go.mod h1:PIPys9Gn1Ro7q7uoacydEX8CtqBlAJSV98 github.com/webrpc/gen-openapi v0.13.0 h1:+FrIyqdCBkjCbUBD3HJ6mVERJL2mPrhuIsW31BMkb7Y= github.com/webrpc/gen-openapi v0.13.0/go.mod h1:fwY3ylZmdiCr+WXjR8Ek8wm08CFRr2/GaXI7Zd/Ou4Y= github.com/webrpc/gen-openapi v0.15.0/go.mod h1:fwY3ylZmdiCr+WXjR8Ek8wm08CFRr2/GaXI7Zd/Ou4Y= +github.com/webrpc/gen-openapi v0.16.3 h1:Gwj1Wxdqu+jLsVd+JeUuvf92JyLTZ/nMNcSwVpdqEWs= github.com/webrpc/gen-openapi v0.16.3/go.mod h1:fwY3ylZmdiCr+WXjR8Ek8wm08CFRr2/GaXI7Zd/Ou4Y= github.com/webrpc/gen-typescript v0.13.0 h1:QgmGmm+OuKZAIDr8Qg/fNLzFem5aUUkH9z+k3OKkf3o= github.com/webrpc/gen-typescript v0.13.0/go.mod h1:xQzYnVaSMfcygDXA5SuW8eYyCLHBHkj15wCF7gcJF5Y= github.com/webrpc/gen-typescript v0.16.3/go.mod h1:xQzYnVaSMfcygDXA5SuW8eYyCLHBHkj15wCF7gcJF5Y= +github.com/webrpc/gen-typescript v0.19.0 h1:apV8DsHAVzyOG4i45I93/YQeDXsy/fBPqFSV6CjWSWM= github.com/webrpc/gen-typescript v0.19.0/go.mod h1:xQzYnVaSMfcygDXA5SuW8eYyCLHBHkj15wCF7gcJF5Y= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= diff --git a/intent_config.go b/intent_config.go index 1ff1546e..b99e8250 100644 --- a/intent_config.go +++ b/intent_config.go @@ -188,10 +188,15 @@ func CreateAnyAddressSubdigestTree(calls []*v3.CallsPayload) ([]v3.WalletConfigT // `CreateIntentTree` creates a tree from a list of intent operations and a main signer address. func CreateIntentTree(mainSigner common.Address, calls []*v3.CallsPayload, sapientSignerLeafNode v3.WalletConfigTree) (*v3.WalletConfigTree, error) { - // Create the subdigest leaves from the batched transactions. - leaves, err := CreateAnyAddressSubdigestTree(calls) - if err != nil { - return nil, err + var leaves []v3.WalletConfigTree + + if len(calls) > 0 { + // Create the subdigest leaves from the batched transactions. + subdigestLeaves, err := CreateAnyAddressSubdigestTree(calls) + if err != nil { + return nil, err + } + leaves = append(leaves, subdigestLeaves...) } // If the sapient signer leaf is not nil, add it to the leaves. @@ -205,6 +210,10 @@ func CreateIntentTree(mainSigner common.Address, calls []*v3.CallsPayload, sapie Address: mainSigner, } + if len(leaves) == 0 { + return nil, fmt.Errorf("no leaves to create tree from") + } + // If the length of the leaves is 1 if len(leaves) == 1 { tree := v3.WalletConfigTreeNodes(mainSignerLeaf, leaves[0]) @@ -221,7 +230,7 @@ func CreateIntentTree(mainSigner common.Address, calls []*v3.CallsPayload, sapie } // `CreateIntentConfiguration` creates a wallet configuration where the intent's transaction batches are grouped into the initial subdigest. -func CreateIntentConfiguration(mainSigner common.Address, calls []*v3.CallsPayload, sapientSignerLeafNode v3.WalletConfigTree) (*v3.WalletConfig, error) { +func CreateIntentConfiguration(mainSigner common.Address, calls []*v3.CallsPayload, sapientSignerLeafNode v3.WalletConfigTree, checkpoint uint64) (*v3.WalletConfig, error) { // Create the subdigest leaves from the batched transactions. tree, err := CreateIntentTree(mainSigner, calls, sapientSignerLeafNode) if err != nil { @@ -231,37 +240,41 @@ func CreateIntentConfiguration(mainSigner common.Address, calls []*v3.CallsPaylo // Construct the new wallet config using: config := &v3.WalletConfig{ Threshold_: 1, - Checkpoint_: 0, + Checkpoint_: checkpoint, Tree: *tree, } return config, nil } +type SignerSignature struct { + Address common.Address + Signature []byte + Type core.SignerSignatureType +} + // `GetIntentConfigurationSignature` creates a signature for the intent configuration that can be used to bypass chain ID validation. -// The signature is based on the transaction bundle digests only. +// `SignerSignatures` can be nil when executing a preapproved static payload. func GetIntentConfigurationSignature( - mainSigner common.Address, - calls []*v3.CallsPayload, + ctx context.Context, + config *v3.WalletConfig, + signerSignatures []*SignerSignature, ) ([]byte, error) { - // Default case without any sapient signer - config, err := CreateIntentConfiguration(mainSigner, calls, nil) - if err != nil { - return nil, err - } - // spew.Dump(config) // spew.Dump(config.Tree) signingFunc := func(ctx context.Context, signer core.Signer, _ []core.SignerSignature) (core.SignerSignatureType, []byte, error) { - // For mainSigner or other signers, we don't provide a signature here. - // This will result in an AddressLeaf or NodeLeaf in the signature tree. + for _, signerSignature := range signerSignatures { + if signer.Address == signerSignature.Address { + return signerSignature.Type, signerSignature.Signature, nil + } + } return 0, nil, nil } // Build the signature using BuildNoChainIDSignature, which allows us to inject custom signatures via SigningFunction. // Set validateSigningPower to false, as we are not necessarily providing signatures for all parts of the config. - sig, err := config.BuildRegularSignature(context.Background(), signingFunc, false) + sig, err := config.BuildRegularSignature(ctx, signingFunc, false) if err != nil { return nil, fmt.Errorf("failed to build regular signature: %w", err) } @@ -301,42 +314,3 @@ func GetIntentConfigurationSignature( return data, nil } - -// // replaceSapientSignerWithNodeInConfigTree recursively traverses the WalletConfigTree. -// func replaceSapientSignerWithNodeInConfigTree(tree v3.WalletConfigTree) v3.WalletConfigTree { -// if tree == nil { -// return nil -// } - -// switch node := tree.(type) { -// case *v3.WalletConfigTreeNode: -// // Recursively call on left and right children -// left := replaceSapientSignerWithNodeInConfigTree(node.Left) -// right := replaceSapientSignerWithNodeInConfigTree(node.Right) - -// if left == node.Left && right == node.Right { -// return node -// } -// return &v3.WalletConfigTreeNode{Left: left, Right: right} - -// case *v3.WalletConfigTreeNestedLeaf: -// // Recursively call on the inner tree -// innerTree := replaceSapientSignerWithNodeInConfigTree(node.Tree) - -// if innerTree == node.Tree { // Check for pointer equality -// return node // No change, return original -// } -// return &v3.WalletConfigTreeNestedLeaf{ -// Weight: node.Weight, -// Threshold: node.Threshold, -// Tree: innerTree, -// } - -// case *v3.WalletConfigTreeSapientSignerLeaf: -// // This is the target node type to replace -// return &v3.WalletConfigTreeNodeLeaf{Node: node.ImageHash()} - -// default: -// return tree -// } -// } diff --git a/intent_config_test.go b/intent_config_test.go index 8ed7babe..a468ae96 100644 --- a/intent_config_test.go +++ b/intent_config_test.go @@ -11,7 +11,6 @@ import ( "github.com/0xsequence/ethkit/ethwallet" "github.com/0xsequence/ethkit/go-ethereum/common" "github.com/0xsequence/ethkit/go-ethereum/core/types" - "github.com/0xsequence/ethkit/go-ethereum/crypto" "github.com/0xsequence/go-sequence" "github.com/davecgh/go-spew/spew" @@ -299,12 +298,13 @@ func TestCreateIntentConfiguration_Valid(t *testing.T) { // Use a valid main signer address. mainSigner := common.HexToAddress("0x1111111111111111111111111111111111111111") - config, err := sequence.CreateIntentConfiguration(mainSigner, []*v3.CallsPayload{&payload}, nil) + config, err := sequence.CreateIntentConfiguration(mainSigner, []*v3.CallsPayload{&payload}, nil, 0) require.NoError(t, err) require.NotNil(t, config) } func TestGetIntentConfigurationSignature(t *testing.T) { + ctx := context.Background() // Create test wallets eoa1, err := ethwallet.NewWalletFromRandomEntropy() require.NoError(t, err) @@ -328,11 +328,11 @@ func TestGetIntentConfigurationSignature(t *testing.T) { t.Run("signature matches subdigest", func(t *testing.T) { // Create the intent configuration - config, err := sequence.CreateIntentConfiguration(eoa1.Address(), []*v3.CallsPayload{&payload}, nil) + config, err := sequence.CreateIntentConfiguration(eoa1.Address(), []*v3.CallsPayload{&payload}, nil, 0) require.NoError(t, err) // Create the signature - signature, err := sequence.GetIntentConfigurationSignature(eoa1.Address(), []*v3.CallsPayload{&payload}) + signature, err := sequence.GetIntentConfigurationSignature(ctx, config, nil) require.NoError(t, err) // fmt.Println("==> signature", common.Bytes2Hex(signature)) @@ -407,10 +407,14 @@ func TestGetIntentConfigurationSignature(t *testing.T) { }, big.NewInt(0), big.NewInt(0)) // Create signatures for each payload as separate batches - sig1, err := sequence.GetIntentConfigurationSignature(eoa1.Address(), []*v3.CallsPayload{&payload1}) + config1, err := sequence.CreateIntentConfiguration(eoa1.Address(), []*v3.CallsPayload{&payload1}, nil, 0) + require.NoError(t, err) + sig1, err := sequence.GetIntentConfigurationSignature(ctx, config1, nil) require.NoError(t, err) - sig2, err := sequence.GetIntentConfigurationSignature(eoa1.Address(), []*v3.CallsPayload{&payload2}) + config2, err := sequence.CreateIntentConfiguration(eoa1.Address(), []*v3.CallsPayload{&payload2}, nil, 0) + require.NoError(t, err) + sig2, err := sequence.GetIntentConfigurationSignature(ctx, config2, nil) require.NoError(t, err) // Verify signatures are different @@ -419,18 +423,24 @@ func TestGetIntentConfigurationSignature(t *testing.T) { t.Run("same transactions produce same signatures", func(t *testing.T) { // Use the payload directly - sig1, err := sequence.GetIntentConfigurationSignature(eoa1.Address(), []*v3.CallsPayload{&payload}) + config1, err := sequence.CreateIntentConfiguration(eoa1.Address(), []*v3.CallsPayload{&payload}, nil, 0) + require.NoError(t, err) + sig1, err := sequence.GetIntentConfigurationSignature(ctx, config1, nil) require.NoError(t, err) - sig2, err := sequence.GetIntentConfigurationSignature(eoa1.Address(), []*v3.CallsPayload{&payload}) + config2, err := sequence.CreateIntentConfiguration(eoa1.Address(), []*v3.CallsPayload{&payload}, nil, 0) + require.NoError(t, err) + sig2, err := sequence.GetIntentConfigurationSignature(ctx, config2, nil) require.NoError(t, err) - // Verify signatures are the same + // Verify configs and signatures are the same + require.Equal(t, config1.Tree, config2.Tree, "same transactions should produce same configuration") require.Equal(t, sig1, sig2, "same transactions should produce same signatures") }) } func TestGetIntentConfigurationSignature_MultipleTransactions(t *testing.T) { + ctx := context.Background() // Create test wallets eoa1, err := ethwallet.NewWalletFromRandomEntropy() require.NoError(t, err) @@ -458,7 +468,9 @@ func TestGetIntentConfigurationSignature_MultipleTransactions(t *testing.T) { }, big.NewInt(0), big.NewInt(0)) // Create a signature - sig, err := sequence.GetIntentConfigurationSignature(eoa1.Address(), []*v3.CallsPayload{&payload1}) + config, err := sequence.CreateIntentConfiguration(eoa1.Address(), []*v3.CallsPayload{&payload1}, nil, 0) + require.NoError(t, err) + sig, err := sequence.GetIntentConfigurationSignature(ctx, config, nil) require.NoError(t, err) // Convert the full signature into a hex string. @@ -469,6 +481,7 @@ func TestGetIntentConfigurationSignature_MultipleTransactions(t *testing.T) { } func TestIntentTransactionToGuestModuleDeployAndCall(t *testing.T) { + ctx := context.Background() // Create normal txn of: callmockContract.testCall(55, 0x112255) callmockContract := testChain.UniDeploy(t, "WALLET_CALL_RECV_MOCK", 0) calldata1, err := callmockContract.Encode("setRevertFlag", false) @@ -529,7 +542,9 @@ func TestIntentTransactionToGuestModuleDeployAndCall(t *testing.T) { require.NotZero(t, mainSigner) // Generate a configuration signature for the batch. - intentConfigSig, err := sequence.GetIntentConfigurationSignature(mainSigner, []*v3.CallsPayload{&payload}) + config, err := sequence.CreateIntentConfiguration(mainSigner, []*v3.CallsPayload{&payload}, nil, 0) + require.NoError(t, err) + intentConfigSig, err := sequence.GetIntentConfigurationSignature(ctx, config, nil) require.NoError(t, err) // fmt.Println("==> bundle.Digest", bundle.Digest().Hash) @@ -603,6 +618,7 @@ func TestIntentTransactionToGuestModuleDeployAndCall(t *testing.T) { } func TestIntentTransactionToGuestModuleDeployAndCallMultiplePayloads(t *testing.T) { + ctx := context.Background() // Create normal txn of: callmockContract.testCall(55, 0x112255) for first chain callmockContract := testChain.UniDeploy(t, "WALLET_CALL_RECV_MOCK", 0) calldata1, err := callmockContract.Encode("setRevertFlag", false) @@ -687,7 +703,9 @@ func TestIntentTransactionToGuestModuleDeployAndCallMultiplePayloads(t *testing. require.NotZero(t, mainSigner) // Generate a configuration signature for both batches - intentConfigSig, err := sequence.GetIntentConfigurationSignature(mainSigner, payloads) + config, err := sequence.CreateIntentConfiguration(mainSigner, payloads, nil, 0) + require.NoError(t, err) + intentConfigSig, err := sequence.GetIntentConfigurationSignature(ctx, config, nil) require.NoError(t, err) fmt.Printf("--- Intent Config Signature (for all payloads) ---\n%s\n", common.Bytes2Hex(intentConfigSig)) @@ -814,7 +832,7 @@ func TestIntentConfigurationAddress(t *testing.T) { ) // Create intent configuration - config, err := sequence.CreateIntentConfiguration(mainSigner, []*v3.CallsPayload{&payload}, nil) + config, err := sequence.CreateIntentConfiguration(mainSigner, []*v3.CallsPayload{&payload}, nil, 0) require.NoError(t, err) // Calculate image hash @@ -864,7 +882,7 @@ func TestIntentConfigurationAddress(t *testing.T) { ) // Create intent configuration - config, err := sequence.CreateIntentConfiguration(mainSigner, []*v3.CallsPayload{&payload1, &payload2}, nil) + config, err := sequence.CreateIntentConfiguration(mainSigner, []*v3.CallsPayload{&payload1, &payload2}, nil, 0) require.NoError(t, err) // Calculate image hash @@ -917,7 +935,7 @@ func TestIntentConfigurationAddress_RealWorldExample(t *testing.T) { }, big.NewInt(0), big.NewInt(0)) // Create intent configuration - config, err := sequence.CreateIntentConfiguration(mainSigner, []*v3.CallsPayload{&payload1, &payload2}, nil) + config, err := sequence.CreateIntentConfiguration(mainSigner, []*v3.CallsPayload{&payload1, &payload2}, nil, 0) require.NoError(t, err) // Calculate image hash @@ -961,23 +979,3 @@ func TestCreateIntentCallsPayloadDigest(t *testing.T) { // Print the digest hash for debugging fmt.Printf("Digest Hash: %s\n", digest.Hash.Hex()) } - -func ecrecoverForTest(hash, sig []byte) (common.Address, error) { - sigCopy := make([]byte, len(sig)) - copy(sigCopy, sig) - if len(sigCopy) == 65 && sigCopy[64] >= 27 { - sigCopy[64] -= 27 - } - - pubKeyBytes, err := crypto.Ecrecover(hash, sigCopy) - if err != nil { - return common.Address{}, err - } - - pubKey, err := crypto.UnmarshalPubkey(pubKeyBytes) - if err != nil { - return common.Address{}, err - } - - return crypto.PubkeyToAddress(*pubKey), nil -} diff --git a/lib/sapient/malleable/README.md b/lib/sapient/malleable/README.md new file mode 100644 index 00000000..9b477268 --- /dev/null +++ b/lib/sapient/malleable/README.md @@ -0,0 +1,66 @@ +# Malleable Sapient (Go) + +Build MalleableSapient signatures by locating byte ranges in call data, and optionally compute the image hash. + +## Usage + +```go +payload := v3.NewCallsPayload(...) + +permitValue := malleable.NewPath(). + CallData(0). + ABI(trailsABI, "hydrateExecute"). + ArgBytesData("packedPayload"). + EncodedCallsPayload(). + EncodedCallData(0). + ABI(erc2612ABI, "permit"). + ArgSlot("value"). + AsSelector() + +transferValue := malleable.NewPath(). + CallData(0). + ABI(trailsABI, "hydrateExecute"). + ArgBytesData("packedPayload"). + EncodedCallsPayload(). + EncodedCallData(1). + ABI(erc20ABI, "transferFrom"). + ArgSlot("_value"). + AsSelector() + +b := malleable.NewBuilder(payload, &malleable.BuilderOptions{ + ValidateRepeats: true, + MergeAdjacentStatic: true, +}) + +b.Repeat(permitValue, transferValue) // repeat constraint + +// mark other malleable fields +b.Malleable(malleable.NewPath(). + CallData(0). + ABI(trailsABI, "hydrateExecute"). + ArgBytesData("packedPayload"). + EncodedCallsPayload(). + EncodedCallData(0). + ABI(erc2612ABI, "permit"). + ArgSlot("deadline"). + AsSelector(), +) + +sig, _, err := b.Build() +``` + +If ABI params are unnamed, use index-based selectors: + +```go +value := malleable.NewPath(). + CallData(0). + ABI(erc20ABI, "transferFrom"). + ArgSlotIndex(2). + AsSelector() +``` + +Compute the image hash: + +```go +hash, err := malleable.ComputeImageHash(payload, sig, chainID) +``` diff --git a/lib/sapient/malleable/builder.go b/lib/sapient/malleable/builder.go new file mode 100644 index 00000000..f8041c13 --- /dev/null +++ b/lib/sapient/malleable/builder.go @@ -0,0 +1,269 @@ +package malleable + +import ( + "fmt" + "sort" + + "github.com/0xsequence/ethkit/go-ethereum/crypto" + v3 "github.com/0xsequence/go-sequence/core/v3" +) + +type BuilderOptions struct { + ValidateRepeats bool + MergeAdjacentStatic bool + MaxOffset uint32 + MaxSize uint32 +} + +type Builder struct { + payload *v3.CallsPayload + options BuilderOptions + malleable []Selector + repeats []repeatSelector +} + +type repeatSelector struct { + a Selector + b Selector +} + +type Plan struct { + Static []StaticSection + Repeat []RepeatSection +} + +func (p *Plan) DebugString() string { + out := "static:" + for _, s := range p.Static { + out += fmt.Sprintf(" [t=%d c=%d s=%d]", s.TIndex, s.CIndex, s.Size) + } + out += " repeat:" + for _, r := range p.Repeat { + out += fmt.Sprintf(" [t=%d c=%d s=%d t2=%d c2=%d]", r.TIndex, r.CIndex, r.Size, r.TIndex2, r.CIndex2) + } + return out +} + +func NewBuilder(payload *v3.CallsPayload, opts *BuilderOptions) *Builder { + options := BuilderOptions{ + MaxOffset: 0xFFFF, + MaxSize: 0xFFFF, + ValidateRepeats: false, + MergeAdjacentStatic: true, + } + if opts != nil { + if opts.MaxOffset != 0 { + options.MaxOffset = opts.MaxOffset + } + if opts.MaxSize != 0 { + options.MaxSize = opts.MaxSize + } + options.ValidateRepeats = opts.ValidateRepeats + options.MergeAdjacentStatic = opts.MergeAdjacentStatic + } + + return &Builder{ + payload: payload, + options: options, + } +} + +func (b *Builder) Malleable(sel Selector) *Builder { + b.malleable = append(b.malleable, sel) + return b +} + +func (b *Builder) Repeat(a Selector, b2 Selector) *Builder { + b.repeats = append(b.repeats, repeatSelector{a: a, b: b2}) + return b +} + +func (b *Builder) Build() ([]byte, *Plan, error) { + if b.payload == nil { + return nil, nil, fmt.Errorf("payload is nil") + } + if len(b.payload.Calls) > 128 { + return nil, nil, fmt.Errorf("too many calls (%d): tindex is 7-bit", len(b.payload.Calls)) + } + + exByCall := make([][]Span, len(b.payload.Calls)) + + addExclude := func(r ByteRange) error { + if r.CallIndex < 0 || r.CallIndex >= len(b.payload.Calls) { + return fmt.Errorf("tindex out of range: %d", r.CallIndex) + } + dataLen := len(b.payload.Calls[r.CallIndex].Data) + if r.Offset < 0 || r.Size < 0 || r.Offset+r.Size > dataLen { + return fmt.Errorf("span out of bounds: [%d,%d) > %d", r.Offset, r.Offset+r.Size, dataLen) + } + exByCall[r.CallIndex] = append(exByCall[r.CallIndex], Span{Start: r.Offset, Len: r.Size}) + return nil + } + + for _, sel := range b.malleable { + ranges, err := sel.Resolve(b.payload) + if err != nil { + return nil, nil, fmt.Errorf("malleable %s: %w", sel.String(), err) + } + for _, r := range ranges { + if err := addExclude(r); err != nil { + return nil, nil, fmt.Errorf("malleable %s: %w", sel.String(), err) + } + } + } + + var repeats []RepeatSection + for _, rp := range b.repeats { + rangesA, err := rp.a.Resolve(b.payload) + if err != nil { + return nil, nil, fmt.Errorf("repeat a %s: %w", rp.a.String(), err) + } + rangesB, err := rp.b.Resolve(b.payload) + if err != nil { + return nil, nil, fmt.Errorf("repeat b %s: %w", rp.b.String(), err) + } + if len(rangesA) != 1 || len(rangesB) != 1 { + return nil, nil, fmt.Errorf("repeat expects single range per selector") + } + a := rangesA[0] + bb := rangesB[0] + if a.Size != bb.Size { + return nil, nil, fmt.Errorf("repeat size mismatch: %d vs %d", a.Size, bb.Size) + } + if err := addExclude(a); err != nil { + return nil, nil, fmt.Errorf("repeat a: %w", err) + } + if err := addExclude(bb); err != nil { + return nil, nil, fmt.Errorf("repeat b: %w", err) + } + if b.options.ValidateRepeats { + sectionA, err := a.Slice(b.payload) + if err != nil { + return nil, nil, err + } + sectionB, err := bb.Slice(b.payload) + if err != nil { + return nil, nil, err + } + if crypto.Keccak256Hash(sectionA) != crypto.Keccak256Hash(sectionB) { + return nil, nil, fmt.Errorf("repeat section mismatch") + } + } + repeats = append(repeats, RepeatSection{ + TIndex: uint8(a.CallIndex), + CIndex: uint16(a.Offset), + Size: uint16(a.Size), + TIndex2: uint8(bb.CallIndex), + CIndex2: uint16(bb.Offset), + }) + } + + var statics []SpanWithCall + for t := range b.payload.Calls { + length := len(b.payload.Calls[t].Data) + ex := mergeSpans(exByCall[t]) + cursor := 0 + for _, s := range ex { + if cursor < s.Start { + statics = append(statics, SpanWithCall{CallIndex: t, Span: Span{Start: cursor, Len: s.Start - cursor}}) + } + cursor = max(cursor, s.Start+s.Len) + } + if cursor < length { + statics = append(statics, SpanWithCall{CallIndex: t, Span: Span{Start: cursor, Len: length - cursor}}) + } + } + + sort.Slice(statics, func(i, j int) bool { + if statics[i].CallIndex != statics[j].CallIndex { + return statics[i].CallIndex < statics[j].CallIndex + } + return statics[i].Start < statics[j].Start + }) + + if b.options.MergeAdjacentStatic { + statics = mergeAdjacentStatics(statics) + } + + staticSections, err := b.encodeStaticSections(statics) + if err != nil { + return nil, nil, err + } + + signature, err := EncodeSignature(staticSections, repeats) + if err != nil { + return nil, nil, err + } + + return signature, &Plan{Static: staticSections, Repeat: repeats}, nil +} + +type SpanWithCall struct { + CallIndex int + Span +} + +func (b *Builder) encodeStaticSections(statics []SpanWithCall) ([]StaticSection, error) { + var sections []StaticSection + for _, s := range statics { + if s.Len == 0 { + continue + } + if s.CallIndex < 0 || s.CallIndex >= len(b.payload.Calls) { + return nil, fmt.Errorf("tindex out of range: %d", s.CallIndex) + } + offset := s.Start + length := s.Len + for length > 0 { + chunk := length + if uint32(chunk) > b.options.MaxSize { + chunk = int(b.options.MaxSize) + } + if uint32(offset) > b.options.MaxOffset { + return nil, fmt.Errorf("cindex too large: %d", offset) + } + sections = append(sections, StaticSection{ + TIndex: uint8(s.CallIndex), + CIndex: uint16(offset), + Size: uint16(chunk), + }) + offset += chunk + length -= chunk + } + } + return sections, nil +} + +func mergeSpans(spans []Span) []Span { + if len(spans) == 0 { + return nil + } + sort.Slice(spans, func(i, j int) bool { return spans[i].Start < spans[j].Start }) + out := []Span{spans[0]} + for _, s := range spans[1:] { + last := &out[len(out)-1] + if s.Start <= last.Start+last.Len { + end := max(last.Start+last.Len, s.Start+s.Len) + last.Len = end - last.Start + } else { + out = append(out, s) + } + } + return out +} + +func mergeAdjacentStatics(statics []SpanWithCall) []SpanWithCall { + if len(statics) == 0 { + return statics + } + out := []SpanWithCall{statics[0]} + for _, s := range statics[1:] { + last := &out[len(out)-1] + if s.CallIndex == last.CallIndex && s.Start == last.Start+last.Len { + last.Len += s.Len + } else { + out = append(out, s) + } + } + return out +} diff --git a/lib/sapient/malleable/builder_test.go b/lib/sapient/malleable/builder_test.go new file mode 100644 index 00000000..b1e5a855 --- /dev/null +++ b/lib/sapient/malleable/builder_test.go @@ -0,0 +1,65 @@ +package malleable + +import ( + "math/big" + "testing" + + "github.com/0xsequence/ethkit/go-ethereum/common" + v3 "github.com/0xsequence/go-sequence/core/v3" + "github.com/stretchr/testify/require" +) + +func TestBuilder_StaticComplement(t *testing.T) { + payload := v3.NewCallsPayload(common.Address{}, big.NewInt(1), []v3.Call{ + {Data: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}}, + }, big.NewInt(0), big.NewInt(0)) + + builder := NewBuilder(&payload, &BuilderOptions{MergeAdjacentStatic: true}) + builder.Malleable(NewRangeSelector(0, 2, 2)) + builder.Malleable(NewRangeSelector(0, 7, 2)) + + sig, plan, err := builder.Build() + require.NoError(t, err) + require.NotEmpty(t, sig) + + require.Equal(t, []StaticSection{ + {TIndex: 0, CIndex: 0, Size: 2}, + {TIndex: 0, CIndex: 4, Size: 3}, + {TIndex: 0, CIndex: 9, Size: 1}, + }, plan.Static) + require.Empty(t, plan.Repeat) +} + +func TestBuilder_RepeatValidation(t *testing.T) { + payload := v3.NewCallsPayload(common.Address{}, big.NewInt(1), []v3.Call{ + {Data: []byte{0xaa, 0xbb, 0xcc, 0xdd}}, + {Data: []byte{0xaa, 0xbb, 0xee, 0xff}}, + }, big.NewInt(0), big.NewInt(0)) + + builder := NewBuilder(&payload, &BuilderOptions{ValidateRepeats: true}) + builder.Repeat(NewRangeSelector(0, 0, 2), NewRangeSelector(1, 0, 2)) + _, _, err := builder.Build() + require.NoError(t, err) + + builder = NewBuilder(&payload, &BuilderOptions{ValidateRepeats: true}) + builder.Repeat(NewRangeSelector(0, 0, 2), NewRangeSelector(1, 2, 2)) + _, _, err = builder.Build() + require.Error(t, err) +} + +func TestEncodeDecodeSignature_RoundTrip(t *testing.T) { + statics := []StaticSection{ + {TIndex: 0, CIndex: 1, Size: 2}, + {TIndex: 1, CIndex: 3, Size: 4}, + } + repeats := []RepeatSection{ + {TIndex: 0, CIndex: 5, Size: 2, TIndex2: 1, CIndex2: 6}, + } + + sig, err := EncodeSignature(statics, repeats) + require.NoError(t, err) + + sections, err := DecodeSignature(sig) + require.NoError(t, err) + require.Len(t, sections, 3) +} diff --git a/lib/sapient/malleable/imagehash.go b/lib/sapient/malleable/imagehash.go new file mode 100644 index 00000000..2050796e --- /dev/null +++ b/lib/sapient/malleable/imagehash.go @@ -0,0 +1,227 @@ +package malleable + +import ( + "encoding/binary" + "fmt" + "math/big" + + "github.com/0xsequence/ethkit/go-ethereum/accounts/abi" + "github.com/0xsequence/ethkit/go-ethereum/common" + "github.com/0xsequence/ethkit/go-ethereum/crypto" + v3 "github.com/0xsequence/go-sequence/core/v3" +) + +func ComputeImageHash(payload *v3.CallsPayload, signature []byte, chainID *big.Int) (common.Hash, error) { + if payload == nil { + return common.Hash{}, fmt.Errorf("payload is nil") + } + if len(payload.Calls) > 128 { + return common.Hash{}, fmt.Errorf("too many calls (%d)", len(payload.Calls)) + } + + space := nz(payload.Space) + nonce := nz(payload.Nonce) + root := fkeccak256(u256Bytes32(space), u256Bytes32(nonce)) + + payloadChainID := payload.ChainID() + noChainID := payloadChainID == nil || payloadChainID.Sign() == 0 + if noChainID { + root = fkeccak256(root, common.Hash{}) + } else { + if chainID == nil { + chainID = payloadChainID + } + root = fkeccak256(root, u256Bytes32(nz(chainID))) + } + + stringTy, _ := abi.NewType("string", "", nil) + u256Ty, _ := abi.NewType("uint256", "", nil) + addrTy, _ := abi.NewType("address", "", nil) + boolTy, _ := abi.NewType("bool", "", nil) + bytesTy, _ := abi.NewType("bytes", "", nil) + + callMetaArgs := abi.Arguments{ + {Type: stringTy}, + {Type: u256Ty}, + {Type: addrTy}, + {Type: u256Ty}, + {Type: u256Ty}, + {Type: boolTy}, + {Type: boolTy}, + {Type: u256Ty}, + } + + staticArgs := abi.Arguments{ + {Type: stringTy}, + {Type: u256Ty}, + {Type: u256Ty}, + {Type: bytesTy}, + } + + repeatArgs := abi.Arguments{ + {Type: stringTy}, + {Type: u256Ty}, + {Type: u256Ty}, + {Type: u256Ty}, + {Type: u256Ty}, + {Type: u256Ty}, + } + + for i := 0; i < len(payload.Calls); i++ { + c := payload.Calls[i] + b, err := callMetaArgs.Pack( + "call", + big.NewInt(int64(i)), + c.To, + nz(c.Value), + nz(c.GasLimit), + c.DelegateCall, + c.OnlyFallback, + big.NewInt(int64(c.BehaviorOnError)), + ) + if err != nil { + return common.Hash{}, err + } + root = fkeccak256(root, crypto.Keccak256Hash(b)) + } + + r := 0 + for r < len(signature) { + if r+5 > len(signature) { + return common.Hash{}, fmt.Errorf("signature truncated at %d", r) + } + tRaw := signature[r] + r++ + cindex := binary.BigEndian.Uint16(signature[r : r+2]) + r += 2 + size := binary.BigEndian.Uint16(signature[r : r+2]) + r += 2 + + repeat := (tRaw & 0x80) != 0 + t := int(tRaw & 0x7F) + if t >= len(payload.Calls) { + return common.Hash{}, fmt.Errorf("tindex out of range: %d", t) + } + if int(cindex)+int(size) > len(payload.Calls[t].Data) { + return common.Hash{}, fmt.Errorf("section out of bounds (t=%d)", t) + } + section := payload.Calls[t].Data[cindex : cindex+size] + + if repeat { + if r+3 > len(signature) { + return common.Hash{}, fmt.Errorf("repeat truncated at %d", r) + } + t2 := int(signature[r]) + r++ + c2 := binary.BigEndian.Uint16(signature[r : r+2]) + r += 2 + + if t2 >= len(payload.Calls) { + return common.Hash{}, fmt.Errorf("tindex2 out of range: %d", t2) + } + if int(c2)+int(size) > len(payload.Calls[t2].Data) { + return common.Hash{}, fmt.Errorf("repeat section2 out of bounds") + } + section2 := payload.Calls[t2].Data[c2 : c2+size] + if crypto.Keccak256Hash(section) != crypto.Keccak256Hash(section2) { + return common.Hash{}, fmt.Errorf("repeat section mismatch") + } + + b, err := repeatArgs.Pack( + "repeat-section", + big.NewInt(int64(t)), + new(big.Int).SetUint64(uint64(cindex)), + new(big.Int).SetUint64(uint64(size)), + big.NewInt(int64(t2)), + new(big.Int).SetUint64(uint64(c2)), + ) + if err != nil { + return common.Hash{}, err + } + root = fkeccak256(root, crypto.Keccak256Hash(b)) + } else { + b, err := staticArgs.Pack( + "static-section", + big.NewInt(int64(t)), + new(big.Int).SetUint64(uint64(cindex)), + section, + ) + if err != nil { + return common.Hash{}, err + } + root = fkeccak256(root, crypto.Keccak256Hash(b)) + } + } + + return root, nil +} + +func ValidateSignature(payload *v3.CallsPayload, signature []byte) error { + if payload == nil { + return fmt.Errorf("payload is nil") + } + r := 0 + for r < len(signature) { + if r+5 > len(signature) { + return fmt.Errorf("signature truncated at %d", r) + } + tRaw := signature[r] + r++ + cindex := binary.BigEndian.Uint16(signature[r : r+2]) + r += 2 + size := binary.BigEndian.Uint16(signature[r : r+2]) + r += 2 + + t := int(tRaw & 0x7F) + if t >= len(payload.Calls) { + return fmt.Errorf("tindex out of range: %d", t) + } + if int(cindex)+int(size) > len(payload.Calls[t].Data) { + return fmt.Errorf("section out of bounds (t=%d)", t) + } + + if tRaw&0x80 != 0 { + if r+3 > len(signature) { + return fmt.Errorf("repeat truncated at %d", r) + } + t2 := int(signature[r]) + r++ + c2 := binary.BigEndian.Uint16(signature[r : r+2]) + r += 2 + + if t2 >= len(payload.Calls) { + return fmt.Errorf("tindex2 out of range: %d", t2) + } + if int(c2)+int(size) > len(payload.Calls[t2].Data) { + return fmt.Errorf("repeat section2 out of bounds") + } + section := payload.Calls[t].Data[cindex : cindex+size] + section2 := payload.Calls[t2].Data[c2 : c2+size] + if crypto.Keccak256Hash(section) != crypto.Keccak256Hash(section2) { + return fmt.Errorf("repeat section mismatch") + } + } + } + return nil +} + +func fkeccak256(a, b common.Hash) common.Hash { + return crypto.Keccak256Hash(a[:], b[:]) +} + +func u256Bytes32(x *big.Int) common.Hash { + var out common.Hash + if x == nil { + return out + } + b := x.Bytes() + copy(out[32-len(b):], b) + return out +} + +func nz(x *big.Int) *big.Int { + if x == nil { + return big.NewInt(0) + } + return x +} diff --git a/lib/sapient/malleable/imagehash_test.go b/lib/sapient/malleable/imagehash_test.go new file mode 100644 index 00000000..7d90ba96 --- /dev/null +++ b/lib/sapient/malleable/imagehash_test.go @@ -0,0 +1,117 @@ +package malleable + +import ( + "context" + "math/big" + "testing" + + "github.com/0xsequence/ethkit/ethrpc" + "github.com/0xsequence/ethkit/go-ethereum/accounts/abi/bind" + "github.com/0xsequence/ethkit/go-ethereum/common" + "github.com/0xsequence/go-sequence/contracts/gen/trailsutils" + v3 "github.com/0xsequence/go-sequence/core/v3" + "github.com/stretchr/testify/require" +) + +const ( + trailsUtils = "0x0000000066c426Fe13962e276f894F11Aa6ebbF2" + baseRPC = "https://nodes.sequence.app/base" + baseChainID = 8453 +) + +func TestComputeImageHash_DifferentSignatures(t *testing.T) { + payload := v3.NewCallsPayload(common.Address{}, big.NewInt(1), []v3.Call{ + {Data: []byte{0x01, 0x02, 0x03, 0x04, 0x05}}, + }, big.NewInt(0), big.NewInt(0)) + + hash1, err := ComputeImageHash(&payload, []byte{}, big.NewInt(1)) + require.NoError(t, err) + + signature := []byte{0x00, 0x00, 0x00, 0x00, 0x03} + hash2, err := ComputeImageHash(&payload, signature, big.NewInt(1)) + require.NoError(t, err) + + require.NotEqual(t, hash1, hash2) +} + +func TestValidateSignature_RepeatMismatch(t *testing.T) { + payload := v3.NewCallsPayload(common.Address{}, big.NewInt(1), []v3.Call{ + {Data: []byte{0x01, 0x02, 0x03}}, + {Data: []byte{0x01, 0xff, 0x03}}, + }, big.NewInt(0), big.NewInt(0)) + + repeat := RepeatSection{TIndex: 0, CIndex: 0, Size: 2, TIndex2: 1, CIndex2: 0} + sig, err := EncodeSignature(nil, []RepeatSection{repeat}) + require.NoError(t, err) + + err = ValidateSignature(&payload, sig) + require.Error(t, err) +} + +func TestComputeImageHash_RecoverSapientSignature(t *testing.T) { + payload := v3.NewCallsPayload(common.Address{}, big.NewInt(baseChainID), []v3.Call{ + { + To: common.HexToAddress("0x1111111111111111111111111111111111111111"), + Value: big.NewInt(0), + Data: []byte{0x01, 0x02}, + GasLimit: big.NewInt(0), + DelegateCall: false, + OnlyFallback: false, + BehaviorOnError: v3.BehaviorOnErrorRevert, + }, + }, big.NewInt(0), big.NewInt(0)) + + signature := []byte{} + expected, err := ComputeImageHash(&payload, signature, big.NewInt(baseChainID)) + require.NoError(t, err) + + provider, err := ethrpc.NewProvider(baseRPC) + require.NoError(t, err) + + contract, err := trailsutils.NewTrailsUtilsCaller(common.HexToAddress(trailsUtils), provider) + require.NoError(t, err) + + callOpts := &bind.CallOpts{Context: context.Background()} + onChainHash, err := contract.RecoverSapientSignature(callOpts, toTrailsUtilsPayload(payload), signature) + require.NoError(t, err) + + require.Equal(t, expected, common.BytesToHash(onChainHash[:])) +} + +func toTrailsUtilsPayload(payload v3.CallsPayload) trailsutils.PayloadDecoded { + calls := make([]trailsutils.PayloadCall, len(payload.Calls)) + for i, call := range payload.Calls { + value := call.Value + if value == nil { + value = big.NewInt(0) + } + gasLimit := call.GasLimit + if gasLimit == nil { + gasLimit = big.NewInt(0) + } + + calls[i] = trailsutils.PayloadCall{ + To: call.To, + Value: value, + Data: call.Data, + GasLimit: gasLimit, + DelegateCall: call.DelegateCall, + OnlyFallback: call.OnlyFallback, + BehaviorOnError: big.NewInt(int64(call.BehaviorOnError)), + } + } + + noChainID := payload.ChainID().Sign() == 0 + + return trailsutils.PayloadDecoded{ + Kind: v3.KindTransactions, + NoChainId: noChainID, + Calls: calls, + Space: payload.Space, + Nonce: payload.Nonce, + Message: []byte{}, + ImageHash: [32]byte{}, + Digest: [32]byte{}, + ParentWallets: []common.Address{}, + } +} diff --git a/lib/sapient/malleable/locators_abi.go b/lib/sapient/malleable/locators_abi.go new file mode 100644 index 00000000..5fa1f8a0 --- /dev/null +++ b/lib/sapient/malleable/locators_abi.go @@ -0,0 +1,72 @@ +package malleable + +import ( + "fmt" + "math/big" + + "github.com/0xsequence/ethkit/go-ethereum/accounts/abi" +) + +func CalldataStaticWord(method abi.Method, argIndex int) (start, length int, err error) { + if argIndex < 0 || argIndex >= len(method.Inputs) { + return 0, 0, fmt.Errorf("argIndex out of range") + } + return 4 + 32*argIndex, 32, nil +} + +// CalldataBytesContent returns the raw bytes/string content (excludes length word and padding). +func CalldataBytesContent(calldata []byte, method abi.Method, argIndex int) (start, length int, err error) { + tailStart, dataLen, err := calldataBytesTail(calldata, method, argIndex) + if err != nil { + return 0, 0, err + } + contentStart := tailStart + 32 + if contentStart+dataLen > len(calldata) { + return 0, 0, fmt.Errorf("calldata too short for bytes content") + } + return contentStart, dataLen, nil +} + +// CalldataBytesEncoded returns the full ABI-encoded tail: length word + data + padding. +func CalldataBytesEncoded(calldata []byte, method abi.Method, argIndex int) (start, length int, err error) { + tailStart, dataLen, err := calldataBytesTail(calldata, method, argIndex) + if err != nil { + return 0, 0, err + } + padded := ((dataLen + 31) / 32) * 32 + total := 32 + padded + if tailStart+total > len(calldata) { + return 0, 0, fmt.Errorf("calldata too short for bytes encoded") + } + return tailStart, total, nil +} + +func calldataBytesTail(calldata []byte, method abi.Method, argIndex int) (tailStart int, dataLen int, err error) { + if argIndex < 0 || argIndex >= len(method.Inputs) { + return 0, 0, fmt.Errorf("argIndex out of range") + } + t := method.Inputs[argIndex].Type + if t.T != abi.BytesTy && t.T != abi.StringTy { + return 0, 0, fmt.Errorf("arg %d is not bytes/string (got %s)", argIndex, t.String()) + } + head := 4 + 32*argIndex + if head+32 > len(calldata) { + return 0, 0, fmt.Errorf("calldata too short for head word") + } + + off := new(big.Int).SetBytes(calldata[head : head+32]) + if !off.IsInt64() { + return 0, 0, fmt.Errorf("dynamic offset too large") + } + tailStart = 4 + int(off.Int64()) + if tailStart+32 > len(calldata) { + return 0, 0, fmt.Errorf("calldata too short for tail length word") + } + + l := new(big.Int).SetBytes(calldata[tailStart : tailStart+32]) + if !l.IsInt64() { + return 0, 0, fmt.Errorf("bytes length too large") + } + dataLen = int(l.Int64()) + return tailStart, dataLen, nil +} diff --git a/lib/sapient/malleable/locators_abi_test.go b/lib/sapient/malleable/locators_abi_test.go new file mode 100644 index 00000000..6b337c0d --- /dev/null +++ b/lib/sapient/malleable/locators_abi_test.go @@ -0,0 +1,72 @@ +package malleable + +import ( + "math/big" + "strings" + "testing" + + "github.com/0xsequence/ethkit/go-ethereum/accounts/abi" + "github.com/0xsequence/ethkit/go-ethereum/common" + "github.com/stretchr/testify/require" +) + +func TestCalldataBytesContent(t *testing.T) { + abiDef := `[{"name":"hydrateExecute","type":"function","inputs":[{"name":"payload","type":"bytes"},{"name":"hydrateData","type":"bytes"}]}]` + parsedABI, err := abi.JSON(strings.NewReader(abiDef)) + require.NoError(t, err) + + payloadBytes := []byte{0x11, 0x22, 0x33, 0x44} + hydrateData := []byte{0xaa} + calldata, err := parsedABI.Pack("hydrateExecute", payloadBytes, hydrateData) + require.NoError(t, err) + + method := parsedABI.Methods["hydrateExecute"] + start, length, err := CalldataBytesContent(calldata, method, 0) + require.NoError(t, err) + require.Equal(t, payloadBytes, calldata[start:start+length]) +} + +func TestCalldataBytesEncoded(t *testing.T) { + abiDef := `[{"name":"hydrateExecute","type":"function","inputs":[{"name":"payload","type":"bytes"},{"name":"hydrateData","type":"bytes"}]}]` + parsedABI, err := abi.JSON(strings.NewReader(abiDef)) + require.NoError(t, err) + + payloadBytes := []byte{0x11, 0x22, 0x33, 0x44} + hydrateData := []byte{0xaa} + calldata, err := parsedABI.Pack("hydrateExecute", payloadBytes, hydrateData) + require.NoError(t, err) + + lengthWord := common.BigToHash(big.NewInt(int64(len(payloadBytes)))).Bytes() + paddedLen := ((len(payloadBytes) + 31) / 32) * 32 + padding := make([]byte, paddedLen-len(payloadBytes)) + encodedPayloadBytes := append(append(lengthWord, payloadBytes...), padding...) + + method := parsedABI.Methods["hydrateExecute"] + start, length, err := CalldataBytesEncoded(calldata, method, 0) + require.NoError(t, err) + require.Equal(t, encodedPayloadBytes, calldata[start:start+length]) +} + +func TestCalldataStaticWord(t *testing.T) { + abiDef := `[{"name":"permit","type":"function","inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"},{"name":"value","type":"uint256"},{"name":"deadline","type":"uint256"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}]}]` + parsedABI, err := abi.JSON(strings.NewReader(abiDef)) + require.NoError(t, err) + + calldata, err := parsedABI.Pack( + "permit", + common.HexToAddress("0x1111111111111111111111111111111111111111"), + common.HexToAddress("0x2222222222222222222222222222222222222222"), + big.NewInt(123), + big.NewInt(456), + uint8(27), + common.HexToHash("0x01"), + common.HexToHash("0x02"), + ) + require.NoError(t, err) + + method := parsedABI.Methods["permit"] + start, length, err := CalldataStaticWord(method, 2) + require.NoError(t, err) + require.Equal(t, 32, length) + require.Equal(t, calldata[4+32*2:4+32*3], calldata[start:start+length]) +} diff --git a/lib/sapient/malleable/locators_packedcalls.go b/lib/sapient/malleable/locators_packedcalls.go new file mode 100644 index 00000000..a8d55f19 --- /dev/null +++ b/lib/sapient/malleable/locators_packedcalls.go @@ -0,0 +1,108 @@ +package malleable + +import ( + "encoding/binary" + "fmt" +) + +type PackedCallsLayout struct { + GlobalFlag byte + NumCalls int + CallData []Span +} + +// ParsePackedCalls parses the packed calls layout from the packed payload.calls data. +func ParsePackedCalls(packed []byte) (*PackedCallsLayout, error) { + if len(packed) < 1 { + return nil, fmt.Errorf("packed calls too short") + } + p := 0 + globalFlag := packed[p] + p++ + + if globalFlag&0x01 == 0x00 { + if p+20 > len(packed) { + return nil, fmt.Errorf("packed calls truncated reading space") + } + p += 20 + } + + nonceSize := int((globalFlag >> 1) & 0x07) + if nonceSize > 0 { + if p+nonceSize > len(packed) { + return nil, fmt.Errorf("packed calls truncated reading nonce (%d bytes)", nonceSize) + } + p += nonceSize + } + + var numCalls int + if globalFlag&0x10 == 0x10 { + numCalls = 1 + } else { + if globalFlag&0x20 == 0x20 { + if p+2 > len(packed) { + return nil, fmt.Errorf("packed calls truncated reading numCalls (u16)") + } + numCalls = int(binary.BigEndian.Uint16(packed[p : p+2])) + p += 2 + } else { + if p+1 > len(packed) { + return nil, fmt.Errorf("packed calls truncated reading numCalls (u8)") + } + numCalls = int(packed[p]) + p++ + } + } + + callData := make([]Span, numCalls) + for i := 0; i < numCalls; i++ { + if p+1 > len(packed) { + return nil, fmt.Errorf("packed calls truncated reading call flags (i=%d)", i) + } + flags := packed[p] + p++ + + if flags&0x01 == 0x00 { + if p+20 > len(packed) { + return nil, fmt.Errorf("packed calls truncated reading to (i=%d)", i) + } + p += 20 + } + + if flags&0x02 == 0x02 { + if p+32 > len(packed) { + return nil, fmt.Errorf("packed calls truncated reading value (i=%d)", i) + } + p += 32 + } + + if flags&0x04 == 0x04 { + if p+3 > len(packed) { + return nil, fmt.Errorf("packed calls truncated reading calldataSize (i=%d)", i) + } + calldataSize := int(packed[p])<<16 | int(packed[p+1])<<8 | int(packed[p+2]) + p += 3 + + if p+calldataSize > len(packed) { + return nil, fmt.Errorf("packed calls truncated reading calldata bytes (i=%d size=%d)", i, calldataSize) + } + callData[i] = Span{Start: p, Len: calldataSize} + p += calldataSize + } else { + callData[i] = Span{Start: -1, Len: 0} + } + + if flags&0x08 == 0x08 { + if p+32 > len(packed) { + return nil, fmt.Errorf("packed calls truncated reading gasLimit (i=%d)", i) + } + p += 32 + } + } + + return &PackedCallsLayout{ + GlobalFlag: globalFlag, + NumCalls: numCalls, + CallData: callData, + }, nil +} diff --git a/lib/sapient/malleable/locators_packedcalls_test.go b/lib/sapient/malleable/locators_packedcalls_test.go new file mode 100644 index 00000000..db819396 --- /dev/null +++ b/lib/sapient/malleable/locators_packedcalls_test.go @@ -0,0 +1,119 @@ +package malleable + +import ( + "math/big" + "testing" + + "github.com/0xsequence/ethkit/go-ethereum/common" + v3 "github.com/0xsequence/go-sequence/core/v3" + "github.com/stretchr/testify/require" +) + +func TestParsePackedCalls_SingleCallWithData(t *testing.T) { + encodeAddr := common.HexToAddress("0x1111111111111111111111111111111111111111") + callData := []byte{0x01, 0x02, 0x03, 0x04} + payload := v3.NewCallsPayload(encodeAddr, big.NewInt(1), []v3.Call{ + { + To: common.HexToAddress("0x2222222222222222222222222222222222222222"), + Value: big.NewInt(5), + Data: callData, + GasLimit: big.NewInt(7), + }, + }, big.NewInt(0), big.NewInt(0)) + + packed := payload.Encode(encodeAddr) + layout, err := ParsePackedCalls(packed) + require.NoError(t, err) + require.Equal(t, 1, layout.NumCalls) + require.Equal(t, 1, len(layout.CallData)) + + span := layout.CallData[0] + require.True(t, span.Start >= 0) + require.Equal(t, callData, packed[span.Start:span.Start+span.Len]) +} + +func TestParsePackedCalls_MultipleCalls_MixedData(t *testing.T) { + encodeAddr := common.HexToAddress("0x3333333333333333333333333333333333333333") + payload := v3.NewCallsPayload(encodeAddr, big.NewInt(1), []v3.Call{ + { + To: common.HexToAddress("0x4444444444444444444444444444444444444444"), + Data: []byte{0xaa, 0xbb}, + }, + { + To: common.HexToAddress("0x5555555555555555555555555555555555555555"), + Data: nil, + }, + }, big.NewInt(0), big.NewInt(1)) + + packed := payload.Encode(encodeAddr) + layout, err := ParsePackedCalls(packed) + require.NoError(t, err) + require.Equal(t, 2, layout.NumCalls) + + span0 := layout.CallData[0] + require.True(t, span0.Start >= 0) + require.Equal(t, []byte{0xaa, 0xbb}, packed[span0.Start:span0.Start+span0.Len]) + + span1 := layout.CallData[1] + require.Equal(t, -1, span1.Start) + require.Equal(t, 0, span1.Len) +} + +func TestParsePackedCalls_TruncatedPacked(t *testing.T) { + encodeAddr := common.HexToAddress("0x6666666666666666666666666666666666666666") + payload := v3.NewCallsPayload(encodeAddr, big.NewInt(1), []v3.Call{ + { + To: common.HexToAddress("0x7777777777777777777777777777777777777777"), + Data: []byte{0xaa, 0xbb, 0xcc}, + }, + }, big.NewInt(0), big.NewInt(0)) + + packed := payload.Encode(encodeAddr) + truncated := packed[:len(packed)-1] + _, err := ParsePackedCalls(truncated) + if err != nil { + t.Logf("parse error: %v", err) + } + require.Error(t, err) +} + +func TestParsePackedCalls_LargeCallCount(t *testing.T) { + encodeAddr := common.HexToAddress("0x8888888888888888888888888888888888888888") + const callCount = 300 + calls := make([]v3.Call, callCount) + for i := 0; i < callCount; i++ { + calls[i] = v3.Call{ + To: common.HexToAddress("0x9999999999999999999999999999999999999999"), + } + } + payload := v3.NewCallsPayload(encodeAddr, big.NewInt(1), calls, big.NewInt(0), big.NewInt(0)) + + packed := payload.Encode(encodeAddr) + layout, err := ParsePackedCalls(packed) + require.NoError(t, err) + require.Equal(t, callCount, layout.NumCalls) + require.Len(t, layout.CallData, callCount) + for _, span := range layout.CallData { + require.Equal(t, -1, span.Start) + require.Equal(t, 0, span.Len) + } +} + +func TestParsePackedCalls_WithNonceAndSpace(t *testing.T) { + encodeAddr := common.HexToAddress("0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") + callData := []byte{0x01} + payload := v3.NewCallsPayload(encodeAddr, big.NewInt(1), []v3.Call{ + { + To: common.HexToAddress("0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"), + Data: callData, + }, + }, big.NewInt(0x1234), big.NewInt(0x42)) + + packed := payload.Encode(encodeAddr) + layout, err := ParsePackedCalls(packed) + require.NoError(t, err) + require.Equal(t, 1, layout.NumCalls) + span := layout.CallData[0] + require.True(t, span.Start >= 0) + require.Equal(t, callData, packed[span.Start:span.Start+span.Len]) +} diff --git a/lib/sapient/malleable/path.go b/lib/sapient/malleable/path.go new file mode 100644 index 00000000..c4afeb3a --- /dev/null +++ b/lib/sapient/malleable/path.go @@ -0,0 +1,450 @@ +package malleable + +import ( + "fmt" + "strings" + + "github.com/0xsequence/ethkit/go-ethereum/accounts/abi" + v3 "github.com/0xsequence/go-sequence/core/v3" +) + +type Selector interface { + Resolve(payload *v3.CallsPayload) ([]ByteRange, error) + String() string +} + +type Path struct { + steps []pathStep + desc []string +} + +func NewPath() *Path { + return &Path{} +} + +func (p *Path) CallData(i int) *Path { + p.steps = append(p.steps, callDataStep{index: i}) + p.desc = append(p.desc, fmt.Sprintf("callData(%d)", i)) + return p +} + +func (p *Path) Slice(offset uint32, size uint32) *Path { + p.steps = append(p.steps, sliceStep{offset: int(offset), size: int(size)}) + p.desc = append(p.desc, fmt.Sprintf("slice(%d,%d)", offset, size)) + return p +} + +func (p *Path) ABI(contractABI *abi.ABI, method string) *Path { + p.steps = append(p.steps, abiStep{contractABI: contractABI, method: method}) + p.desc = append(p.desc, fmt.Sprintf("abi(%s)", method)) + return p +} + +func (p *Path) ArgSlot(argName string) *Path { + p.steps = append(p.steps, argSlotStep{name: argName}) + p.desc = append(p.desc, fmt.Sprintf("argSlot(%s)", argName)) + return p +} + +func (p *Path) ArgSlotIndex(argIndex int) *Path { + p.steps = append(p.steps, argSlotIndexStep{index: argIndex}) + p.desc = append(p.desc, fmt.Sprintf("argSlotIndex(%d)", argIndex)) + return p +} + +func (p *Path) ArgBytesData(argName string) *Path { + p.steps = append(p.steps, argBytesDataStep{name: argName}) + p.desc = append(p.desc, fmt.Sprintf("argBytesData(%s)", argName)) + return p +} + +func (p *Path) ArgBytesDataIndex(argIndex int) *Path { + p.steps = append(p.steps, argBytesDataIndexStep{index: argIndex}) + p.desc = append(p.desc, fmt.Sprintf("argBytesDataIndex(%d)", argIndex)) + return p +} + +func (p *Path) ArgBytesEncoded(argName string) *Path { + p.steps = append(p.steps, argBytesEncodedStep{name: argName}) + p.desc = append(p.desc, fmt.Sprintf("argBytesEncoded(%s)", argName)) + return p +} + +func (p *Path) EncodedCallsPayload() *Path { + p.steps = append(p.steps, encodedCallsPayloadStep{}) + p.desc = append(p.desc, "encodedCallsPayload()") + return p +} + +func (p *Path) EncodedCallData(i int) *Path { + p.steps = append(p.steps, encodedCallDataStep{index: i}) + p.desc = append(p.desc, fmt.Sprintf("encodedCallData(%d)", i)) + return p +} + +func (p *Path) AsSelector() Selector { + return p +} + +func (p *Path) Resolve(payload *v3.CallsPayload) ([]ByteRange, error) { + state := pathState{} + for _, step := range p.steps { + if err := step.apply(payload, &state); err != nil { + return nil, err + } + } + if len(state.ranges) == 0 { + return nil, fmt.Errorf("path resolved to empty ranges") + } + return state.ranges, nil +} + +func (p *Path) String() string { + if len(p.desc) == 0 { + return "path()" + } + return "path(" + strings.Join(p.desc, " -> ") + ")" +} + +type pathState struct { + ranges []ByteRange + method *abi.Method +} + +type pathStep interface { + apply(payload *v3.CallsPayload, state *pathState) error +} + +type callDataStep struct { + index int +} + +func (s callDataStep) apply(payload *v3.CallsPayload, state *pathState) error { + if payload == nil { + return fmt.Errorf("payload is nil") + } + if s.index < 0 || s.index >= len(payload.Calls) { + return fmt.Errorf("call index out of range: %d", s.index) + } + state.ranges = []ByteRange{{ + CallIndex: s.index, + Offset: 0, + Size: len(payload.Calls[s.index].Data), + }} + state.method = nil + return nil +} + +type sliceStep struct { + offset int + size int +} + +func (s sliceStep) apply(payload *v3.CallsPayload, state *pathState) error { + if len(state.ranges) == 0 { + return fmt.Errorf("slice step has no active ranges") + } + var out []ByteRange + for _, r := range state.ranges { + if s.offset < 0 || s.size < 0 || s.offset+s.size > r.Size { + return fmt.Errorf("slice out of bounds: [%d,%d) within %d", s.offset, s.offset+s.size, r.Size) + } + out = append(out, ByteRange{ + CallIndex: r.CallIndex, + Offset: r.Offset + s.offset, + Size: s.size, + }) + } + state.ranges = out + return nil +} + +type abiStep struct { + contractABI *abi.ABI + method string +} + +func (s abiStep) apply(payload *v3.CallsPayload, state *pathState) error { + if s.contractABI == nil { + return fmt.Errorf("abi step missing contract ABI") + } + method, ok := s.contractABI.Methods[s.method] + if !ok { + return fmt.Errorf("method not found: %s", s.method) + } + if len(state.ranges) == 0 { + return fmt.Errorf("abi step has no active ranges") + } + for _, r := range state.ranges { + if r.Size < 4 { + return fmt.Errorf("calldata too short for selector") + } + data, err := r.Slice(payload) + if err != nil { + return err + } + if len(data) < 4 { + return fmt.Errorf("calldata too short for selector") + } + if !bytesEqual(data[:4], method.ID) { + return fmt.Errorf("calldata selector mismatch for %s", s.method) + } + } + state.method = &method + return nil +} + +type argSlotStep struct { + name string +} + +func (s argSlotStep) apply(payload *v3.CallsPayload, state *pathState) error { + if state.method == nil { + return fmt.Errorf("argSlot step requires ABI context") + } + argIndex, err := argIndexByName(*state.method, s.name) + if err != nil { + return err + } + argType := state.method.Inputs[argIndex].Type + if isDynamicType(argType) { + return fmt.Errorf("arg %s is dynamic (%s)", s.name, argType.String()) + } + var out []ByteRange + for _, r := range state.ranges { + start := r.Offset + 4 + 32*argIndex + if start+32 > r.Offset+r.Size { + return fmt.Errorf("arg slot out of bounds for %s", s.name) + } + out = append(out, ByteRange{ + CallIndex: r.CallIndex, + Offset: start, + Size: 32, + }) + } + state.ranges = out + return nil +} + +type argSlotIndexStep struct { + index int +} + +func (s argSlotIndexStep) apply(payload *v3.CallsPayload, state *pathState) error { + if state.method == nil { + return fmt.Errorf("argSlotIndex step requires ABI context") + } + argIndex := s.index + if argIndex < 0 || argIndex >= len(state.method.Inputs) { + return fmt.Errorf("arg index out of range: %d", argIndex) + } + argType := state.method.Inputs[argIndex].Type + if isDynamicType(argType) { + return fmt.Errorf("arg %d is dynamic (%s)", argIndex, argType.String()) + } + var out []ByteRange + for _, r := range state.ranges { + start := r.Offset + 4 + 32*argIndex + if start+32 > r.Offset+r.Size { + return fmt.Errorf("arg slot out of bounds for %d", argIndex) + } + out = append(out, ByteRange{ + CallIndex: r.CallIndex, + Offset: start, + Size: 32, + }) + } + state.ranges = out + return nil +} + +type argBytesDataStep struct { + name string +} + +func (s argBytesDataStep) apply(payload *v3.CallsPayload, state *pathState) error { + if state.method == nil { + return fmt.Errorf("argBytesData step requires ABI context") + } + argIndex, err := argIndexByName(*state.method, s.name) + if err != nil { + return err + } + argType := state.method.Inputs[argIndex].Type + if argType.T != abi.BytesTy && argType.T != abi.StringTy { + return fmt.Errorf("arg %s is not bytes/string (%s)", s.name, argType.String()) + } + var out []ByteRange + for _, r := range state.ranges { + data, err := r.Slice(payload) + if err != nil { + return err + } + start, length, err := CalldataBytesContent(data, *state.method, argIndex) + if err != nil { + return err + } + out = append(out, ByteRange{ + CallIndex: r.CallIndex, + Offset: r.Offset + start, + Size: length, + }) + } + state.ranges = out + return nil +} + +type argBytesDataIndexStep struct { + index int +} + +func (s argBytesDataIndexStep) apply(payload *v3.CallsPayload, state *pathState) error { + if state.method == nil { + return fmt.Errorf("argBytesDataIndex step requires ABI context") + } + argIndex := s.index + if argIndex < 0 || argIndex >= len(state.method.Inputs) { + return fmt.Errorf("arg index out of range: %d", argIndex) + } + argType := state.method.Inputs[argIndex].Type + if argType.T != abi.BytesTy && argType.T != abi.StringTy { + return fmt.Errorf("arg %d is not bytes/string (%s)", argIndex, argType.String()) + } + var out []ByteRange + for _, r := range state.ranges { + data, err := r.Slice(payload) + if err != nil { + return err + } + start, length, err := CalldataBytesContent(data, *state.method, argIndex) + if err != nil { + return err + } + out = append(out, ByteRange{ + CallIndex: r.CallIndex, + Offset: r.Offset + start, + Size: length, + }) + } + state.ranges = out + return nil +} + +type argBytesEncodedStep struct { + name string +} + +func (s argBytesEncodedStep) apply(payload *v3.CallsPayload, state *pathState) error { + if state.method == nil { + return fmt.Errorf("argBytesEncoded step requires ABI context") + } + argIndex, err := argIndexByName(*state.method, s.name) + if err != nil { + return err + } + argType := state.method.Inputs[argIndex].Type + if argType.T != abi.BytesTy && argType.T != abi.StringTy { + return fmt.Errorf("arg %s is not bytes/string (%s)", s.name, argType.String()) + } + var out []ByteRange + for _, r := range state.ranges { + data, err := r.Slice(payload) + if err != nil { + return err + } + start, length, err := CalldataBytesEncoded(data, *state.method, argIndex) + if err != nil { + return err + } + out = append(out, ByteRange{ + CallIndex: r.CallIndex, + Offset: r.Offset + start, + Size: length, + }) + } + state.ranges = out + return nil +} + +type encodedCallsPayloadStep struct{} + +func (s encodedCallsPayloadStep) apply(payload *v3.CallsPayload, state *pathState) error { + if len(state.ranges) == 0 { + return fmt.Errorf("encodedCallsPayload step has no active ranges") + } + return nil +} + +type encodedCallDataStep struct { + index int +} + +func (s encodedCallDataStep) apply(payload *v3.CallsPayload, state *pathState) error { + if len(state.ranges) == 0 { + return fmt.Errorf("encodedCallData step has no active ranges") + } + var out []ByteRange + for _, r := range state.ranges { + data, err := r.Slice(payload) + if err != nil { + return err + } + layout, err := ParsePackedCalls(data) + if err != nil { + return err + } + if s.index < 0 || s.index >= layout.NumCalls { + return fmt.Errorf("packed call index out of range: %d", s.index) + } + span := layout.CallData[s.index] + if span.Start < 0 || span.Len == 0 { + return fmt.Errorf("packed call %d has no calldata", s.index) + } + out = append(out, ByteRange{ + CallIndex: r.CallIndex, + Offset: r.Offset + span.Start, + Size: span.Len, + }) + } + state.ranges = out + return nil +} + +func argIndexByName(method abi.Method, name string) (int, error) { + for i, input := range method.Inputs { + if input.Name == name { + return i, nil + } + } + return -1, fmt.Errorf("arg not found: %s", name) +} + +func isDynamicType(t abi.Type) bool { + switch t.T { + case abi.BytesTy, abi.StringTy, abi.SliceTy: + return true + case abi.ArrayTy: + return t.Size == 0 || isDynamicType(*t.Elem) + case abi.TupleTy: + for _, elem := range t.TupleElems { + if isDynamicType(*elem) { + return true + } + } + return false + default: + return false + } +} + +func bytesEqual(a, b []byte) bool { + if len(a) != len(b) { + return false + } + for i := range a { + if a[i] != b[i] { + return false + } + } + return true +} diff --git a/lib/sapient/malleable/path_test.go b/lib/sapient/malleable/path_test.go new file mode 100644 index 00000000..19f849e3 --- /dev/null +++ b/lib/sapient/malleable/path_test.go @@ -0,0 +1,265 @@ +package malleable + +import ( + "math/big" + "strings" + "testing" + + "github.com/0xsequence/ethkit/go-ethereum/accounts/abi" + "github.com/0xsequence/ethkit/go-ethereum/common" + v3 "github.com/0xsequence/go-sequence/core/v3" + "github.com/stretchr/testify/require" +) + +func TestPath_ResolveNestedPackedCalls(t *testing.T) { + trailsABIJSON := `[{"name":"hydrateExecute","type":"function","inputs":[{"name":"payload","type":"bytes"},{"name":"hydrateData","type":"bytes"}]}]` + erc2612ABIJSON := `[{"name":"permit","type":"function","inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"},{"name":"value","type":"uint256"},{"name":"deadline","type":"uint256"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}]}]` + erc20ABIJSON := `[{"name":"transferFrom","type":"function","inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}]}]` + + trailsABI, err := abi.JSON(strings.NewReader(trailsABIJSON)) + require.NoError(t, err) + erc2612ABI, err := abi.JSON(strings.NewReader(erc2612ABIJSON)) + require.NoError(t, err) + erc20ABI, err := abi.JSON(strings.NewReader(erc20ABIJSON)) + require.NoError(t, err) + + permitCalldata, err := erc2612ABI.Pack( + "permit", + common.HexToAddress("0x1111111111111111111111111111111111111111"), + common.HexToAddress("0x2222222222222222222222222222222222222222"), + big.NewInt(7), + big.NewInt(8), + uint8(27), + common.HexToHash("0x01"), + common.HexToHash("0x02"), + ) + require.NoError(t, err) + + transferCalldata, err := erc20ABI.Pack( + "transferFrom", + common.HexToAddress("0x3333333333333333333333333333333333333333"), + common.HexToAddress("0x4444444444444444444444444444444444444444"), + big.NewInt(7), + ) + require.NoError(t, err) + + encodeAddr := common.HexToAddress("0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") + innerPayload := v3.NewCallsPayload(encodeAddr, big.NewInt(1), []v3.Call{ + {To: common.HexToAddress("0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"), Data: permitCalldata}, + {To: common.HexToAddress("0xcccccccccccccccccccccccccccccccccccccccc"), Data: transferCalldata}, + }, big.NewInt(0), big.NewInt(0)) + + packed := innerPayload.Encode(encodeAddr) + hydrateData := []byte{0x55} + outerCallData, err := trailsABI.Pack("hydrateExecute", packed, hydrateData) + require.NoError(t, err) + + payload := v3.NewCallsPayload(common.Address{}, big.NewInt(1), []v3.Call{ + {To: common.HexToAddress("0xdddddddddddddddddddddddddddddddddddddddd"), Data: outerCallData}, + }, big.NewInt(0), big.NewInt(0)) + + permitValueSel := NewPath(). + CallData(0). + ABI(&trailsABI, "hydrateExecute"). + ArgBytesData("payload"). + EncodedCallsPayload(). + EncodedCallData(0). + ABI(&erc2612ABI, "permit"). + ArgSlot("value"). + AsSelector() + t.Logf("permitValueSel: %s", permitValueSel.String()) + + transferValueSel := NewPath(). + CallData(0). + ABI(&trailsABI, "hydrateExecute"). + ArgBytesData("payload"). + EncodedCallsPayload(). + EncodedCallData(1). + ABI(&erc20ABI, "transferFrom"). + ArgSlot("value"). + AsSelector() + t.Logf("transferValueSel: %s", transferValueSel.String()) + + permitRanges, err := permitValueSel.Resolve(&payload) + require.NoError(t, err) + require.Len(t, permitRanges, 1) + + transferRanges, err := transferValueSel.Resolve(&payload) + require.NoError(t, err) + require.Len(t, transferRanges, 1) + + permitSlice, err := permitRanges[0].Slice(&payload) + require.NoError(t, err) + transferSlice, err := transferRanges[0].Slice(&payload) + require.NoError(t, err) + + require.Equal(t, permitCalldata[4+32*2:4+32*3], permitSlice) + require.Equal(t, transferCalldata[4+32*2:4+32*3], transferSlice) +} + +func TestPath_ResolveDirectTransferFromValue(t *testing.T) { + erc20ABIJSON := `[{"name":"transferFrom","type":"function","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}]}]` + erc20ABI, err := abi.JSON(strings.NewReader(erc20ABIJSON)) + require.NoError(t, err) + + transferCalldata, err := erc20ABI.Pack( + "transferFrom", + common.HexToAddress("0x3333333333333333333333333333333333333333"), + common.HexToAddress("0x4444444444444444444444444444444444444444"), + big.NewInt(7), + ) + require.NoError(t, err) + + payload := v3.NewCallsPayload(common.Address{}, big.NewInt(1), []v3.Call{ + {To: common.HexToAddress("0x5555555555555555555555555555555555555555"), Data: transferCalldata}, + }, big.NewInt(0), big.NewInt(0)) + + valueSel := NewPath(). + CallData(0). + ABI(&erc20ABI, "transferFrom"). + ArgSlot("_value"). + AsSelector() + t.Logf("valueSel: %s", valueSel.String()) + + ranges, err := valueSel.Resolve(&payload) + require.NoError(t, err) + require.Len(t, ranges, 1) + + valueSlice, err := ranges[0].Slice(&payload) + require.NoError(t, err) + require.Equal(t, transferCalldata[4+32*2:4+32*3], valueSlice) +} + +func TestPath_ResolveDirectTransferFromValueByIndex(t *testing.T) { + erc20ABIJSON := `[{"name":"transferFrom","type":"function","inputs":[{"name":"","type":"address"},{"name":"","type":"address"},{"name":"","type":"uint256"}]}]` + erc20ABI, err := abi.JSON(strings.NewReader(erc20ABIJSON)) + require.NoError(t, err) + + transferCalldata, err := erc20ABI.Pack( + "transferFrom", + common.HexToAddress("0x3333333333333333333333333333333333333333"), + common.HexToAddress("0x4444444444444444444444444444444444444444"), + big.NewInt(7), + ) + require.NoError(t, err) + + payload := v3.NewCallsPayload(common.Address{}, big.NewInt(1), []v3.Call{ + {To: common.HexToAddress("0x5555555555555555555555555555555555555555"), Data: transferCalldata}, + }, big.NewInt(0), big.NewInt(0)) + + valueSel := NewPath(). + CallData(0). + ABI(&erc20ABI, "transferFrom"). + ArgSlotIndex(2). + AsSelector() + t.Logf("valueSelByIndex: %s", valueSel.String()) + + ranges, err := valueSel.Resolve(&payload) + require.NoError(t, err) + require.Len(t, ranges, 1) + + valueSlice, err := ranges[0].Slice(&payload) + require.NoError(t, err) + require.Equal(t, transferCalldata[4+32*2:4+32*3], valueSlice) +} + +func TestPath_ResolveFailsWithSelectorMismatch(t *testing.T) { + erc20ABIJSON := `[{"name":"transferFrom","type":"function","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}]}]` + erc20ABI, err := abi.JSON(strings.NewReader(erc20ABIJSON)) + require.NoError(t, err) + + approveABIJSON := `[{"name":"approve","type":"function","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}]}]` + approveABI, err := abi.JSON(strings.NewReader(approveABIJSON)) + require.NoError(t, err) + + approveCalldata, err := approveABI.Pack( + "approve", + common.HexToAddress("0x3333333333333333333333333333333333333333"), + big.NewInt(7), + ) + require.NoError(t, err) + + payload := v3.NewCallsPayload(common.Address{}, big.NewInt(1), []v3.Call{ + {To: common.HexToAddress("0x5555555555555555555555555555555555555555"), Data: approveCalldata}, + }, big.NewInt(0), big.NewInt(0)) + + valueSel := NewPath(). + CallData(0). + ABI(&erc20ABI, "transferFrom"). + ArgSlot("_value"). + AsSelector() + t.Logf("mismatchedSelector: %s", valueSel.String()) + + _, err = valueSel.Resolve(&payload) + if err != nil { + t.Logf("resolve error: %v", err) + } + require.Error(t, err) +} + +func TestPath_ResolveFailsWithOutOfRangeCallIndex(t *testing.T) { + erc20ABIJSON := `[{"name":"transferFrom","type":"function","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}]}]` + erc20ABI, err := abi.JSON(strings.NewReader(erc20ABIJSON)) + require.NoError(t, err) + + transferCalldata, err := erc20ABI.Pack( + "transferFrom", + common.HexToAddress("0x3333333333333333333333333333333333333333"), + common.HexToAddress("0x4444444444444444444444444444444444444444"), + big.NewInt(7), + ) + require.NoError(t, err) + + payload := v3.NewCallsPayload(common.Address{}, big.NewInt(1), []v3.Call{ + {To: common.HexToAddress("0x5555555555555555555555555555555555555555"), Data: transferCalldata}, + }, big.NewInt(0), big.NewInt(0)) + + valueSel := NewPath(). + CallData(1). + ABI(&erc20ABI, "transferFrom"). + ArgSlot("_value"). + AsSelector() + t.Logf("outOfRangeCallIndex: %s", valueSel.String()) + + _, err = valueSel.Resolve(&payload) + if err != nil { + t.Logf("resolve error: %v", err) + } + require.Error(t, err) +} + +func TestPath_ResolveFailsWithInvalidEncodedCallsPayload(t *testing.T) { + trailsABIJSON := `[{"name":"hydrateExecute","type":"function","inputs":[{"name":"payload","type":"bytes"},{"name":"hydrateData","type":"bytes"}]}]` + trailsABI, err := abi.JSON(strings.NewReader(trailsABIJSON)) + require.NoError(t, err) + + erc20ABIJSON := `[{"name":"transferFrom","type":"function","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}]}]` + erc20ABI, err := abi.JSON(strings.NewReader(erc20ABIJSON)) + require.NoError(t, err) + + invalidPacked := []byte{} + hydrateData := []byte{0x55} + outerCallData, err := trailsABI.Pack("hydrateExecute", invalidPacked, hydrateData) + require.NoError(t, err) + + payload := v3.NewCallsPayload(common.Address{}, big.NewInt(1), []v3.Call{ + {To: common.HexToAddress("0xdddddddddddddddddddddddddddddddddddddddd"), Data: outerCallData}, + }, big.NewInt(0), big.NewInt(0)) + + valueSel := NewPath(). + CallData(0). + ABI(&trailsABI, "hydrateExecute"). + ArgBytesData("payload"). + EncodedCallsPayload(). + EncodedCallData(0). + ABI(&erc20ABI, "transferFrom"). + ArgSlot("_value"). + AsSelector() + t.Logf("invalidEncodedCallsPayload: %s", valueSel.String()) + + _, err = valueSel.Resolve(&payload) + if err != nil { + t.Logf("resolve error: %v", err) + } + require.Error(t, err) +} diff --git a/lib/sapient/malleable/signature.go b/lib/sapient/malleable/signature.go new file mode 100644 index 00000000..7a6f6da9 --- /dev/null +++ b/lib/sapient/malleable/signature.go @@ -0,0 +1,102 @@ +package malleable + +import ( + "bytes" + "encoding/binary" + "fmt" +) + +type SectionKind uint8 + +const ( + SectionStatic SectionKind = iota + SectionRepeat +) + +type Section interface { + Kind() SectionKind +} + +type StaticSection struct { + TIndex uint8 + CIndex uint16 + Size uint16 +} + +func (s StaticSection) Kind() SectionKind { return SectionStatic } + +type RepeatSection struct { + TIndex uint8 + CIndex uint16 + Size uint16 + TIndex2 uint8 + CIndex2 uint16 +} + +func (s RepeatSection) Kind() SectionKind { return SectionRepeat } + +func EncodeSignature(statics []StaticSection, repeats []RepeatSection) ([]byte, error) { + var out bytes.Buffer + + for _, s := range statics { + if s.TIndex > 0x7F { + return nil, fmt.Errorf("tindex out of range: %d", s.TIndex) + } + out.WriteByte(byte(s.TIndex & 0x7F)) + _ = binary.Write(&out, binary.BigEndian, s.CIndex) + _ = binary.Write(&out, binary.BigEndian, s.Size) + } + + for _, r := range repeats { + if r.TIndex > 0x7F { + return nil, fmt.Errorf("tindex out of range: %d", r.TIndex) + } + out.WriteByte(byte(r.TIndex&0x7F) | 0x80) + _ = binary.Write(&out, binary.BigEndian, r.CIndex) + _ = binary.Write(&out, binary.BigEndian, r.Size) + out.WriteByte(r.TIndex2) + _ = binary.Write(&out, binary.BigEndian, r.CIndex2) + } + + return out.Bytes(), nil +} + +func DecodeSignature(sig []byte) ([]Section, error) { + var sections []Section + i := 0 + for i < len(sig) { + if i+5 > len(sig) { + return nil, fmt.Errorf("signature truncated at %d", i) + } + tRaw := sig[i] + i++ + cindex := binary.BigEndian.Uint16(sig[i : i+2]) + i += 2 + size := binary.BigEndian.Uint16(sig[i : i+2]) + i += 2 + + if tRaw&0x80 != 0 { + if i+3 > len(sig) { + return nil, fmt.Errorf("repeat truncated at %d", i) + } + t2 := sig[i] + i++ + c2 := binary.BigEndian.Uint16(sig[i : i+2]) + i += 2 + sections = append(sections, RepeatSection{ + TIndex: tRaw & 0x7F, + CIndex: cindex, + Size: size, + TIndex2: t2, + CIndex2: c2, + }) + } else { + sections = append(sections, StaticSection{ + TIndex: tRaw & 0x7F, + CIndex: cindex, + Size: size, + }) + } + } + return sections, nil +} diff --git a/lib/sapient/malleable/spans.go b/lib/sapient/malleable/spans.go new file mode 100644 index 00000000..2446b529 --- /dev/null +++ b/lib/sapient/malleable/spans.go @@ -0,0 +1,57 @@ +package malleable + +import ( + "fmt" + + v3 "github.com/0xsequence/go-sequence/core/v3" +) + +type Span struct { + Start int + Len int +} + +type ByteRange struct { + CallIndex int + Offset int + Size int +} + +func (r ByteRange) Slice(payload *v3.CallsPayload) ([]byte, error) { + if payload == nil { + return nil, fmt.Errorf("payload is nil") + } + if r.CallIndex < 0 || r.CallIndex >= len(payload.Calls) { + return nil, fmt.Errorf("call index out of range: %d", r.CallIndex) + } + data := payload.Calls[r.CallIndex].Data + if r.Offset < 0 || r.Size < 0 || r.Offset+r.Size > len(data) { + return nil, fmt.Errorf("range out of bounds: [%d,%d) with len %d", r.Offset, r.Offset+r.Size, len(data)) + } + return data[r.Offset : r.Offset+r.Size], nil +} + +type RangeSelector struct { + Range ByteRange +} + +func NewRangeSelector(callIndex, offset, size int) RangeSelector { + return RangeSelector{ + Range: ByteRange{ + CallIndex: callIndex, + Offset: offset, + Size: size, + }, + } +} + +func (r RangeSelector) Resolve(payload *v3.CallsPayload) ([]ByteRange, error) { + if _, err := r.Range.Slice(payload); err != nil { + return nil, err + } + return []ByteRange{r.Range}, nil +} + +func (r RangeSelector) String() string { + return fmt.Sprintf("range(call=%d,offset=%d,size=%d)", r.Range.CallIndex, r.Range.Offset, r.Range.Size) +} diff --git a/lib/waas/intent.gen.go b/lib/waas/intent.gen.go index fb05baab..3d5ddab8 100644 --- a/lib/waas/intent.gen.go +++ b/lib/waas/intent.gen.go @@ -1,6 +1,6 @@ // sequence-waas-intents v0.1.0 7d401e1a69093dd5519b7a02f14de0c1380595e0 // -- -// Code generated by webrpc-gen@v0.24.0 with golang generator. DO NOT EDIT. +// Code generated by webrpc-gen@v0.28.1 with golang generator. DO NOT EDIT. // // webrpc-gen -schema=intent.ridl -target=golang -pkg=intents -out=./intent.gen.go package intents @@ -18,7 +18,7 @@ import ( const WebrpcHeader = "Webrpc" -const WebrpcHeaderValue = "webrpc@v0.24.0;gen-golang@v0.18.2;sequence-waas-intents@v0.1.0" +const WebrpcHeaderValue = "webrpc@v0.28.1;gen-golang@v0.21.0;sequence-waas-intents@v0.1.0" // WebRPC description and code-gen version func WebRPCVersion() string { @@ -696,9 +696,26 @@ var WebRPCServices = map[string][]string{} // type method struct { - Name string - Service string - Annotations map[string]string + name string + service string + annotations map[string]string +} + +func (m method) Name() string { + return m.name +} + +func (m method) Service() string { + return m.service +} + +func (m method) Annotations() map[string]string { + res := make(map[string]string, len(m.annotations)) + for k, v := range m.annotations { + res[k] = v + } + + return res } type contextKey struct { @@ -804,15 +821,15 @@ func ErrorWithCause(rpcErr WebRPCError, cause error) WebRPCError { // Webrpc errors var ( - ErrWebrpcEndpoint = WebRPCError{Code: 0, Name: "WebrpcEndpoint", Message: "endpoint error", HTTPStatus: 400} - ErrWebrpcRequestFailed = WebRPCError{Code: -1, Name: "WebrpcRequestFailed", Message: "request failed", HTTPStatus: 400} - ErrWebrpcBadRoute = WebRPCError{Code: -2, Name: "WebrpcBadRoute", Message: "bad route", HTTPStatus: 404} - ErrWebrpcBadMethod = WebRPCError{Code: -3, Name: "WebrpcBadMethod", Message: "bad method", HTTPStatus: 405} - ErrWebrpcBadRequest = WebRPCError{Code: -4, Name: "WebrpcBadRequest", Message: "bad request", HTTPStatus: 400} - ErrWebrpcBadResponse = WebRPCError{Code: -5, Name: "WebrpcBadResponse", Message: "bad response", HTTPStatus: 500} - ErrWebrpcServerPanic = WebRPCError{Code: -6, Name: "WebrpcServerPanic", Message: "server panic", HTTPStatus: 500} - ErrWebrpcInternalError = WebRPCError{Code: -7, Name: "WebrpcInternalError", Message: "internal error", HTTPStatus: 500} - ErrWebrpcClientDisconnected = WebRPCError{Code: -8, Name: "WebrpcClientDisconnected", Message: "client disconnected", HTTPStatus: 400} - ErrWebrpcStreamLost = WebRPCError{Code: -9, Name: "WebrpcStreamLost", Message: "stream lost", HTTPStatus: 400} - ErrWebrpcStreamFinished = WebRPCError{Code: -10, Name: "WebrpcStreamFinished", Message: "stream finished", HTTPStatus: 200} + ErrWebrpcEndpoint = WebRPCError{Code: 0, Name: "WebrpcEndpoint", Message: "endpoint error", HTTPStatus: 400} + ErrWebrpcRequestFailed = WebRPCError{Code: -1, Name: "WebrpcRequestFailed", Message: "request failed", HTTPStatus: 400} + ErrWebrpcBadRoute = WebRPCError{Code: -2, Name: "WebrpcBadRoute", Message: "bad route", HTTPStatus: 404} + ErrWebrpcBadMethod = WebRPCError{Code: -3, Name: "WebrpcBadMethod", Message: "bad method", HTTPStatus: 405} + ErrWebrpcBadRequest = WebRPCError{Code: -4, Name: "WebrpcBadRequest", Message: "bad request", HTTPStatus: 400} + ErrWebrpcBadResponse = WebRPCError{Code: -5, Name: "WebrpcBadResponse", Message: "bad response", HTTPStatus: 500} + ErrWebrpcServerPanic = WebRPCError{Code: -6, Name: "WebrpcServerPanic", Message: "server panic", HTTPStatus: 500} + ErrWebrpcInternalError = WebRPCError{Code: -7, Name: "WebrpcInternalError", Message: "internal error", HTTPStatus: 500} + ErrWebrpcClientAborted = WebRPCError{Code: -8, Name: "WebrpcClientAborted", Message: "request aborted by client", HTTPStatus: 400} + ErrWebrpcStreamLost = WebRPCError{Code: -9, Name: "WebrpcStreamLost", Message: "stream lost", HTTPStatus: 400} + ErrWebrpcStreamFinished = WebRPCError{Code: -10, Name: "WebrpcStreamFinished", Message: "stream finished", HTTPStatus: 200} ) diff --git a/services/trailsapi/trailsapi.gen.go b/services/trailsapi/trailsapi.gen.go index fbd4b1bb..74cdc357 100644 --- a/services/trailsapi/trailsapi.gen.go +++ b/services/trailsapi/trailsapi.gen.go @@ -1,4 +1,4 @@ -// trails-api v1-25.12.16-ee270e57 cd6fea50d2e26fb661de670279f19010f6a3f14a +// trails-api v1-26.1.13-e74daec9 0d952fe03ce07d60c89665bb34a732315012ba2c // -- // Code generated by webrpc-gen@v0.31.3 with golang generator. DO NOT EDIT. // @@ -29,12 +29,12 @@ func WebRPCVersion() string { // Schema version of your RIDL schema func WebRPCSchemaVersion() string { - return "v1-25.12.16-ee270e57" + return "v1-26.1.13-e74daec9" } // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "cd6fea50d2e26fb661de670279f19010f6a3f14a" + return "0d952fe03ce07d60c89665bb34a732315012ba2c" } // @@ -52,6 +52,7 @@ type TrailsClient interface { GetIntentReceipt(ctx context.Context, getIntentReceiptRequest GetIntentReceiptRequest) (*GetIntentReceiptResponse, error) GetIntent(ctx context.Context, getIntentRequest GetIntentRequest) (*GetIntentResponse, error) SearchIntents(ctx context.Context, searchIntentsRequest SearchIntentsRequest) (*SearchIntentsResponse, error) + GetCallsConfiguration(ctx context.Context, getCallsConfigurationRequest GetCallsConfigurationRequest) (*GetCallsConfigurationResponse, error) GetIntentHistory(ctx context.Context, getIntentHistoryRequest GetIntentHistoryRequest) (*GetIntentHistoryResponse, error) AbortIntent(ctx context.Context, abortIntentRequest AbortIntentRequest) (*AbortIntentResponse, error) // GetChains will return the list of supported chains by Trails. @@ -173,6 +174,8 @@ const ( IntentStatus_SUCCEEDED IntentStatus = 4 // done, intent execution was aborted by user IntentStatus_ABORTED IntentStatus = 5 + // done, intent execution was refunded + IntentStatus_REFUNDED IntentStatus = 6 ) var IntentStatus_name = map[uint8]string{ @@ -182,6 +185,7 @@ var IntentStatus_name = map[uint8]string{ 3: "FAILED", 4: "SUCCEEDED", 5: "ABORTED", + 6: "REFUNDED", } var IntentStatus_value = map[string]uint8{ @@ -191,6 +195,7 @@ var IntentStatus_value = map[string]uint8{ "FAILED": 3, "SUCCEEDED": 4, "ABORTED": 5, + "REFUNDED": 6, } func (x IntentStatus) String() string { @@ -338,19 +343,22 @@ const ( TransactionStatus_FAILED TransactionStatus = 8 // terminal state: aborted at one of the stages, and never completed onchain txn TransactionStatus_ABORTED TransactionStatus = 9 + // terminal state: txn mined but call reverted (refund triggered) + TransactionStatus_REVERTED TransactionStatus = 10 ) var TransactionStatus_name = map[uint8]string{ - 0: "UNKNOWN", - 1: "ON_HOLD", - 2: "PENDING", - 3: "RELAYING", - 4: "SENT", - 5: "ERRORED", - 6: "MINING", - 7: "SUCCEEDED", - 8: "FAILED", - 9: "ABORTED", + 0: "UNKNOWN", + 1: "ON_HOLD", + 2: "PENDING", + 3: "RELAYING", + 4: "SENT", + 5: "ERRORED", + 6: "MINING", + 7: "SUCCEEDED", + 8: "FAILED", + 9: "ABORTED", + 10: "REVERTED", } var TransactionStatus_value = map[string]uint8{ @@ -364,6 +372,7 @@ var TransactionStatus_value = map[string]uint8{ "SUCCEEDED": 7, "FAILED": 8, "ABORTED": 9, + "REVERTED": 10, } func (x TransactionStatus) String() string { @@ -483,11 +492,12 @@ type QuoteIntentRequest struct { OriginChainID uint64 `json:"originChainId"` OriginTokenAddress prototyp.Hash `json:"originTokenAddress"` // destination chain, token, and execution details - DestinationChainID uint64 `json:"destinationChainId"` - DestinationTokenAddress prototyp.Hash `json:"destinationTokenAddress"` - DestinationToAddress prototyp.Hash `json:"destinationToAddress"` - DestinationCallData *string `json:"destinationCallData"` - DestinationCallValue *prototyp.BigInt `json:"destinationCallValue"` + DestinationChainID uint64 `json:"destinationChainId"` + DestinationTokenAddress prototyp.Hash `json:"destinationTokenAddress"` + DestinationToAddress prototyp.Hash `json:"destinationToAddress"` + DestinationApproveAddress prototyp.Hash `json:"destinationApproveAddress"` + DestinationCallData *string `json:"destinationCallData"` + DestinationCallValue *prototyp.BigInt `json:"destinationCallValue"` // originTokenAmount is used with EXACT_INPUT txns OriginTokenAmount *prototyp.BigInt `json:"originTokenAmount"` // destinationTokenAmount is used with EXACT_OUTPUT txns @@ -570,6 +580,15 @@ type IntentCalls struct { Calls []*TransactionCall `json:"calls"` } +type IntentConfiguration struct { + // Origin + ImageHash prototyp.Hash `json:"imageHash"` + OwnerAddress prototyp.Hash `json:"ownerAddress"` + Checkpoint uint64 `json:"checkpoint"` + OriginCalls *IntentCalls `json:"originCalls"` + DestinationCalls *IntentCalls `json:"destinationCalls,omitempty"` +} + type TransactionCall struct { To prototyp.Hash `json:"to"` Value prototyp.BigInt `json:"value"` @@ -713,8 +732,7 @@ type IntentTransaction struct { Type TransactionType `json:"type" db:"type"` Context TransactionContext `json:"context" db:"context"` FromAddress prototyp.Hash `json:"fromAddress" db:"from_address"` - // ie. originIntentAddress, TrailsRouter, or TrailsIntentEntrypoint - ToAddress prototyp.Hash `json:"toAddress" db:"to_address"` + ToAddress prototyp.Hash `json:"toAddress" db:"to_address"` // Token being transferred in this transaction TokenAddress prototyp.Hash `json:"tokenAddress" db:"token_address"` // Amount transferred in this transaction @@ -734,6 +752,24 @@ type IntentTransaction struct { CreatedAt *time.Time `json:"createdAt,omitempty" db:"created_at,omitempty"` } +type PriceImpact struct { + PriceImpact float64 `json:"priceImpact"` + PriceImpactUSD float64 `json:"priceImpactUsd"` +} + +type PriceImpactDetails struct { + // Price impact that results from gas fees on origin and destination chains + ExecutionPriceImpact *PriceImpact `json:"executionPriceImpact"` + // Price impact that results from slippage and pure market movement + MarketPriceImpact *PriceImpact `json:"marketPriceImpact"` + // Price impact that results from provider fees, excluding trails (swap + bridge) + ProviderFeesPriceImpact *PriceImpact `json:"providerFeesPriceImpact"` + // Price impact that results from trails fees + TrailsFeesPriceImpact *PriceImpact `json:"trailsFeesPriceImpact"` + // Price impact that results from net result of all fees, currently used in the final price impact shown to user + NetPriceImpact *PriceImpact `json:"netPriceImpact"` +} + // IntentProviderQuote represents the quotes from the underlining providers for both // the swap and/or bridge external providers. If we do both a swap and a bridge, then // the total amount is the sum of both providers. @@ -750,8 +786,10 @@ type IntentProviderQuote struct { ToAmountUSD float64 `json:"toAmountUsd"` ToAmountMinUSD float64 `json:"toAmountMinUsd"` MaxSlippage float64 `json:"maxSlippage"` - PriceImpact float64 `json:"priceImpact"` - PriceImpactUSD float64 `json:"priceImpactUsd"` + // This is the net price impact (same value as priceImpactDetails.netPriceImpact) + PriceImpact float64 `json:"priceImpact"` + PriceImpactUSD float64 `json:"priceImpactUsd"` + PriceImpactDetails *PriceImpactDetails `json:"priceImpactDetails"` } type IntentFees struct { @@ -760,14 +798,35 @@ type IntentFees struct { DestinationGas *IntentTransactionGasFee `json:"destinationGas"` // provider fees (swap + bridge + trails) Provider *IntentProviderFees `json:"provider"` - // total fees including provider fees + gas fees - FeeTokenAddress prototyp.Hash `json:"feeTokenAddress"` - FeeTokenTotal prototyp.BigInt `json:"feeTokenTotal"` - TotalFeeAmount prototyp.BigInt `json:"totalFeeAmount"` - TotalFeeUSD float64 `json:"totalFeeUsd"` + // fee token details + FeeTokenAddress prototyp.Hash `json:"feeTokenAddress"` + // @deprecated: kept for backwards compatibility here, set to `collectorFeeTotal` + FeeTokenAmount prototyp.BigInt `json:"feeTokenAmount"` + // @deprecated: kept for backwards compatibility here, set to `collectorFeeUsd` + // fee token usd = gas + trails fee (amount trails' fee collector gets transferred) + FeeTokenUSD float64 `json:"feeTokenUsd"` + // @deprecated: kept for backwards compatibility here, set to 0 + // fee token amount = provider + trails + origin amount total + FeeTokenTotal prototyp.BigInt `json:"feeTokenTotal"` + // gas fee component (origin + destination gas or orchestraion fee) + GasFeeTotal prototyp.BigInt `json:"gasFeeTotal"` + GasFeeUSD float64 `json:"gasFeeUsd"` + // trails fee component + TrailsFeeTotal prototyp.BigInt `json:"trailsFeeTotal"` + TrailsFeeUSD float64 `json:"trailsFeeUsd"` + // gas + trails fee component (amount trails collects as a fee) + CollectorFeeTotal prototyp.BigInt `json:"collectorFeeTotal"` + CollectedFeeUSD float64 `json:"collectorFeeUsd"` + // provider fee component + ProviderFeeTotal prototyp.BigInt `json:"providerFeeTotal"` + ProviderFeeUSD float64 `json:"providerFeeUsd"` + // display fees (gas + trails + provider) - what user sees + TotalFeeAmount prototyp.BigInt `json:"totalFeeAmount"` + TotalFeeUSD float64 `json:"totalFeeUsd"` } // ProviderFees is the swap+bridge provider fee, trails fee summary and totals +// @deprecated: please use IntentFees instead type IntentProviderFees struct { // quote provider fee component (swap and/or bridge) QuoteProvider string `json:"quoteProvider"` @@ -776,7 +835,11 @@ type IntentProviderFees struct { // trails provider fee component, denominated in the origin token TrailsFee prototyp.BigInt `json:"trailsFee"` TrailsFeeUSD float64 `json:"trailsFeeUsd"` + // provider + trails (non-gas) fee totals + QuoteProviderWithTrailsFee prototyp.BigInt `json:"quoteProviderWithTrailsFee"` + ProviderWithTrailsFeeUSD float64 `json:"providerWithTrailsFeeUsd"` // total provider fees, aka, swap + bridge + trails fees + // @deprecated: kept for backwards compatibility here, sync w/ providerWithTrailsFee TotalFeeAmount prototyp.BigInt `json:"totalFeeAmount"` TotalFeeUSD float64 `json:"totalFeeUsd"` } @@ -920,8 +983,6 @@ type FeeOption struct { // DepositSignature contains all gasless deposit signature parameters for ExecuteIntent type DepositSignature struct { - // Required: EIP-712 TrailsIntent signature (hex) - IntentSignature prototyp.Hash `json:"intentSignature"` // Optional: EIP-2612 permit signature (hex, if token approval needed) PermitSignature *prototyp.Hash `json:"permitSignature"` // Optional: Permit expiration timestamp @@ -930,16 +991,12 @@ type DepositSignature struct { PermitAmount prototyp.BigInt `json:"permitAmount"` // Required: Selected fee option from gasFeeOptions SelectedGasFeeOption *FeeOption `json:"selectedGasFeeOption"` - // Required: User nonce from Intent Entrypoint contract (fetched fresh at execute time) - UserNonce uint64 `json:"userNonce"` // Required: Intent deadline timestamp Deadline uint64 `json:"deadline"` } // DepositIntentEntry contains gasless deposit metadata stored in JSONB type DepositIntentEntry struct { - // EIP-712 TrailsIntent signature (hex) - IntentSignature prototyp.Hash `json:"intentSignature"` // EIP-2612 permit signature (hex, if approval needed) PermitSignature *prototyp.Hash `json:"permitSignature"` // Permit expiration timestamp @@ -952,8 +1009,6 @@ type DepositIntentEntry struct { FeeToken prototyp.Hash `json:"feeToken"` // Address that receives the fee FeeCollector prototyp.Hash `json:"feeCollector"` - // User nonce from Intent Entrypoint contract (provided by client) - UserNonce uint64 `json:"userNonce"` // Intent deadline timestamp Deadline uint64 `json:"deadline"` } @@ -967,9 +1022,7 @@ type TrailsAddressOverrides struct { } type TrailsContracts struct { - TrailsIntentEntrypointAddress prototyp.Hash `json:"trailsIntentEntrypointAddress"` - TrailsRouterAddress prototyp.Hash `json:"trailsRouterAddress"` - TrailsRouterShimAddress prototyp.Hash `json:"trailsRouterShimAddress"` + TrailsUtilsAddress prototyp.Hash `json:"trailsUtilsAddress"` } type ChainInfo struct { @@ -1094,8 +1147,9 @@ type ServiceStatus struct { // NOTE: we use the IntentRequest directly for the QuoteIntent request type. // And do not create a QuoteIntentRequest additional type, as its unnecessary. type QuoteIntentResponse struct { - Intent *Intent `json:"intent"` - GasFeeOptions *GasFeeOptions `json:"gasFeeOptions"` + Intent *Intent `json:"intent"` + GasFeeOptions *GasFeeOptions `json:"gasFeeOptions"` + IntentConfiguration *IntentConfiguration `json:"intentConfiguration,omitempty"` } // CommitIntent accepts a fully formed Intent and commits it for execution. CommitIntent @@ -1183,6 +1237,23 @@ type SearchIntentsResponse struct { Intents []*Intent `json:"intents"` } +type GetCallsConfigurationRequest struct { + OwnerAddress prototyp.Hash `json:"ownerAddress"` + Checkpoint uint64 `json:"checkpoint"` + Calls *IntentCalls `json:"calls"` + // Origin configuration adds permit capability for the source token + PermitTokenAddress prototyp.Hash `json:"permitTokenAddress"` + IsOrigin bool `json:"isOrigin"` + TrailsAddressOverrides *TrailsAddressOverrides `json:"trailsAddressOverrides,omitempty"` +} + +type GetCallsConfigurationResponse struct { + Address prototyp.Hash `json:"address"` + ImageHash prototyp.Hash `json:"imageHash"` + // v3.WalletConfig Same as sessions + WalletConfiguration interface{} `json:"walletConfiguration"` +} + // GetIntentHistory returns the intent history list, with receipt and summary info. type GetIntentHistoryRequest struct { // cursor paging parameters @@ -1330,12 +1401,12 @@ const TrailsPathPrefix = "/rpc/Trails/" type trailsClient struct { client HTTPClient - urls [19]string + urls [20]string } func NewTrailsClient(addr string, client HTTPClient) TrailsClient { prefix := urlBase(addr) + TrailsPathPrefix - urls := [19]string{ + urls := [20]string{ prefix + "Ping", prefix + "RuntimeStatus", prefix + "Clock", @@ -1346,6 +1417,7 @@ func NewTrailsClient(addr string, client HTTPClient) TrailsClient { prefix + "GetIntentReceipt", prefix + "GetIntent", prefix + "SearchIntents", + prefix + "GetCallsConfiguration", prefix + "GetIntentHistory", prefix + "AbortIntent", prefix + "GetChains", @@ -1522,12 +1594,28 @@ func (c *trailsClient) SearchIntents(ctx context.Context, searchIntentsRequest S return out.Ret0, err } +func (c *trailsClient) GetCallsConfiguration(ctx context.Context, getCallsConfigurationRequest GetCallsConfigurationRequest) (*GetCallsConfigurationResponse, error) { + out := struct { + Ret0 *GetCallsConfigurationResponse + }{} + + resp, err := doHTTPRequest(ctx, c.client, c.urls[10], getCallsConfigurationRequest, &out.Ret0) + if resp != nil { + cerr := resp.Body.Close() + if err == nil && cerr != nil { + err = ErrWebrpcRequestFailed.WithCausef("failed to close response body: %w", cerr) + } + } + + return out.Ret0, err +} + func (c *trailsClient) GetIntentHistory(ctx context.Context, getIntentHistoryRequest GetIntentHistoryRequest) (*GetIntentHistoryResponse, error) { out := struct { Ret0 *GetIntentHistoryResponse }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[10], getIntentHistoryRequest, &out.Ret0) + resp, err := doHTTPRequest(ctx, c.client, c.urls[11], getIntentHistoryRequest, &out.Ret0) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1543,7 +1631,7 @@ func (c *trailsClient) AbortIntent(ctx context.Context, abortIntentRequest Abort Ret0 *AbortIntentResponse }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[11], abortIntentRequest, &out.Ret0) + resp, err := doHTTPRequest(ctx, c.client, c.urls[12], abortIntentRequest, &out.Ret0) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1559,7 +1647,7 @@ func (c *trailsClient) GetChains(ctx context.Context, getChainsRequest GetChains Ret0 *GetChainsResponse }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[12], getChainsRequest, &out.Ret0) + resp, err := doHTTPRequest(ctx, c.client, c.urls[13], getChainsRequest, &out.Ret0) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1575,7 +1663,7 @@ func (c *trailsClient) GetExactOutputRoutes(ctx context.Context, getExactOutputR Ret0 *GetExactOutputRoutesResponse }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[13], getExactOutputRoutesRequest, &out.Ret0) + resp, err := doHTTPRequest(ctx, c.client, c.urls[14], getExactOutputRoutesRequest, &out.Ret0) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1591,7 +1679,7 @@ func (c *trailsClient) GetExactInputRoutes(ctx context.Context, getExactInputRou Ret0 *GetExactInputRoutesResponse }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[14], getExactInputRoutesRequest, &out.Ret0) + resp, err := doHTTPRequest(ctx, c.client, c.urls[15], getExactInputRoutesRequest, &out.Ret0) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1607,7 +1695,7 @@ func (c *trailsClient) GetTokenList(ctx context.Context, getTokenListRequest Get Ret0 *GetTokenListResponse }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[15], getTokenListRequest, &out.Ret0) + resp, err := doHTTPRequest(ctx, c.client, c.urls[16], getTokenListRequest, &out.Ret0) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1623,7 +1711,7 @@ func (c *trailsClient) GetTokenPrices(ctx context.Context, getTokenPricesRequest Ret0 *GetTokenPricesResponse }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[16], getTokenPricesRequest, &out.Ret0) + resp, err := doHTTPRequest(ctx, c.client, c.urls[17], getTokenPricesRequest, &out.Ret0) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1639,7 +1727,7 @@ func (c *trailsClient) GetTrailsContracts(ctx context.Context) (*TrailsContracts Ret0 *TrailsContracts `json:"TrailsContracts"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[17], nil, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[18], nil, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -1655,7 +1743,7 @@ func (c *trailsClient) GetIntentTransactionHistory(ctx context.Context, getInten Ret0 *GetIntentTransactionHistoryResponse }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[18], getIntentTransactionHistoryRequest, &out.Ret0) + resp, err := doHTTPRequest(ctx, c.client, c.urls[19], getIntentTransactionHistoryRequest, &out.Ret0) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -2057,7 +2145,7 @@ var ( const WebrpcHeader = "Webrpc" -const WebrpcHeaderValue = "webrpc@v0.31.3;gen-golang@v0.23.3;trails-api@v1-25.12.16-ee270e57" +const WebrpcHeaderValue = "webrpc@v0.31.3;gen-golang@v0.23.3;trails-api@v1-26.1.13-e74daec9" type WebrpcGenVersions struct { WebrpcGenVersion string diff --git a/testutil/contracts.go b/testutil/contracts.go index a8d99540..8b841ca2 100644 --- a/testutil/contracts.go +++ b/testutil/contracts.go @@ -22,6 +22,7 @@ var ( func init() { Contracts.MustAdd(contracts.ERC20Mock) Contracts.MustAdd(contracts.V1.WalletFactory) + Contracts.MustAdd(contracts.TrailsUtils) Contracts.MustRegisterJSON("WALLET_CALL_RECV_MOCK", walletcallmock.CallReceiverMockABI, common.FromHex(walletcallmock.CallReceiverMockBin)) } diff --git a/testutil/testutil.go b/testutil/testutil.go index f44a7228..deccf39b 100644 --- a/testutil/testutil.go +++ b/testutil/testutil.go @@ -479,6 +479,13 @@ func (c *TestChain) UniDeploy(t *testing.T, contractName string, contractInstanc return ethcontract.NewContractCaller(contractAddress, artifact.ABI, c.Provider) } +// DeployTrailsUtils deploys TrailsUtils contract and returns its address. +// Multiple calls will deploy just a single instance (using contractInstanceNum 0). +func (c *TestChain) DeployTrailsUtils(t *testing.T) common.Address { + contract := c.UniDeploy(t, "TRAILS_UTILS", 0) + return contract.Address +} + // Deploy will deploy a contract registered in `Contracts` registry using the standard deployment method. Each Deploy call // will instanitate a new contract on the test chain. func (c *TestChain) Deploy(t *testing.T, contractName string, contractConstructorArgs ...interface{}) (*ethcontract.Contract, *types.Receipt) { @@ -721,7 +728,7 @@ func (c *TestChain) V3DummySequenceWalletWithIntentConfig(seed uint64, calls []* } // Create an intent config - intentConfig, err := sequence.CreateIntentConfiguration(owner.Address(), calls, nil) + intentConfig, err := sequence.CreateIntentConfiguration(owner.Address(), calls, nil, 0) if err != nil { return nil, err }