diff --git a/.changeset/silly-pumpkins-prove.md b/.changeset/silly-pumpkins-prove.md new file mode 100644 index 00000000..2c500f27 --- /dev/null +++ b/.changeset/silly-pumpkins-prove.md @@ -0,0 +1,5 @@ +--- +"@soundxyz/legacy-sdk": patch +--- + +Remove keccak dependency diff --git a/.changeset/six-seas-approve.md b/.changeset/six-seas-approve.md new file mode 100644 index 00000000..5bd43c24 --- /dev/null +++ b/.changeset/six-seas-approve.md @@ -0,0 +1,5 @@ +--- +'@soundxyz/sdk': minor +--- + +support SuperMinterV2 diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index 38df86ea..bc11bbd1 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -21,7 +21,7 @@ "superjson": "^2.0.0", "undici": "^5.26.3", "valtio": "^1.11.2", - "viem": "^1.16.6", + "viem": "^1.20.0", "wagmi": "^1.4.4", "zod": "^3.22.4" }, diff --git a/packages/legacy-sdk/package.json b/packages/legacy-sdk/package.json index 2bf5b51b..b0dd3b28 100644 --- a/packages/legacy-sdk/package.json +++ b/packages/legacy-sdk/package.json @@ -36,7 +36,6 @@ "tsc": "tsc -p tsconfig.build.json" }, "dependencies": { - "keccak256": "^1.0.6", "zod": "^3.22.4" }, "devDependencies": { @@ -57,10 +56,10 @@ "merkletreejs": "^0.3.10", "require-env-variable": "^4.0.2", "typescript": "5.2.2", - "viem": "^1.16.6" + "viem": "^1.20.0" }, "peerDependencies": { - "viem": "^1.10.8" + "viem": "^1.20.0" }, "publishConfig": { "access": "public", diff --git a/packages/legacy-sdk/src/client/edition/create.ts b/packages/legacy-sdk/src/client/edition/create.ts index 4b9f0ec5..64505675 100644 --- a/packages/legacy-sdk/src/client/edition/create.ts +++ b/packages/legacy-sdk/src/client/edition/create.ts @@ -1,5 +1,5 @@ import { type Address, type Chain } from 'viem' -import { encodeFunctionData } from 'viem/utils' +import { encodeFunctionData, keccak256, toHex } from 'viem/utils' import { soundCreatorV1Abi } from '../../abi/sound-creator-v1' import { InvalidEditionMaxMintableError, @@ -10,7 +10,7 @@ import { } from '../../errors' import type { ContractCall, EditionConfig, MintConfig, TransactionGasOptions } from '../../types' import { editionInitFlags, MINTER_ROLE, NULL_ADDRESS, NULL_BYTES32, UINT32_MAX } from '../../utils/constants' -import { getSaltAsBytes32, retry } from '../../utils/helpers' +import { retry } from '../../utils/helpers' import { SoundClientInstance } from '../instance' import { soundEditionV1_2Abi } from '../../abi/sound-edition-v1_2' import { rangeEditionMinterV2_1Abi } from '../../abi/range-edition-minter-v2_1' @@ -50,7 +50,7 @@ async function createEditionHelper( maxPriorityFeePerGas, } - const formattedSalt = getSaltAsBytes32(customSalt || Math.random() * 1_000_000_000_000_000) + const formattedSalt = keccak256(toHex(customSalt || Math.random() * 1_000_000_000_000_000)) // Precompute the edition address. const [editionAddress, _] = await retry( @@ -352,15 +352,16 @@ export async function expectedEditionAddress( }: { creatorAddress: Address }, - { deployer, salt }: { deployer: Address; salt: string | number }, + { deployer, salt: customSalt }: { deployer: Address; salt: string | number }, ) { const { readContract } = await this.expectClient() + const formattedSalt = keccak256(toHex(customSalt || Math.random() * 1_000_000_000_000_000)) const [editionAddress, exists] = await readContract({ abi: soundCreatorV1Abi, address: creatorAddress, functionName: 'soundEditionAddress', - args: [deployer, getSaltAsBytes32(salt)], + args: [deployer, formattedSalt], }) return { diff --git a/packages/legacy-sdk/src/utils/helpers.ts b/packages/legacy-sdk/src/utils/helpers.ts index 240b2492..c4419230 100644 --- a/packages/legacy-sdk/src/utils/helpers.ts +++ b/packages/legacy-sdk/src/utils/helpers.ts @@ -1,14 +1,9 @@ -import keccak256 from 'keccak256' import { isHex, type Hex } from 'viem' export function isHexList(list: string[]): list is Hex[] { return list.every((value) => isHex(value)) } -export function getSaltAsBytes32(salt: string | number) { - return `0x${keccak256(salt.toString()).toString('hex')}` as const -} - export function getLazyOption(option: T | (() => T | Promise)) { return typeof option === 'function' ? option() : option } diff --git a/packages/legacy-sdk/test/helpers/merkle.ts b/packages/legacy-sdk/test/helpers/merkle.ts index a6d6c666..6c2eca00 100644 --- a/packages/legacy-sdk/test/helpers/merkle.ts +++ b/packages/legacy-sdk/test/helpers/merkle.ts @@ -1,5 +1,5 @@ import { keccak256 as solidityKeccak256 } from '@ethersproject/solidity' -import keccak256 from 'keccak256' +import keccak256 from 'viem/utils' import { MerkleTree } from 'merkletreejs' import { type Address, type Hex } from 'viem' diff --git a/packages/legacy-sdk/test/test-constants.ts b/packages/legacy-sdk/test/test-constants.ts index 2a675c2b..c47d1d6d 100644 --- a/packages/legacy-sdk/test/test-constants.ts +++ b/packages/legacy-sdk/test/test-constants.ts @@ -1,6 +1,7 @@ -import { getSaltAsBytes32 } from '../src/utils/helpers' +import { keccak256, toHex } from 'viem/utils' + +export const DEFAULT_SALT = keccak256(toHex(12345678)) -export const DEFAULT_SALT = getSaltAsBytes32(12345678) export const SOUND_FEE = 0 export const ONE_HOUR = 3600 export const PRICE = 420420420n diff --git a/packages/sdk/package.json b/packages/sdk/package.json index f5be713b..6cf5de30 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -51,11 +51,11 @@ "esbuild": "^0.19.4", "prettier": "^3.0.3", "typescript": "5.2.2", - "viem": "^1.16.6", + "viem": "^1.20.0", "zod": "^3.22.4" }, "peerDependencies": { - "viem": "^1.16.6", + "viem": "^1.20.0", "zod": "^3.22.4" }, "publishConfig": { diff --git a/packages/sdk/src/contract/edition-v2/abi/super-minter.ts b/packages/sdk/src/contract/edition-v2/abi/super-minter-v1.ts similarity index 99% rename from packages/sdk/src/contract/edition-v2/abi/super-minter.ts rename to packages/sdk/src/contract/edition-v2/abi/super-minter-v1.ts index 3501299e..05545f5b 100644 --- a/packages/sdk/src/contract/edition-v2/abi/super-minter.ts +++ b/packages/sdk/src/contract/edition-v2/abi/super-minter-v1.ts @@ -1,6 +1,6 @@ -export const SUPER_MINTER_ADDRESS = '0x0000000000CF4558c36229ac0026ee16D3aE35Cd' +export const SUPER_MINTER_V1_ADDRESS = '0x0000000000CF4558c36229ac0026ee16D3aE35Cd' -export const SUPER_MINTER_ABI = [ +export const SUPER_MINTER_V1_ABI = [ { inputs: [], name: 'CallerNotDelegated', type: 'error' }, { inputs: [], name: 'ExceedsMaxPerAccount', type: 'error' }, { inputs: [], name: 'ExceedsMintSupply', type: 'error' }, @@ -981,3 +981,9 @@ export const SUPER_MINTER_ABI = [ }, { stateMutability: 'payable', type: 'receive' }, ] as const + +export const SUPER_MINTER_V1 = { + version: '1', + address: SUPER_MINTER_V1_ADDRESS, + abi: SUPER_MINTER_V1_ABI, +} as const diff --git a/packages/sdk/src/contract/edition-v2/abi/super-minter-v2.ts b/packages/sdk/src/contract/edition-v2/abi/super-minter-v2.ts new file mode 100644 index 00000000..66de720c --- /dev/null +++ b/packages/sdk/src/contract/edition-v2/abi/super-minter-v2.ts @@ -0,0 +1,1072 @@ +export const SUPER_MINTER_V2_ADDRESS = '0x000000000001A36777f9930aAEFf623771b13e70' + +export const SUPER_MINTER_V2_ABI = [ + { inputs: [], name: 'CallerNotDelegated', type: 'error' }, + { inputs: [], name: 'ExceedsMaxPerAccount', type: 'error' }, + { inputs: [], name: 'ExceedsMintSupply', type: 'error' }, + { inputs: [], name: 'ExceedsSignedQuantity', type: 'error' }, + { inputs: [], name: 'InvalidAffiliate', type: 'error' }, + { inputs: [], name: 'InvalidAffiliateFeeBPS', type: 'error' }, + { inputs: [], name: 'InvalidMaxMintableRange', type: 'error' }, + { inputs: [], name: 'InvalidMerkleProof', type: 'error' }, + { inputs: [], name: 'InvalidMode', type: 'error' }, + { inputs: [], name: 'InvalidPlatformFeeBPS', type: 'error' }, + { inputs: [], name: 'InvalidPlatformFeeConfig', type: 'error' }, + { inputs: [], name: 'InvalidPlatformFlatFee', type: 'error' }, + { inputs: [], name: 'InvalidSignature', type: 'error' }, + { inputs: [], name: 'InvalidTimeRange', type: 'error' }, + { inputs: [], name: 'MaxMintableIsZero', type: 'error' }, + { inputs: [], name: 'MaxMintablePerAccountIsZero', type: 'error' }, + { inputs: [], name: 'MerkleRootIsEmpty', type: 'error' }, + { inputs: [], name: 'MintDoesNotExist', type: 'error' }, + { + inputs: [ + { internalType: 'uint256', name: 'blockTimestamp', type: 'uint256' }, + { internalType: 'uint32', name: 'startTime', type: 'uint32' }, + { internalType: 'uint32', name: 'endTime', type: 'uint32' }, + ], + name: 'MintNotOpen', + type: 'error', + }, + { inputs: [], name: 'MintPaused', type: 'error' }, + { inputs: [], name: 'MintsAlreadyExist', type: 'error' }, + { inputs: [], name: 'NotConfigurable', type: 'error' }, + { inputs: [], name: 'PlatformFeeAddressIsZero', type: 'error' }, + { inputs: [], name: 'SignatureAlreadyUsed', type: 'error' }, + { inputs: [], name: 'SignatureExpired', type: 'error' }, + { inputs: [], name: 'SignedPriceTooLow', type: 'error' }, + { + inputs: [ + { internalType: 'uint256', name: 'paid', type: 'uint256' }, + { internalType: 'uint256', name: 'required', type: 'uint256' }, + ], + name: 'WrongPayment', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'edition', type: 'address' }, + { indexed: false, internalType: 'uint8', name: 'tier', type: 'uint8' }, + { indexed: false, internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { indexed: false, internalType: 'uint16', name: 'bps', type: 'uint16' }, + ], + name: 'AffiliateFeeSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'affiliate', type: 'address' }, + { indexed: false, internalType: 'uint256', name: 'accrued', type: 'uint256' }, + ], + name: 'AffiliateFeesWithdrawn', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'edition', type: 'address' }, + { indexed: false, internalType: 'uint8', name: 'tier', type: 'uint8' }, + { indexed: false, internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { indexed: false, internalType: 'bytes32', name: 'root', type: 'bytes32' }, + ], + name: 'AffiliateMerkleRootSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'platform', type: 'address' }, + { + components: [ + { internalType: 'uint96', name: 'artistMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'affiliateMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'platformMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdPrice', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdArtistMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdAffiliateMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdPlatformMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'platformTxFlatFee', type: 'uint96' }, + { internalType: 'uint16', name: 'platformMintFeeBPS', type: 'uint16' }, + { internalType: 'bool', name: 'active', type: 'bool' }, + ], + indexed: false, + internalType: 'struct ISuperMinterV2.PlatformFeeConfig', + name: 'config', + type: 'tuple', + }, + ], + name: 'DefaultPlatformFeeConfigSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'platform', type: 'address' }, + { indexed: false, internalType: 'uint96', name: 'price', type: 'uint96' }, + ], + name: 'GAPriceSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'edition', type: 'address' }, + { indexed: false, internalType: 'uint8', name: 'tier', type: 'uint8' }, + { indexed: false, internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { indexed: false, internalType: 'uint32', name: 'value', type: 'uint32' }, + ], + name: 'MaxMintablePerAccountSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'edition', type: 'address' }, + { indexed: false, internalType: 'uint8', name: 'tier', type: 'uint8' }, + { indexed: false, internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { indexed: false, internalType: 'uint32', name: 'value', type: 'uint32' }, + ], + name: 'MaxMintableSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'edition', type: 'address' }, + { indexed: false, internalType: 'uint8', name: 'tier', type: 'uint8' }, + { indexed: false, internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { indexed: false, internalType: 'bytes32', name: 'merkleRoot', type: 'bytes32' }, + ], + name: 'MerkleRootSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'edition', type: 'address' }, + { indexed: false, internalType: 'uint8', name: 'tier', type: 'uint8' }, + { indexed: false, internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { + components: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint96', name: 'price', type: 'uint96' }, + { internalType: 'uint32', name: 'startTime', type: 'uint32' }, + { internalType: 'uint32', name: 'endTime', type: 'uint32' }, + { internalType: 'uint32', name: 'maxMintablePerAccount', type: 'uint32' }, + { internalType: 'uint32', name: 'maxMintable', type: 'uint32' }, + { internalType: 'uint16', name: 'affiliateFeeBPS', type: 'uint16' }, + { internalType: 'bytes32', name: 'affiliateMerkleRoot', type: 'bytes32' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'address', name: 'platform', type: 'address' }, + { internalType: 'uint8', name: 'mode', type: 'uint8' }, + { internalType: 'bytes32', name: 'merkleRoot', type: 'bytes32' }, + ], + indexed: false, + internalType: 'struct ISuperMinterV2.MintCreation', + name: 'creation', + type: 'tuple', + }, + ], + name: 'MintCreated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'edition', type: 'address' }, + { indexed: false, internalType: 'uint8', name: 'tier', type: 'uint8' }, + { indexed: false, internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { indexed: true, internalType: 'address', name: 'to', type: 'address' }, + { + components: [ + { internalType: 'uint32', name: 'quantity', type: 'uint32' }, + { internalType: 'uint256', name: 'fromTokenId', type: 'uint256' }, + { internalType: 'address', name: 'allowlisted', type: 'address' }, + { internalType: 'uint32', name: 'allowlistedQuantity', type: 'uint32' }, + { internalType: 'uint32', name: 'signedQuantity', type: 'uint32' }, + { internalType: 'uint32', name: 'signedClaimTicket', type: 'uint32' }, + { internalType: 'address', name: 'affiliate', type: 'address' }, + { internalType: 'bool', name: 'affiliated', type: 'bool' }, + { internalType: 'uint256', name: 'requiredEtherValue', type: 'uint256' }, + { internalType: 'uint256', name: 'unitPrice', type: 'uint256' }, + { internalType: 'uint256', name: 'finalArtistFee', type: 'uint256' }, + { internalType: 'uint256', name: 'finalAffiliateFee', type: 'uint256' }, + { internalType: 'uint256', name: 'finalPlatformFee', type: 'uint256' }, + ], + indexed: false, + internalType: 'struct ISuperMinterV2.MintedLogData', + name: 'data', + type: 'tuple', + }, + { indexed: true, internalType: 'uint256', name: 'attributionId', type: 'uint256' }, + ], + name: 'Minted', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'edition', type: 'address' }, + { indexed: false, internalType: 'uint8', name: 'tier', type: 'uint8' }, + { indexed: false, internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { indexed: false, internalType: 'bool', name: 'paused', type: 'bool' }, + ], + name: 'PausedSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'edition', type: 'address' }, + { indexed: false, internalType: 'uint8', name: 'tier', type: 'uint8' }, + { indexed: false, internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { indexed: false, internalType: 'address[]', name: 'to', type: 'address[]' }, + { indexed: false, internalType: 'uint32', name: 'signedQuantity', type: 'uint32' }, + { indexed: false, internalType: 'uint256', name: 'fromTokenId', type: 'uint256' }, + ], + name: 'PlatformAirdropped', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'platform', type: 'address' }, + { indexed: false, internalType: 'address', name: 'recipient', type: 'address' }, + ], + name: 'PlatformFeeAddressSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'platform', type: 'address' }, + { indexed: false, internalType: 'uint8', name: 'tier', type: 'uint8' }, + { + components: [ + { internalType: 'uint96', name: 'artistMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'affiliateMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'platformMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdPrice', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdArtistMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdAffiliateMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdPlatformMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'platformTxFlatFee', type: 'uint96' }, + { internalType: 'uint16', name: 'platformMintFeeBPS', type: 'uint16' }, + { internalType: 'bool', name: 'active', type: 'bool' }, + ], + indexed: false, + internalType: 'struct ISuperMinterV2.PlatformFeeConfig', + name: 'config', + type: 'tuple', + }, + ], + name: 'PlatformFeeConfigSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'platform', type: 'address' }, + { indexed: false, internalType: 'uint256', name: 'accrued', type: 'uint256' }, + ], + name: 'PlatformFeesWithdrawn', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'platform', type: 'address' }, + { indexed: false, internalType: 'address', name: 'signer', type: 'address' }, + ], + name: 'PlatformSignerSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'edition', type: 'address' }, + { indexed: false, internalType: 'uint8', name: 'tier', type: 'uint8' }, + { indexed: false, internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { indexed: false, internalType: 'uint96', name: 'price', type: 'uint96' }, + ], + name: 'PriceSet', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'address', name: 'edition', type: 'address' }, + { indexed: false, internalType: 'uint8', name: 'tier', type: 'uint8' }, + { indexed: false, internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { indexed: false, internalType: 'uint32', name: 'startTime', type: 'uint32' }, + { indexed: false, internalType: 'uint32', name: 'endTime', type: 'uint32' }, + ], + name: 'TimeRangeSet', + type: 'event', + }, + { stateMutability: 'payable', type: 'fallback' }, + { + inputs: [], + name: 'BPS_DENOMINATOR', + outputs: [{ internalType: 'uint16', name: '', type: 'uint16' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'DEFAULT', + outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'DOMAIN_TYPEHASH', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'GA_TIER', + outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'MAX_AFFILIATE_FEE_BPS', + outputs: [{ internalType: 'uint16', name: '', type: 'uint16' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'MAX_PER_MINT_REWARD', + outputs: [{ internalType: 'uint96', name: '', type: 'uint96' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'MAX_PLATFORM_PER_MINT_FEE_BPS', + outputs: [{ internalType: 'uint16', name: '', type: 'uint16' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'MAX_PLATFORM_PER_TX_FLAT_FEE', + outputs: [{ internalType: 'uint96', name: '', type: 'uint96' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'MINT_TO_TYPEHASH', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'PLATFORM_AIRDROP', + outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'PLATFORM_AIRDROP_TYPEHASH', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'VERIFY_MERKLE', + outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'VERIFY_SIGNATURE', + outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: '', type: 'address' }], + name: 'affiliateFeesAccrued', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'uint32[]', name: 'claimTickets', type: 'uint32[]' }, + ], + name: 'checkClaimTickets', + outputs: [{ internalType: 'bool[]', name: 'claimed', type: 'bool[]' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + components: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'address', name: 'to', type: 'address' }, + { internalType: 'uint32', name: 'quantity', type: 'uint32' }, + { internalType: 'address', name: 'allowlisted', type: 'address' }, + { internalType: 'uint32', name: 'allowlistedQuantity', type: 'uint32' }, + { internalType: 'bytes32[]', name: 'allowlistProof', type: 'bytes32[]' }, + { internalType: 'uint96', name: 'signedPrice', type: 'uint96' }, + { internalType: 'uint32', name: 'signedQuantity', type: 'uint32' }, + { internalType: 'uint32', name: 'signedClaimTicket', type: 'uint32' }, + { internalType: 'uint32', name: 'signedDeadline', type: 'uint32' }, + { internalType: 'bytes', name: 'signature', type: 'bytes' }, + { internalType: 'address', name: 'affiliate', type: 'address' }, + { internalType: 'bytes32[]', name: 'affiliateProof', type: 'bytes32[]' }, + { internalType: 'uint256', name: 'attributionId', type: 'uint256' }, + ], + internalType: 'struct ISuperMinterV2.MintTo', + name: 'p', + type: 'tuple', + }, + ], + name: 'computeMintToDigest', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + components: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'address[]', name: 'to', type: 'address[]' }, + { internalType: 'uint32', name: 'signedQuantity', type: 'uint32' }, + { internalType: 'uint32', name: 'signedClaimTicket', type: 'uint32' }, + { internalType: 'uint32', name: 'signedDeadline', type: 'uint32' }, + { internalType: 'bytes', name: 'signature', type: 'bytes' }, + ], + internalType: 'struct ISuperMinterV2.PlatformAirdrop', + name: 'p', + type: 'tuple', + }, + ], + name: 'computePlatformAirdropDigest', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + components: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint96', name: 'price', type: 'uint96' }, + { internalType: 'uint32', name: 'startTime', type: 'uint32' }, + { internalType: 'uint32', name: 'endTime', type: 'uint32' }, + { internalType: 'uint32', name: 'maxMintablePerAccount', type: 'uint32' }, + { internalType: 'uint32', name: 'maxMintable', type: 'uint32' }, + { internalType: 'uint16', name: 'affiliateFeeBPS', type: 'uint16' }, + { internalType: 'bytes32', name: 'affiliateMerkleRoot', type: 'bytes32' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'address', name: 'platform', type: 'address' }, + { internalType: 'uint8', name: 'mode', type: 'uint8' }, + { internalType: 'bytes32', name: 'merkleRoot', type: 'bytes32' }, + ], + internalType: 'struct ISuperMinterV2.MintCreation', + name: 'c', + type: 'tuple', + }, + ], + name: 'createEditionMint', + outputs: [{ internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: 'platform', type: 'address' }], + name: 'defaultPlatformFeeConfig', + outputs: [ + { + components: [ + { internalType: 'uint96', name: 'artistMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'affiliateMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'platformMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdPrice', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdArtistMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdAffiliateMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdPlatformMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'platformTxFlatFee', type: 'uint96' }, + { internalType: 'uint16', name: 'platformMintFeeBPS', type: 'uint16' }, + { internalType: 'bool', name: 'active', type: 'bool' }, + ], + internalType: 'struct ISuperMinterV2.PlatformFeeConfig', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'platform', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + ], + name: 'effectivePlatformFeeConfig', + outputs: [ + { + components: [ + { internalType: 'uint96', name: 'artistMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'affiliateMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'platformMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdPrice', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdArtistMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdAffiliateMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdPlatformMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'platformTxFlatFee', type: 'uint96' }, + { internalType: 'uint16', name: 'platformMintFeeBPS', type: 'uint16' }, + { internalType: 'bool', name: 'active', type: 'bool' }, + ], + internalType: 'struct ISuperMinterV2.PlatformFeeConfig', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'eip712Domain', + outputs: [ + { internalType: 'bytes1', name: 'fields', type: 'bytes1' }, + { internalType: 'string', name: 'name', type: 'string' }, + { internalType: 'string', name: 'version', type: 'string' }, + { internalType: 'uint256', name: 'chainId', type: 'uint256' }, + { internalType: 'address', name: 'verifyingContract', type: 'address' }, + { internalType: 'bytes32', name: 'salt', type: 'bytes32' }, + { internalType: 'uint256[]', name: 'extensions', type: 'uint256[]' }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: '', type: 'address' }], + name: 'gaPrice', + outputs: [{ internalType: 'uint96', name: '', type: 'uint96' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'address', name: 'affiliate', type: 'address' }, + ], + name: 'isAffiliated', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'address', name: 'affiliate', type: 'address' }, + { internalType: 'bytes32[]', name: 'affiliateProof', type: 'bytes32[]' }, + ], + name: 'isAffiliatedWithProof', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + ], + name: 'mintInfo', + outputs: [ + { + components: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'address', name: 'platform', type: 'address' }, + { internalType: 'uint96', name: 'price', type: 'uint96' }, + { internalType: 'uint32', name: 'startTime', type: 'uint32' }, + { internalType: 'uint32', name: 'endTime', type: 'uint32' }, + { internalType: 'uint32', name: 'maxMintablePerAccount', type: 'uint32' }, + { internalType: 'uint32', name: 'maxMintable', type: 'uint32' }, + { internalType: 'uint32', name: 'minted', type: 'uint32' }, + { internalType: 'uint16', name: 'affiliateFeeBPS', type: 'uint16' }, + { internalType: 'uint8', name: 'mode', type: 'uint8' }, + { internalType: 'bool', name: 'paused', type: 'bool' }, + { internalType: 'bool', name: 'hasMints', type: 'bool' }, + { internalType: 'bytes32', name: 'affiliateMerkleRoot', type: 'bytes32' }, + { internalType: 'bytes32', name: 'merkleRoot', type: 'bytes32' }, + { internalType: 'address', name: 'signer', type: 'address' }, + ], + internalType: 'struct ISuperMinterV2.MintInfo', + name: 'info', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: 'edition', type: 'address' }], + name: 'mintInfoList', + outputs: [ + { + components: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'address', name: 'platform', type: 'address' }, + { internalType: 'uint96', name: 'price', type: 'uint96' }, + { internalType: 'uint32', name: 'startTime', type: 'uint32' }, + { internalType: 'uint32', name: 'endTime', type: 'uint32' }, + { internalType: 'uint32', name: 'maxMintablePerAccount', type: 'uint32' }, + { internalType: 'uint32', name: 'maxMintable', type: 'uint32' }, + { internalType: 'uint32', name: 'minted', type: 'uint32' }, + { internalType: 'uint16', name: 'affiliateFeeBPS', type: 'uint16' }, + { internalType: 'uint8', name: 'mode', type: 'uint8' }, + { internalType: 'bool', name: 'paused', type: 'bool' }, + { internalType: 'bool', name: 'hasMints', type: 'bool' }, + { internalType: 'bytes32', name: 'affiliateMerkleRoot', type: 'bytes32' }, + { internalType: 'bytes32', name: 'merkleRoot', type: 'bytes32' }, + { internalType: 'address', name: 'signer', type: 'address' }, + ], + internalType: 'struct ISuperMinterV2.MintInfo[]', + name: 'a', + type: 'tuple[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + components: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'address', name: 'to', type: 'address' }, + { internalType: 'uint32', name: 'quantity', type: 'uint32' }, + { internalType: 'address', name: 'allowlisted', type: 'address' }, + { internalType: 'uint32', name: 'allowlistedQuantity', type: 'uint32' }, + { internalType: 'bytes32[]', name: 'allowlistProof', type: 'bytes32[]' }, + { internalType: 'uint96', name: 'signedPrice', type: 'uint96' }, + { internalType: 'uint32', name: 'signedQuantity', type: 'uint32' }, + { internalType: 'uint32', name: 'signedClaimTicket', type: 'uint32' }, + { internalType: 'uint32', name: 'signedDeadline', type: 'uint32' }, + { internalType: 'bytes', name: 'signature', type: 'bytes' }, + { internalType: 'address', name: 'affiliate', type: 'address' }, + { internalType: 'bytes32[]', name: 'affiliateProof', type: 'bytes32[]' }, + { internalType: 'uint256', name: 'attributionId', type: 'uint256' }, + ], + internalType: 'struct ISuperMinterV2.MintTo', + name: 'p', + type: 'tuple', + }, + ], + name: 'mintTo', + outputs: [{ internalType: 'uint256', name: 'fromTokenId', type: 'uint256' }], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [], + name: 'name', + outputs: [{ internalType: 'string', name: 'name_', type: 'string' }], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + ], + name: 'nextScheduleNum', + outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'address', name: 'collector', type: 'address' }, + ], + name: 'numberMinted', + outputs: [{ internalType: 'uint32', name: '', type: 'uint32' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + components: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'address[]', name: 'to', type: 'address[]' }, + { internalType: 'uint32', name: 'signedQuantity', type: 'uint32' }, + { internalType: 'uint32', name: 'signedClaimTicket', type: 'uint32' }, + { internalType: 'uint32', name: 'signedDeadline', type: 'uint32' }, + { internalType: 'bytes', name: 'signature', type: 'bytes' }, + ], + internalType: 'struct ISuperMinterV2.PlatformAirdrop', + name: 'p', + type: 'tuple', + }, + ], + name: 'platformAirdrop', + outputs: [{ internalType: 'uint256', name: 'fromTokenId', type: 'uint256' }], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: '', type: 'address' }], + name: 'platformFeeAddress', + outputs: [{ internalType: 'address', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'platform', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + ], + name: 'platformFeeConfig', + outputs: [ + { + components: [ + { internalType: 'uint96', name: 'artistMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'affiliateMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'platformMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdPrice', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdArtistMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdAffiliateMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdPlatformMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'platformTxFlatFee', type: 'uint96' }, + { internalType: 'uint16', name: 'platformMintFeeBPS', type: 'uint16' }, + { internalType: 'bool', name: 'active', type: 'bool' }, + ], + internalType: 'struct ISuperMinterV2.PlatformFeeConfig', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: '', type: 'address' }], + name: 'platformFeesAccrued', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: '', type: 'address' }], + name: 'platformSigner', + outputs: [{ internalType: 'address', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'uint16', name: 'bps', type: 'uint16' }, + ], + name: 'setAffiliateFee', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'bytes32', name: 'root', type: 'bytes32' }, + ], + name: 'setAffiliateMerkleRoot', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + components: [ + { internalType: 'uint96', name: 'artistMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'affiliateMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'platformMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdPrice', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdArtistMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdAffiliateMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdPlatformMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'platformTxFlatFee', type: 'uint96' }, + { internalType: 'uint16', name: 'platformMintFeeBPS', type: 'uint16' }, + { internalType: 'bool', name: 'active', type: 'bool' }, + ], + internalType: 'struct ISuperMinterV2.PlatformFeeConfig', + name: 'c', + type: 'tuple', + }, + ], + name: 'setDefaultPlatformFeeConfig', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [{ internalType: 'uint96', name: 'price', type: 'uint96' }], + name: 'setGAPrice', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'uint32', name: 'value', type: 'uint32' }, + ], + name: 'setMaxMintable', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'uint32', name: 'value', type: 'uint32' }, + ], + name: 'setMaxMintablePerAccount', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'bytes32', name: 'merkleRoot', type: 'bytes32' }, + ], + name: 'setMerkleRoot', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'bool', name: 'paused', type: 'bool' }, + ], + name: 'setPaused', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: 'recipient', type: 'address' }], + name: 'setPlatformFeeAddress', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { + components: [ + { internalType: 'uint96', name: 'artistMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'affiliateMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'platformMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdPrice', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdArtistMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdAffiliateMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'thresholdPlatformMintReward', type: 'uint96' }, + { internalType: 'uint96', name: 'platformTxFlatFee', type: 'uint96' }, + { internalType: 'uint16', name: 'platformMintFeeBPS', type: 'uint16' }, + { internalType: 'bool', name: 'active', type: 'bool' }, + ], + internalType: 'struct ISuperMinterV2.PlatformFeeConfig', + name: 'c', + type: 'tuple', + }, + ], + name: 'setPlatformFeeConfig', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: 'signer', type: 'address' }], + name: 'setPlatformSigner', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'uint96', name: 'price', type: 'uint96' }, + ], + name: 'setPrice', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'uint32', name: 'startTime', type: 'uint32' }, + ], + name: 'setStartTime', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'uint32', name: 'startTime', type: 'uint32' }, + { internalType: 'uint32', name: 'endTime', type: 'uint32' }, + ], + name: 'setTimeRange', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [{ internalType: 'bytes4', name: 'interfaceId', type: 'bytes4' }], + name: 'supportsInterface', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'uint32', name: 'quantity', type: 'uint32' }, + { internalType: 'bool', name: 'hasValidAffiliate', type: 'bool' }, + ], + name: 'totalPriceAndFees', + outputs: [ + { + components: [ + { internalType: 'uint256', name: 'total', type: 'uint256' }, + { internalType: 'uint256', name: 'subTotal', type: 'uint256' }, + { internalType: 'uint256', name: 'unitPrice', type: 'uint256' }, + { internalType: 'uint256', name: 'finalArtistFee', type: 'uint256' }, + { internalType: 'uint256', name: 'finalAffiliateFee', type: 'uint256' }, + { internalType: 'uint256', name: 'finalPlatformFee', type: 'uint256' }, + ], + internalType: 'struct ISuperMinterV2.TotalPriceAndFees', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { internalType: 'address', name: 'edition', type: 'address' }, + { internalType: 'uint8', name: 'tier', type: 'uint8' }, + { internalType: 'uint8', name: 'scheduleNum', type: 'uint8' }, + { internalType: 'uint32', name: 'quantity', type: 'uint32' }, + { internalType: 'uint96', name: 'signedPrice', type: 'uint96' }, + { internalType: 'bool', name: 'hasValidAffiliate', type: 'bool' }, + ], + name: 'totalPriceAndFeesWithSignedPrice', + outputs: [ + { + components: [ + { internalType: 'uint256', name: 'total', type: 'uint256' }, + { internalType: 'uint256', name: 'subTotal', type: 'uint256' }, + { internalType: 'uint256', name: 'unitPrice', type: 'uint256' }, + { internalType: 'uint256', name: 'finalArtistFee', type: 'uint256' }, + { internalType: 'uint256', name: 'finalAffiliateFee', type: 'uint256' }, + { internalType: 'uint256', name: 'finalPlatformFee', type: 'uint256' }, + ], + internalType: 'struct ISuperMinterV2.TotalPriceAndFees', + name: '', + type: 'tuple', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'version', + outputs: [{ internalType: 'string', name: 'version_', type: 'string' }], + stateMutability: 'pure', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: 'affiliate', type: 'address' }], + name: 'withdrawForAffiliate', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [{ internalType: 'address', name: 'platform', type: 'address' }], + name: 'withdrawForPlatform', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +export const SUPER_MINTER_V2 = { + version: '2', + address: SUPER_MINTER_V2_ADDRESS, + abi: SUPER_MINTER_V2_ABI, +} as const diff --git a/packages/sdk/src/contract/edition-v2/read/create.ts b/packages/sdk/src/contract/edition-v2/read/create.ts index 23be2c7b..bdb551a0 100644 --- a/packages/sdk/src/contract/edition-v2/read/create.ts +++ b/packages/sdk/src/contract/edition-v2/read/create.ts @@ -1,26 +1,26 @@ import { encodeFunctionData, + keccak256, + type Account, type Address, + type Chain, type EncodeFunctionDataParameters, type Hex, type PublicClient, - type Account, - type Chain, - keccak256, + toHex, } from 'viem' +import { MINT_GAS_LIMIT_MULTIPLIER, UINT32_MAX } from '../../../utils/constants' +import { InvalidUint32 } from '../../../utils/errors' +import { curry, scaleAmount } from '../../../utils/helpers' +import type { Prettify, TransactionGasOptions } from '../../../utils/types' +import type { ContractCall } from '../../types' import { SPLIT_MAIN_ABI, SPLIT_MAIN_ADDRESS } from '../abi/external/split-main' import { SOUND_CREATOR_V2_ABI, SOUND_CREATOR_V2_ADDRESS } from '../abi/sound-creator-v2' import { SOUND_EDITION_V2_ABI, SOUND_EDITION_V2_IMPLEMENTATION_ADDRESS } from '../abi/sound-edition-v2' import { SOUND_METADATA_ABI, SOUND_METADATA_ADDRESS } from '../abi/sound-metadata' -import { SUPER_MINTER_ABI, SUPER_MINTER_ADDRESS } from '../abi/super-minter' -import type { MinterScheduleConfig, TierConfig, TieredEditionConfig } from './info' -import type { ContractCall } from '../../types' +import { SUPER_MINTER_V2_ABI, SUPER_MINTER_V2_ADDRESS } from '../abi/super-minter-v2' import { MINTER_ROLE } from './helpers' -import { scaleAmount } from '../../../utils/helpers' -import type { Prettify, TransactionGasOptions } from '../../../utils/types' -import { curry } from '../../../utils/helpers' -import { InvalidUint32 } from '../../../utils/errors' -import { MINT_GAS_LIMIT_MULTIPLIER, NULL_ADDRESS, UINT32_MAX } from '../../../utils/constants' +import type { MinterScheduleConfig, TierConfig, TieredEditionConfig } from './info' interface EditionV2EncodeArguments { readonly owner: Address | Readonly @@ -47,7 +47,7 @@ function isValidUint32(value: number) { return true } -function createTieredEditionArgs({ +export function createTieredEditionArgs({ owner, formattedSalt, precomputedEdition, @@ -64,7 +64,7 @@ function createTieredEditionArgs({ calldata: encodeFunctionData({ abi: SOUND_EDITION_V2_ABI, functionName: 'grantRoles', - args: [SUPER_MINTER_ADDRESS, MINTER_ROLE], + args: [SUPER_MINTER_V2_ADDRESS, MINTER_ROLE], }), }) @@ -99,9 +99,9 @@ function createTieredEditionArgs({ } contractCalls.push({ - contractAddress: SUPER_MINTER_ADDRESS, + contractAddress: SUPER_MINTER_V2_ADDRESS, calldata: encodeFunctionData({ - abi: SUPER_MINTER_ABI, + abi: SUPER_MINTER_V2_ABI, functionName: 'createEditionMint', args: [ { @@ -118,7 +118,6 @@ function createTieredEditionArgs({ // TODO: add better typesafety here mode: mintConfig.mode === 'DEFAULT' ? 0 : mintConfig.mode === 'VERIFY_MERKLE' ? 1 : 2, merkleRoot: mintConfig.mode === 'VERIFY_MERKLE' ? mintConfig.merkleRoot : EMPTY_MERKLE_ROOT, - signer: mintConfig.mode === 'VERIFY_SIGNATURE' ? mintConfig.signer : NULL_ADDRESS, }, ], }), @@ -289,7 +288,7 @@ export type EditionCreateContractInput = Awaited>( client: Client, - { deployer, salt }: GetExpectedEditionAddressParams, + { deployer, salt: customSalt }: GetExpectedEditionAddressParams, ): Promise { - const formattedSalt = keccak256(salt) + const formattedSalt = keccak256(toHex(customSalt || Math.random() * 1_000_000_000_000_000)) const [edition, exists] = await client.readContract({ abi: SOUND_CREATOR_V2_ABI, diff --git a/packages/sdk/src/contract/edition-v2/read/helpers.ts b/packages/sdk/src/contract/edition-v2/read/helpers.ts index 2a761651..b5a9c5bc 100644 --- a/packages/sdk/src/contract/edition-v2/read/helpers.ts +++ b/packages/sdk/src/contract/edition-v2/read/helpers.ts @@ -1,5 +1,10 @@ +import type { Address, PublicClient } from 'viem' import { nowUnixTimestamp } from '../../../utils/helpers' +import { SOUND_EDITION_V2_ABI } from '../abi/sound-edition-v2' +import { SUPER_MINTER_V1, SUPER_MINTER_V1_ADDRESS } from '../abi/super-minter-v1' +import { SUPER_MINTER_V2, SUPER_MINTER_V2_ADDRESS } from '../abi/super-minter-v2' import type { GetEditionContractInfoReturnType } from './info' +import { CacheUtils } from '../../../utils/cache-utils' export function getTierCurrentMaxMintable( tierInfo: Pick< @@ -14,3 +19,49 @@ export function getTierCurrentMaxMintable( // This is hardcoded on the contract so we always know its 2 export const MINTER_ROLE = 2n + +export type SuperMinter = typeof SUPER_MINTER_V1 | typeof SUPER_MINTER_V2 +export type SuperMinterAddress = SuperMinter['address'] + +export async function getSuperMinterForEdition>( + client: Client, + { editionAddress }: { editionAddress: Address }, +): Promise { + const cacheKey = `superMinter-${editionAddress}` + + return CacheUtils.getOrSetCache(cacheKey, () => _getSuperMinterForEdition({ client, editionAddress })) +} + +async function _getSuperMinterForEdition({ + client, + editionAddress, +}: { + client: Pick + editionAddress: Address +}) { + const [hasSuperMinterV1, hasSuperMinterV2] = await client.multicall({ + contracts: [ + { + abi: SOUND_EDITION_V2_ABI, + address: editionAddress, + functionName: 'hasAnyRole', + args: [SUPER_MINTER_V1_ADDRESS, MINTER_ROLE], + }, + { + abi: SOUND_EDITION_V2_ABI, + address: editionAddress, + functionName: 'hasAnyRole', + args: [SUPER_MINTER_V2_ADDRESS, MINTER_ROLE], + }, + ], + allowFailure: false, + }) + + if (hasSuperMinterV1) { + return SUPER_MINTER_V1 + } else if (hasSuperMinterV2) { + return SUPER_MINTER_V2 + } + + throw new Error('No super minter found for edition') +} diff --git a/packages/sdk/src/contract/edition-v2/read/info.ts b/packages/sdk/src/contract/edition-v2/read/info.ts index cbaa6bae..d33de7a8 100644 --- a/packages/sdk/src/contract/edition-v2/read/info.ts +++ b/packages/sdk/src/contract/edition-v2/read/info.ts @@ -1,9 +1,7 @@ import type { Address, Hex, PublicClient } from 'viem' +import { curry, nowUnixTimestamp } from '../../../utils/helpers' import { SOUND_EDITION_V2_ABI } from '../abi/sound-edition-v2' -import { getTierCurrentMaxMintable } from './helpers' -import { SUPER_MINTER_ABI, SUPER_MINTER_ADDRESS } from '../abi/super-minter' -import { nowUnixTimestamp } from '../../../utils/helpers' -import { curry } from '../../../utils/helpers' +import { getSuperMinterForEdition, getTierCurrentMaxMintable } from './helpers' import { isSoundV2 } from './interface' export type GetEditionContractInfoReturnType = { @@ -101,12 +99,11 @@ export type MerkleScheduleConfig = ScheduleConfigBase & { } export type SignatureScheduleConfig = ScheduleConfigBase & { mode: 'VERIFY_SIGNATURE' - signer: Address - usePlatformSigner: boolean } export type MinterScheduleConfig = DefaultScheduleConfig | MerkleScheduleConfig | SignatureScheduleConfig export type ScheduleBase = ScheduleConfigBase & { + minterAddress: Address scheduleNum: number minted: number hasMints: boolean @@ -121,8 +118,6 @@ export type MerkleSchedule = ScheduleBase & { } export type SignatureSchedule = ScheduleBase & { mode: 'VERIFY_SIGNATURE' - signer: Address - usePlatformSigner: boolean } export type SuperMinterSchedule = DefaultSchedule | MerkleSchedule | SignatureSchedule @@ -137,14 +132,16 @@ export type GetMintingSchedulesReturnType = { activeSchedules: readonly SuperMinterSchedule[] } -export async function mintingSchedules>( +export async function mintingSchedules>( client: Client, { editionAddress, unixTimestamp = nowUnixTimestamp() }: GetMintingSchedulesParams, ): Promise { + const { address, abi } = await getSuperMinterForEdition(client, { editionAddress }) + const schedules: SuperMinterSchedule[] = await client - .readContract({ - abi: SUPER_MINTER_ABI, - address: SUPER_MINTER_ADDRESS, + .readContract({ + abi, + address, functionName: 'mintInfoList', args: [editionAddress], }) @@ -152,6 +149,7 @@ export async function mintingSchedules ({ ...schedule, mode: schedule.mode === 0 ? 'DEFAULT' : schedule.mode === 1 ? 'VERIFY_MERKLE' : 'VERIFY_SIGNATURE', + minterAddress: address, })), ) diff --git a/packages/sdk/src/contract/edition-v2/read/interface.ts b/packages/sdk/src/contract/edition-v2/read/interface.ts index bf42b115..4d4fc11b 100644 --- a/packages/sdk/src/contract/edition-v2/read/interface.ts +++ b/packages/sdk/src/contract/edition-v2/read/interface.ts @@ -1,7 +1,6 @@ import type { Address, PublicClient } from 'viem' import { SOUND_EDITION_V2_ABI } from '../abi/sound-edition-v2' import { interfaceIds } from '../interfaceIds' -import { SUPER_MINTER_ABI } from '../abi/super-minter' export function isSoundV2>( client: Client, @@ -18,19 +17,3 @@ export function isSoundV2>( args: [interfaceIds.ISoundEditionV2], }) } - -export function isSuperMinter>( - client: Client, - { - editionAddress, - }: { - editionAddress: Address - }, -) { - return client.readContract({ - abi: SUPER_MINTER_ABI, - address: editionAddress, - functionName: 'supportsInterface', - args: [interfaceIds.ISuperMinter], - }) -} diff --git a/packages/sdk/src/contract/edition-v2/read/mint.ts b/packages/sdk/src/contract/edition-v2/read/mint.ts index e5b55e8c..3fbb28a3 100644 --- a/packages/sdk/src/contract/edition-v2/read/mint.ts +++ b/packages/sdk/src/contract/edition-v2/read/mint.ts @@ -1,13 +1,11 @@ import type { Account, Address, Chain, Hex, PublicClient } from 'viem' -import { SUPER_MINTER_ABI, SUPER_MINTER_ADDRESS } from '../abi/super-minter' +import { MINT_FALLBACK_GAS_LIMIT, MINT_GAS_LIMIT_MULTIPLIER, NULL_ADDRESS, UINT32_MAX } from '../../../utils/constants' +import { curry, exhaustiveGuard, scaleAmount } from '../../../utils/helpers' import type { MerkleProvider, TransactionGasOptions, TypeFromUnion } from '../../../utils/types' +import type { MintParameters } from '../../types' import { SOUND_EDITION_V2_ABI } from '../abi/sound-edition-v2' -import { getTierCurrentMaxMintable } from './helpers' +import { getSuperMinterForEdition, getTierCurrentMaxMintable } from './helpers' import type { SuperMinterSchedule } from './info' -import type { MintParameters } from '../../types' -import { scaleAmount } from '../../../utils/helpers' -import { curry } from '../../../utils/helpers' -import { MINT_FALLBACK_GAS_LIMIT, MINT_GAS_LIMIT_MULTIPLIER, NULL_ADDRESS, UINT32_MAX } from '../../../utils/constants' export type GetTotalMintPriceAndFeesParams = { tier: number @@ -41,43 +39,35 @@ export type GetTotalMintPriceAndFeesReturnType = { affiliateFee: bigint } -export async function getTotalMintPriceAndFees>( +export async function getTotalMintPriceAndFees>( client: Client, { tier, scheduleNum, quantity, editionAddress }: GetTotalMintPriceAndFeesParams, -): Promise { - return client.readContract({ - abi: SUPER_MINTER_ABI, - address: SUPER_MINTER_ADDRESS, - functionName: 'totalPriceAndFees', - args: [editionAddress, tier, scheduleNum, quantity], - }) -} - -export type GetPlatformFeesParams = { - platform: Address - tiers: number[] -} - -export type GetPlatformFeesReturnType = { - perTxFlat: bigint - perMintFlat: bigint - perMintBPS: number - active: boolean -}[] +) { + const superMinter = await getSuperMinterForEdition(client, { editionAddress }) + + switch (superMinter.version) { + case '1': { + const { abi, address } = superMinter + return client.readContract({ + abi, + address, + functionName: 'totalPriceAndFees', + args: [editionAddress, tier, scheduleNum, quantity], + }) + } -export async function getPlatformFees>( - client: Client, - { platform, tiers }: GetPlatformFeesParams, -): Promise { - return client.multicall({ - contracts: tiers.map((tier) => ({ - abi: SUPER_MINTER_ABI, - address: SUPER_MINTER_ADDRESS, - functionName: 'platformFeeConfig', - args: [platform, tier], - })), - allowFailure: false, - }) + case '2': { + const { abi, address } = superMinter + return client.readContract({ + abi, + address, + functionName: 'totalPriceAndFees', + args: [editionAddress, tier, scheduleNum, quantity, false], + }) + } + default: + exhaustiveGuard(superMinter) + } } export type GetMintEligibilityParams = { @@ -98,17 +88,19 @@ export async function mintEligibility { + const { address, abi } = await getSuperMinterForEdition(client, { editionAddress }) + const [numberMintedOnSchedule, scheduleInfo, tierInfo] = await client.multicall({ contracts: [ { - abi: SUPER_MINTER_ABI, - address: SUPER_MINTER_ADDRESS, + abi, + address, functionName: 'numberMinted', args: [editionAddress, tier, scheduleNum, collectorAddress], }, { - abi: SUPER_MINTER_ABI, - address: SUPER_MINTER_ADDRESS, + abi, + address, functionName: 'mintInfo', args: [editionAddress, tier, scheduleNum], }, @@ -254,9 +246,11 @@ export async function editionMintParameters< editionAddress, }) + const superMinter = await getSuperMinterForEdition(client, { editionAddress }) + const sharedWriteContractParameters = { - address: SUPER_MINTER_ADDRESS, - abi: SUPER_MINTER_ABI, + address: superMinter.address, + abi: superMinter.abi, functionName: 'mintTo', account, value, @@ -291,7 +285,7 @@ export async function editionMintParameters< try { // Add a buffer to the gas estimate to account for node provider estimate variance. gasEstimate = txnOverrides.gas = scaleAmount({ - amount: await client.estimateContractGas({ + amount: await client.estimateContractGas({ args, ...sharedWriteContractParameters, ...txnOverrides, @@ -355,7 +349,7 @@ export async function editionMintParameters< try { // Add a buffer to the gas estimate to account for node provider estimate variance. gasEstimate = txnOverrides.gas = scaleAmount({ - amount: await client.estimateContractGas({ + amount: await client.estimateContractGas({ args, ...sharedWriteContractParameters, ...txnOverrides, @@ -402,9 +396,8 @@ export function editionV2PublicActionsMint< ...client.editionV2, totalMintPriceAndFees: curry(getTotalMintPriceAndFees)(client), - platformFees: curry(getPlatformFees)(client), - eligiblity: curry(mintEligibility)(client)({ merkleProvider: client.merkleProvider }), + eligibility: curry(mintEligibility)(client)({ merkleProvider: client.merkleProvider }), mintParameters: curry(editionMintParameters)(client)({ merkleProvider: client.merkleProvider }), }, diff --git a/packages/sdk/src/contract/edition-v2/write/create.ts b/packages/sdk/src/contract/edition-v2/write/create.ts index 680fbf2f..8d4f75ab 100644 --- a/packages/sdk/src/contract/edition-v2/write/create.ts +++ b/packages/sdk/src/contract/edition-v2/write/create.ts @@ -1,6 +1,6 @@ import type { WalletClient } from 'viem' -import type { EditionCreateContractInput } from '../read/create' import { curry } from '../../../utils/helpers' +import type { EditionCreateContractInput } from '../read/create' export function editionCreate>( client: Client, diff --git a/packages/sdk/src/contract/edition-v2/write/mint.ts b/packages/sdk/src/contract/edition-v2/write/mint.ts index 5aa0feba..9c3710cc 100644 --- a/packages/sdk/src/contract/edition-v2/write/mint.ts +++ b/packages/sdk/src/contract/edition-v2/write/mint.ts @@ -1,12 +1,12 @@ -import type { WalletClient } from 'viem' -import type { EditionMintContractInput } from '../read/mint' +import type { Chain, WalletClient } from 'viem' import { curry } from '../../../utils/helpers' +import type { EditionMintContractInput } from '../read/mint' export function editionMint>( client: Client, { input }: EditionMintContractInput, ) { - return client.writeContract(input) + return client.writeContract(input) } export function editionV2WalletActionsMint & { editionV2?: {} }>( diff --git a/packages/sdk/src/utils/cache-utils.ts b/packages/sdk/src/utils/cache-utils.ts new file mode 100644 index 00000000..bba732c5 --- /dev/null +++ b/packages/sdk/src/utils/cache-utils.ts @@ -0,0 +1,15 @@ +export class CacheUtils { + private static cache = new Map>() + + public static async getOrSetCache(key: string, fetchData: () => Promise): Promise { + if (this.cache.has(key)) { + return this.cache.get(key) as Promise + } + + const promise = fetchData() + + this.cache.set(key, promise) + + return promise + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b0097ed6..8630fa04 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -120,11 +120,11 @@ importers: specifier: ^1.11.2 version: 1.12.1(@types/react@18.2.45)(react@18.2.0) viem: - specifier: ^1.16.6 - version: 1.19.15(typescript@5.2.2)(zod@3.22.4) + specifier: ^1.20.0 + version: 1.20.0(typescript@5.2.2)(zod@3.22.4) wagmi: specifier: ^1.4.4 - version: 1.4.11(@types/react@18.2.45)(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2)(viem@1.19.15)(zod@3.22.4) + version: 1.4.11(@types/react@18.2.45)(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2)(viem@1.20.0)(zod@3.22.4) zod: specifier: ^3.22.4 version: 3.22.4 @@ -159,9 +159,6 @@ importers: packages/legacy-sdk: dependencies: - keccak256: - specifier: ^1.0.6 - version: 1.0.6 zod: specifier: ^3.22.4 version: 3.22.4 @@ -218,8 +215,8 @@ importers: specifier: 5.2.2 version: 5.2.2 viem: - specifier: ^1.16.6 - version: 1.19.15(typescript@5.2.2)(zod@3.22.4) + specifier: ^1.20.0 + version: 1.20.0(typescript@5.2.2)(zod@3.22.4) publishDirectory: dist packages/sdk: @@ -264,8 +261,8 @@ importers: specifier: 5.2.2 version: 5.2.2 viem: - specifier: ^1.16.6 - version: 1.19.15(typescript@5.2.2)(zod@3.22.4) + specifier: ^1.20.0 + version: 1.20.0(typescript@5.2.2)(zod@3.22.4) zod: specifier: ^3.22.4 version: 3.22.4 @@ -3191,6 +3188,7 @@ packages: dependencies: is-glob: 4.0.3 micromatch: 4.0.5 + napi-wasm: 1.1.0 dev: false bundledDependencies: - napi-wasm @@ -4510,7 +4508,7 @@ packages: resolution: {integrity: sha512-XJbEPuaVc7b9n23MqlF6c+ToYIS3f7P2Sel8f3cSBQ9WORE4xrSuvhMpK9fDSFqJ7by/brc+rmJR/5HViRr0/w==} dependencies: '@safe-global/safe-gateway-typescript-sdk': 3.13.3 - viem: 1.19.15(typescript@5.2.2)(zod@3.22.4) + viem: 1.20.0(typescript@5.2.2)(zod@3.22.4) transitivePeerDependencies: - bufferutil - typescript @@ -5096,7 +5094,7 @@ packages: pretty-format: 29.7.0 dev: true - /@wagmi/connectors@3.1.9(@types/react@18.2.45)(react@18.2.0)(typescript@5.2.2)(viem@1.19.15)(zod@3.22.4): + /@wagmi/connectors@3.1.9(@types/react@18.2.45)(react@18.2.0)(typescript@5.2.2)(viem@1.20.0)(zod@3.22.4): resolution: {integrity: sha512-q7Hz6WDnvOcZ/EPzuFgilirSwyoWYo1owowHmHqHTxEu0yu6HFNQGuaMNK9hsM/XCHeCisW/ZdUvudQSBUVpHQ==} peerDependencies: typescript: '>=5.0.4' @@ -5116,7 +5114,7 @@ packages: abitype: 0.8.7(typescript@5.2.2)(zod@3.22.4) eventemitter3: 4.0.7 typescript: 5.2.2 - viem: 1.19.15(typescript@5.2.2)(zod@3.22.4) + viem: 1.20.0(typescript@5.2.2)(zod@3.22.4) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -5139,7 +5137,7 @@ packages: - zod dev: false - /@wagmi/core@1.4.11(@types/react@18.2.45)(react@18.2.0)(typescript@5.2.2)(viem@1.19.15)(zod@3.22.4): + /@wagmi/core@1.4.11(@types/react@18.2.45)(react@18.2.0)(typescript@5.2.2)(viem@1.20.0)(zod@3.22.4): resolution: {integrity: sha512-H6y5v+PpvYbT5Qsk7PTVu5MtcSqudDqGZC/LZFV6Y+UeJlBsnfJNy5+cPEzKmvaz+6tSyVPGCF9aWK+sNdC0sQ==} peerDependencies: typescript: '>=5.0.4' @@ -5148,11 +5146,11 @@ packages: typescript: optional: true dependencies: - '@wagmi/connectors': 3.1.9(@types/react@18.2.45)(react@18.2.0)(typescript@5.2.2)(viem@1.19.15)(zod@3.22.4) + '@wagmi/connectors': 3.1.9(@types/react@18.2.45)(react@18.2.0)(typescript@5.2.2)(viem@1.20.0)(zod@3.22.4) abitype: 0.8.7(typescript@5.2.2)(zod@3.22.4) eventemitter3: 4.0.7 typescript: 5.2.2 - viem: 1.19.15(typescript@5.2.2)(zod@3.22.4) + viem: 1.20.0(typescript@5.2.2)(zod@3.22.4) zustand: 4.4.7(@types/react@18.2.45)(react@18.2.0) transitivePeerDependencies: - '@azure/app-configuration' @@ -9135,14 +9133,6 @@ packages: object.values: 1.1.7 dev: true - /keccak256@1.0.6: - resolution: {integrity: sha512-8GLiM01PkdJVGUhR1e6M/AvWnSqYS0HaERI+K/QtStGDGlSTx2B1zTqZk4Zlqu5TxHJNTxWAdP9Y+WI50OApUw==} - dependencies: - bn.js: 5.2.1 - buffer: 6.0.3 - keccak: 3.0.4 - dev: false - /keccak@3.0.4: resolution: {integrity: sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==} engines: {node: '>=10.0.0'} @@ -9682,6 +9672,10 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + /napi-wasm@1.1.0: + resolution: {integrity: sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg==} + dev: false + /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true @@ -12016,8 +12010,8 @@ packages: engines: {node: '>=12'} dev: true - /viem@1.19.15(typescript@5.2.2)(zod@3.22.4): - resolution: {integrity: sha512-rc87AkyrUUsoOAgMNYP+X/wN4GYwbhP87DkmsqQCYKxxQyzTX0+yliKs6Bxljbjr8ybU72GOb12Oyus6393AjQ==} + /viem@1.20.0(typescript@5.2.2)(zod@3.22.4): + resolution: {integrity: sha512-yPjV9pJr10xi28C/9LEvs5zdZNEMiru3Kz7nufghVYABJAfeSkoZQXb6b23n7MscS7c55JO5nmUI3xKkd9g6Yg==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -12161,7 +12155,7 @@ packages: - terser dev: true - /wagmi@1.4.11(@types/react@18.2.45)(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2)(viem@1.19.15)(zod@3.22.4): + /wagmi@1.4.11(@types/react@18.2.45)(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2)(viem@1.20.0)(zod@3.22.4): resolution: {integrity: sha512-Kslc5wwuPTSOqxpqElE9lGZahyPwlwAXrRpvmw+h89e8lPg7DWThQsPQMWiSvKcg+NloEHwQRGmy5rpfKFKLaA==} peerDependencies: react: '>=17.0.0' @@ -12174,12 +12168,12 @@ packages: '@tanstack/query-sync-storage-persister': 4.36.1 '@tanstack/react-query': 4.36.1(react-dom@18.2.0)(react@18.2.0) '@tanstack/react-query-persist-client': 4.36.1(@tanstack/react-query@4.36.1) - '@wagmi/core': 1.4.11(@types/react@18.2.45)(react@18.2.0)(typescript@5.2.2)(viem@1.19.15)(zod@3.22.4) + '@wagmi/core': 1.4.11(@types/react@18.2.45)(react@18.2.0)(typescript@5.2.2)(viem@1.20.0)(zod@3.22.4) abitype: 0.8.7(typescript@5.2.2)(zod@3.22.4) react: 18.2.0 typescript: 5.2.2 use-sync-external-store: 1.2.0(react@18.2.0) - viem: 1.19.15(typescript@5.2.2)(zod@3.22.4) + viem: 1.20.0(typescript@5.2.2)(zod@3.22.4) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos'