Contract creation: The transaction has been reverted to the initial state

21 views Asked by At

creation of HomestayNFT pending... creation of HomestayNFT errored: Error occured: revert.

revert The transaction has been reverted to the initial state. Note: The called function should be payable if you send value and the value you send should be less than your current balance. Debug the transaction to get more information.

constructor(
        uint256 noRooms,
        uint256 firstTwoHourPrice,
        uint256 hourPrice,
        uint256 dayPrice,
        uint256 monthPrice
    ) ERC721("HomestayNFT", "HNFT") Ownable(msg.sender) {
        _startTime = block.timestamp;
        _noRooms = noRooms;
        for (uint256 i = 0; i < noRooms; i++) {
            _roomValidity[i] = true;
        }
        _price[0] = firstTwoHourPrice;
        _price[1] = hourPrice;
        _price[2] = dayPrice;
        _price[3] = monthPrice;
    }

I try to deploy a smart contract with params 20,5,2,30,300 and it reverted. I try to deploy by thirdweb and remix but all of them reverted. If you know the answer, can you help me to understand why. Thanks

0

There are 0 answers