0

[edit] this is the error. it happens when calling the create auction function as described below.

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
execution reverted

Been trying to create an nft auction and succeeded in simpler prototype but am having trouble actually creating the auction for my actual use case.. As the title says the problem is gas estimation error and atm it's on the Create Auction function, both pasted below or here found in gist and base implmentation here or scroll up from first link (gist)

function createAuction(
        ERC1155 _nftAddress,
        uint256 _tokenId,
        address _seller,
        uint128 _startPrice,
        uint256 _duration,
        uint128 _highestBid,
        address _highestBidder
    )public payable
    {
        require(_ownerOf(address(_nftAddress),_tokenId));
        _escrow(msg.sender,address(_nftAddress), _tokenId);
        Auction memory auction = Auction(
            ERC1155(_nftAddress),
            uint256(_tokenId),
            payable(_seller),
            uint128(_startPrice),
            uint64(_duration),
            uint128(_highestBid),
            payable(_highestBidder)
        );
3
  • Hi, can you add the error you're getting? Nov 23 at 13:10
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Nov 23 at 13:18
  • added the error. Nov 23 at 17:26
0

I was foolishly grabbing the nft address I guess inappropriately. When I changed some of the ERC1155 declarations as simply address and referenced the address to set the erc1155 ref obj using the nft address arg I was already providing in the function it worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.