0

I'm building a marketplace for 1/1-NFT's. I'm trying to create a listing mechanism, which sends the metaplex-NFT to a PDA from where it can be bought, from someone else. To unlist it the pda has to send it back to the owner.

(Optionally the pda should also have a bidding function, but not neccessary:)

how can i do this?

New contributor
M2DT is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

2 Answers 2

1

You could try using the Approve and Revoke instruction from the token program to request the NFT owner to approve/revoke your program's PDA as a delegate.

https://solana-labs.github.io/solana-program-library/token/js/modules.html#approve https://solana-labs.github.io/solana-program-library/token/js/modules.html#revoke

You can then use Metaplex's FreezeDelegatedAccount instructions to prevent the owner of an NFT from transferring it while listed. And the ThawDelegatedAccount instruction to unfreeze.

https://docs.metaplex.com/programs/token-metadata/faq#freeze-authority https://docs.metaplex.com/programs/token-metadata/instructions#freeze-the-token-account-as-a-delegate https://docs.metaplex.com/programs/token-metadata/instructions#thaw-the-token-account-as-a-delegate

0

You can take a look at Auction House. link You can explore the Code and the docs and check if it helps

Your Answer

M2DT is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.