Skip to content

Commit

Permalink
Merge pull request #521 from rabbitholegg/matthew/boost-4572-update-z…
Browse files Browse the repository at this point in the history
…ora-sdk-in-plugin-repo

[BOOST-4572] chore(zora): update Zora SDK to 0.9.5
  • Loading branch information
mmackz authored Aug 29, 2024
2 parents 8e19618 + d0f7d5e commit 700f1bb
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-sloths-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rabbitholegg/questdk-plugin-zora": minor
---

update zora SDK version to 0.9.5
2 changes: 1 addition & 1 deletion packages/zora/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@rabbitholegg/questdk-plugin-utils": "workspace:*"
},
"dependencies": {
"@zoralabs/protocol-sdk": "0.9.0",
"@zoralabs/protocol-sdk": "0.9.5",
"@zoralabs/universal-minter": "0.2.15",
"@rabbitholegg/questdk-plugin-utils": "workspace:*",
"@rabbitholegg/questdk": "workspace:*"
Expand Down
25 changes: 25 additions & 0 deletions packages/zora/src/Zora.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,31 @@ describe('Given the getFee function', () => {
expect(fee.projectFee).equals(parseEther('0.000777'))
expect(fee.actionFee).equals(parseEther('0.29'))
})

test('should return the correct project + action fee for V2 timed sale mint', async () => {
const contractAddress: Address =
'0x5849c383457794aca6e2284cdcacfb7c7b98fa38'
const tokenId = 1
const mintParams = {
contractAddress,
tokenId,
chainId: Chains.ZORA,
amount: 1,
}

const mockFns = {
getFees: async (_mint: MintActionParams) => ({
projectFee: parseEther('0.000111'),
actionFee: parseEther('0'),
}),
}

const getFeesSpy = vi.spyOn(mockFns, 'getFees')
const fee = await mockFns.getFees(mintParams)
expect(getFeesSpy.mock.calls.length).toBe(1)
expect(fee.projectFee).equals(parseEther('0.000111'))
expect(fee.actionFee).equals(parseEther('0'))
})
})

describe('simulateMint function', () => {
Expand Down
72 changes: 64 additions & 8 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 700f1bb

Please sign in to comment.