existing nft contract?
maddefientist opened this issue · 6 comments
Is there a way to use an existing nft smart contract?
Have tried renaming nft.address in the deploy script, passing the contract address in constructor (wont let me verify with constructor arguments) but it doesnt seem to like anything except the contract deployed alongside the token and staking.
Where would I configure this?
In the deploy script, instead of passing nft.address, pass your contract's address as a string
The "you cant stake what you dont own" error is given when you're trying to stake a NFT that is not yours(see require statement at line 61 in the SC). Just to make sure, are you approvin the NFT transfer before trying to stake?
So I approve each tokenId with the NFT contract for movement, and the staking works. Thank you. Are you aware of any process that makes this flow happen together? Or must all dApps be built to approve specific token ID in your wallet with the NFT collection before staking in Staking contract?
Thanks for your help, if you don't have an answer to simplifying this process please feel free to close the issue
You can use the setApprovalForAll function the first time a user stakes a token so you don’t have to do it with each token every time, as OpenSea does it for example.