Bitcoin Forum
June 17, 2024, 11:30:10 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: NFT Tutorial (need help)  (Read 61 times)
bte (OP)
Member
**
Offline Offline

Activity: 109
Merit: 13


View Profile
December 02, 2022, 06:13:43 AM
 #1

Can you help me deploy my contract on Ethereum Mainnet?

I am not a programmer, and I read tutorial at Ethereum.org and I managed to do everything in Goerli, I see my NFT in MM:
https://ethereum.org/en/developers/tutorials/how-to-write-and-deploy-an-nft/

But when I change Alchemy API to Mainnet and run:
npx hardhat run scripts/deploy.js --network mainnet

I saw the error:
Error HH100: Network mainnet doesn't exist

How I can deploy my contract from this tutorial to Ethereum Mainnet?
TryNinja
Legendary
*
Offline Offline

Activity: 2870
Merit: 7114


Crypto Swap Exchange


View Profile WWW
December 02, 2022, 08:36:06 AM
 #2

Open hardhat.config.js and look for networks. Did you setup the Ethereum mainnet network there? Is "mainnet" the name you're using?

It should look like this:

Code:
networks: {
    mainnet: {
        url: "json-rpc provider url",
        accounts: ["private-key"]
    }
}

P.S, You should definitely read the docs: https://hardhat.org/hardhat-runner/docs/config#networks-configuration

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
vv181
Legendary
*
Offline Offline

Activity: 1932
Merit: 1273


View Profile
December 02, 2022, 06:18:03 PM
 #3

As an additional resource besides the Hardhat documentation page. Do in mind and try to comprehend what each step of the Ethereum site tutorial explains to you, and adjust accordingly the network with mainnet.

For example, step 11 requires you to have the environment variables using goerli API, and it is interconnected with the next step where the hardhat.config.js consumes the env variables. So if there is some step that affects the whole NFT tutorial step, try to change the part where the network using goerli with mainnet.
bte (OP)
Member
**
Offline Offline

Activity: 109
Merit: 13


View Profile
December 06, 2022, 04:23:21 PM
 #4

Open hardhat.config.js and look for networks. Did you setup the Ethereum mainnet network there? Is "mainnet" the name you're using?

It should look like this:

Code:
networks: {
    mainnet: {
        url: "json-rpc provider url",
        accounts: ["private-key"]
    }
}



Thanks,
I repeated all the steps several times and in the end everything worked out. I had to delete and create a new Alchemy App.
Now I have the task of verifying my NFT contract, created according to the instructions from the Ethereum website. An error is coming out:
ParserError: Multiple SPDX license identifiers found in source file. Use “AND” or “OR” to combine multiple licenses

I flat my contract and uploaded it to Etherscan, but it didn't help

But this is probably another topic?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!