From f7ca02422ef54ae0b8fd9c8eb303d361ea392c56 Mon Sep 17 00:00:00 2001 From: roquesrolando Date: Thu, 18 Apr 2024 14:56:57 -0400 Subject: [PATCH] adding amoy --- src/config/deployedProduction.json | 3 +++ src/config/eventsByContract.js | 14 ++++++++++++-- src/config/index.js | 21 ++++++--------------- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/config/deployedProduction.json b/src/config/deployedProduction.json index 37ed883..b44daa1 100644 --- a/src/config/deployedProduction.json +++ b/src/config/deployedProduction.json @@ -58,5 +58,8 @@ "PFPAssetTest": "0x7D05Eece310621385Ac1666c20fe1CdC5a1A1642", "TestPFPAsset": "0x7d05eece310621385ac1666c20fe1cdc5a1a1642", "PFPMumbaiAsset": "0x7D05Eece310621385Ac1666c20fe1CdC5a1A1642" + }, + "80002": { + "TurnUPNFTAmoy": "0xe0246956A086dE3Bd6C3F518FCCD638cc7Ec9a9B" } } diff --git a/src/config/eventsByContract.js b/src/config/eventsByContract.js index f5c4120..b655269 100644 --- a/src/config/eventsByContract.js +++ b/src/config/eventsByContract.js @@ -615,8 +615,7 @@ const eventsByContract = { }, { name: "MintAndStakeRequested", - filter: - "MintAndStakeRequested(uint256,uint256,address,uint256,uint256)", + filter: "MintAndStakeRequested(uint256,uint256,address,uint256,uint256)", ABI: ABI.MintAndStakeRequested, }, { @@ -659,6 +658,17 @@ const eventsByContract = { }, ], }, + TurnUPNFTAmoy: { + chainId: 80002, + startBlock: 0, + events: [ + { + name: "Transfer", + filter: "Transfer(address,address,uint256)", + ABI: ABI.Transfer, + }, + ], + }, // NFTTest: { // chainId: 80001, // startBlock: 0, diff --git a/src/config/index.js b/src/config/index.js index 7604b1c..aadd738 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -1,10 +1,7 @@ const ethers = require("ethers"); const path = require("path"); const fs = require("fs-extra"); -const { - CeloProvider, - StaticCeloProvider, -} = require("@celo-tools/celo-ethers-wrapper"); +const { CeloProvider, StaticCeloProvider } = require("@celo-tools/celo-ethers-wrapper"); let contracts = require("./deployedProduction.json"); let eventsByContract = require("./eventsByContract"); @@ -14,17 +11,10 @@ let providers = { 5: new ethers.providers.InfuraProvider("goerli", process.env.INFURA_KEY), 137: new ethers.providers.JsonRpcProvider("https://polygon-rpc.com/"), 56: new ethers.providers.JsonRpcProvider("https://bscrpc.com", 56), - 80001: new ethers.providers.JsonRpcProvider( - "https://rpc-mumbai.maticvigil.com", - 80001 - ), - 7001: new ethers.providers.JsonRpcProvider( - "https://rpc.ankr.com/zetachain_evm_testnet" - ), - 44787: new StaticCeloProvider( - "https://alfajores-forno.celo-testnet.org", - 44787 - ), + 80001: new ethers.providers.JsonRpcProvider("https://rpc-mumbai.maticvigil.com", 80001), + 80002: new ethers.providers.JsonRpcProvider("https://rpc-amoy.polygon.technology/", 80002), + 7001: new ethers.providers.JsonRpcProvider("https://rpc.ankr.com/zetachain_evm_testnet"), + 44787: new StaticCeloProvider("https://alfajores-forno.celo-testnet.org", 44787), }; let averageBlockPerDay = { @@ -58,6 +48,7 @@ const supportedByMoralis = { 42161: "Arbitrum", 43114: "Avalanche C-Chain", 80001: "Polygon Mumbai", + 80002: "Amoy", 11155111: "Ethereum Sepolia", 11297108109: "Palm", };