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?

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

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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