CryptoFly.us | CRYPTOCURRENCY BITCOIN SHIRTS CLOTHING APPAREL HATS

CRYPTO NEWS

creation ERC721 error: Transaction failed, invalid address,

I would like to learn how ERC721 token works. I found some sample contracts online and tried to use remix and Ethereum Wallet to deploy the contract. The compile was fine but failed in the creation. The error message on remix is

“creation ERC721 error: Transaction failed, invalid address. If you use an injected provider, please check it is properly unlocked”.

Can anyone help me? what can I do to fix the problem? Thank you.

Ganache: Error: Returned error: VM Exception while processing transaction: revert

I’m using truffle and ganache to write/deploy a really simple smart contract: pragma solidity >=0.7.0 <0.9.0; contract TestContract { function sayHi() public pure returns (string memory) { return "Hi"; } } And here’s my web.js code in JS to call the sayHi method in the smart contract const Web3 = require(‘web3’); const testContract = require(‘./build/contracts/TestContract.json’);::Listen

I’m using truffle and ganache to write/deploy a really simple smart contract:

pragma solidity >=0.7.0 <0.9.0;  contract TestContract {     function sayHi() public pure returns (string memory) {         return "Hi";     } } 

And here’s my web.js code in JS to call the sayHi method in the smart contract

const Web3 = require('web3'); const testContract = require('./build/contracts/TestContract.json');  const web3 = new Web3('http://127.0.0.1:7545');  const TestContract = new web3.eth.Contract(testContract.abi, '0xC29F99d4b73D8f66B4957C781A87399aBeEeA71d');  console.log(TestContract);  TestContract.methods.sayHi().call(function (err, result) {     if (err)         console.log(err);     else         console.log(`Gotten from result ${result}`); }); 

After running the JS, I get the following error:

Error: Returned error: VM Exception while processing transaction: revert 

I don’t understand what I’m doing wrong. I doubled even tripled checked everything: the smart contract address in web3.js is the correct one, the 0xC29F99d4b73D8f66B4957C781A87399aBeEeA71d smart contract does indeed get deployed on ganache (I checked this under the transactions tab):

enter image description here

Can someone help me out here?

creation ERC721 error: Transaction failed, invalid address,

Shopping cart
There are no products in the cart!
Continue shopping
0