[英]Why I don't have to pay gas for listing an NFT on opensea?
How can this be done, is it a signed voucher?这怎么行,是签名凭证吗? Any sample code that I can take a look?我可以看一下任何示例代码吗?
Until anyone buys the NFT, it does not exist on the blockchain.在任何人购买 NFT 之前,它都不存在于区块链上。 It's "just" a record in OpenSea's offchain database.它“只是”OpenSea 链下数据库中的一条记录。
Only when they buy the NFT through OpenSea, the buyser sends a transaction - effectively paying gas fees to mint the NFT.只有当他们通过 OpenSea 购买 NFT 时,买家才会发送交易——有效地支付 gas 费用来铸造 NFT。
Code example of signing a message and validating with ethers.js使用 ethers.js 签署消息和验证的代码示例
const message = "hello";
const [signer] = await ethers.getSigners();
const signature = await signer.signMessage(message);
console.log(
ethers.utils.verifyMessage(message, signature) == signer.address
);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.