i have created a NFT voucher .Now I want to see the nft detail in opensea.
This is my voucher code :
async function main() {
const [admin, minter, relayer] = await ethers.getSigners();
console.log(`Sign authorization:`);
const registry = (await attach('ERC721LazyMintWith712', process.env.ADDRESS)).connect(admin);
const { chainId } = await ethers.provider.getNetwork();
const tokenId = process.env.TOKENID || 1;
const account = process.env.ACCOUNT || '0x8c8e240C723F5F850c6fdfD04a1B08598DaF6B53';
const uri = "ipfs://bafybeibnsoufr2renqzsh347nrx54wcubt5lgkeivez63xvivplfwhtpym/metadata.json";
const voucher = { tokenId, uri, account }
console.log(voucher);
const domain = {
name: 'Name',
version: '1',
verifyingContract: registry.address,
chainId: '4'
}
const types = {
NFTVoucher: [
{name: "tokenId", type: "uint256"},
{name: "uri", type: "string"},
{name: "account", type: "address"},
]
}
const signature = await admin._signTypedData(domain,types,voucher);
console.log({ registry: registry.address, tokenId, account,uri, signature });
}
main()
.then(() => process.exit(0))
.catch(error => {
console.error(error);
process.exit(1);
});
This is the output result :
{
registry: '0x083f6a7a8393a5A2660aFAb869E5eCb50dD46b26',
tokenId: '1',
account: '0x8c8e240C723F5F850c6fdfD04a1B08598DaF6B53',
uri: 'ipfs://bafybeibnsoufr2renqzsh347nrx54wcubt5lgkeivez63xvivplfwhtpym/metadata.json',
signature: '0x8338df852a63c6e72b16033434b20614c466f1d0204b219fe523f35790bc837f19b7d52a333a3805aa29906933a3b1081333792225c3527a875042855e4647e01b'
}
How can I list the NFT in opensea using this signature? As this signature have URL TOKENID. need your help.