Skip to content

Commit

Permalink
Merge pull request #218 from rabbitholegg/mmackz/zora-arb-update
Browse files Browse the repository at this point in the history
feat(zora): add arbitrum support
  • Loading branch information
mmackz authored Feb 16, 2024
2 parents aa54ca6 + fef982c commit c648a4a
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 61 deletions.
5 changes: 5 additions & 0 deletions .changeset/shiny-toes-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rabbitholegg/questdk-plugin-zora": minor
---

add arbitrum support
3 changes: 2 additions & 1 deletion packages/zora/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"tsconfig": "workspace:*"
},
"dependencies": {
"@zoralabs/universal-minter": "0.2.12"
"@zoralabs/universal-minter": "0.2.12",
"@rabbitholegg/questdk-plugin-utils": "workspace:*"
}
}
6 changes: 4 additions & 2 deletions packages/zora/src/Zora.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ import {
ZORA_MINTER_ABI_1155,
ZORA_MINTER_ABI_721,
} from './abi'
import type { Chains } from './utils'

export const mint = async (
mint: MintActionParams,
): Promise<TransactionFilter> => {
const { chainId, contractAddress, tokenId, amount, recipient } = mint

const universalMinter = zoraUniversalMinterAddress[chainId as Chains]
const universalMinter =
zoraUniversalMinterAddress[
chainId as keyof typeof zoraUniversalMinterAddress
]

const mintContract = universalMinter
? { $or: [contractAddress.toLowerCase(), universalMinter.toLowerCase()] }
Expand Down
3 changes: 2 additions & 1 deletion packages/zora/src/chain-ids.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Chains } from './utils'
import { Chains } from '@rabbitholegg/questdk-plugin-utils'

export const CHAIN_ID_ARRAY = [
Chains.ARBITRUM_ONE,
Chains.BASE,
Chains.ETHEREUM,
Chains.OPTIMISM,
Expand Down
2 changes: 1 addition & 1 deletion packages/zora/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getAddress } from 'viem'
import { createTestCase } from './utils'
import { createTestCase } from '@rabbitholegg/questdk-plugin-utils'
import {
BASIC_PURCHASE,
MINT_WITH_REWARDS,
Expand Down
3 changes: 1 addition & 2 deletions packages/zora/src/test-transactions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { type MintActionParams } from '@rabbitholegg/questdk'
import { type TestParams } from './utils'
import { Chains } from './utils'
import { type TestParams, Chains } from '@rabbitholegg/questdk-plugin-utils'

export const BASIC_PURCHASE: TestParams<MintActionParams> = {
transaction: {
Expand Down
54 changes: 0 additions & 54 deletions packages/zora/src/utils.ts

This file was deleted.

3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c648a4a

Please sign in to comment.