How to lock nft but keep that under stake key?

Hello, everybody.
Now, I am trying develop NFT locking system.
So when users lock their nft, they can’t spend that nft, but that nft lives under his stake address.
How can I implement this?
Can anybody help me?

Thank you.

1 Like

Just a time lock? You can make a native script (or smart contract if the locking mechanism is more complicated) which will give you a script payment address. You can then just combine this script payment address with a regular stake address from the user to create a base address. NFT’s sent to this address will show up under that stake address in pool.pm and such, but can only be spent if they adhere to the script or smart contract.

1 Like

… and if the locking shall be more complicated, basically the same works with Plutus contracts: Just combine the script hash of the Plutus validator with the stake key hash of the user to get an address that can only be spent under the conditions of the contract, but is staked and shown under the stake address of the user.

Thank you for you replies. @brouwerQ, @HeptaSean.
Those anwers are really helpful.
Thank you.

2 Likes

Here’s an example time locking contract using Gamechanger development environment to build the tx using Helios.

It’s testnet and the link will open a testnet burner wallet.
Let me know if you have any questions