Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect Metamask to Kovan Testnet Or Localhost 7545 running a custom RPC like Ganache #8

Open
staminna opened this issue Jan 23, 2022 · 2 comments

Comments

@staminna
Copy link

Dear devpavan

I followed all the instructions successfully but the following error shows:

CRYPTO BOYS CONTRACT NOT DEPLOYED TO THIS NETWORK.
Connect Metamask to Kovan Testnet Or Localhost 7545 running a custom RPC like Ganache.

Here is the truffle test:

Compiling your contracts...
===========================
✔ Fetching solc version list from solc-bin. Attempt #1
> Compiling ./src/contracts/CryptoBoys.sol
> Compiling ./src/contracts/ERC721.sol
> Compiling ./src/contracts/Migrations.sol
> Artifacts written to /var/folders/bw/3p5s80wx4j9317z2v18mf3d00000gn/T/test--35348-0C4qIofrLlt0
> Compiled successfully using:
   - solc: 0.7.6+commit.7338295f.Emscripten.clang



  Contract: Crypto Boys
    Deployment
      ✓ contract has an address
      ✓ has a name (224ms)
      ✓ has a symbol
    application features
      ✓ allows users to mint ERC721 token (2547ms)
      ✓ returns address of the token's owner
      ✓ returns metadata of a token
      ✓ returns total number of tokens minted so far
      ✓ returns total number of tokens owned by an address
      ✓ allows users to buy token for specified ethers (965ms)
      ✓ allows users to change token price (628ms)
      ✓ allows users to toggle between setting the token for sale or not for sale (391ms)


  11 passing (6s)

@staminna
Copy link
Author

staminna commented Jan 24, 2022

I added a private key to MetaMask and I have 100 ETH, but the initial problem is the same.

"CRYPTO BOYS CONTRACT NOT DEPLOYED TO THIS NETWORK.
Connect Metamask to Kovan Testnet Or Localhost 7545 running a custom RPC like Ganache".

curl -X POST --data '{"jsonrpc":"2.0","method":"net_version","params":[],"id":67}' localhost:8545

{"id":67,"jsonrpc":"2.0","result":"1337"}

Screenshot 2022-01-24 at 13 03 31

@WangGuaGua1023
Copy link

Hi, sir. I need help.
I have do all the steps in the spe. when I view cryptoboys, I meet erros.

Unhandled Rejection (TypeError): Failed to fetch
_callee5$
D:/git/cryptoboys-nft-marketplace/src/components/App.js:157
154 |
155 | setMetaData = async () => {
156 | if (this.state.cryptoBoys.length !== 0) {

157 | this.state.cryptoBoys.map(async (cryptoboy) => {
| ^ 158 | const result = await fetch(cryptoboy.tokenURI);
159 | const metaData = await result.json();
160 | this.setState({
View compiled
▶ 7 stack frames were collapsed.
(anonymous function)
D:/git/cryptoboys-nft-marketplace/src/components/App.js:157
154 |
155 | setMetaData = async () => {
156 | if (this.state.cryptoBoys.length !== 0) {
157 | this.state.cryptoBoys.map(async (cryptoboy) => {
| ^ 158 | const result = await fetch(cryptoboy.tokenURI);
159 | const metaData = await result.json();
160 | this.setState({
View compiled
_callee6$
D:/git/cryptoboys-nft-marketplace/src/components/App.js:157
154 |
155 | setMetaData = async () => {
156 | if (this.state.cryptoBoys.length !== 0) {
157 | this.state.cryptoBoys.map(async (cryptoboy) => {
| ^ 158 | const result = await fetch(cryptoboy.tokenURI);
159 | const metaData = await result.json();
160 | this.setState({
View compiled
▶ 7 stack frames were collapsed.
_callee$
D:/git/cryptoboys-nft-marketplace/src/components/App.js:45
42 | };
43 | }
44 |
45 | componentWillMount = async () => {
| ^ 46 | await this.loadWeb3();
47 | await this.loadBlockchainData();
48 | await this.setMetaData();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants