Skip to content

Commit

Permalink
Merge pull request #139 from P4-Games/develop
Browse files Browse the repository at this point in the history
Deploy 20240409-3
  • Loading branch information
dappsar authored Apr 9, 2024
2 parents 3ae8e29 + 6288efd commit 11ad63c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 40 deletions.
32 changes: 0 additions & 32 deletions .emv_mainnet

This file was deleted.

17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ npx hardhat test
# Deploy to local
npx hardhat run scripts/deploy.ts

# Deploy to Mumbai
npx hardhat run scripts/deploy.ts --network mumbai
# Deploy to Testnet
npx hardhat run scripts/deploy.ts --network amoy

# Deploy Mock Data (local)
npx hardhat run scripts/deploy-mock-data.ts
Expand All @@ -146,6 +146,14 @@ NOTA: The ERC20 token being used is DAI, the official addresses of the Mainnet a

Alternatively for testnet, the source code of the DAI contract is in this repository (contracts folder) to deploy your own and avoid collecting cents from faucets.

### Amoy
* DAI: 0xd5654b986d5aDba8662c06e847E32579078561dC
* Alpha: 0xBA5E2aF09e39CC36dfBc9530c4d4C89d5C44d323
* Gamma Cards: 0xe6C812381DF5532A4bA4dA27baA1889adf67eec4
* Gamma Cards NFT: 0xCcF821c87bE912984bCb952A36Fdfca066a925F8
* Gamma Packs: 0xc616ac2191C6012791d3aBFA0e8f372579986090
* Gamma Offers: 0x7DC00081F078D64B7b02535d82D3b6041D79Ce32
* Gamma Tickets: 0xCD177Fa01b249Ee8ca1afF0136c06cD279E8Bf3e

### Mumbai
* DAI: 0xEa4c35c858E15Cef77821278A88435dE57bc8707
Expand Down Expand Up @@ -231,6 +239,11 @@ see more in: https://github.com/P4-Games/NoF-Smart-Contracts/graphs/contributors

### Faucets

* Matic Faucet on Amoy:
- https://www.alchemy.com/faucets/polygon-amoy
- https://faucet.trade/polygon-amoy-matic-faucet
- https://learnweb3.io/faucets/polygon_amoy/

* Matic Faucet on Mumbai:
- https://mumbaifaucet.com/

Expand Down
4 changes: 4 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ const config: HardhatUserConfig = {
url: `https://polygon-mumbai.g.alchemy.com/v2/${ALCHEMY_API_KEY}`,
...(PRIVATE_KEY ? { accounts: [`${PRIVATE_KEY}`] } : {})
},
amoy: {
url: `https://polygon-amoy.g.alchemy.com/v2/${ALCHEMY_API_KEY}`,
...(PRIVATE_KEY ? { accounts: [`${PRIVATE_KEY}`] } : {})
},
sepolia: {
url: `https://sepolia.infura.io/v3/${INFURA_API_KEY}`,
...(PRIVATE_KEY ? { accounts: [`${PRIVATE_KEY}`] } : {})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"compile": "hardhat compile",
"deploy": "npx hardhat run scripts/deploy.ts --network localhost",
"deploy-mock-data": "npx hardhat run scripts/deploy-mock-data.ts --network localhost",
"deploy-mumbai": "npx hardhat run scripts/deploy.ts --network mumbai",
"deploy-amoy": "npx hardhat run scripts/deploy.ts --network amoy",
"solhint": "npx solhint \"{contracts,test}/**/*.sol\"",
"lint": "npx eslint --ignore-path .gitignore .",
"lint:fix": "npx eslint --ignore-path .gitignore . --fix",
Expand Down
5 changes: 0 additions & 5 deletions scripts/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ export async function deployContracts(wallets: SignerWithAddress[]) {
const nofGammaLibStringutilsCurrentAddress = process.env.NOF_GAMMA_LIB_STRING_UTILS_CONTRACT_CURRENT_ADDRESS || ''
const nofGammaLibControlMgmtCurrentAddress = process.env.NOF_GAMMA_LIB_OWNERS_MGMT_CONTRACT_CURRENT_ADDRESS || ''

if(nofDaiContractCurrentAddress === '' && !isLocalhost && !isHardhat) {
console.error('Real DAI Smart Contract Address must be filled in NOF_DAI_CONTRACT_CURRENT_ADDRESS variable in .env')
process.exit(1);
}

const libPackVerifier = await deployContract(nofGammaLibPackVerifierCurrentAddress, nofGammaLibPackVerifierName)
const libStringUtils = await deployContract(nofGammaLibStringutilsCurrentAddress, nofGammaLibStringUtilsName)
const libControlMgmt = await deployContract(nofGammaLibControlMgmtCurrentAddress, nofGammaLibControlMgmtName)
Expand Down

0 comments on commit 11ad63c

Please sign in to comment.