diff --git a/.changeset/nice-apricots-bathe.md b/.changeset/nice-apricots-bathe.md new file mode 100644 index 000000000..b78203fa3 --- /dev/null +++ b/.changeset/nice-apricots-bathe.md @@ -0,0 +1,5 @@ +--- +"@rabbitholegg/questdk-plugin-zora": patch +--- + +update universal minter package diff --git a/packages/zora/package.json b/packages/zora/package.json index 2294509a2..ca0d61cbb 100644 --- a/packages/zora/package.json +++ b/packages/zora/package.json @@ -36,7 +36,7 @@ "tsconfig": "workspace:*" }, "dependencies": { - "@zoralabs/universal-minter": "0.2.12", + "@zoralabs/universal-minter": "0.2.15", "@rabbitholegg/questdk-plugin-utils": "workspace:*", "@rabbitholegg/questdk": "workspace:*" } diff --git a/packages/zora/src/Zora.test.ts b/packages/zora/src/Zora.test.ts index eb517fa2a..82d0bd6f8 100644 --- a/packages/zora/src/Zora.test.ts +++ b/packages/zora/src/Zora.test.ts @@ -1,13 +1,13 @@ -import { apply } from '@rabbitholegg/questdk/filter' -import { describe, expect, test } from 'vitest' -import { failingTestCases, passingTestCases } from './test-setup' -import { BASIC_PURCHASE } from './test-transactions' import { mint } from './Zora' import { - ZORA_MINTER_ABI_1155, - ZORA_MINTER_ABI_721, UNIVERSAL_MINTER_ABI, + ZORA_MINTER_ABI_721, + ZORA_MINTER_ABI_1155, } from './abi' +import { failingTestCases, passingTestCases } from './test-setup' +import { BASIC_PURCHASE } from './test-transactions' +import { apply } from '@rabbitholegg/questdk/filter' +import { describe, expect, test } from 'vitest' describe('Given the zora plugin', () => { describe('When handling the mint', () => { diff --git a/packages/zora/src/Zora.ts b/packages/zora/src/Zora.ts index 3b6942243..0abbcd084 100644 --- a/packages/zora/src/Zora.ts +++ b/packages/zora/src/Zora.ts @@ -1,16 +1,16 @@ import { - type TransactionFilter, + UNIVERSAL_MINTER_ABI, + ZORA_MINTER_ABI_721, + ZORA_MINTER_ABI_1155, +} from './abi' +import { CHAIN_ID_ARRAY } from './chain-ids' +import { type MintActionParams, + type TransactionFilter, compressJson, } from '@rabbitholegg/questdk' import { zoraUniversalMinterAddress } from '@zoralabs/universal-minter' import { type Address, getAddress } from 'viem' -import { CHAIN_ID_ARRAY } from './chain-ids' -import { - UNIVERSAL_MINTER_ABI, - ZORA_MINTER_ABI_1155, - ZORA_MINTER_ABI_721, -} from './abi' export const mint = async ( mint: MintActionParams, diff --git a/packages/zora/src/index.ts b/packages/zora/src/index.ts index 208c7b605..7436301eb 100644 --- a/packages/zora/src/index.ts +++ b/packages/zora/src/index.ts @@ -4,9 +4,9 @@ import { } from '@rabbitholegg/questdk' import { - mint, getSupportedChainIds, getSupportedTokenAddresses, + mint, } from './Zora.js' export const Zora: IActionPlugin = { diff --git a/packages/zora/src/test-setup.ts b/packages/zora/src/test-setup.ts index 0f4b9d9f2..8b2e93639 100644 --- a/packages/zora/src/test-setup.ts +++ b/packages/zora/src/test-setup.ts @@ -1,17 +1,19 @@ -import { getAddress } from 'viem' -import { createTestCase } from '@rabbitholegg/questdk-plugin-utils' import { BASIC_PURCHASE, + BATCH_MINT_ARB, + MINT_BATCH_WITHOUT_FEES, MINT_WITH_REWARDS, MINT_WITH_REWARDS_1155, - MINT_BATCH_WITHOUT_FEES, } from './test-transactions' +import { createTestCase } from '@rabbitholegg/questdk-plugin-utils' +import { getAddress } from 'viem' export const passingTestCases = [ createTestCase(BASIC_PURCHASE, 'when doing a basic purchase'), createTestCase(MINT_WITH_REWARDS, 'Minting with rewards'), createTestCase(MINT_WITH_REWARDS_1155, 'Minting with rewards 1155'), createTestCase(MINT_BATCH_WITHOUT_FEES, 'When using the batch mint function'), + createTestCase(BATCH_MINT_ARB, 'when using batch mint function on arbitrum'), createTestCase(MINT_WITH_REWARDS, 'when contractAddress is checksummed', { contractAddress: getAddress(MINT_WITH_REWARDS.params.contractAddress), }), diff --git a/packages/zora/src/test-transactions.ts b/packages/zora/src/test-transactions.ts index 0ae9c0cc8..ad3cc40d3 100644 --- a/packages/zora/src/test-transactions.ts +++ b/packages/zora/src/test-transactions.ts @@ -1,5 +1,5 @@ import { type MintActionParams } from '@rabbitholegg/questdk' -import { type TestParams, Chains } from '@rabbitholegg/questdk-plugin-utils' +import { Chains, type TestParams } from '@rabbitholegg/questdk-plugin-utils' export const BASIC_PURCHASE: TestParams = { transaction: { @@ -70,3 +70,19 @@ export const MINT_BATCH_WITHOUT_FEES: TestParams = { tokenId: 2, }, } + +export const BATCH_MINT_ARB: TestParams = { + transaction: { + chainId: 42161, // Optimism + from: '0x1671b592610fb7427ed788b66fa3e9217ff41047', + hash: '0x4c0d898b6f3864332e3e47a3924cad33491b8df0a05590d13175823ee62ef07c', + input: + '0x7c1e2068000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000fc0000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000b850c9a71b925237a10dce831911b59849c883e4000000000000000000000000b850c9a71b925237a10dce831911b59849c883e4000000000000000000000000b850c9a71b925237a10dce831911b59849c883e4000000000000000000000000b850c9a71b925237a10dce831911b59849c883e4000000000000000000000000b850c9a71b925237a10dce831911b59849c883e4000000000000000000000000b850c9a71b925237a10dce831911b59849c883e4000000000000000000000000b850c9a71b925237a10dce831911b59849c883e4000000000000000000000000b850c9a71b925237a10dce831911b59849c883e4000000000000000000000000b850c9a71b925237a10dce831911b59849c883e4000000000000000000000000b850c9a71b925237a10dce831911b59849c883e4000000000000000000000000b850c9a71b925237a10dce831911b59849c883e4000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000005e00000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000082000000000000000000000000000000000000000000000000000000000000009400000000000000000000000000000000000000000000000000000000000000a600000000000000000000000000000000000000000000000000000000000000b800000000000000000000000000000000000000000000000000000000000000ca000000000000000000000000000000000000000000000000000000000000000e49dbb844d0000000000000000000000001cd1c1f3b8b779b50db23155f2cb244fcca06b210000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006609dfa1cb75d74f4ff39c8a5057bd111fba5b220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e49dbb844d0000000000000000000000001cd1c1f3b8b779b50db23155f2cb244fcca06b210000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006609dfa1cb75d74f4ff39c8a5057bd111fba5b220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e49dbb844d0000000000000000000000001cd1c1f3b8b779b50db23155f2cb244fcca06b210000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006609dfa1cb75d74f4ff39c8a5057bd111fba5b220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e49dbb844d0000000000000000000000001cd1c1f3b8b779b50db23155f2cb244fcca06b210000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006609dfa1cb75d74f4ff39c8a5057bd111fba5b220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e49dbb844d0000000000000000000000001cd1c1f3b8b779b50db23155f2cb244fcca06b210000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006609dfa1cb75d74f4ff39c8a5057bd111fba5b220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e49dbb844d0000000000000000000000001cd1c1f3b8b779b50db23155f2cb244fcca06b210000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006609dfa1cb75d74f4ff39c8a5057bd111fba5b220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e49dbb844d0000000000000000000000001cd1c1f3b8b779b50db23155f2cb244fcca06b210000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006609dfa1cb75d74f4ff39c8a5057bd111fba5b220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e49dbb844d0000000000000000000000001cd1c1f3b8b779b50db23155f2cb244fcca06b210000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006609dfa1cb75d74f4ff39c8a5057bd111fba5b220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e49dbb844d0000000000000000000000001cd1c1f3b8b779b50db23155f2cb244fcca06b210000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006609dfa1cb75d74f4ff39c8a5057bd111fba5b220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e49dbb844d0000000000000000000000001cd1c1f3b8b779b50db23155f2cb244fcca06b21000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006609dfa1cb75d74f4ff39c8a5057bd111fba5b220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e49dbb844d0000000000000000000000001cd1c1f3b8b779b50db23155f2cb244fcca06b21000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000006609dfa1cb75d74f4ff39c8a5057bd111fba5b2200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000000000000000000000000000000002c2ad68fd90000000000000000000000000000000000000000000000000000002c2ad68fd90000000000000000000000000000000000000000000000000000002c2ad68fd90000000000000000000000000000000000000000000000000000002c2ad68fd90000000000000000000000000000000000000000000000000000002c2ad68fd90000000000000000000000000000000000000000000000000000002c2ad68fd90000000000000000000000000000000000000000000000000000002c2ad68fd90000000000000000000000000000000000000000000000000000002c2ad68fd90000000000000000000000000000000000000000000000000000002c2ad68fd90000000000000000000000000000000000000000000000000000002c2ad68fd90000000000000000000000000000000000000000000000000000002c2ad68fd9000', + to: '0xc6899816663891d7493939d74d83cb7f2bbcbb16', + value: '1554000000000000', + }, + params: { + chainId: Chains.ARBITRUM_ONE, + contractAddress: '0xb850c9a71b925237a10dce831911b59849c883e4', + }, +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b863cf132..bcd5b6f25 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -710,8 +710,8 @@ importers: specifier: workspace:* version: link:../utils '@zoralabs/universal-minter': - specifier: 0.2.12 - version: 0.2.12(@types/node@20.4.5)(ts-node@10.9.1)(typescript@5.3.2) + specifier: 0.2.15 + version: 0.2.15(@types/node@20.4.5)(ts-node@10.9.1)(typescript@5.3.2) devDependencies: tsconfig: specifier: workspace:* @@ -3815,8 +3815,8 @@ packages: resolution: {integrity: sha512-Jf2aIHhyAsybCCv1byV5uP/YiwA/ZB3zTywDO6d15796Bf58zzC3D1ptKuh+z1Nba3dU2Hzqz0K7EEQOjoq+1A==} dev: false - /@zoralabs/universal-minter@0.2.12(@types/node@20.4.5)(ts-node@10.9.1)(typescript@5.3.2): - resolution: {integrity: sha512-tPeUh85OQrCOc454TaXy0MbHfU79XwaU1Mrhj1DAxY077v3ztXl2Vg7wJbQduVg8c6H8/hShCSI+scO2NYcHZg==} + /@zoralabs/universal-minter@0.2.15(@types/node@20.4.5)(ts-node@10.9.1)(typescript@5.3.2): + resolution: {integrity: sha512-4ck2Rur7ltoBTV5EdQ0TtJtSyRTnNZtZyZSWhnrglfZ7574KOOAu0E/DJCgRXhNTo4RSNCbTXQh6+7WzjehagA==} dependencies: '@zoralabs/zora-1155-contracts': 1.6.1(@types/node@20.4.5)(ts-node@10.9.1) abitype: 0.9.10(typescript@5.3.2) @@ -4737,7 +4737,7 @@ packages: resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} dependencies: pascal-case: 3.1.2 - tslib: 2.6.2 + tslib: 2.3.1 dev: false /camelcase-keys@6.2.2: @@ -4765,7 +4765,7 @@ packages: resolution: {integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==} dependencies: no-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.3.1 upper-case-first: 2.0.2 dev: false @@ -4887,7 +4887,7 @@ packages: path-case: 3.0.4 sentence-case: 3.0.4 snake-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.3.1 dev: false /chardet@0.7.0: @@ -5120,7 +5120,7 @@ packages: resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} dependencies: no-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.3.1 upper-case: 2.0.2 dev: false @@ -5621,7 +5621,7 @@ packages: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} dependencies: no-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.3.1 dev: false /dotenv-expand@10.0.0: @@ -7189,7 +7189,7 @@ packages: resolution: {integrity: sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==} dependencies: capital-case: 1.0.4 - tslib: 2.6.2 + tslib: 2.3.1 dev: false /hmac-drbg@1.0.1: @@ -8163,7 +8163,7 @@ packages: /lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} dependencies: - tslib: 2.6.2 + tslib: 2.3.1 dev: false /lowercase-keys@2.0.0: @@ -8714,7 +8714,7 @@ packages: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} dependencies: lower-case: 2.0.2 - tslib: 2.6.2 + tslib: 2.3.1 dev: false /node-abi@2.30.1: @@ -9175,7 +9175,7 @@ packages: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} dependencies: dot-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.3.1 dev: false /parent-module@1.0.1: @@ -9224,7 +9224,7 @@ packages: resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} dependencies: no-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.3.1 dev: false /path-case@2.1.1: @@ -9237,7 +9237,7 @@ packages: resolution: {integrity: sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==} dependencies: dot-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.3.1 dev: false /path-exists@3.0.0: @@ -10146,7 +10146,7 @@ packages: resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==} dependencies: no-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.3.1 upper-case-first: 2.0.2 dev: false @@ -10366,7 +10366,7 @@ packages: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} dependencies: dot-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.3.1 dev: false /socks-proxy-agent@8.0.2: @@ -11057,6 +11057,7 @@ packages: /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: true /tsort@0.0.1: resolution: {integrity: sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==} @@ -11395,7 +11396,7 @@ packages: /upper-case-first@2.0.2: resolution: {integrity: sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==} dependencies: - tslib: 2.6.2 + tslib: 2.3.1 dev: false /upper-case@1.1.3: @@ -11405,7 +11406,7 @@ packages: /upper-case@2.0.2: resolution: {integrity: sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==} dependencies: - tslib: 2.6.2 + tslib: 2.3.1 dev: false /uri-js@4.4.1: