Problem with ERC721PresetMinterPauserAutoId

I’ve deployed ERC721PresetMinterPauserAutoId contract to the Ropsten network via Remix. And it works fine there.
Now I am trying to iterate with that via Web3 from my node.js server.
Calling this I get an error “unknow account”

 instance.methods.mint(WALLET_ADDR)
.then((tx) => {
    return tx.send({ from: WALLET_ADDR })
 })

calling this “Transaction has been reverted by the EVM”

const encoded = instance.methods.mint(WALLET_ADDR).encodeABI()

        const gasPrice = await web3.eth.getGasPrice()
        const gasEstimate = await instance.methods
            .mint(WALLET_ADDR)
            .estimateGas({ from: addr })
        const tx = {
            to: CONTRACT_ADDR,
            from: WALLET_ADDR,
            data: encoded,
            gasPrice,
            gas: Math.round(gasEstimate * 1.1),
        }

        return web3.eth.accounts
            .signTransaction(tx, WALLET_KEY)
            .then((signed) => {
                return web3.eth
                    .sendSignedTransaction(signed.rawTransaction)
})
}

CONTRACT_ADDR=0xEAC4bfAbBDcFd2C699Fe4fde13e4A89728A91456
WALLET_ADDR=0xDBf0E8e739Ad2c51a5398c48E69bE2BC020c4A73

What could be wrong? How to debug such things?
Thanks!

:computer: Environment

Node, Web3, Geth

:memo:Details

:1234: Code to reproduce

Solved. It was a gas issue (what?)
just making more gas resolve a issue

1 Like