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

Pay - Transak NFT Checkout - ERC1155 Primary Sales #289

Open
BellringerQuinn opened this issue Feb 18, 2025 · 0 comments
Open

Pay - Transak NFT Checkout - ERC1155 Primary Sales #289

BellringerQuinn opened this issue Feb 18, 2025 · 0 comments

Comments

@BellringerQuinn
Copy link
Collaborator

BellringerQuinn commented Feb 18, 2025

Expose the ability to purchase an ERC1155 using our Primary Sales contracts via a credit card with Transak - this is a web based purchase flow

At a high level, Transak will be given minting privileges on each whitelisted primary sales contract (notice: your contract needs to be whitelisted; it is recommended to use the same config as done in Unity test - this is identified by contractId a unique mapping of Transak API key, network, and contract address) for testing) and when doing the checkout we include the calldata for minting a token and our sales contract which they will sign and send as a transaction after our credit card purchase is confirmed
It is recommended to expose an interface that makes this logic (assembling calldata) much easier or at least clearer; please reference the Unity code for inspiration
https://github.com/0xsequence/sequence-unity/blob/Feature/marketplaceCheckout/Packages/Sequence-Unity/Sequence/SequenceSDK/Pay/Transak/TransakNFTCheckout.cs

You should also consider create a mapping of Transak contractIds for sequence contracts
https://github.com/0xsequence/sequence-unity/blob/Feature/marketplaceCheckout/Packages/Sequence-Unity/Sequence/SequenceSDK/Pay/Transak/SequenceTransakContractIdRepository.cs

One other oddity with Transak is that, when assembling calldata, the address you are minting to should be the Transak owned contract address for the given chain listed in their docs and embedded into the Unity SDK
https://github.com/0xsequence/sequence-unity/blob/Feature/marketplaceCheckout/Packages/Sequence-Unity/Sequence/SequenceSDK/Pay/Transak/TransakNFTCheckout.cs
Once they've confirmed the credit card transaction has passed, they will transfer the ERC1155s to your address

Note: the SDK already has support for Transak On-Ramp. This code should probably live near that

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

No branches or pull requests

1 participant