Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(zora): add mint plugin #117

Merged
merged 40 commits into from
Dec 5, 2023
Merged

Feat(zora): add mint plugin #117

merged 40 commits into from
Dec 5, 2023

Conversation

Quazia
Copy link
Member

@Quazia Quazia commented Dec 4, 2023

There's two main contracts, one for 721 and one for 1155. This supports both.

The filter requires that a contract address is found since every mint goes through a different contract. There might be a way to get the full list but I don't think we want to support minting on any contract at this time.

It looks like there's collections with legacy contracts, I tried to support the ones I could find but it's possible that this plugin will break for collections launched too long into the past. Should work for all recent collections and all going forward.

Copy link

changeset-bot bot commented Dec 4, 2023

🦋 Changeset detected

Latest commit: 237ea18

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@rabbitholegg/questdk-plugin-registry Patch
@rabbitholegg/questdk-plugin-zora Patch
@rabbitholegg/questdk-plugin-basepaint Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Quazia Quazia marked this pull request as ready for review December 4, 2023 22:18
@Quazia Quazia requested a review from a team as a code owner December 4, 2023 22:18

test('should return a valid action filter', () => {

})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should at a filter test - yeah good callout

} from './Zora.js'

// Replace *project* with the name of the project
export const {Zora}: IActionPlugin = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be destructured

recipient: '0xd31143Ca8503b25DdE780dc1B92E9aA61D0E326d',
}),
createTestCase(MINT_WITH_REWARDS_1155, 'when tokenId is incorrect', {
tokenId: '1',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tokenId expects a number here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if you meant to include this file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deff not I should probably remove it lol

chainId: Chains.ZORA,
contractAddress: '0x4c0c2DD31d2661E8BCeC60a42e803dCc6F81Baad'.toLowerCase() as Address,
amount: '1',
tokenId: '25',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tokenId should be a number

@Quazia Quazia requested a review from mmackz December 5, 2023 01:59
): Promise<TransactionFilter> => {
const { chainId, contractAddress, tokenId, amount, recipient } = mint

let andArray = []
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linter wants this to be a const, since it does not get reassigned. Not really a big deal though as it still passes the tests.

@Quazia Quazia merged commit e3b4f08 into main Dec 5, 2023
9 checks passed
@mmackz mmackz deleted the add_zora_plugin branch March 14, 2024 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants