@opensea/seaport-js 2.0.3 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/lib/bundle.js +34 -12
- package/lib/constants.js +4 -4
- package/lib/constants.js.map +1 -1
- package/lib/seaport.js +3 -3
- package/lib/seaport.js.map +1 -1
- package/lib/typechain-types/factories/@rari-capital/solmate/src/tokens/ERC1155.sol/ERC1155TokenReceiver__factory.js +1 -1
- package/lib/typechain-types/factories/@rari-capital/solmate/src/tokens/ERC1155.sol/ERC1155TokenReceiver__factory.js.map +1 -1
- package/lib/typechain-types/factories/@rari-capital/solmate/src/tokens/ERC1155.sol/ERC1155__factory.js +1 -1
- package/lib/typechain-types/factories/@rari-capital/solmate/src/tokens/ERC1155.sol/ERC1155__factory.js.map +1 -1
- package/lib/typechain-types/factories/@rari-capital/solmate/src/tokens/ERC20__factory.js +1 -1
- package/lib/typechain-types/factories/@rari-capital/solmate/src/tokens/ERC20__factory.js.map +1 -1
- package/lib/typechain-types/factories/@rari-capital/solmate/src/tokens/ERC721.sol/ERC721TokenReceiver__factory.js +1 -1
- package/lib/typechain-types/factories/@rari-capital/solmate/src/tokens/ERC721.sol/ERC721TokenReceiver__factory.js.map +1 -1
- package/lib/typechain-types/factories/@rari-capital/solmate/src/tokens/ERC721.sol/ERC721__factory.js +1 -1
- package/lib/typechain-types/factories/@rari-capital/solmate/src/tokens/ERC721.sol/ERC721__factory.js.map +1 -1
- package/lib/typechain-types/factories/domain-registry/contracts/DomainRegistry__factory.js +1 -1
- package/lib/typechain-types/factories/domain-registry/contracts/DomainRegistry__factory.js.map +1 -1
- package/lib/typechain-types/factories/domain-registry/contracts/interfaces/DomainRegistryInterface__factory.js +1 -1
- package/lib/typechain-types/factories/domain-registry/contracts/interfaces/DomainRegistryInterface__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/conduit/ConduitController__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/conduit/ConduitController__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/conduit/Conduit__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/conduit/Conduit__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/AmountDeriver__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/AmountDeriver__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/Assertions__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/Assertions__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/BasicOrderFulfiller__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/BasicOrderFulfiller__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/ConsiderationBase__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/ConsiderationBase__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/Consideration__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/Consideration__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/CounterManager__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/CounterManager__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/CriteriaResolution__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/CriteriaResolution__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/Executor__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/Executor__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/FulfillmentApplier__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/FulfillmentApplier__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/GettersAndDerivers__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/GettersAndDerivers__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/OrderCombiner__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/OrderCombiner__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/OrderFulfiller__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/OrderFulfiller__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/OrderValidator__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/OrderValidator__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/ReentrancyGuard__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/ReentrancyGuard__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/SignatureVerification__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/SignatureVerification__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/TokenTransferrer__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/TokenTransferrer__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/Verifiers__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/Verifiers__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/ZoneInteraction__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-core/src/lib/ZoneInteraction__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/AmountDerivationErrors__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/AmountDerivationErrors__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/ConduitControllerInterface__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/ConduitControllerInterface__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/ConduitInterface__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/ConduitInterface__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/ConsiderationEventsAndErrors__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/ConsiderationEventsAndErrors__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/ConsiderationInterface__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/ConsiderationInterface__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/CriteriaResolutionErrors__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/CriteriaResolutionErrors__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/FulfillmentApplicationErrors__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/FulfillmentApplicationErrors__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/ReentrancyErrors__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/ReentrancyErrors__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/SignatureVerificationErrors__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/SignatureVerificationErrors__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/TokenTransferrerErrors__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/TokenTransferrerErrors__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/ZoneInteractionErrors__factory.js +1 -1
- package/lib/typechain-types/factories/seaport-types/src/interfaces/ZoneInteractionErrors__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport_v1_4/contracts/Seaport__factory.js +1 -1
- package/lib/typechain-types/factories/seaport_v1_4/contracts/Seaport__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport_v1_4/contracts/conduit/Conduit.sol/LocalConduit__factory.js +1 -1
- package/lib/typechain-types/factories/seaport_v1_4/contracts/conduit/Conduit.sol/LocalConduit__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport_v1_4/contracts/conduit/ConduitController.sol/LocalConduitController__factory.js +1 -1
- package/lib/typechain-types/factories/seaport_v1_4/contracts/conduit/ConduitController.sol/LocalConduitController__factory.js.map +1 -1
- package/lib/typechain-types/factories/seaport_v1_5/contracts/Seaport__factory.js +1 -1
- package/lib/typechain-types/factories/seaport_v1_5/contracts/Seaport__factory.js.map +1 -1
- package/lib/typechain-types/factories/src/contracts/test/TestERC1155__factory.js +1 -1
- package/lib/typechain-types/factories/src/contracts/test/TestERC1155__factory.js.map +1 -1
- package/lib/typechain-types/factories/src/contracts/test/TestERC1271Wallet.sol/IERC20Approve__factory.d.ts +26 -0
- package/lib/typechain-types/factories/src/contracts/test/TestERC1271Wallet.sol/IERC20Approve__factory.js +44 -0
- package/lib/typechain-types/factories/src/contracts/test/TestERC1271Wallet.sol/IERC20Approve__factory.js.map +1 -0
- package/lib/typechain-types/factories/src/contracts/test/TestERC1271Wallet.sol/TestERC1271Wallet__factory.d.ts +96 -0
- package/lib/typechain-types/factories/src/contracts/test/TestERC1271Wallet.sol/TestERC1271Wallet__factory.js +142 -0
- package/lib/typechain-types/factories/src/contracts/test/TestERC1271Wallet.sol/TestERC1271Wallet__factory.js.map +1 -0
- package/lib/typechain-types/factories/src/contracts/test/TestERC1271Wallet.sol/index.d.ts +2 -0
- package/lib/typechain-types/factories/src/contracts/test/TestERC1271Wallet.sol/index.js +11 -0
- package/lib/typechain-types/factories/src/contracts/test/TestERC1271Wallet.sol/index.js.map +1 -0
- package/lib/typechain-types/factories/src/contracts/test/TestERC20USDC__factory.js +1 -1
- package/lib/typechain-types/factories/src/contracts/test/TestERC20USDC__factory.js.map +1 -1
- package/lib/typechain-types/factories/src/contracts/test/TestERC20__factory.js +1 -1
- package/lib/typechain-types/factories/src/contracts/test/TestERC20__factory.js.map +1 -1
- package/lib/typechain-types/factories/src/contracts/test/TestERC721__factory.js +1 -1
- package/lib/typechain-types/factories/src/contracts/test/TestERC721__factory.js.map +1 -1
- package/lib/typechain-types/factories/src/contracts/test/index.d.ts +1 -0
- package/lib/typechain-types/factories/src/contracts/test/index.js +2 -1
- package/lib/typechain-types/factories/src/contracts/test/index.js.map +1 -1
- package/lib/typechain-types/index.d.ts +4 -0
- package/lib/typechain-types/index.js +5 -1
- package/lib/typechain-types/index.js.map +1 -1
- package/lib/typechain-types/src/contracts/test/TestERC1271Wallet.sol/IERC20Approve.d.ts +50 -0
- package/lib/typechain-types/src/contracts/test/TestERC1271Wallet.sol/IERC20Approve.js +3 -0
- package/lib/typechain-types/src/contracts/test/TestERC1271Wallet.sol/IERC20Approve.js.map +1 -0
- package/lib/typechain-types/src/contracts/test/TestERC1271Wallet.sol/TestERC1271Wallet.d.ts +82 -0
- package/lib/typechain-types/src/contracts/test/TestERC1271Wallet.sol/TestERC1271Wallet.js +3 -0
- package/lib/typechain-types/src/contracts/test/TestERC1271Wallet.sol/TestERC1271Wallet.js.map +1 -0
- package/lib/typechain-types/src/contracts/test/TestERC1271Wallet.sol/index.d.ts +2 -0
- package/lib/typechain-types/src/contracts/test/TestERC1271Wallet.sol/index.js +3 -0
- package/lib/typechain-types/src/contracts/test/TestERC1271Wallet.sol/index.js.map +1 -0
- package/lib/typechain-types/src/contracts/test/index.d.ts +2 -0
- package/lib/types.d.ts +1 -0
- package/lib/utils/criteria.js.map +1 -1
- package/package.json +4 -4
- package/src/artifacts/@rari-capital/solmate/src/tokens/ERC1155.sol/ERC1155.dbg.json +1 -1
- package/src/artifacts/@rari-capital/solmate/src/tokens/ERC1155.sol/ERC1155TokenReceiver.dbg.json +1 -1
- package/src/artifacts/@rari-capital/solmate/src/tokens/ERC20.sol/ERC20.dbg.json +1 -1
- package/src/artifacts/@rari-capital/solmate/src/tokens/ERC721.sol/ERC721.dbg.json +1 -1
- package/src/artifacts/@rari-capital/solmate/src/tokens/ERC721.sol/ERC721TokenReceiver.dbg.json +1 -1
- package/src/artifacts/build-info/{9bdb09ed3cce3558b76665325e604aed.json → d74aedd79bfea1f175b8b4ef785e53de.json} +1 -1
- package/src/artifacts/domain-registry/contracts/DomainRegistry.sol/DomainRegistry.dbg.json +1 -1
- package/src/artifacts/domain-registry/contracts/interfaces/DomainRegistryInterface.sol/DomainRegistryInterface.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/conduit/Conduit.sol/Conduit.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/conduit/ConduitController.sol/ConduitController.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/AmountDeriver.sol/AmountDeriver.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/Assertions.sol/Assertions.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/BasicOrderFulfiller.sol/BasicOrderFulfiller.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/Consideration.sol/Consideration.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/ConsiderationBase.sol/ConsiderationBase.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/ConsiderationDecoder.sol/ConsiderationDecoder.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/ConsiderationEncoder.sol/ConsiderationEncoder.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/CounterManager.sol/CounterManager.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/CriteriaResolution.sol/CriteriaResolution.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/Executor.sol/Executor.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/FulfillmentApplier.sol/FulfillmentApplier.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/GettersAndDerivers.sol/GettersAndDerivers.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/LowLevelHelpers.sol/LowLevelHelpers.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/OrderCombiner.sol/OrderCombiner.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/OrderFulfiller.sol/OrderFulfiller.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/OrderValidator.sol/OrderValidator.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/ReentrancyGuard.sol/ReentrancyGuard.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/SignatureVerification.sol/SignatureVerification.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/TokenTransferrer.sol/TokenTransferrer.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/Verifiers.sol/Verifiers.dbg.json +1 -1
- package/src/artifacts/seaport-core/src/lib/ZoneInteraction.sol/ZoneInteraction.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/helpers/PointerLibraries.sol/CalldataPointerLib.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/helpers/PointerLibraries.sol/CalldataReaders.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/helpers/PointerLibraries.sol/MemoryPointerLib.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/helpers/PointerLibraries.sol/MemoryReaders.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/helpers/PointerLibraries.sol/MemoryWriters.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/helpers/PointerLibraries.sol/ReturndataPointerLib.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/helpers/PointerLibraries.sol/ReturndataReaders.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/interfaces/AmountDerivationErrors.sol/AmountDerivationErrors.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/interfaces/ConduitControllerInterface.sol/ConduitControllerInterface.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/interfaces/ConduitInterface.sol/ConduitInterface.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/interfaces/ConsiderationEventsAndErrors.sol/ConsiderationEventsAndErrors.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/interfaces/ConsiderationInterface.sol/ConsiderationInterface.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/interfaces/CriteriaResolutionErrors.sol/CriteriaResolutionErrors.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/interfaces/FulfillmentApplicationErrors.sol/FulfillmentApplicationErrors.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/interfaces/ReentrancyErrors.sol/ReentrancyErrors.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/interfaces/SignatureVerificationErrors.sol/SignatureVerificationErrors.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/interfaces/TokenTransferrerErrors.sol/TokenTransferrerErrors.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/interfaces/ZoneInteractionErrors.sol/ZoneInteractionErrors.dbg.json +1 -1
- package/src/artifacts/seaport-types/src/lib/ConsiderationStructs.sol/StructPointers.dbg.json +1 -1
- package/src/artifacts/seaport_v1_4/contracts/Seaport.sol/Seaport.dbg.json +1 -1
- package/src/artifacts/seaport_v1_4/contracts/conduit/Conduit.sol/LocalConduit.dbg.json +1 -1
- package/src/artifacts/seaport_v1_4/contracts/conduit/ConduitController.sol/LocalConduitController.dbg.json +1 -1
- package/src/artifacts/seaport_v1_5/contracts/Seaport.sol/Seaport.dbg.json +1 -1
- package/src/artifacts/src/contracts/test/TestERC1155.sol/TestERC1155.dbg.json +1 -1
- package/src/artifacts/src/contracts/test/TestERC1271Wallet.sol/IERC20Approve.dbg.json +4 -0
- package/src/artifacts/src/contracts/test/TestERC1271Wallet.sol/IERC20Approve.json +35 -0
- package/src/artifacts/src/contracts/test/TestERC1271Wallet.sol/TestERC1271Wallet.dbg.json +4 -0
- package/src/artifacts/src/contracts/test/TestERC1271Wallet.sol/TestERC1271Wallet.json +110 -0
- package/src/artifacts/src/contracts/test/TestERC20.sol/TestERC20.dbg.json +1 -1
- package/src/artifacts/src/contracts/test/TestERC20USDC.sol/TestERC20USDC.dbg.json +1 -1
- package/src/artifacts/src/contracts/test/TestERC721.sol/TestERC721.dbg.json +1 -1
- package/src/constants.ts +1 -1
- package/src/contracts/test/TestERC1271Wallet.sol +89 -0
- package/src/seaport.ts +58 -57
- package/src/typechain-types/factories/src/contracts/test/TestERC1271Wallet.sol/IERC20Approve__factory.ts +50 -0
- package/src/typechain-types/factories/src/contracts/test/TestERC1271Wallet.sol/TestERC1271Wallet__factory.ts +161 -0
- package/src/typechain-types/factories/src/contracts/test/TestERC1271Wallet.sol/index.ts +5 -0
- package/src/typechain-types/factories/src/contracts/test/index.ts +1 -0
- package/src/typechain-types/hardhat.d.ts +18 -0
- package/src/typechain-types/index.ts +4 -0
- package/src/typechain-types/src/contracts/test/TestERC1271Wallet.sol/IERC20Approve.ts +107 -0
- package/src/typechain-types/src/contracts/test/TestERC1271Wallet.sol/TestERC1271Wallet.ts +228 -0
- package/src/typechain-types/src/contracts/test/TestERC1271Wallet.sol/index.ts +5 -0
- package/src/typechain-types/src/contracts/test/index.ts +2 -0
- package/src/types.ts +13 -12
- package/src/utils/approval.ts +9 -9
- package/src/utils/balance.ts +7 -7
- package/src/utils/balanceAndApprovalCheck.ts +22 -22
- package/src/utils/criteria.ts +7 -7
- package/src/utils/eip712/Eip712MerkleTree.ts +2 -2
- package/src/utils/eip712/bulk-orders.ts +2 -2
- package/src/utils/eip712/defaults.ts +5 -5
- package/src/utils/eip712/utils.ts +1 -1
- package/src/utils/fulfill.ts +44 -44
- package/src/utils/item.ts +3 -3
- package/src/utils/merkletree.ts +2 -2
- package/src/utils/order.ts +15 -15
- package/src/utils/usecase.ts +8 -8
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
|
2
|
+
pragma solidity >=0.8.7;
|
|
3
|
+
|
|
4
|
+
interface IERC20Approve {
|
|
5
|
+
function approve(address spender, uint256 amount) external returns (bool);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
contract TestERC1271Wallet {
|
|
9
|
+
address public orderSigner;
|
|
10
|
+
|
|
11
|
+
constructor() {
|
|
12
|
+
orderSigner = msg.sender;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function approveToken(
|
|
16
|
+
address token,
|
|
17
|
+
address spender,
|
|
18
|
+
uint256 amount
|
|
19
|
+
) external {
|
|
20
|
+
IERC20Approve(token).approve(spender, amount);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function isValidSignature(
|
|
24
|
+
bytes32 hash,
|
|
25
|
+
bytes calldata signature
|
|
26
|
+
) external view returns (bytes4) {
|
|
27
|
+
address signer_ = recover(hash, signature);
|
|
28
|
+
if (signer_ == orderSigner) {
|
|
29
|
+
return 0x1626ba7e;
|
|
30
|
+
}
|
|
31
|
+
return 0x00000000;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function recover(
|
|
35
|
+
bytes32 hash,
|
|
36
|
+
bytes memory signature
|
|
37
|
+
) internal pure returns (address) {
|
|
38
|
+
bytes32 r;
|
|
39
|
+
bytes32 s;
|
|
40
|
+
uint8 v;
|
|
41
|
+
|
|
42
|
+
if (signature.length == 65) {
|
|
43
|
+
// ecrecover takes the signature parameters, and the only way to get them
|
|
44
|
+
// currently is to use assembly.
|
|
45
|
+
// solhint-disable-next-line no-inline-assembly
|
|
46
|
+
assembly {
|
|
47
|
+
r := mload(add(signature, 0x20))
|
|
48
|
+
s := mload(add(signature, 0x40))
|
|
49
|
+
v := byte(0, mload(add(signature, 0x60)))
|
|
50
|
+
}
|
|
51
|
+
} else if (signature.length == 64) {
|
|
52
|
+
// ecrecover takes the signature parameters, and the only way to get them
|
|
53
|
+
// currently is to use assembly.
|
|
54
|
+
// solhint-disable-next-line no-inline-assembly
|
|
55
|
+
assembly {
|
|
56
|
+
let vs := mload(add(signature, 0x40))
|
|
57
|
+
r := mload(add(signature, 0x20))
|
|
58
|
+
s := and(
|
|
59
|
+
vs,
|
|
60
|
+
0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
|
61
|
+
)
|
|
62
|
+
v := add(shr(255, vs), 27)
|
|
63
|
+
}
|
|
64
|
+
} else {
|
|
65
|
+
revert("ECDSA: invalid signature length");
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Version of signature should be 27 or 28, but 0 and 1 are also possible versions
|
|
69
|
+
if (v < 27) {
|
|
70
|
+
v += 27;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// If the version is correct return the signer address
|
|
74
|
+
if (v != 27 && v != 28) {
|
|
75
|
+
return (address(0));
|
|
76
|
+
} else {
|
|
77
|
+
return ecrecover(hash, v, r, s);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function onERC721Received(
|
|
82
|
+
address operator,
|
|
83
|
+
address from,
|
|
84
|
+
uint256 tokenId,
|
|
85
|
+
bytes calldata _data
|
|
86
|
+
) public returns (bytes4) {
|
|
87
|
+
return this.onERC721Received.selector;
|
|
88
|
+
}
|
|
89
|
+
}
|
package/src/seaport.ts
CHANGED
|
@@ -105,7 +105,7 @@ export class Seaport {
|
|
|
105
105
|
balanceAndApprovalChecksOnOrderCreation = true,
|
|
106
106
|
conduitKeyToConduit,
|
|
107
107
|
seaportVersion = "1.5",
|
|
108
|
-
}: SeaportConfig = {}
|
|
108
|
+
}: SeaportConfig = {},
|
|
109
109
|
) {
|
|
110
110
|
const provider =
|
|
111
111
|
providerOrSigner instanceof providers.Provider
|
|
@@ -117,14 +117,14 @@ export class Seaport {
|
|
|
117
117
|
|
|
118
118
|
if (!provider) {
|
|
119
119
|
throw new Error(
|
|
120
|
-
"Either a provider or custom signer with provider must be provided"
|
|
120
|
+
"Either a provider or custom signer with provider must be provided",
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
this.provider = provider;
|
|
125
125
|
|
|
126
126
|
this.multicallProvider = new multicallProviders.MulticallProvider(
|
|
127
|
-
this.provider
|
|
127
|
+
this.provider,
|
|
128
128
|
);
|
|
129
129
|
|
|
130
130
|
this.contract = new Contract(
|
|
@@ -133,13 +133,13 @@ export class Seaport {
|
|
|
133
133
|
? CROSS_CHAIN_SEAPORT_V1_5_ADDRESS
|
|
134
134
|
: CROSS_CHAIN_SEAPORT_V1_4_ADDRESS),
|
|
135
135
|
SeaportABIv14,
|
|
136
|
-
this.multicallProvider
|
|
136
|
+
this.multicallProvider,
|
|
137
137
|
) as SeaportContract;
|
|
138
138
|
|
|
139
139
|
this.domainRegistry = new Contract(
|
|
140
140
|
overrides?.domainRegistryAddress ?? DOMAIN_REGISTRY_ADDRESS,
|
|
141
141
|
DomainRegistryABI,
|
|
142
|
-
this.multicallProvider
|
|
142
|
+
this.multicallProvider,
|
|
143
143
|
) as DomainRegistryContract;
|
|
144
144
|
|
|
145
145
|
this.config = {
|
|
@@ -186,16 +186,16 @@ export class Seaport {
|
|
|
186
186
|
public async createOrder(
|
|
187
187
|
input: CreateOrderInput,
|
|
188
188
|
accountAddress?: string,
|
|
189
|
-
exactApproval?: boolean
|
|
189
|
+
exactApproval?: boolean,
|
|
190
190
|
): Promise<OrderUseCase<CreateOrderAction>> {
|
|
191
191
|
const signer = this._getSigner(accountAddress);
|
|
192
|
-
const offerer = await signer.getAddress();
|
|
192
|
+
const offerer = accountAddress ?? (await signer.getAddress());
|
|
193
193
|
|
|
194
194
|
const { orderComponents, approvalActions } = await this._formatOrder(
|
|
195
195
|
signer,
|
|
196
196
|
offerer,
|
|
197
197
|
Boolean(exactApproval),
|
|
198
|
-
input
|
|
198
|
+
input,
|
|
199
199
|
);
|
|
200
200
|
|
|
201
201
|
const createOrderAction = {
|
|
@@ -235,7 +235,7 @@ export class Seaport {
|
|
|
235
235
|
public async createBulkOrders(
|
|
236
236
|
createOrderInput: CreateOrderInput[],
|
|
237
237
|
accountAddress?: string,
|
|
238
|
-
exactApproval?: boolean
|
|
238
|
+
exactApproval?: boolean,
|
|
239
239
|
): Promise<OrderUseCase<CreateBulkOrdersAction>> {
|
|
240
240
|
const signer = this._getSigner(accountAddress);
|
|
241
241
|
const offerer = await signer.getAddress();
|
|
@@ -250,7 +250,7 @@ export class Seaport {
|
|
|
250
250
|
signer,
|
|
251
251
|
offerer,
|
|
252
252
|
Boolean(exactApproval),
|
|
253
|
-
input
|
|
253
|
+
input,
|
|
254
254
|
);
|
|
255
255
|
|
|
256
256
|
allOrderComponents.push(orderComponents);
|
|
@@ -296,6 +296,7 @@ export class Seaport {
|
|
|
296
296
|
{
|
|
297
297
|
conduitKey = this.defaultConduitKey,
|
|
298
298
|
zone = ethers.constants.AddressZero,
|
|
299
|
+
zoneHash = ethers.constants.HashZero,
|
|
299
300
|
startTime = Math.floor(Date.now() / 1000).toString(),
|
|
300
301
|
endTime = MAX_INT.toString(),
|
|
301
302
|
offer,
|
|
@@ -306,7 +307,7 @@ export class Seaport {
|
|
|
306
307
|
fees,
|
|
307
308
|
domain,
|
|
308
309
|
salt,
|
|
309
|
-
}: CreateOrderInput
|
|
310
|
+
}: CreateOrderInput,
|
|
310
311
|
) {
|
|
311
312
|
const offerItems = offer.map(mapInputItemToOfferItem);
|
|
312
313
|
const considerationItems = [
|
|
@@ -324,12 +325,12 @@ export class Seaport {
|
|
|
324
325
|
})
|
|
325
326
|
) {
|
|
326
327
|
throw new Error(
|
|
327
|
-
"All currency tokens in the order must be the same token when applying fees"
|
|
328
|
+
"All currency tokens in the order must be the same token when applying fees",
|
|
328
329
|
);
|
|
329
330
|
}
|
|
330
331
|
|
|
331
332
|
const currencies = [...offerItems, ...considerationItems].filter(
|
|
332
|
-
isCurrencyItem
|
|
333
|
+
isCurrencyItem,
|
|
333
334
|
);
|
|
334
335
|
|
|
335
336
|
const totalCurrencyAmount = totalItemsAmount(currencies);
|
|
@@ -350,7 +351,7 @@ export class Seaport {
|
|
|
350
351
|
token: currencies[0].token,
|
|
351
352
|
baseAmount: totalCurrencyAmount.startAmount,
|
|
352
353
|
baseEndAmount: totalCurrencyAmount.endAmount,
|
|
353
|
-
})
|
|
354
|
+
}),
|
|
354
355
|
) ?? []
|
|
355
356
|
: []),
|
|
356
357
|
];
|
|
@@ -363,7 +364,7 @@ export class Seaport {
|
|
|
363
364
|
const orderComponents: OrderComponents = {
|
|
364
365
|
offerer,
|
|
365
366
|
zone,
|
|
366
|
-
zoneHash
|
|
367
|
+
zoneHash,
|
|
367
368
|
startTime,
|
|
368
369
|
endTime,
|
|
369
370
|
orderType,
|
|
@@ -397,7 +398,7 @@ export class Seaport {
|
|
|
397
398
|
const approvals = getApprovalActions(
|
|
398
399
|
insufficientApprovals,
|
|
399
400
|
exactApproval,
|
|
400
|
-
signer
|
|
401
|
+
signer,
|
|
401
402
|
);
|
|
402
403
|
approvalActions.push(...approvals);
|
|
403
404
|
}
|
|
@@ -468,8 +469,8 @@ export class Seaport {
|
|
|
468
469
|
_TypedDataEncoder.getPayload(
|
|
469
470
|
domainData,
|
|
470
471
|
EIP_712_ORDER_TYPE,
|
|
471
|
-
orderComponents
|
|
472
|
-
)
|
|
472
|
+
orderComponents,
|
|
473
|
+
),
|
|
473
474
|
);
|
|
474
475
|
}
|
|
475
476
|
|
|
@@ -487,7 +488,7 @@ export class Seaport {
|
|
|
487
488
|
const chunks = tree.getDataToSign();
|
|
488
489
|
|
|
489
490
|
return JSON.stringify(
|
|
490
|
-
_TypedDataEncoder.getPayload(domainData, bulkOrderType, { tree: chunks })
|
|
491
|
+
_TypedDataEncoder.getPayload(domainData, bulkOrderType, { tree: chunks }),
|
|
491
492
|
);
|
|
492
493
|
}
|
|
493
494
|
|
|
@@ -499,7 +500,7 @@ export class Seaport {
|
|
|
499
500
|
*/
|
|
500
501
|
public async signOrder(
|
|
501
502
|
orderComponents: OrderComponents,
|
|
502
|
-
accountAddress?: string
|
|
503
|
+
accountAddress?: string,
|
|
503
504
|
): Promise<string> {
|
|
504
505
|
const signer = this._getSigner(accountAddress);
|
|
505
506
|
|
|
@@ -508,7 +509,7 @@ export class Seaport {
|
|
|
508
509
|
const signature = await signer._signTypedData(
|
|
509
510
|
domainData,
|
|
510
511
|
EIP_712_ORDER_TYPE,
|
|
511
|
-
orderComponents
|
|
512
|
+
orderComponents,
|
|
512
513
|
);
|
|
513
514
|
|
|
514
515
|
// Use EIP-2098 compact signatures to save gas.
|
|
@@ -523,7 +524,7 @@ export class Seaport {
|
|
|
523
524
|
*/
|
|
524
525
|
public async signBulkOrder(
|
|
525
526
|
orderComponents: OrderComponents[],
|
|
526
|
-
accountAddress?: string
|
|
527
|
+
accountAddress?: string,
|
|
527
528
|
): Promise<OrderWithCounter[]> {
|
|
528
529
|
const signer = this._getSigner(accountAddress);
|
|
529
530
|
|
|
@@ -536,7 +537,7 @@ export class Seaport {
|
|
|
536
537
|
let signature = await signer._signTypedData(
|
|
537
538
|
domainData,
|
|
538
539
|
bulkOrderType,
|
|
539
|
-
value
|
|
540
|
+
value,
|
|
540
541
|
);
|
|
541
542
|
|
|
542
543
|
// Use EIP-2098 compact signatures to save gas.
|
|
@@ -561,7 +562,7 @@ export class Seaport {
|
|
|
561
562
|
public cancelOrders(
|
|
562
563
|
orders: OrderComponents[],
|
|
563
564
|
accountAddress?: string,
|
|
564
|
-
domain?: string
|
|
565
|
+
domain?: string,
|
|
565
566
|
): TransactionMethods<ContractMethodReturnType<SeaportContract, "cancel">> {
|
|
566
567
|
const signer = this._getSigner(accountAddress);
|
|
567
568
|
|
|
@@ -569,7 +570,7 @@ export class Seaport {
|
|
|
569
570
|
this.contract.connect(signer),
|
|
570
571
|
"cancel",
|
|
571
572
|
[orders],
|
|
572
|
-
domain
|
|
573
|
+
domain,
|
|
573
574
|
);
|
|
574
575
|
}
|
|
575
576
|
|
|
@@ -581,7 +582,7 @@ export class Seaport {
|
|
|
581
582
|
*/
|
|
582
583
|
public bulkCancelOrders(
|
|
583
584
|
offerer?: string,
|
|
584
|
-
domain?: string
|
|
585
|
+
domain?: string,
|
|
585
586
|
): TransactionMethods<
|
|
586
587
|
ContractMethodReturnType<SeaportContract, "incrementCounter">
|
|
587
588
|
> {
|
|
@@ -591,7 +592,7 @@ export class Seaport {
|
|
|
591
592
|
this.contract.connect(signer),
|
|
592
593
|
"incrementCounter",
|
|
593
594
|
[],
|
|
594
|
-
domain
|
|
595
|
+
domain,
|
|
595
596
|
);
|
|
596
597
|
}
|
|
597
598
|
|
|
@@ -606,7 +607,7 @@ export class Seaport {
|
|
|
606
607
|
public validate(
|
|
607
608
|
orders: Order[],
|
|
608
609
|
accountAddress?: string,
|
|
609
|
-
domain?: string
|
|
610
|
+
domain?: string,
|
|
610
611
|
): TransactionMethods<ContractMethodReturnType<SeaportContract, "validate">> {
|
|
611
612
|
const signer = this._getSigner(accountAddress);
|
|
612
613
|
|
|
@@ -614,7 +615,7 @@ export class Seaport {
|
|
|
614
615
|
this.contract.connect(signer),
|
|
615
616
|
"validate",
|
|
616
617
|
[orders],
|
|
617
|
-
domain
|
|
618
|
+
domain,
|
|
618
619
|
);
|
|
619
620
|
}
|
|
620
621
|
|
|
@@ -650,13 +651,13 @@ export class Seaport {
|
|
|
650
651
|
const orderTypeString = `${orderComponentsPartialTypeString}${considerationItemTypeString}${offerItemTypeString}`;
|
|
651
652
|
|
|
652
653
|
const offerItemTypeHash = ethers.utils.keccak256(
|
|
653
|
-
ethers.utils.toUtf8Bytes(offerItemTypeString)
|
|
654
|
+
ethers.utils.toUtf8Bytes(offerItemTypeString),
|
|
654
655
|
);
|
|
655
656
|
const considerationItemTypeHash = ethers.utils.keccak256(
|
|
656
|
-
ethers.utils.toUtf8Bytes(considerationItemTypeString)
|
|
657
|
+
ethers.utils.toUtf8Bytes(considerationItemTypeString),
|
|
657
658
|
);
|
|
658
659
|
const orderTypeHash = ethers.utils.keccak256(
|
|
659
|
-
ethers.utils.toUtf8Bytes(orderTypeString)
|
|
660
|
+
ethers.utils.toUtf8Bytes(orderTypeString),
|
|
660
661
|
);
|
|
661
662
|
|
|
662
663
|
const offerHash = ethers.utils.keccak256(
|
|
@@ -682,11 +683,11 @@ export class Seaport {
|
|
|
682
683
|
.toHexString()
|
|
683
684
|
.slice(2)
|
|
684
685
|
.padStart(64, "0"),
|
|
685
|
-
].join("")
|
|
686
|
+
].join(""),
|
|
686
687
|
)
|
|
687
688
|
.slice(2);
|
|
688
689
|
})
|
|
689
|
-
.join("")
|
|
690
|
+
.join(""),
|
|
690
691
|
);
|
|
691
692
|
|
|
692
693
|
const considerationHash = ethers.utils.keccak256(
|
|
@@ -701,7 +702,7 @@ export class Seaport {
|
|
|
701
702
|
considerationItem.itemType.toString().padStart(64, "0"),
|
|
702
703
|
considerationItem.token.slice(2).padStart(64, "0"),
|
|
703
704
|
ethers.BigNumber.from(
|
|
704
|
-
considerationItem.identifierOrCriteria
|
|
705
|
+
considerationItem.identifierOrCriteria,
|
|
705
706
|
)
|
|
706
707
|
.toHexString()
|
|
707
708
|
.slice(2)
|
|
@@ -715,11 +716,11 @@ export class Seaport {
|
|
|
715
716
|
.slice(2)
|
|
716
717
|
.padStart(64, "0"),
|
|
717
718
|
considerationItem.recipient.slice(2).padStart(64, "0"),
|
|
718
|
-
].join("")
|
|
719
|
+
].join(""),
|
|
719
720
|
)
|
|
720
721
|
.slice(2);
|
|
721
722
|
})
|
|
722
|
-
.join("")
|
|
723
|
+
.join(""),
|
|
723
724
|
);
|
|
724
725
|
|
|
725
726
|
const derivedOrderHash = ethers.utils.keccak256(
|
|
@@ -749,7 +750,7 @@ export class Seaport {
|
|
|
749
750
|
.toHexString()
|
|
750
751
|
.slice(2)
|
|
751
752
|
.padStart(64, "0"),
|
|
752
|
-
].join("")
|
|
753
|
+
].join(""),
|
|
753
754
|
);
|
|
754
755
|
|
|
755
756
|
return derivedOrderHash;
|
|
@@ -857,7 +858,7 @@ export class Seaport {
|
|
|
857
858
|
|
|
858
859
|
const sanitizedOrder = validateAndSanitizeFromOrderStatus(
|
|
859
860
|
order,
|
|
860
|
-
orderStatus
|
|
861
|
+
orderStatus,
|
|
861
862
|
);
|
|
862
863
|
|
|
863
864
|
const timeBasedItemParams = {
|
|
@@ -897,7 +898,7 @@ export class Seaport {
|
|
|
897
898
|
tips: tipConsiderationItems,
|
|
898
899
|
domain,
|
|
899
900
|
},
|
|
900
|
-
exactApproval
|
|
901
|
+
exactApproval,
|
|
901
902
|
);
|
|
902
903
|
}
|
|
903
904
|
|
|
@@ -925,7 +926,7 @@ export class Seaport {
|
|
|
925
926
|
recipientAddress,
|
|
926
927
|
domain,
|
|
927
928
|
},
|
|
928
|
-
exactApproval
|
|
929
|
+
exactApproval,
|
|
929
930
|
);
|
|
930
931
|
}
|
|
931
932
|
|
|
@@ -976,23 +977,23 @@ export class Seaport {
|
|
|
976
977
|
|
|
977
978
|
const allOffererOperators = fulfillOrderDetails.map(
|
|
978
979
|
({ order }) =>
|
|
979
|
-
this.config.conduitKeyToConduit[order.parameters.conduitKey]
|
|
980
|
+
this.config.conduitKeyToConduit[order.parameters.conduitKey],
|
|
980
981
|
);
|
|
981
982
|
|
|
982
983
|
const fulfillerOperator = this.config.conduitKeyToConduit[conduitKey];
|
|
983
984
|
|
|
984
985
|
const allOfferItems = fulfillOrderDetails.flatMap(
|
|
985
|
-
({ order }) => order.parameters.offer
|
|
986
|
+
({ order }) => order.parameters.offer,
|
|
986
987
|
);
|
|
987
988
|
|
|
988
989
|
const allConsiderationItems = fulfillOrderDetails.flatMap(
|
|
989
|
-
({ order }) => order.parameters.consideration
|
|
990
|
+
({ order }) => order.parameters.consideration,
|
|
990
991
|
);
|
|
991
992
|
const allOfferCriteria = fulfillOrderDetails.flatMap(
|
|
992
|
-
({ offerCriteria = [] }) => offerCriteria
|
|
993
|
+
({ offerCriteria = [] }) => offerCriteria,
|
|
993
994
|
);
|
|
994
995
|
const allConsiderationCriteria = fulfillOrderDetails.flatMap(
|
|
995
|
-
({ considerationCriteria = [] }) => considerationCriteria
|
|
996
|
+
({ considerationCriteria = [] }) => considerationCriteria,
|
|
996
997
|
);
|
|
997
998
|
|
|
998
999
|
const [
|
|
@@ -1009,8 +1010,8 @@ export class Seaport {
|
|
|
1009
1010
|
criterias: offerCriteria,
|
|
1010
1011
|
operator: allOffererOperators[i],
|
|
1011
1012
|
multicallProvider: this.multicallProvider,
|
|
1012
|
-
})
|
|
1013
|
-
)
|
|
1013
|
+
}),
|
|
1014
|
+
),
|
|
1014
1015
|
),
|
|
1015
1016
|
// Get fulfiller balances and approvals of all items in the set, as offer items
|
|
1016
1017
|
// may be received by the fulfiller for standard fulfills
|
|
@@ -1024,8 +1025,8 @@ export class Seaport {
|
|
|
1024
1025
|
this.multicallProvider.getBlock("latest"),
|
|
1025
1026
|
Promise.all(
|
|
1026
1027
|
fulfillOrderDetails.map(({ order }) =>
|
|
1027
|
-
this.getOrderStatus(this.getOrderHash(order.parameters))
|
|
1028
|
-
)
|
|
1028
|
+
this.getOrderStatus(this.getOrderHash(order.parameters)),
|
|
1029
|
+
),
|
|
1029
1030
|
),
|
|
1030
1031
|
]);
|
|
1031
1032
|
|
|
@@ -1044,7 +1045,7 @@ export class Seaport {
|
|
|
1044
1045
|
extraData: orderDetails.extraData ?? "0x",
|
|
1045
1046
|
offererBalancesAndApprovals: offerersBalancesAndApprovals[index],
|
|
1046
1047
|
offererOperator: allOffererOperators[index],
|
|
1047
|
-
})
|
|
1048
|
+
}),
|
|
1048
1049
|
);
|
|
1049
1050
|
|
|
1050
1051
|
return fulfillAvailableOrders({
|
|
@@ -1096,13 +1097,13 @@ export class Seaport {
|
|
|
1096
1097
|
this.contract.connect(signer),
|
|
1097
1098
|
"matchOrders",
|
|
1098
1099
|
[orders, fulfillments, overrides],
|
|
1099
|
-
domain
|
|
1100
|
+
domain,
|
|
1100
1101
|
);
|
|
1101
1102
|
}
|
|
1102
1103
|
|
|
1103
1104
|
public setDomain(
|
|
1104
1105
|
domain: string,
|
|
1105
|
-
accountAddress?: string
|
|
1106
|
+
accountAddress?: string,
|
|
1106
1107
|
): TransactionMethods<
|
|
1107
1108
|
ContractMethodReturnType<DomainRegistryContract, "setDomain">
|
|
1108
1109
|
> {
|
|
@@ -1111,7 +1112,7 @@ export class Seaport {
|
|
|
1111
1112
|
return getTransactionMethods(
|
|
1112
1113
|
this.domainRegistry.connect(signer),
|
|
1113
1114
|
"setDomain",
|
|
1114
|
-
[domain]
|
|
1115
|
+
[domain],
|
|
1115
1116
|
);
|
|
1116
1117
|
}
|
|
1117
1118
|
|
|
@@ -1125,7 +1126,7 @@ export class Seaport {
|
|
|
1125
1126
|
|
|
1126
1127
|
public async getDomains(
|
|
1127
1128
|
tag: string,
|
|
1128
|
-
shouldThrow?: boolean
|
|
1129
|
+
shouldThrow?: boolean,
|
|
1129
1130
|
): Promise<string[]> {
|
|
1130
1131
|
try {
|
|
1131
1132
|
if (shouldThrow) {
|
|
@@ -1140,8 +1141,8 @@ export class Seaport {
|
|
|
1140
1141
|
|
|
1141
1142
|
const domainArray = Promise.all(
|
|
1142
1143
|
[...Array(totalDomains).keys()].map((i) =>
|
|
1143
|
-
this.domainRegistry.getDomain(tag, i)
|
|
1144
|
-
)
|
|
1144
|
+
this.domainRegistry.getDomain(tag, i),
|
|
1145
|
+
),
|
|
1145
1146
|
);
|
|
1146
1147
|
|
|
1147
1148
|
return domainArray;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import { Contract, Signer, utils } from "ethers";
|
|
6
|
+
import type { Provider } from "@ethersproject/providers";
|
|
7
|
+
import type {
|
|
8
|
+
IERC20Approve,
|
|
9
|
+
IERC20ApproveInterface,
|
|
10
|
+
} from "../../../../../src/contracts/test/TestERC1271Wallet.sol/IERC20Approve";
|
|
11
|
+
|
|
12
|
+
const _abi = [
|
|
13
|
+
{
|
|
14
|
+
inputs: [
|
|
15
|
+
{
|
|
16
|
+
internalType: "address",
|
|
17
|
+
name: "spender",
|
|
18
|
+
type: "address",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
internalType: "uint256",
|
|
22
|
+
name: "amount",
|
|
23
|
+
type: "uint256",
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
name: "approve",
|
|
27
|
+
outputs: [
|
|
28
|
+
{
|
|
29
|
+
internalType: "bool",
|
|
30
|
+
name: "",
|
|
31
|
+
type: "bool",
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
stateMutability: "nonpayable",
|
|
35
|
+
type: "function",
|
|
36
|
+
},
|
|
37
|
+
] as const;
|
|
38
|
+
|
|
39
|
+
export class IERC20Approve__factory {
|
|
40
|
+
static readonly abi = _abi;
|
|
41
|
+
static createInterface(): IERC20ApproveInterface {
|
|
42
|
+
return new utils.Interface(_abi) as IERC20ApproveInterface;
|
|
43
|
+
}
|
|
44
|
+
static connect(
|
|
45
|
+
address: string,
|
|
46
|
+
signerOrProvider: Signer | Provider
|
|
47
|
+
): IERC20Approve {
|
|
48
|
+
return new Contract(address, _abi, signerOrProvider) as IERC20Approve;
|
|
49
|
+
}
|
|
50
|
+
}
|