diff --git a/packages/zora/src/test-setup.ts b/packages/zora/src/test-setup.ts index 05ea4c96c..a6dade1ab 100644 --- a/packages/zora/src/test-setup.ts +++ b/packages/zora/src/test-setup.ts @@ -3,6 +3,7 @@ import { CREATE_COLLECTION_BASE, CREATE_COLLECTION_ZORA, LAYER_ZERO_MINT, + MINT, MINT_BATCH_WITHOUT_FEES, MINT_WITH_REWARDS, MINT_WITH_REWARDS_1155, @@ -15,7 +16,8 @@ export const passingTestCasesMint = [ 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(BATCH_MINT_ARB, 'when using batch mint function on optimism'), + createTestCase(MINT, 'when using mint function'), createTestCase(MINT_WITH_REWARDS, 'when contractAddress is checksummed', { contractAddress: getAddress(MINT_WITH_REWARDS.params.contractAddress), }), @@ -61,6 +63,12 @@ export const failingTestCasesMint = [ }, ), createTestCase(ZERO_QUANTITY, 'when quantity minted is 0'), + createTestCase(MINT_WITH_REWARDS, 'when referral is incorrect', { + referral: '0xDEAD0940159fB3368F5b06b34212C0cDF4e2C032', + }), + createTestCase(MINT, 'when referral is incorrect', { + referral: '0xDEAD0940159fB3368F5b06b34212C0cDF4e2C032', + }), ] export const passingTestCasesCreate = [ diff --git a/packages/zora/src/test-transactions.ts b/packages/zora/src/test-transactions.ts index 56f7e9043..99e88e810 100644 --- a/packages/zora/src/test-transactions.ts +++ b/packages/zora/src/test-transactions.ts @@ -3,6 +3,7 @@ import type { CreateActionParams, } from '@rabbitholegg/questdk' import { Chains, type TestParams } from '@rabbitholegg/questdk-plugin-utils' +import { zeroAddress } from 'viem' export const BASIC_PURCHASE: TestParams = { transaction: { @@ -21,6 +22,24 @@ export const BASIC_PURCHASE: TestParams = { }, } +export const MINT: TestParams = { + transaction: { + chainId: 7777777, // Zora + from: '0xeE520B72e4772E9bcb29a7B5940ACeC3d82AC9B1', + to: '0x8057c6bf3bc3adfc20b0deaf1898d5294d9701e8', + hash: '0x6e4e91536b59f1027913a77e2bb93ee362de64f95a41467c642ab8b1c0182804', + input: '0x359f130200000000000000000000000004e2516a2c207e84a1839755675dfd8ef6302f0a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000ee520b72e4772e9bcb29a7b5940acec3d82ac9b1', + value: '777000000000000', // 0.000777 ETH + }, + params: { + chainId: Chains.ZORA, + contractAddress: '0x8057C6Bf3bc3aDfc20B0dEaf1898d5294d9701e8', + amount: '1', + tokenId: 1, + referral: zeroAddress, + }, +} + export const MINT_WITH_REWARDS: TestParams = { transaction: { chainId: 1, // Ethereum @@ -53,6 +72,7 @@ export const MINT_WITH_REWARDS_1155: TestParams = { contractAddress: '0x4c0c2dd31d2661e8bcec60a42e803dcc6f81baad', amount: '1', tokenId: 25, + referral: zeroAddress, }, } @@ -71,6 +91,7 @@ export const MINT_BATCH_WITHOUT_FEES: TestParams = { contractAddress: '0xe538598941e4a25f471aef9b1b5dffd6ee0fda54', amount: '1', tokenId: 2, + referral: zeroAddress, }, } @@ -98,7 +119,7 @@ export const EXPECTED_ENCODED_DATA_1155 = export const BATCH_MINT_ARB: TestParams = { transaction: { - chainId: 42161, // Optimism + chainId: 42161, // Arbitrum from: '0x1671b592610fb7427ed788b66fa3e9217ff41047', hash: '0x4c0d898b6f3864332e3e47a3924cad33491b8df0a05590d13175823ee62ef07c', input: