forked from tatumio/smart-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile_instructions.txt
56 lines (36 loc) · 3.06 KB
/
compile_instructions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using git check out the latest project code from github : https://github.com/muzamilw/smart-contracts
swtich to the root of the project. Ensure root of the main project and not in the contracts folder.
install node version v16.15.0
if some other version, then instal NVN to configure the above ementioned version.
run command : npm -i
install yarn package manager : npm install --global yarn
run command : npm -i dotenv
npm install --save-dev hardhat
run command : npm install --save-dev @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers
#create a .env file at the root of project and add the following lines to it, apply the correct MNEMONIC and privatekey.
MNEMONIC = "your memnomic here"
PKEY = "your metamask private key here"
ALCHEMY_API_KEY = "key"
ALCHEMY_tatumRopsten_API_KEY = "key"
#open deploy\deploy.js file, and make the arguments as required i.e. contract name, currency symbol.
we are using Tatum721General contract from tatum, which is based on openzepplin template.
run commmand : yarn hardhat compile
#deploy the contract to celo alfajores network for testing.
run command : yarn hardhat deploy --network alfajores
#you will notice the transaction id and contract address. this requires that you have the fuel currency in your wallet for that netowrk. use fountains to get the currency in test environments, and in live environments you will need actual currency of that netowkr.
verify the contract code by locating the BlockchainLaboratories721.json file in the deployments \ network folder.
Use this file to verify the contract at https://sourcify.dev/#/verifier
for polygon or other networks where above verifier doesnt work use flat command to generate flat contract like below.:
run : npx hardhat flat contracts/tatum/EadonForestClub.sol > contracts/tatum/Eadonforestclub_Flattened.sol
then use the flattened single file to verify the contract. use compiler version 0.8.7
Added Tatum Addreses as minter role to the contract :
So essentially, we have allow Tatum's account as a valid miner on our contract . This is further explained here : https://apidoc.tatum.io/tag/NFT-(ERC-721-or-compatible)/#operation/NftMintErc721
i.e. : The following table lists the blockchain addresses of the Tatum NFT minters for the testnet and mainnet of the supported blockchains:
Blockchain Minter address - testnet* Minter address - mainnet**
BNB Smart Chain 0xc16ae5e8c985b906935a0cadf4e24f0400531883 0x49678AAB11E001eb3cB2cBD9aA96b36DC2461A94
Celo 0xBC2eBA680EE50d685cc4Fe65f102AA70AfB27D3F 0x49678AAB11E001eb3cB2cBD9aA96b36DC2461A94
Ethereum 0x53e8577C4347C365E4e0DA5B57A589cB6f2AB848 0x49678AAB11E001eb3cB2cBD9aA96b36DC2461A94
Harmony 0x8906f62d40293ddca77fdf6714c3f63265deddf0 0x49678AAB11E001eb3cB2cBD9aA96b36DC2461A94
Klaytn 0x80d8bac9a6901698b3749fe336bbd1385c1f98f2 0x49678AAB11E001eb3cB2cBD9aA96b36DC2461A94
Polygon 0x542b9ac4945a3836fd12ad98acbc76a0c8b743f5 0x49678AAB11E001eb3cB2cBD9aA96b36DC2461A94
Use the GrantRole Function to give "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6" minter Role to the above mentioned corresponding tatum minter addresses.