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

adding amoy #67

Open
wants to merge 1 commit into
base: adding-config-database
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/config/deployedProduction.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,8 @@
"PFPAssetTest": "0x7D05Eece310621385Ac1666c20fe1CdC5a1A1642",
"TestPFPAsset": "0x7d05eece310621385ac1666c20fe1cdc5a1a1642",
"PFPMumbaiAsset": "0x7D05Eece310621385Ac1666c20fe1CdC5a1A1642"
},
"80002": {
"TurnUPNFTAmoy": "0xe0246956A086dE3Bd6C3F518FCCD638cc7Ec9a9B"
}
}
14 changes: 12 additions & 2 deletions src/config/eventsByContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
{
Expand Down Expand Up @@ -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,
Expand Down
21 changes: 6 additions & 15 deletions src/config/index.js
Original file line number Diff line number Diff line change
@@ -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");
Expand All @@ -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 = {
Expand Down Expand Up @@ -58,6 +48,7 @@ const supportedByMoralis = {
42161: "Arbitrum",
43114: "Avalanche C-Chain",
80001: "Polygon Mumbai",
80002: "Amoy",
11155111: "Ethereum Sepolia",
11297108109: "Palm",
};
Expand Down