From 230d31b347037a7d06e59b73033f5fd7cc30d225 Mon Sep 17 00:00:00 2001 From: brucedonovan Date: Wed, 27 Sep 2023 15:36:18 +0100 Subject: [PATCH] reformatting --- src/abi/SeaportAbi.ts | 2930 ++++++++--------- .../cactiComponents/ActionResponse.tsx | 7 +- .../cactiComponents/hooks/useApproval.tsx | 8 +- .../cactiComponents/hooks/useBalance.ts | 4 +- .../widgets/rocketPool/rocketPoolWithdraw.tsx | 2 +- .../current/widgets/transfer/Transfer.tsx | 6 +- .../current/widgets/uniswap/Uniswap.tsx | 2 +- .../widgets/arbitrum/ArbitrumDeposit.tsx | 6 +- .../widgets/arbitrum/ArbitrumWithdraw.tsx | 4 +- src/contexts/ConnectionWrapper.tsx | 23 +- src/utils/ethersAdapter.ts | 11 +- src/utils/index.tsx | 4 +- 12 files changed, 1480 insertions(+), 1527 deletions(-) diff --git a/src/abi/SeaportAbi.ts b/src/abi/SeaportAbi.ts index 9f22077f..4ee7d71d 100644 --- a/src/abi/SeaportAbi.ts +++ b/src/abi/SeaportAbi.ts @@ -1,2258 +1,2214 @@ -export default[ +export default [ { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "conduitController", - "type": "address" - } + internalType: 'address', + name: 'conduitController', + type: 'address', + }, ], - "stateMutability": "nonpayable", - "type": "constructor" + stateMutability: 'nonpayable', + type: 'constructor', }, { - "inputs": [ + inputs: [ { - "components": [ - { "internalType": "address", "name": "offerer", "type": "address" }, - { "internalType": "address", "name": "zone", "type": "address" }, + components: [ + { internalType: 'address', name: 'offerer', type: 'address' }, + { internalType: 'address', name: 'zone', type: 'address' }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, - { "internalType": "address", "name": "token", "type": "address" }, + { internalType: 'address', name: 'token', type: 'address' }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', + }, ], - "internalType": "structOfferItem[]", - "name": "offer", - "type": "tuple[]" + internalType: 'structOfferItem[]', + name: 'offer', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, - { "internalType": "address", "name": "token", "type": "address" }, + { internalType: 'address', name: 'token', type: 'address' }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" + internalType: 'structConsiderationItem[]', + name: 'consideration', + type: 'tuple[]', }, { - "internalType": "enumOrderType", - "name": "orderType", - "type": "uint8" + internalType: 'enumOrderType', + name: 'orderType', + type: 'uint8', }, - { "internalType": "uint256", "name": "startTime", "type": "uint256" }, - { "internalType": "uint256", "name": "endTime", "type": "uint256" }, - { "internalType": "bytes32", "name": "zoneHash", "type": "bytes32" }, - { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { internalType: 'uint256', name: 'startTime', type: 'uint256' }, + { internalType: 'uint256', name: 'endTime', type: 'uint256' }, + { internalType: 'bytes32', name: 'zoneHash', type: 'bytes32' }, + { internalType: 'uint256', name: 'salt', type: 'uint256' }, { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'conduitKey', + type: 'bytes32', }, - { "internalType": "uint256", "name": "counter", "type": "uint256" } + { internalType: 'uint256', name: 'counter', type: 'uint256' }, ], - "internalType": "structOrderComponents[]", - "name": "orders", - "type": "tuple[]" - } - ], - "name": "cancel", - "outputs": [ - { "internalType": "bool", "name": "cancelled", "type": "bool" } + internalType: 'structOrderComponents[]', + name: 'orders', + type: 'tuple[]', + }, ], - "stateMutability": "nonpayable", - "type": "function" + name: 'cancel', + outputs: [{ internalType: 'bool', name: 'cancelled', type: 'bool' }], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "components": [ + components: [ { - "components": [ + components: [ { - "internalType": "address", - "name": "offerer", - "type": "address" + internalType: 'address', + name: 'offerer', + type: 'address', }, - { "internalType": "address", "name": "zone", "type": "address" }, + { internalType: 'address', name: 'zone', type: 'address' }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, { - "internalType": "address", - "name": "token", - "type": "address" + internalType: 'address', + name: 'token', + type: 'address', }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', + }, ], - "internalType": "structOfferItem[]", - "name": "offer", - "type": "tuple[]" + internalType: 'structOfferItem[]', + name: 'offer', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, { - "internalType": "address", - "name": "token", - "type": "address" + internalType: 'address', + name: 'token', + type: 'address', }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" + internalType: 'structConsiderationItem[]', + name: 'consideration', + type: 'tuple[]', }, { - "internalType": "enumOrderType", - "name": "orderType", - "type": "uint8" + internalType: 'enumOrderType', + name: 'orderType', + type: 'uint8', }, { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" + internalType: 'uint256', + name: 'startTime', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" + internalType: 'uint256', + name: 'endTime', + type: 'uint256', }, { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" + internalType: 'bytes32', + name: 'zoneHash', + type: 'bytes32', }, - { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { internalType: 'uint256', name: 'salt', type: 'uint256' }, { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'conduitKey', + type: 'bytes32', }, { - "internalType": "uint256", - "name": "totalOriginalConsiderationItems", - "type": "uint256" - } + internalType: 'uint256', + name: 'totalOriginalConsiderationItems', + type: 'uint256', + }, ], - "internalType": "structOrderParameters", - "name": "parameters", - "type": "tuple" + internalType: 'structOrderParameters', + name: 'parameters', + type: 'tuple', }, - { "internalType": "uint120", "name": "numerator", "type": "uint120" }, + { internalType: 'uint120', name: 'numerator', type: 'uint120' }, { - "internalType": "uint120", - "name": "denominator", - "type": "uint120" + internalType: 'uint120', + name: 'denominator', + type: 'uint120', }, - { "internalType": "bytes", "name": "signature", "type": "bytes" }, - { "internalType": "bytes", "name": "extraData", "type": "bytes" } + { internalType: 'bytes', name: 'signature', type: 'bytes' }, + { internalType: 'bytes', name: 'extraData', type: 'bytes' }, ], - "internalType": "structAdvancedOrder", - "name": "advancedOrder", - "type": "tuple" + internalType: 'structAdvancedOrder', + name: 'advancedOrder', + type: 'tuple', }, { - "components": [ + components: [ { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" + internalType: 'uint256', + name: 'orderIndex', + type: 'uint256', }, - { "internalType": "enumSide", "name": "side", "type": "uint8" }, - { "internalType": "uint256", "name": "index", "type": "uint256" }, + { internalType: 'enumSide', name: 'side', type: 'uint8' }, + { internalType: 'uint256', name: 'index', type: 'uint256' }, { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" + internalType: 'uint256', + name: 'identifier', + type: 'uint256', }, { - "internalType": "bytes32[]", - "name": "criteriaProof", - "type": "bytes32[]" - } + internalType: 'bytes32[]', + name: 'criteriaProof', + type: 'bytes32[]', + }, ], - "internalType": "structCriteriaResolver[]", - "name": "criteriaResolvers", - "type": "tuple[]" + internalType: 'structCriteriaResolver[]', + name: 'criteriaResolvers', + type: 'tuple[]', }, { - "internalType": "bytes32", - "name": "fulfillerConduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'fulfillerConduitKey', + type: 'bytes32', }, - { "internalType": "address", "name": "recipient", "type": "address" } + { internalType: 'address', name: 'recipient', type: 'address' }, ], - "name": "fulfillAdvancedOrder", - "outputs": [ - { "internalType": "bool", "name": "fulfilled", "type": "bool" } - ], - "stateMutability": "payable", - "type": "function" + name: 'fulfillAdvancedOrder', + outputs: [{ internalType: 'bool', name: 'fulfilled', type: 'bool' }], + stateMutability: 'payable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "components": [ + components: [ { - "components": [ + components: [ { - "internalType": "address", - "name": "offerer", - "type": "address" + internalType: 'address', + name: 'offerer', + type: 'address', }, - { "internalType": "address", "name": "zone", "type": "address" }, + { internalType: 'address', name: 'zone', type: 'address' }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, { - "internalType": "address", - "name": "token", - "type": "address" + internalType: 'address', + name: 'token', + type: 'address', }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', + }, ], - "internalType": "structOfferItem[]", - "name": "offer", - "type": "tuple[]" + internalType: 'structOfferItem[]', + name: 'offer', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, { - "internalType": "address", - "name": "token", - "type": "address" + internalType: 'address', + name: 'token', + type: 'address', }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" + internalType: 'structConsiderationItem[]', + name: 'consideration', + type: 'tuple[]', }, { - "internalType": "enumOrderType", - "name": "orderType", - "type": "uint8" + internalType: 'enumOrderType', + name: 'orderType', + type: 'uint8', }, { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" + internalType: 'uint256', + name: 'startTime', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" + internalType: 'uint256', + name: 'endTime', + type: 'uint256', }, { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" + internalType: 'bytes32', + name: 'zoneHash', + type: 'bytes32', }, - { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { internalType: 'uint256', name: 'salt', type: 'uint256' }, { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'conduitKey', + type: 'bytes32', }, { - "internalType": "uint256", - "name": "totalOriginalConsiderationItems", - "type": "uint256" - } + internalType: 'uint256', + name: 'totalOriginalConsiderationItems', + type: 'uint256', + }, ], - "internalType": "structOrderParameters", - "name": "parameters", - "type": "tuple" + internalType: 'structOrderParameters', + name: 'parameters', + type: 'tuple', }, - { "internalType": "uint120", "name": "numerator", "type": "uint120" }, + { internalType: 'uint120', name: 'numerator', type: 'uint120' }, { - "internalType": "uint120", - "name": "denominator", - "type": "uint120" + internalType: 'uint120', + name: 'denominator', + type: 'uint120', }, - { "internalType": "bytes", "name": "signature", "type": "bytes" }, - { "internalType": "bytes", "name": "extraData", "type": "bytes" } + { internalType: 'bytes', name: 'signature', type: 'bytes' }, + { internalType: 'bytes', name: 'extraData', type: 'bytes' }, ], - "internalType": "structAdvancedOrder[]", - "name": "advancedOrders", - "type": "tuple[]" + internalType: 'structAdvancedOrder[]', + name: 'advancedOrders', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" + internalType: 'uint256', + name: 'orderIndex', + type: 'uint256', }, - { "internalType": "enumSide", "name": "side", "type": "uint8" }, - { "internalType": "uint256", "name": "index", "type": "uint256" }, + { internalType: 'enumSide', name: 'side', type: 'uint8' }, + { internalType: 'uint256', name: 'index', type: 'uint256' }, { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" + internalType: 'uint256', + name: 'identifier', + type: 'uint256', }, { - "internalType": "bytes32[]", - "name": "criteriaProof", - "type": "bytes32[]" - } + internalType: 'bytes32[]', + name: 'criteriaProof', + type: 'bytes32[]', + }, ], - "internalType": "structCriteriaResolver[]", - "name": "criteriaResolvers", - "type": "tuple[]" + internalType: 'structCriteriaResolver[]', + name: 'criteriaResolvers', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" + internalType: 'uint256', + name: 'orderIndex', + type: 'uint256', }, - { "internalType": "uint256", "name": "itemIndex", "type": "uint256" } + { internalType: 'uint256', name: 'itemIndex', type: 'uint256' }, ], - "internalType": "structFulfillmentComponent[][]", - "name": "offerFulfillments", - "type": "tuple[][]" + internalType: 'structFulfillmentComponent[][]', + name: 'offerFulfillments', + type: 'tuple[][]', }, { - "components": [ + components: [ { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" + internalType: 'uint256', + name: 'orderIndex', + type: 'uint256', }, - { "internalType": "uint256", "name": "itemIndex", "type": "uint256" } + { internalType: 'uint256', name: 'itemIndex', type: 'uint256' }, ], - "internalType": "structFulfillmentComponent[][]", - "name": "considerationFulfillments", - "type": "tuple[][]" + internalType: 'structFulfillmentComponent[][]', + name: 'considerationFulfillments', + type: 'tuple[][]', }, { - "internalType": "bytes32", - "name": "fulfillerConduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'fulfillerConduitKey', + type: 'bytes32', }, - { "internalType": "address", "name": "recipient", "type": "address" }, + { internalType: 'address', name: 'recipient', type: 'address' }, { - "internalType": "uint256", - "name": "maximumFulfilled", - "type": "uint256" - } + internalType: 'uint256', + name: 'maximumFulfilled', + type: 'uint256', + }, ], - "name": "fulfillAvailableAdvancedOrders", - "outputs": [ - { "internalType": "bool[]", "name": "availableOrders", "type": "bool[]" }, + name: 'fulfillAvailableAdvancedOrders', + outputs: [ + { internalType: 'bool[]', name: 'availableOrders', type: 'bool[]' }, { - "components": [ + components: [ { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, - { "internalType": "address", "name": "token", "type": "address" }, + { internalType: 'address', name: 'token', type: 'address' }, { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" + internalType: 'uint256', + name: 'identifier', + type: 'uint256', }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + internalType: 'uint256', + name: 'amount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structReceivedItem", - "name": "item", - "type": "tuple" + internalType: 'structReceivedItem', + name: 'item', + type: 'tuple', }, - { "internalType": "address", "name": "offerer", "type": "address" }, - { "internalType": "bytes32", "name": "conduitKey", "type": "bytes32" } + { internalType: 'address', name: 'offerer', type: 'address' }, + { internalType: 'bytes32', name: 'conduitKey', type: 'bytes32' }, ], - "internalType": "structExecution[]", - "name": "executions", - "type": "tuple[]" - } + internalType: 'structExecution[]', + name: 'executions', + type: 'tuple[]', + }, ], - "stateMutability": "payable", - "type": "function" + stateMutability: 'payable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "components": [ + components: [ { - "components": [ + components: [ { - "internalType": "address", - "name": "offerer", - "type": "address" + internalType: 'address', + name: 'offerer', + type: 'address', }, - { "internalType": "address", "name": "zone", "type": "address" }, + { internalType: 'address', name: 'zone', type: 'address' }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, { - "internalType": "address", - "name": "token", - "type": "address" + internalType: 'address', + name: 'token', + type: 'address', }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', + }, ], - "internalType": "structOfferItem[]", - "name": "offer", - "type": "tuple[]" + internalType: 'structOfferItem[]', + name: 'offer', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, { - "internalType": "address", - "name": "token", - "type": "address" + internalType: 'address', + name: 'token', + type: 'address', }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" + internalType: 'structConsiderationItem[]', + name: 'consideration', + type: 'tuple[]', }, { - "internalType": "enumOrderType", - "name": "orderType", - "type": "uint8" + internalType: 'enumOrderType', + name: 'orderType', + type: 'uint8', }, { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" + internalType: 'uint256', + name: 'startTime', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" + internalType: 'uint256', + name: 'endTime', + type: 'uint256', }, { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" + internalType: 'bytes32', + name: 'zoneHash', + type: 'bytes32', }, - { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { internalType: 'uint256', name: 'salt', type: 'uint256' }, { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'conduitKey', + type: 'bytes32', }, { - "internalType": "uint256", - "name": "totalOriginalConsiderationItems", - "type": "uint256" - } + internalType: 'uint256', + name: 'totalOriginalConsiderationItems', + type: 'uint256', + }, ], - "internalType": "structOrderParameters", - "name": "parameters", - "type": "tuple" + internalType: 'structOrderParameters', + name: 'parameters', + type: 'tuple', }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } + { internalType: 'bytes', name: 'signature', type: 'bytes' }, ], - "internalType": "structOrder[]", - "name": "orders", - "type": "tuple[]" + internalType: 'structOrder[]', + name: 'orders', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" + internalType: 'uint256', + name: 'orderIndex', + type: 'uint256', }, - { "internalType": "uint256", "name": "itemIndex", "type": "uint256" } + { internalType: 'uint256', name: 'itemIndex', type: 'uint256' }, ], - "internalType": "structFulfillmentComponent[][]", - "name": "offerFulfillments", - "type": "tuple[][]" + internalType: 'structFulfillmentComponent[][]', + name: 'offerFulfillments', + type: 'tuple[][]', }, { - "components": [ + components: [ { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" + internalType: 'uint256', + name: 'orderIndex', + type: 'uint256', }, - { "internalType": "uint256", "name": "itemIndex", "type": "uint256" } + { internalType: 'uint256', name: 'itemIndex', type: 'uint256' }, ], - "internalType": "structFulfillmentComponent[][]", - "name": "considerationFulfillments", - "type": "tuple[][]" + internalType: 'structFulfillmentComponent[][]', + name: 'considerationFulfillments', + type: 'tuple[][]', }, { - "internalType": "bytes32", - "name": "fulfillerConduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'fulfillerConduitKey', + type: 'bytes32', }, { - "internalType": "uint256", - "name": "maximumFulfilled", - "type": "uint256" - } + internalType: 'uint256', + name: 'maximumFulfilled', + type: 'uint256', + }, ], - "name": "fulfillAvailableOrders", - "outputs": [ - { "internalType": "bool[]", "name": "availableOrders", "type": "bool[]" }, + name: 'fulfillAvailableOrders', + outputs: [ + { internalType: 'bool[]', name: 'availableOrders', type: 'bool[]' }, { - "components": [ + components: [ { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, - { "internalType": "address", "name": "token", "type": "address" }, + { internalType: 'address', name: 'token', type: 'address' }, { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" + internalType: 'uint256', + name: 'identifier', + type: 'uint256', }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + internalType: 'uint256', + name: 'amount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structReceivedItem", - "name": "item", - "type": "tuple" + internalType: 'structReceivedItem', + name: 'item', + type: 'tuple', }, - { "internalType": "address", "name": "offerer", "type": "address" }, - { "internalType": "bytes32", "name": "conduitKey", "type": "bytes32" } + { internalType: 'address', name: 'offerer', type: 'address' }, + { internalType: 'bytes32', name: 'conduitKey', type: 'bytes32' }, ], - "internalType": "structExecution[]", - "name": "executions", - "type": "tuple[]" - } + internalType: 'structExecution[]', + name: 'executions', + type: 'tuple[]', + }, ], - "stateMutability": "payable", - "type": "function" + stateMutability: 'payable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "components": [ + components: [ { - "internalType": "address", - "name": "considerationToken", - "type": "address" + internalType: 'address', + name: 'considerationToken', + type: 'address', }, { - "internalType": "uint256", - "name": "considerationIdentifier", - "type": "uint256" + internalType: 'uint256', + name: 'considerationIdentifier', + type: 'uint256', }, { - "internalType": "uint256", - "name": "considerationAmount", - "type": "uint256" + internalType: 'uint256', + name: 'considerationAmount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "offerer", - "type": "address" + internalType: 'addresspayable', + name: 'offerer', + type: 'address', }, - { "internalType": "address", "name": "zone", "type": "address" }, + { internalType: 'address', name: 'zone', type: 'address' }, { - "internalType": "address", - "name": "offerToken", - "type": "address" + internalType: 'address', + name: 'offerToken', + type: 'address', }, { - "internalType": "uint256", - "name": "offerIdentifier", - "type": "uint256" + internalType: 'uint256', + name: 'offerIdentifier', + type: 'uint256', }, { - "internalType": "uint256", - "name": "offerAmount", - "type": "uint256" + internalType: 'uint256', + name: 'offerAmount', + type: 'uint256', }, { - "internalType": "enumBasicOrderType", - "name": "basicOrderType", - "type": "uint8" + internalType: 'enumBasicOrderType', + name: 'basicOrderType', + type: 'uint8', }, - { "internalType": "uint256", "name": "startTime", "type": "uint256" }, - { "internalType": "uint256", "name": "endTime", "type": "uint256" }, - { "internalType": "bytes32", "name": "zoneHash", "type": "bytes32" }, - { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { internalType: 'uint256', name: 'startTime', type: 'uint256' }, + { internalType: 'uint256', name: 'endTime', type: 'uint256' }, + { internalType: 'bytes32', name: 'zoneHash', type: 'bytes32' }, + { internalType: 'uint256', name: 'salt', type: 'uint256' }, { - "internalType": "bytes32", - "name": "offererConduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'offererConduitKey', + type: 'bytes32', }, { - "internalType": "bytes32", - "name": "fulfillerConduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'fulfillerConduitKey', + type: 'bytes32', }, { - "internalType": "uint256", - "name": "totalOriginalAdditionalRecipients", - "type": "uint256" + internalType: 'uint256', + name: 'totalOriginalAdditionalRecipients', + type: 'uint256', }, { - "components": [ + components: [ { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + internalType: 'uint256', + name: 'amount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structAdditionalRecipient[]", - "name": "additionalRecipients", - "type": "tuple[]" + internalType: 'structAdditionalRecipient[]', + name: 'additionalRecipients', + type: 'tuple[]', }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } + { internalType: 'bytes', name: 'signature', type: 'bytes' }, ], - "internalType": "structBasicOrderParameters", - "name": "parameters", - "type": "tuple" - } - ], - "name": "fulfillBasicOrder", - "outputs": [ - { "internalType": "bool", "name": "fulfilled", "type": "bool" } + internalType: 'structBasicOrderParameters', + name: 'parameters', + type: 'tuple', + }, ], - "stateMutability": "payable", - "type": "function" + name: 'fulfillBasicOrder', + outputs: [{ internalType: 'bool', name: 'fulfilled', type: 'bool' }], + stateMutability: 'payable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "components": [ + components: [ { - "internalType": "address", - "name": "considerationToken", - "type": "address" + internalType: 'address', + name: 'considerationToken', + type: 'address', }, { - "internalType": "uint256", - "name": "considerationIdentifier", - "type": "uint256" + internalType: 'uint256', + name: 'considerationIdentifier', + type: 'uint256', }, { - "internalType": "uint256", - "name": "considerationAmount", - "type": "uint256" + internalType: 'uint256', + name: 'considerationAmount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "offerer", - "type": "address" + internalType: 'addresspayable', + name: 'offerer', + type: 'address', }, - { "internalType": "address", "name": "zone", "type": "address" }, + { internalType: 'address', name: 'zone', type: 'address' }, { - "internalType": "address", - "name": "offerToken", - "type": "address" + internalType: 'address', + name: 'offerToken', + type: 'address', }, { - "internalType": "uint256", - "name": "offerIdentifier", - "type": "uint256" + internalType: 'uint256', + name: 'offerIdentifier', + type: 'uint256', }, { - "internalType": "uint256", - "name": "offerAmount", - "type": "uint256" + internalType: 'uint256', + name: 'offerAmount', + type: 'uint256', }, { - "internalType": "enumBasicOrderType", - "name": "basicOrderType", - "type": "uint8" + internalType: 'enumBasicOrderType', + name: 'basicOrderType', + type: 'uint8', }, - { "internalType": "uint256", "name": "startTime", "type": "uint256" }, - { "internalType": "uint256", "name": "endTime", "type": "uint256" }, - { "internalType": "bytes32", "name": "zoneHash", "type": "bytes32" }, - { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { internalType: 'uint256', name: 'startTime', type: 'uint256' }, + { internalType: 'uint256', name: 'endTime', type: 'uint256' }, + { internalType: 'bytes32', name: 'zoneHash', type: 'bytes32' }, + { internalType: 'uint256', name: 'salt', type: 'uint256' }, { - "internalType": "bytes32", - "name": "offererConduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'offererConduitKey', + type: 'bytes32', }, { - "internalType": "bytes32", - "name": "fulfillerConduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'fulfillerConduitKey', + type: 'bytes32', }, { - "internalType": "uint256", - "name": "totalOriginalAdditionalRecipients", - "type": "uint256" + internalType: 'uint256', + name: 'totalOriginalAdditionalRecipients', + type: 'uint256', }, { - "components": [ + components: [ { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + internalType: 'uint256', + name: 'amount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structAdditionalRecipient[]", - "name": "additionalRecipients", - "type": "tuple[]" + internalType: 'structAdditionalRecipient[]', + name: 'additionalRecipients', + type: 'tuple[]', }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } + { internalType: 'bytes', name: 'signature', type: 'bytes' }, ], - "internalType": "structBasicOrderParameters", - "name": "parameters", - "type": "tuple" - } - ], - "name": "fulfillBasicOrder_efficient_6GL6yc", - "outputs": [ - { "internalType": "bool", "name": "fulfilled", "type": "bool" } + internalType: 'structBasicOrderParameters', + name: 'parameters', + type: 'tuple', + }, ], - "stateMutability": "payable", - "type": "function" + name: 'fulfillBasicOrder_efficient_6GL6yc', + outputs: [{ internalType: 'bool', name: 'fulfilled', type: 'bool' }], + stateMutability: 'payable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "components": [ + components: [ { - "components": [ + components: [ { - "internalType": "address", - "name": "offerer", - "type": "address" + internalType: 'address', + name: 'offerer', + type: 'address', }, - { "internalType": "address", "name": "zone", "type": "address" }, + { internalType: 'address', name: 'zone', type: 'address' }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, { - "internalType": "address", - "name": "token", - "type": "address" + internalType: 'address', + name: 'token', + type: 'address', }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', + }, ], - "internalType": "structOfferItem[]", - "name": "offer", - "type": "tuple[]" + internalType: 'structOfferItem[]', + name: 'offer', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, { - "internalType": "address", - "name": "token", - "type": "address" + internalType: 'address', + name: 'token', + type: 'address', }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" + internalType: 'structConsiderationItem[]', + name: 'consideration', + type: 'tuple[]', }, { - "internalType": "enumOrderType", - "name": "orderType", - "type": "uint8" + internalType: 'enumOrderType', + name: 'orderType', + type: 'uint8', }, { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" + internalType: 'uint256', + name: 'startTime', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" + internalType: 'uint256', + name: 'endTime', + type: 'uint256', }, { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" + internalType: 'bytes32', + name: 'zoneHash', + type: 'bytes32', }, - { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { internalType: 'uint256', name: 'salt', type: 'uint256' }, { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'conduitKey', + type: 'bytes32', }, { - "internalType": "uint256", - "name": "totalOriginalConsiderationItems", - "type": "uint256" - } + internalType: 'uint256', + name: 'totalOriginalConsiderationItems', + type: 'uint256', + }, ], - "internalType": "structOrderParameters", - "name": "parameters", - "type": "tuple" + internalType: 'structOrderParameters', + name: 'parameters', + type: 'tuple', }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } + { internalType: 'bytes', name: 'signature', type: 'bytes' }, ], - "internalType": "structOrder", - "name": "order", - "type": "tuple" + internalType: 'structOrder', + name: 'order', + type: 'tuple', }, { - "internalType": "bytes32", - "name": "fulfillerConduitKey", - "type": "bytes32" - } - ], - "name": "fulfillOrder", - "outputs": [ - { "internalType": "bool", "name": "fulfilled", "type": "bool" } + internalType: 'bytes32', + name: 'fulfillerConduitKey', + type: 'bytes32', + }, ], - "stateMutability": "payable", - "type": "function" + name: 'fulfillOrder', + outputs: [{ internalType: 'bool', name: 'fulfilled', type: 'bool' }], + stateMutability: 'payable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "contractOfferer", - "type": "address" - } - ], - "name": "getContractOffererNonce", - "outputs": [ - { "internalType": "uint256", "name": "nonce", "type": "uint256" } + internalType: 'address', + name: 'contractOfferer', + type: 'address', + }, ], - "stateMutability": "view", - "type": "function" + name: 'getContractOffererNonce', + outputs: [{ internalType: 'uint256', name: 'nonce', type: 'uint256' }], + stateMutability: 'view', + type: 'function', }, { - "inputs": [ - { "internalType": "address", "name": "offerer", "type": "address" } - ], - "name": "getCounter", - "outputs": [ - { "internalType": "uint256", "name": "counter", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" + inputs: [{ internalType: 'address', name: 'offerer', type: 'address' }], + name: 'getCounter', + outputs: [{ internalType: 'uint256', name: 'counter', type: 'uint256' }], + stateMutability: 'view', + type: 'function', }, { - "inputs": [ + inputs: [ { - "components": [ - { "internalType": "address", "name": "offerer", "type": "address" }, - { "internalType": "address", "name": "zone", "type": "address" }, + components: [ + { internalType: 'address', name: 'offerer', type: 'address' }, + { internalType: 'address', name: 'zone', type: 'address' }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, - { "internalType": "address", "name": "token", "type": "address" }, + { internalType: 'address', name: 'token', type: 'address' }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', + }, ], - "internalType": "structOfferItem[]", - "name": "offer", - "type": "tuple[]" + internalType: 'structOfferItem[]', + name: 'offer', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, - { "internalType": "address", "name": "token", "type": "address" }, + { internalType: 'address', name: 'token', type: 'address' }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" + internalType: 'structConsiderationItem[]', + name: 'consideration', + type: 'tuple[]', }, { - "internalType": "enumOrderType", - "name": "orderType", - "type": "uint8" + internalType: 'enumOrderType', + name: 'orderType', + type: 'uint8', }, - { "internalType": "uint256", "name": "startTime", "type": "uint256" }, - { "internalType": "uint256", "name": "endTime", "type": "uint256" }, - { "internalType": "bytes32", "name": "zoneHash", "type": "bytes32" }, - { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { internalType: 'uint256', name: 'startTime', type: 'uint256' }, + { internalType: 'uint256', name: 'endTime', type: 'uint256' }, + { internalType: 'bytes32', name: 'zoneHash', type: 'bytes32' }, + { internalType: 'uint256', name: 'salt', type: 'uint256' }, { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'conduitKey', + type: 'bytes32', }, - { "internalType": "uint256", "name": "counter", "type": "uint256" } + { internalType: 'uint256', name: 'counter', type: 'uint256' }, ], - "internalType": "structOrderComponents", - "name": "order", - "type": "tuple" - } - ], - "name": "getOrderHash", - "outputs": [ - { "internalType": "bytes32", "name": "orderHash", "type": "bytes32" } + internalType: 'structOrderComponents', + name: 'order', + type: 'tuple', + }, ], - "stateMutability": "view", - "type": "function" + name: 'getOrderHash', + outputs: [{ internalType: 'bytes32', name: 'orderHash', type: 'bytes32' }], + stateMutability: 'view', + type: 'function', }, { - "inputs": [ - { "internalType": "bytes32", "name": "orderHash", "type": "bytes32" } - ], - "name": "getOrderStatus", - "outputs": [ - { "internalType": "bool", "name": "isValidated", "type": "bool" }, - { "internalType": "bool", "name": "isCancelled", "type": "bool" }, - { "internalType": "uint256", "name": "totalFilled", "type": "uint256" }, - { "internalType": "uint256", "name": "totalSize", "type": "uint256" } + inputs: [{ internalType: 'bytes32', name: 'orderHash', type: 'bytes32' }], + name: 'getOrderStatus', + outputs: [ + { internalType: 'bool', name: 'isValidated', type: 'bool' }, + { internalType: 'bool', name: 'isCancelled', type: 'bool' }, + { internalType: 'uint256', name: 'totalFilled', type: 'uint256' }, + { internalType: 'uint256', name: 'totalSize', type: 'uint256' }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "incrementCounter", - "outputs": [ - { "internalType": "uint256", "name": "newCounter", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: 'incrementCounter', + outputs: [{ internalType: 'uint256', name: 'newCounter', type: 'uint256' }], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [], - "name": "information", - "outputs": [ - { "internalType": "string", "name": "version", "type": "string" }, + inputs: [], + name: 'information', + outputs: [ + { internalType: 'string', name: 'version', type: 'string' }, { - "internalType": "bytes32", - "name": "domainSeparator", - "type": "bytes32" + internalType: 'bytes32', + name: 'domainSeparator', + type: 'bytes32', }, { - "internalType": "address", - "name": "conduitController", - "type": "address" - } + internalType: 'address', + name: 'conduitController', + type: 'address', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [ + inputs: [ { - "components": [ + components: [ { - "components": [ + components: [ { - "internalType": "address", - "name": "offerer", - "type": "address" + internalType: 'address', + name: 'offerer', + type: 'address', }, - { "internalType": "address", "name": "zone", "type": "address" }, + { internalType: 'address', name: 'zone', type: 'address' }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, { - "internalType": "address", - "name": "token", - "type": "address" + internalType: 'address', + name: 'token', + type: 'address', }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', + }, ], - "internalType": "structOfferItem[]", - "name": "offer", - "type": "tuple[]" + internalType: 'structOfferItem[]', + name: 'offer', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, { - "internalType": "address", - "name": "token", - "type": "address" + internalType: 'address', + name: 'token', + type: 'address', }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" + internalType: 'structConsiderationItem[]', + name: 'consideration', + type: 'tuple[]', }, { - "internalType": "enumOrderType", - "name": "orderType", - "type": "uint8" + internalType: 'enumOrderType', + name: 'orderType', + type: 'uint8', }, { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" + internalType: 'uint256', + name: 'startTime', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" + internalType: 'uint256', + name: 'endTime', + type: 'uint256', }, { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" + internalType: 'bytes32', + name: 'zoneHash', + type: 'bytes32', }, - { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { internalType: 'uint256', name: 'salt', type: 'uint256' }, { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'conduitKey', + type: 'bytes32', }, { - "internalType": "uint256", - "name": "totalOriginalConsiderationItems", - "type": "uint256" - } + internalType: 'uint256', + name: 'totalOriginalConsiderationItems', + type: 'uint256', + }, ], - "internalType": "structOrderParameters", - "name": "parameters", - "type": "tuple" + internalType: 'structOrderParameters', + name: 'parameters', + type: 'tuple', }, - { "internalType": "uint120", "name": "numerator", "type": "uint120" }, + { internalType: 'uint120', name: 'numerator', type: 'uint120' }, { - "internalType": "uint120", - "name": "denominator", - "type": "uint120" + internalType: 'uint120', + name: 'denominator', + type: 'uint120', }, - { "internalType": "bytes", "name": "signature", "type": "bytes" }, - { "internalType": "bytes", "name": "extraData", "type": "bytes" } + { internalType: 'bytes', name: 'signature', type: 'bytes' }, + { internalType: 'bytes', name: 'extraData', type: 'bytes' }, ], - "internalType": "structAdvancedOrder[]", - "name": "orders", - "type": "tuple[]" + internalType: 'structAdvancedOrder[]', + name: 'orders', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" + internalType: 'uint256', + name: 'orderIndex', + type: 'uint256', }, - { "internalType": "enumSide", "name": "side", "type": "uint8" }, - { "internalType": "uint256", "name": "index", "type": "uint256" }, + { internalType: 'enumSide', name: 'side', type: 'uint8' }, + { internalType: 'uint256', name: 'index', type: 'uint256' }, { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" + internalType: 'uint256', + name: 'identifier', + type: 'uint256', }, { - "internalType": "bytes32[]", - "name": "criteriaProof", - "type": "bytes32[]" - } + internalType: 'bytes32[]', + name: 'criteriaProof', + type: 'bytes32[]', + }, ], - "internalType": "structCriteriaResolver[]", - "name": "criteriaResolvers", - "type": "tuple[]" + internalType: 'structCriteriaResolver[]', + name: 'criteriaResolvers', + type: 'tuple[]', }, { - "components": [ + components: [ { - "components": [ + components: [ { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" + internalType: 'uint256', + name: 'orderIndex', + type: 'uint256', }, { - "internalType": "uint256", - "name": "itemIndex", - "type": "uint256" - } + internalType: 'uint256', + name: 'itemIndex', + type: 'uint256', + }, ], - "internalType": "structFulfillmentComponent[]", - "name": "offerComponents", - "type": "tuple[]" + internalType: 'structFulfillmentComponent[]', + name: 'offerComponents', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" + internalType: 'uint256', + name: 'orderIndex', + type: 'uint256', }, { - "internalType": "uint256", - "name": "itemIndex", - "type": "uint256" - } + internalType: 'uint256', + name: 'itemIndex', + type: 'uint256', + }, ], - "internalType": "structFulfillmentComponent[]", - "name": "considerationComponents", - "type": "tuple[]" - } + internalType: 'structFulfillmentComponent[]', + name: 'considerationComponents', + type: 'tuple[]', + }, ], - "internalType": "structFulfillment[]", - "name": "fulfillments", - "type": "tuple[]" + internalType: 'structFulfillment[]', + name: 'fulfillments', + type: 'tuple[]', }, - { "internalType": "address", "name": "recipient", "type": "address" } + { internalType: 'address', name: 'recipient', type: 'address' }, ], - "name": "matchAdvancedOrders", - "outputs": [ + name: 'matchAdvancedOrders', + outputs: [ { - "components": [ + components: [ { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, - { "internalType": "address", "name": "token", "type": "address" }, + { internalType: 'address', name: 'token', type: 'address' }, { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" + internalType: 'uint256', + name: 'identifier', + type: 'uint256', }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + internalType: 'uint256', + name: 'amount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structReceivedItem", - "name": "item", - "type": "tuple" + internalType: 'structReceivedItem', + name: 'item', + type: 'tuple', }, - { "internalType": "address", "name": "offerer", "type": "address" }, - { "internalType": "bytes32", "name": "conduitKey", "type": "bytes32" } + { internalType: 'address', name: 'offerer', type: 'address' }, + { internalType: 'bytes32', name: 'conduitKey', type: 'bytes32' }, ], - "internalType": "structExecution[]", - "name": "executions", - "type": "tuple[]" - } + internalType: 'structExecution[]', + name: 'executions', + type: 'tuple[]', + }, ], - "stateMutability": "payable", - "type": "function" + stateMutability: 'payable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "components": [ + components: [ { - "components": [ + components: [ { - "internalType": "address", - "name": "offerer", - "type": "address" + internalType: 'address', + name: 'offerer', + type: 'address', }, - { "internalType": "address", "name": "zone", "type": "address" }, + { internalType: 'address', name: 'zone', type: 'address' }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, { - "internalType": "address", - "name": "token", - "type": "address" + internalType: 'address', + name: 'token', + type: 'address', }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', + }, ], - "internalType": "structOfferItem[]", - "name": "offer", - "type": "tuple[]" + internalType: 'structOfferItem[]', + name: 'offer', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, { - "internalType": "address", - "name": "token", - "type": "address" + internalType: 'address', + name: 'token', + type: 'address', }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" + internalType: 'structConsiderationItem[]', + name: 'consideration', + type: 'tuple[]', }, { - "internalType": "enumOrderType", - "name": "orderType", - "type": "uint8" + internalType: 'enumOrderType', + name: 'orderType', + type: 'uint8', }, { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" + internalType: 'uint256', + name: 'startTime', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" + internalType: 'uint256', + name: 'endTime', + type: 'uint256', }, { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" + internalType: 'bytes32', + name: 'zoneHash', + type: 'bytes32', }, - { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { internalType: 'uint256', name: 'salt', type: 'uint256' }, { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'conduitKey', + type: 'bytes32', }, { - "internalType": "uint256", - "name": "totalOriginalConsiderationItems", - "type": "uint256" - } + internalType: 'uint256', + name: 'totalOriginalConsiderationItems', + type: 'uint256', + }, ], - "internalType": "structOrderParameters", - "name": "parameters", - "type": "tuple" + internalType: 'structOrderParameters', + name: 'parameters', + type: 'tuple', }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } + { internalType: 'bytes', name: 'signature', type: 'bytes' }, ], - "internalType": "structOrder[]", - "name": "orders", - "type": "tuple[]" + internalType: 'structOrder[]', + name: 'orders', + type: 'tuple[]', }, { - "components": [ + components: [ { - "components": [ + components: [ { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" + internalType: 'uint256', + name: 'orderIndex', + type: 'uint256', }, { - "internalType": "uint256", - "name": "itemIndex", - "type": "uint256" - } + internalType: 'uint256', + name: 'itemIndex', + type: 'uint256', + }, ], - "internalType": "structFulfillmentComponent[]", - "name": "offerComponents", - "type": "tuple[]" + internalType: 'structFulfillmentComponent[]', + name: 'offerComponents', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" + internalType: 'uint256', + name: 'orderIndex', + type: 'uint256', }, { - "internalType": "uint256", - "name": "itemIndex", - "type": "uint256" - } + internalType: 'uint256', + name: 'itemIndex', + type: 'uint256', + }, ], - "internalType": "structFulfillmentComponent[]", - "name": "considerationComponents", - "type": "tuple[]" - } + internalType: 'structFulfillmentComponent[]', + name: 'considerationComponents', + type: 'tuple[]', + }, ], - "internalType": "structFulfillment[]", - "name": "fulfillments", - "type": "tuple[]" - } + internalType: 'structFulfillment[]', + name: 'fulfillments', + type: 'tuple[]', + }, ], - "name": "matchOrders", - "outputs": [ + name: 'matchOrders', + outputs: [ { - "components": [ + components: [ { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, - { "internalType": "address", "name": "token", "type": "address" }, + { internalType: 'address', name: 'token', type: 'address' }, { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" + internalType: 'uint256', + name: 'identifier', + type: 'uint256', }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + internalType: 'uint256', + name: 'amount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structReceivedItem", - "name": "item", - "type": "tuple" + internalType: 'structReceivedItem', + name: 'item', + type: 'tuple', }, - { "internalType": "address", "name": "offerer", "type": "address" }, - { "internalType": "bytes32", "name": "conduitKey", "type": "bytes32" } + { internalType: 'address', name: 'offerer', type: 'address' }, + { internalType: 'bytes32', name: 'conduitKey', type: 'bytes32' }, ], - "internalType": "structExecution[]", - "name": "executions", - "type": "tuple[]" - } + internalType: 'structExecution[]', + name: 'executions', + type: 'tuple[]', + }, ], - "stateMutability": "payable", - "type": "function" + stateMutability: 'payable', + type: 'function', }, { - "inputs": [], - "name": "name", - "outputs": [ - { "internalType": "string", "name": "contractName", "type": "string" } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: 'name', + outputs: [{ internalType: 'string', name: 'contractName', type: 'string' }], + stateMutability: 'view', + type: 'function', }, { - "inputs": [ + inputs: [ { - "components": [ + components: [ { - "components": [ + components: [ { - "internalType": "address", - "name": "offerer", - "type": "address" + internalType: 'address', + name: 'offerer', + type: 'address', }, - { "internalType": "address", "name": "zone", "type": "address" }, + { internalType: 'address', name: 'zone', type: 'address' }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, { - "internalType": "address", - "name": "token", - "type": "address" + internalType: 'address', + name: 'token', + type: 'address', }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', + }, ], - "internalType": "structOfferItem[]", - "name": "offer", - "type": "tuple[]" + internalType: 'structOfferItem[]', + name: 'offer', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, { - "internalType": "address", - "name": "token", - "type": "address" + internalType: 'address', + name: 'token', + type: 'address', }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" + internalType: 'structConsiderationItem[]', + name: 'consideration', + type: 'tuple[]', }, { - "internalType": "enumOrderType", - "name": "orderType", - "type": "uint8" + internalType: 'enumOrderType', + name: 'orderType', + type: 'uint8', }, { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" + internalType: 'uint256', + name: 'startTime', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" + internalType: 'uint256', + name: 'endTime', + type: 'uint256', }, { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" + internalType: 'bytes32', + name: 'zoneHash', + type: 'bytes32', }, - { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { internalType: 'uint256', name: 'salt', type: 'uint256' }, { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'conduitKey', + type: 'bytes32', }, { - "internalType": "uint256", - "name": "totalOriginalConsiderationItems", - "type": "uint256" - } + internalType: 'uint256', + name: 'totalOriginalConsiderationItems', + type: 'uint256', + }, ], - "internalType": "structOrderParameters", - "name": "parameters", - "type": "tuple" + internalType: 'structOrderParameters', + name: 'parameters', + type: 'tuple', }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } + { internalType: 'bytes', name: 'signature', type: 'bytes' }, ], - "internalType": "structOrder[]", - "name": "orders", - "type": "tuple[]" - } - ], - "name": "validate", - "outputs": [ - { "internalType": "bool", "name": "validated", "type": "bool" } + internalType: 'structOrder[]', + name: 'orders', + type: 'tuple[]', + }, ], - "stateMutability": "nonpayable", - "type": "function" + name: 'validate', + outputs: [{ internalType: 'bool', name: 'validated', type: 'bool' }], + stateMutability: 'nonpayable', + type: 'function', }, - { "inputs": [], "name": "BadContractSignature", "type": "error" }, - { "inputs": [], "name": "BadFraction", "type": "error" }, + { inputs: [], name: 'BadContractSignature', type: 'error' }, + { inputs: [], name: 'BadFraction', type: 'error' }, { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } + inputs: [ + { internalType: 'address', name: 'token', type: 'address' }, + { internalType: 'address', name: 'from', type: 'address' }, + { internalType: 'address', name: 'to', type: 'address' }, + { internalType: 'uint256', name: 'amount', type: 'uint256' }, ], - "name": "BadReturnValueFromERC20OnTransfer", - "type": "error" + name: 'BadReturnValueFromERC20OnTransfer', + type: 'error', }, { - "inputs": [{ "internalType": "uint8", "name": "v", "type": "uint8" }], - "name": "BadSignatureV", - "type": "error" + inputs: [{ internalType: 'uint8', name: 'v', type: 'uint8' }], + name: 'BadSignatureV', + type: 'error', }, - { "inputs": [], "name": "CannotCancelOrder", "type": "error" }, + { inputs: [], name: 'CannotCancelOrder', type: 'error' }, { - "inputs": [], - "name": "ConsiderationCriteriaResolverOutOfRange", - "type": "error" + inputs: [], + name: 'ConsiderationCriteriaResolverOutOfRange', + type: 'error', }, { - "inputs": [], - "name": "ConsiderationLengthNotEqualToTotalOriginal", - "type": "error" + inputs: [], + name: 'ConsiderationLengthNotEqualToTotalOriginal', + type: 'error', }, { - "inputs": [ - { "internalType": "uint256", "name": "orderIndex", "type": "uint256" }, + inputs: [ + { internalType: 'uint256', name: 'orderIndex', type: 'uint256' }, { - "internalType": "uint256", - "name": "considerationIndex", - "type": "uint256" + internalType: 'uint256', + name: 'considerationIndex', + type: 'uint256', }, { - "internalType": "uint256", - "name": "shortfallAmount", - "type": "uint256" - } + internalType: 'uint256', + name: 'shortfallAmount', + type: 'uint256', + }, ], - "name": "ConsiderationNotMet", - "type": "error" + name: 'ConsiderationNotMet', + type: 'error', }, - { "inputs": [], "name": "CriteriaNotEnabledForItem", "type": "error" }, + { inputs: [], name: 'CriteriaNotEnabledForItem', type: 'error' }, { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, + inputs: [ + { internalType: 'address', name: 'token', type: 'address' }, + { internalType: 'address', name: 'from', type: 'address' }, + { internalType: 'address', name: 'to', type: 'address' }, { - "internalType": "uint256[]", - "name": "identifiers", - "type": "uint256[]" + internalType: 'uint256[]', + name: 'identifiers', + type: 'uint256[]', }, - { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } + { internalType: 'uint256[]', name: 'amounts', type: 'uint256[]' }, ], - "name": "ERC1155BatchTransferGenericFailure", - "type": "error" + name: 'ERC1155BatchTransferGenericFailure', + type: 'error', }, - { "inputs": [], "name": "InexactFraction", "type": "error" }, - { "inputs": [], "name": "InsufficientNativeTokensSupplied", "type": "error" }, - { "inputs": [], "name": "Invalid1155BatchTransferEncoding", "type": "error" }, + { inputs: [], name: 'InexactFraction', type: 'error' }, + { inputs: [], name: 'InsufficientNativeTokensSupplied', type: 'error' }, + { inputs: [], name: 'Invalid1155BatchTransferEncoding', type: 'error' }, { - "inputs": [], - "name": "InvalidBasicOrderParameterEncoding", - "type": "error" + inputs: [], + name: 'InvalidBasicOrderParameterEncoding', + type: 'error', }, { - "inputs": [ - { "internalType": "address", "name": "conduit", "type": "address" } - ], - "name": "InvalidCallToConduit", - "type": "error" + inputs: [{ internalType: 'address', name: 'conduit', type: 'address' }], + name: 'InvalidCallToConduit', + type: 'error', }, { - "inputs": [ - { "internalType": "bytes32", "name": "conduitKey", "type": "bytes32" }, - { "internalType": "address", "name": "conduit", "type": "address" } + inputs: [ + { internalType: 'bytes32', name: 'conduitKey', type: 'bytes32' }, + { internalType: 'address', name: 'conduit', type: 'address' }, ], - "name": "InvalidConduit", - "type": "error" + name: 'InvalidConduit', + type: 'error', }, { - "inputs": [ - { "internalType": "bytes32", "name": "orderHash", "type": "bytes32" } - ], - "name": "InvalidContractOrder", - "type": "error" + inputs: [{ internalType: 'bytes32', name: 'orderHash', type: 'bytes32' }], + name: 'InvalidContractOrder', + type: 'error', }, { - "inputs": [ - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "InvalidERC721TransferAmount", - "type": "error" + inputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }], + name: 'InvalidERC721TransferAmount', + type: 'error', }, - { "inputs": [], "name": "InvalidFulfillmentComponentData", "type": "error" }, + { inputs: [], name: 'InvalidFulfillmentComponentData', type: 'error' }, { - "inputs": [ - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "InvalidMsgValue", - "type": "error" + inputs: [{ internalType: 'uint256', name: 'value', type: 'uint256' }], + name: 'InvalidMsgValue', + type: 'error', }, - { "inputs": [], "name": "InvalidNativeOfferItem", "type": "error" }, - { "inputs": [], "name": "InvalidProof", "type": "error" }, + { inputs: [], name: 'InvalidNativeOfferItem', type: 'error' }, + { inputs: [], name: 'InvalidProof', type: 'error' }, { - "inputs": [ - { "internalType": "bytes32", "name": "orderHash", "type": "bytes32" } - ], - "name": "InvalidRestrictedOrder", - "type": "error" + inputs: [{ internalType: 'bytes32', name: 'orderHash', type: 'bytes32' }], + name: 'InvalidRestrictedOrder', + type: 'error', }, - { "inputs": [], "name": "InvalidSignature", "type": "error" }, - { "inputs": [], "name": "InvalidSigner", "type": "error" }, + { inputs: [], name: 'InvalidSignature', type: 'error' }, + { inputs: [], name: 'InvalidSigner', type: 'error' }, { - "inputs": [ - { "internalType": "uint256", "name": "startTime", "type": "uint256" }, - { "internalType": "uint256", "name": "endTime", "type": "uint256" } + inputs: [ + { internalType: 'uint256', name: 'startTime', type: 'uint256' }, + { internalType: 'uint256', name: 'endTime', type: 'uint256' }, ], - "name": "InvalidTime", - "type": "error" + name: 'InvalidTime', + type: 'error', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "fulfillmentIndex", - "type": "uint256" - } + internalType: 'uint256', + name: 'fulfillmentIndex', + type: 'uint256', + }, ], - "name": "MismatchedFulfillmentOfferAndConsiderationComponents", - "type": "error" + name: 'MismatchedFulfillmentOfferAndConsiderationComponents', + type: 'error', }, { - "inputs": [{ "internalType": "enumSide", "name": "side", "type": "uint8" }], - "name": "MissingFulfillmentComponentOnAggregation", - "type": "error" + inputs: [{ internalType: 'enumSide', name: 'side', type: 'uint8' }], + name: 'MissingFulfillmentComponentOnAggregation', + type: 'error', }, - { "inputs": [], "name": "MissingItemAmount", "type": "error" }, + { inputs: [], name: 'MissingItemAmount', type: 'error' }, { - "inputs": [], - "name": "MissingOriginalConsiderationItems", - "type": "error" + inputs: [], + name: 'MissingOriginalConsiderationItems', + type: 'error', }, { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } + inputs: [ + { internalType: 'address', name: 'account', type: 'address' }, + { internalType: 'uint256', name: 'amount', type: 'uint256' }, ], - "name": "NativeTokenTransferGenericFailure", - "type": "error" + name: 'NativeTokenTransferGenericFailure', + type: 'error', }, { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "NoContract", - "type": "error" + inputs: [{ internalType: 'address', name: 'account', type: 'address' }], + name: 'NoContract', + type: 'error', }, - { "inputs": [], "name": "NoReentrantCalls", "type": "error" }, - { "inputs": [], "name": "NoSpecifiedOrdersAvailable", "type": "error" }, + { inputs: [], name: 'NoReentrantCalls', type: 'error' }, + { inputs: [], name: 'NoSpecifiedOrdersAvailable', type: 'error' }, { - "inputs": [], - "name": "OfferAndConsiderationRequiredOnFulfillment", - "type": "error" + inputs: [], + name: 'OfferAndConsiderationRequiredOnFulfillment', + type: 'error', }, - { "inputs": [], "name": "OfferCriteriaResolverOutOfRange", "type": "error" }, + { inputs: [], name: 'OfferCriteriaResolverOutOfRange', type: 'error' }, { - "inputs": [ - { "internalType": "bytes32", "name": "orderHash", "type": "bytes32" } - ], - "name": "OrderAlreadyFilled", - "type": "error" + inputs: [{ internalType: 'bytes32', name: 'orderHash', type: 'bytes32' }], + name: 'OrderAlreadyFilled', + type: 'error', }, { - "inputs": [{ "internalType": "enumSide", "name": "side", "type": "uint8" }], - "name": "OrderCriteriaResolverOutOfRange", - "type": "error" + inputs: [{ internalType: 'enumSide', name: 'side', type: 'uint8' }], + name: 'OrderCriteriaResolverOutOfRange', + type: 'error', }, { - "inputs": [ - { "internalType": "bytes32", "name": "orderHash", "type": "bytes32" } - ], - "name": "OrderIsCancelled", - "type": "error" + inputs: [{ internalType: 'bytes32', name: 'orderHash', type: 'bytes32' }], + name: 'OrderIsCancelled', + type: 'error', }, { - "inputs": [ - { "internalType": "bytes32", "name": "orderHash", "type": "bytes32" } - ], - "name": "OrderPartiallyFilled", - "type": "error" + inputs: [{ internalType: 'bytes32', name: 'orderHash', type: 'bytes32' }], + name: 'OrderPartiallyFilled', + type: 'error', }, - { "inputs": [], "name": "PartialFillsNotEnabledForOrder", "type": "error" }, + { inputs: [], name: 'PartialFillsNotEnabledForOrder', type: 'error' }, { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "identifier", "type": "uint256" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } + inputs: [ + { internalType: 'address', name: 'token', type: 'address' }, + { internalType: 'address', name: 'from', type: 'address' }, + { internalType: 'address', name: 'to', type: 'address' }, + { internalType: 'uint256', name: 'identifier', type: 'uint256' }, + { internalType: 'uint256', name: 'amount', type: 'uint256' }, ], - "name": "TokenTransferGenericFailure", - "type": "error" + name: 'TokenTransferGenericFailure', + type: 'error', }, { - "inputs": [ - { "internalType": "uint256", "name": "orderIndex", "type": "uint256" }, + inputs: [ + { internalType: 'uint256', name: 'orderIndex', type: 'uint256' }, { - "internalType": "uint256", - "name": "considerationIndex", - "type": "uint256" - } + internalType: 'uint256', + name: 'considerationIndex', + type: 'uint256', + }, ], - "name": "UnresolvedConsiderationCriteria", - "type": "error" + name: 'UnresolvedConsiderationCriteria', + type: 'error', }, { - "inputs": [ - { "internalType": "uint256", "name": "orderIndex", "type": "uint256" }, - { "internalType": "uint256", "name": "offerIndex", "type": "uint256" } + inputs: [ + { internalType: 'uint256', name: 'orderIndex', type: 'uint256' }, + { internalType: 'uint256', name: 'offerIndex', type: 'uint256' }, ], - "name": "UnresolvedOfferCriteria", - "type": "error" + name: 'UnresolvedOfferCriteria', + type: 'error', }, - { "inputs": [], "name": "UnusedItemParameters", "type": "error" }, + { inputs: [], name: 'UnusedItemParameters', type: 'error' }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": false, - "internalType": "uint256", - "name": "newCounter", - "type": "uint256" + indexed: false, + internalType: 'uint256', + name: 'newCounter', + type: 'uint256', }, { - "indexed": true, - "internalType": "address", - "name": "offerer", - "type": "address" - } + indexed: true, + internalType: 'address', + name: 'offerer', + type: 'address', + }, ], - "name": "CounterIncremented", - "type": "event" + name: 'CounterIncremented', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": false, - "internalType": "bytes32", - "name": "orderHash", - "type": "bytes32" + indexed: false, + internalType: 'bytes32', + name: 'orderHash', + type: 'bytes32', }, { - "indexed": true, - "internalType": "address", - "name": "offerer", - "type": "address" + indexed: true, + internalType: 'address', + name: 'offerer', + type: 'address', }, { - "indexed": true, - "internalType": "address", - "name": "zone", - "type": "address" - } + indexed: true, + internalType: 'address', + name: 'zone', + type: 'address', + }, ], - "name": "OrderCancelled", - "type": "event" + name: 'OrderCancelled', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": false, - "internalType": "bytes32", - "name": "orderHash", - "type": "bytes32" + indexed: false, + internalType: 'bytes32', + name: 'orderHash', + type: 'bytes32', }, { - "indexed": true, - "internalType": "address", - "name": "offerer", - "type": "address" + indexed: true, + internalType: 'address', + name: 'offerer', + type: 'address', }, { - "indexed": true, - "internalType": "address", - "name": "zone", - "type": "address" + indexed: true, + internalType: 'address', + name: 'zone', + type: 'address', }, { - "indexed": false, - "internalType": "address", - "name": "recipient", - "type": "address" + indexed: false, + internalType: 'address', + name: 'recipient', + type: 'address', }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, - { "internalType": "address", "name": "token", "type": "address" }, + { internalType: 'address', name: 'token', type: 'address' }, { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" + internalType: 'uint256', + name: 'identifier', + type: 'uint256', }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } + { internalType: 'uint256', name: 'amount', type: 'uint256' }, ], - "indexed": false, - "internalType": "structSpentItem[]", - "name": "offer", - "type": "tuple[]" + indexed: false, + internalType: 'structSpentItem[]', + name: 'offer', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, - { "internalType": "address", "name": "token", "type": "address" }, + { internalType: 'address', name: 'token', type: 'address' }, { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" + internalType: 'uint256', + name: 'identifier', + type: 'uint256', }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { internalType: 'uint256', name: 'amount', type: 'uint256' }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "indexed": false, - "internalType": "structReceivedItem[]", - "name": "consideration", - "type": "tuple[]" - } + indexed: false, + internalType: 'structReceivedItem[]', + name: 'consideration', + type: 'tuple[]', + }, ], - "name": "OrderFulfilled", - "type": "event" + name: 'OrderFulfilled', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": false, - "internalType": "bytes32", - "name": "orderHash", - "type": "bytes32" + indexed: false, + internalType: 'bytes32', + name: 'orderHash', + type: 'bytes32', }, { - "components": [ - { "internalType": "address", "name": "offerer", "type": "address" }, - { "internalType": "address", "name": "zone", "type": "address" }, + components: [ + { internalType: 'address', name: 'offerer', type: 'address' }, + { internalType: 'address', name: 'zone', type: 'address' }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, - { "internalType": "address", "name": "token", "type": "address" }, + { internalType: 'address', name: 'token', type: 'address' }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', + }, ], - "internalType": "structOfferItem[]", - "name": "offer", - "type": "tuple[]" + internalType: 'structOfferItem[]', + name: 'offer', + type: 'tuple[]', }, { - "components": [ + components: [ { - "internalType": "enumItemType", - "name": "itemType", - "type": "uint8" + internalType: 'enumItemType', + name: 'itemType', + type: 'uint8', }, - { "internalType": "address", "name": "token", "type": "address" }, + { internalType: 'address', name: 'token', type: 'address' }, { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" + internalType: 'uint256', + name: 'identifierOrCriteria', + type: 'uint256', }, { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" + internalType: 'uint256', + name: 'startAmount', + type: 'uint256', }, { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" + internalType: 'uint256', + name: 'endAmount', + type: 'uint256', }, { - "internalType": "addresspayable", - "name": "recipient", - "type": "address" - } + internalType: 'addresspayable', + name: 'recipient', + type: 'address', + }, ], - "internalType": "structConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" + internalType: 'structConsiderationItem[]', + name: 'consideration', + type: 'tuple[]', }, { - "internalType": "enumOrderType", - "name": "orderType", - "type": "uint8" + internalType: 'enumOrderType', + name: 'orderType', + type: 'uint8', }, - { "internalType": "uint256", "name": "startTime", "type": "uint256" }, - { "internalType": "uint256", "name": "endTime", "type": "uint256" }, - { "internalType": "bytes32", "name": "zoneHash", "type": "bytes32" }, - { "internalType": "uint256", "name": "salt", "type": "uint256" }, + { internalType: 'uint256', name: 'startTime', type: 'uint256' }, + { internalType: 'uint256', name: 'endTime', type: 'uint256' }, + { internalType: 'bytes32', name: 'zoneHash', type: 'bytes32' }, + { internalType: 'uint256', name: 'salt', type: 'uint256' }, { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" + internalType: 'bytes32', + name: 'conduitKey', + type: 'bytes32', }, { - "internalType": "uint256", - "name": "totalOriginalConsiderationItems", - "type": "uint256" - } + internalType: 'uint256', + name: 'totalOriginalConsiderationItems', + type: 'uint256', + }, ], - "indexed": false, - "internalType": "structOrderParameters", - "name": "orderParameters", - "type": "tuple" - } + indexed: false, + internalType: 'structOrderParameters', + name: 'orderParameters', + type: 'tuple', + }, ], - "name": "OrderValidated", - "type": "event" + name: 'OrderValidated', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": false, - "internalType": "bytes32[]", - "name": "orderHashes", - "type": "bytes32[]" - } + indexed: false, + internalType: 'bytes32[]', + name: 'orderHashes', + type: 'bytes32[]', + }, ], - "name": "OrdersMatched", - "type": "event" - } -] as const + name: 'OrdersMatched', + type: 'event', + }, +] as const; diff --git a/src/components/cactiComponents/ActionResponse.tsx b/src/components/cactiComponents/ActionResponse.tsx index ada9d2d2..0d33ed71 100644 --- a/src/components/cactiComponents/ActionResponse.tsx +++ b/src/components/cactiComponents/ActionResponse.tsx @@ -2,11 +2,9 @@ import { useEffect, useMemo, useState } from 'react'; import Skeleton from 'react-loading-skeleton'; import { CheckCircleIcon, ExclamationTriangleIcon } from '@heroicons/react/24/outline'; import { ConnectButton } from '@rainbow-me/rainbowkit'; - import tw from 'tailwind-styled-components'; import { TransactionReceipt, TransactionRequestBase, formatUnits, zeroAddress } from 'viem'; -import { useAccount, useNetwork, useSwitchNetwork, UsePrepareContractWriteConfig, } from 'wagmi'; - +import { UsePrepareContractWriteConfig, useAccount, useNetwork, useSwitchNetwork } from 'wagmi'; import useToken from '@/hooks/useToken'; import { cleanValue } from '@/utils'; import { ActionStepper } from './ActionStepper'; @@ -143,8 +141,7 @@ export const ActionResponse = ({ // explicitly showing approvalParams === undefined for clarity - as oppposed to !approvalParams if (_approvalParams === undefined) return setHasEnoughBalance(true); - if (BigInt(sendParams?.value || '0') > BigInt(ethBal || '0')) - return setHasEnoughBalance(false); + if (BigInt(sendParams?.value || '0') > BigInt(ethBal || '0')) return setHasEnoughBalance(false); // check approval token balance if (balance && _approvalParams?.approvalAmount) diff --git a/src/components/cactiComponents/hooks/useApproval.tsx b/src/components/cactiComponents/hooks/useApproval.tsx index 6e4e2af7..8fb8b81d 100644 --- a/src/components/cactiComponents/hooks/useApproval.tsx +++ b/src/components/cactiComponents/hooks/useApproval.tsx @@ -1,12 +1,12 @@ import { useMemo } from 'react'; import { useQuery } from 'react-query'; +import { zeroAddress } from 'viem'; import { erc20ABI, useContractWrite, usePrepareContractWrite, useWaitForTransaction } from 'wagmi'; import { prepareWriteContract } from 'wagmi/actions'; import useChainId from '@/hooks/useChainId'; import useToken from '@/hooks/useToken'; import { cleanValue } from '@/utils'; import useAllowance from './useAllowance'; -import { zeroAddress } from 'viem'; export type ApprovalBasicParams = { approvalAmount: bigint; @@ -21,7 +21,7 @@ const validateAddress = (addr: `0x${string}`): `0x${string}` | undefined => const useApproval = (params: ApprovalBasicParams) => { const chainId = useChainId(); const { approvalAmount, tokenAddress: _tokenAddress, spender: _spender } = params; - + const tokenAddress = validateAddress(_tokenAddress); const spender = validateAddress(_spender); @@ -41,7 +41,7 @@ const useApproval = (params: ApprovalBasicParams) => { // Prepare the approval transaction - doesn't run if address or spender is undefined const { data: config, isError: isPrepareError } = useQuery({ queryKey: ['prepareApprove', tokenAddress, spender, chainId], - queryFn: async () => { + queryFn: async () => { // case: invalid spender if (!spender) { console.warn(`Spender not found for approval`); @@ -53,7 +53,7 @@ const useApproval = (params: ApprovalBasicParams) => { return; } - const {request} = await prepareWriteContract({ + const { request } = await prepareWriteContract({ address: tokenAddress, abi: erc20ABI, functionName: 'approve', diff --git a/src/components/cactiComponents/hooks/useBalance.ts b/src/components/cactiComponents/hooks/useBalance.ts index caf5f12d..45cdfaed 100644 --- a/src/components/cactiComponents/hooks/useBalance.ts +++ b/src/components/cactiComponents/hooks/useBalance.ts @@ -1,10 +1,10 @@ import { useEffect, useState } from 'react'; import { useQuery } from 'react-query'; +import { zeroAddress } from 'viem'; import { useAccount } from 'wagmi'; import { fetchBalance, readContract } from 'wagmi/actions'; import erc1155ABI from '@/abi/erc1155ABI'; import useChainId from '@/hooks/useChainId'; -import { zeroAddress } from 'viem'; /** * @description gets the balance of a an account for a token address, or if no address is specified, get's eth balance @@ -42,7 +42,7 @@ const useBalance = ( chainId, abi: erc1155ABI, functionName: 'balanceOf', - args: [account, BigInt(erc1155TokenId) ], + args: [account, BigInt(erc1155TokenId)], }); return erc1155Bal; } diff --git a/src/components/current/widgets/rocketPool/rocketPoolWithdraw.tsx b/src/components/current/widgets/rocketPool/rocketPoolWithdraw.tsx index 424dd326..cd2bb805 100644 --- a/src/components/current/widgets/rocketPool/rocketPoolWithdraw.tsx +++ b/src/components/current/widgets/rocketPool/rocketPoolWithdraw.tsx @@ -1,5 +1,6 @@ import { useMemo } from 'react'; import { Address, UsePrepareContractWriteConfig } from 'wagmi'; +import rETHAbi from '@/abi/rETH'; import { ActionResponse, HeaderResponse, @@ -9,7 +10,6 @@ import { import { ResponseRow } from '@/components/cactiComponents/helpers/layout'; import useToken from '@/hooks/useToken'; import { cleanValue } from '@/utils'; -import rETHAbi from '@/abi/rETH'; interface RethProps { inputString: string; diff --git a/src/components/current/widgets/transfer/Transfer.tsx b/src/components/current/widgets/transfer/Transfer.tsx index 3d97cdd7..b354301b 100644 --- a/src/components/current/widgets/transfer/Transfer.tsx +++ b/src/components/current/widgets/transfer/Transfer.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import { parseUnits} from 'viem'; +import { parseUnits } from 'viem'; import { erc20ABI, useAccount, useEnsAddress } from 'wagmi'; import { ActionResponse, HeaderResponse } from '@/components/cactiComponents'; import useToken from '@/hooks/useToken'; @@ -47,8 +47,8 @@ const Transfer = ({ tokenSymbol, amtString, receiver }: TransferWidgetProps) => /> diff --git a/src/components/current/widgets/uniswap/Uniswap.tsx b/src/components/current/widgets/uniswap/Uniswap.tsx index d57d03b7..1c4e3504 100644 --- a/src/components/current/widgets/uniswap/Uniswap.tsx +++ b/src/components/current/widgets/uniswap/Uniswap.tsx @@ -46,7 +46,7 @@ const Uniswap = ({ const { data: tokenOutChecked } = useToken(tokenOutIsETH ? 'WETH' : tokenOutSymbol); const input = useInput(inputAmount, tokenInChecked?.symbol!); -const slippage_ = +slippage || 0.5; // in percentage terms + const slippage_ = +slippage || 0.5; // in percentage terms const getSlippageAdjustedAmount = (amount: bigint) => (amount * BigInt(10000 - slippage_ * 100)) / BigInt(10000); diff --git a/src/components/experimental_/widgets/arbitrum/ArbitrumDeposit.tsx b/src/components/experimental_/widgets/arbitrum/ArbitrumDeposit.tsx index 9ae17d43..c6e0205c 100644 --- a/src/components/experimental_/widgets/arbitrum/ArbitrumDeposit.tsx +++ b/src/components/experimental_/widgets/arbitrum/ArbitrumDeposit.tsx @@ -2,13 +2,13 @@ import { useEffect, useMemo, useState } from 'react'; import { Erc20Bridger, getL2Network } from '@arbitrum/sdk'; import { BigNumber, UnsignedTransaction } from 'ethers'; import { Interface } from 'ethers/lib/utils.js'; -import { erc20ABI, useAccount, usePrepareContractWrite} from 'wagmi'; +import { erc20ABI, useAccount, usePrepareContractWrite } from 'wagmi'; import { ActionResponse, HeaderResponse } from '@/components/cactiComponents'; import { ApprovalBasicParams } from '@/components/cactiComponents/hooks/useApproval'; import useInput from '@/hooks/useInput'; import useToken from '@/hooks/useToken'; -import Inbox from './abi/Inbox'; import { unsignedTxToTxRequestBase, useEthersProvider } from '@/utils/ethersAdapter'; +import Inbox from './abi/Inbox'; interface ArbitrumDepositETHProps { tokenSymbol: string; @@ -112,7 +112,7 @@ const ArbitrumDeposit = ({ tokenSymbol, amtString }: ArbitrumDepositETHProps) => label={`Deposit ${amount?.formatted || ''} ${tokenSymbol} to Arbitrum`} txParams={undefined} approvalParams={erc20ApprovalParams} - sendParams={ unsignedTxToTxRequestBase(sendParams as UnsignedTransaction, account!) } + sendParams={unsignedTxToTxRequestBase(sendParams as UnsignedTransaction, account!)} /> ); diff --git a/src/components/experimental_/widgets/arbitrum/ArbitrumWithdraw.tsx b/src/components/experimental_/widgets/arbitrum/ArbitrumWithdraw.tsx index 925f9eb3..662abe87 100644 --- a/src/components/experimental_/widgets/arbitrum/ArbitrumWithdraw.tsx +++ b/src/components/experimental_/widgets/arbitrum/ArbitrumWithdraw.tsx @@ -6,9 +6,9 @@ import { ActionResponse, HeaderResponse } from '@/components/cactiComponents'; import { ApprovalBasicParams } from '@/components/cactiComponents/hooks/useApproval'; import useInput from '@/hooks/useInput'; import useToken from '@/hooks/useToken'; +import { unsignedTxToTxRequestBase, useEthersProvider } from '@/utils/ethersAdapter'; import { L2_CHAIN_ID } from './ArbitrumDeposit'; import ArbSys from './abi/ArbSys'; -import { unsignedTxToTxRequestBase, useEthersProvider } from '@/utils/ethersAdapter'; interface ArbitrumWithdrawProps { tokenSymbol: string; @@ -80,7 +80,7 @@ const ArbitrumWithdraw = ({ tokenSymbol, amtString }: ArbitrumWithdrawProps) => label={`Withdraw ${amount?.formatted} ${tokenSymbol} from Arbitrum`} txParams={undefined} approvalParams={undefined} - sendParams={ unsignedTxToTxRequestBase(sendParams as UnsignedTransaction, account!) } + sendParams={unsignedTxToTxRequestBase(sendParams as UnsignedTransaction, account!)} /> ); diff --git a/src/contexts/ConnectionWrapper.tsx b/src/contexts/ConnectionWrapper.tsx index 0edfd2c0..12d97802 100644 --- a/src/contexts/ConnectionWrapper.tsx +++ b/src/contexts/ConnectionWrapper.tsx @@ -11,17 +11,15 @@ import { lightTheme, } from '@rainbow-me/rainbowkit'; import axios from 'axios'; - import { Chain, WagmiConfig, configureChains, createConfig, useEnsAvatar } from 'wagmi'; import { arbitrum, goerli, zkSyncTestnet } from 'wagmi/chains'; +import { publicProvider } from 'wagmi/providers/public'; import useCachedState from '@/hooks/useCachedState'; import { getBackendApiUrl } from '@/utils/backend'; import { GetSiweMessageOptions, RainbowKitSiweNextAuthProvider } from '@/utils/rainbowSIWEmod'; import SettingsContext from './SettingsContext'; -import { publicProvider } from 'wagmi/providers/public' const ConnectionWrapper = ({ children, useSiwe = true }: any) => { - /* Use a fork url cached in the browser localStorage, else use the .env value */ const [forkUrl] = useCachedState( 'forkUrl', @@ -47,17 +45,16 @@ const ConnectionWrapper = ({ children, useSiwe = true }: any) => { }, } as Chain; + const arbitrumFork = { + ...arbitrum, + name: 'Arbitrum One Fork', + rpcUrls: { + public: { http: [arbitrum.rpcUrls.public.http[0]] }, + default: { http: [process.env.ARBITRUM_FORK_URL] }, + }, + } as Chain; -const arbitrumFork = { - ...arbitrum, - name: 'Arbitrum One Fork', - rpcUrls: { - public: { http: [arbitrum.rpcUrls.public.http[0]] }, - default: { http: [process.env.ARBITRUM_FORK_URL] }, - }, -} as Chain; - -const { chains, publicClient, webSocketPublicClient } = configureChains( + const { chains, publicClient, webSocketPublicClient } = configureChains( [mainnetFork, goerli, zkSyncTestnet, arbitrumFork], [publicProvider()] ); diff --git a/src/utils/ethersAdapter.ts b/src/utils/ethersAdapter.ts index 3e010ed1..15c5a8cf 100644 --- a/src/utils/ethersAdapter.ts +++ b/src/utils/ethersAdapter.ts @@ -1,8 +1,8 @@ import * as React from 'react'; import { type WalletClient } from '@wagmi/core'; import { UnsignedTransaction, providers } from 'ethers'; -import { type PublicClient, usePublicClient, useWalletClient } from 'wagmi'; import { TransactionRequestBase } from 'viem'; +import { type PublicClient, usePublicClient, useWalletClient } from 'wagmi'; export function publicClientToProvider(publicClient: PublicClient) { const { chain, transport } = publicClient; @@ -41,7 +41,10 @@ export function useEthersSigner({ chainId }: { chainId?: number } = {}) { ); } -export const unsignedTxToTxRequestBase = (unsignedTx: UnsignedTransaction, from:`0x${string}` ): TransactionRequestBase => { +export const unsignedTxToTxRequestBase = ( + unsignedTx: UnsignedTransaction, + from: `0x${string}` +): TransactionRequestBase => { return { data: unsignedTx.data as `0x${string}`, from, @@ -49,5 +52,5 @@ export const unsignedTxToTxRequestBase = (unsignedTx: UnsignedTransaction, from: nonce: unsignedTx.nonce, to: unsignedTx.to as `0x${string}`, value: BigInt(unsignedTx.value!.toString()), - } -} + }; +}; diff --git a/src/utils/index.tsx b/src/utils/index.tsx index 5eae20b0..b7d67ab3 100644 --- a/src/utils/index.tsx +++ b/src/utils/index.tsx @@ -1,7 +1,7 @@ +import { formatEther, parseEther } from 'viem'; import projectListJson from '@/utils/ProjectList.json'; import tokenListJson from '@/utils/TokenList.json'; import { Project, Token } from '../types'; -import { formatEther, parseEther } from 'viem'; export const shortenAddress = (address: string) => address.slice(0, 6) + '...' + address.slice(-4); @@ -12,7 +12,7 @@ export const findTokenBySymbol = (symbol: string, chainId: number) => export const findTokenByAddress = (address: string, chainId: number) => tokenListJson.tokens.find( (token) => token.address.toLowerCase() === address.toLowerCase() && token.chainId === chainId - ) as Token | undefined; + ) as Token | undefined; export const formatToEther = (amount: string) => formatEther(BigInt(amount)); export const formatToWei = (amount: string) => parseEther(amount).toString();