简体   繁体   English

OpenSea isApprovedForAll 和代理地址功能

[英]OpenSea isApprovedForAll and proxy addresses functionality

I found an explanation here , but I want to clarify some moments.我在这里找到了解释,但我想澄清一些时刻。

Is the isApprovedForAll method needs to be overwritten in ERC721Tradable if we need to get rid of excess fees for approval?如果我们需要摆脱多余的审批费用,是否需要在ERC721Tradable中覆盖isApprovedForAll方法? Is proxy addresses for each user unique?每个用户的代理地址是否唯一? If it isn't, do we need to add something like如果不是,我们是否需要添加类似

       if (_operator == address(proxy_address)) {
            return true;
        }

in isApprovedForAll ?isApprovedForAll中?

As displayed in deploy script for OpenSea Creatures contracts (lines 27-32), there is one address for each network:OpenSea Creatures 合约的部署脚本(第 27-32 行)所示,每个网络都有一个地址:

  let proxyRegistryAddress = "";
  if (network === 'rinkeby') {
          proxyRegistryAddress = "0xf57b2c51ded3a29e6891aba85459d600256cf317";
  } else {
          proxyRegistryAddress = "0xa5409ec958c83c3f309868babaca7c86dcb077c1";
  }

So in most cases, we don't need to hardcode it inside our contracts.所以在大多数情况下,我们不需要在合约中硬编码它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM