0

我正在使用 HashLips 的新 LowGasFees 智能合约。我正在 Polygon 网络上进行部署,并且我将所有 NFT 铸造到我的 opensea 中,以便稍后分批出售。所以不涉及 DAPP。

为了避免免费铸币者的安全,我将成本设为100 ether,即 100 马蒂奇。但每当我通过 Remix 甚至通过合约本身在多边形扫描上进行测试时,它都不会显示增加的成本,只有汽油费。不知道为什么,这比主网上的正常价格高出很多(正常时~0,47 MATIC就像 ~0,005-0,007 MATIC)。

这可能是什么原因?这是正常的吗?每当我取消暂停合同时,我不希望任何人为了一分钱而狙击我的 nfts。

这就是我设置公共道具的方式

string public uriPrefix = "";
string public uriSuffis = ".json";
string public hiddenMetadataUri;

uint256 public cost = 100 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmountPerTx = 50;

bool public paused = true;
bool public revealed = true;

这就是薄荷的工作原理:

function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) {
   require(!paused, "Contract is paused");
   if (msg.sender != owner()) {
     require(msg.value >= cost * _mintAmount, "Insufficient funds!");
   }

   _mintLoop(msg.sender, _mintAmount);
}


function _mintLoop(address _receiver, uint256 _mintAmount) internal {
   for(uint256 i = 0; i < _mintAmount; i++) {
       supply.increment();
       _safeMint(_receiver, supply.current());
   }
}

我还希望能够在运行时修改 maxSupply,所以我创建了这个 setter 函数,不确定它是否可以,或者是否还有其他一些我可能错过的检查。

 function setMaxSupply(uint256 _maxSupply) public onlyOwner {
    require(_maxSupply >= supply.current(), "You can't set a value lower than current supply minted!");
    
    maxSupply = _maxSupply;
  }

提前致谢。

4

1 回答 1

0

那是因为您的合同已暂停,使其无法使用。您需要对已部署的合约进行交易以使 pause = false。它可以让您正常铸造,并且天然气将降至实际价格。

于 2022-02-23T19:43:05.040 回答