diff --git a/README.md b/README.md index c10cd97..9875458 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ | Matic Temp | Hosted Services | https://thegraph.com/explorer/subgraph/decentraland/collections-matic-mainnet-temp | QmTKztw187jUHZ33S2pndtyo68K462XwewcvMVAVH7mwZR | Qmf3igvJs24gozdwCwnDyPNz9DEBQMPQRFmEhUzEvgxZSq | | Mumbai | Satsuma | https://subgraph.satsuma-prod.com/decentraland/collections-matic-mumbai/playground | QmdqoM3jpJWWbK1EMTZcSE5WJgiUaoSpKcSLeQRHhqQSea | QmYVGaMGvqkcBMrJ4F5XrkzwCzhB3FfJvHRBERbtgovCai | | Mumbai | Hosted Service | https://thegraph.com/explorer/subgraph/decentraland/collections-matic-mumbai | QmdqoM3jpJWWbK1EMTZcSE5WJgiUaoSpKcSLeQRHhqQSea | QmYVGaMGvqkcBMrJ4F5XrkzwCzhB3FfJvHRBERbtgovCai | -| Amoy | Satsuma | https://subgraph.satsuma-prod.com/decentraland/collections-matic-amoy/playground | QmZKxA9VfjFTDNbNDASec194y3rZxiamtEMakWaoFaD8ov | Qma6T1cGQtBvYY5bsctwLNSbNymXKidkXaC9DbQVTgH1BE | +| Amoy | Satsuma | https://subgraph.satsuma-prod.com/decentraland/collections-matic-amoy/playground | QmeJBtfn5mgPH2CbRJpWbwUBmjg64vxTA5KTERaHUtG15u | QmZKxA9VfjFTDNbNDASec194y3rZxiamtEMakWaoFaD8ov | Using [The Graph](https://thegraph.com) and [Alchemy](https://www.alchemy.com/) diff --git a/src/modules/catalyst/index.ts b/src/modules/catalyst/index.ts index c804c4e..b5a7fb6 100644 --- a/src/modules/catalyst/index.ts +++ b/src/modules/catalyst/index.ts @@ -7,7 +7,7 @@ export function getCatalystBase(): string { return 'https://peer.decentraland.org' } - if (network == 'ropsten' || network == 'goerli' || network == 'sepolia' || network == 'mumbai') { + if (network == 'ropsten' || network == 'goerli' || network == 'sepolia' || network == 'mumbai' || network == 'polygon-amoy') { return 'https://peer.decentraland.zone' } diff --git a/src/modules/curation/index.ts b/src/modules/curation/index.ts index 1c085d7..feeb128 100644 --- a/src/modules/curation/index.ts +++ b/src/modules/curation/index.ts @@ -16,5 +16,9 @@ export function getBlockWhereRescueItemsStarted(): BigInt { return BigInt.fromI32(19885000) } + if (network == 'amoy') { + return BigInt.fromI32(5706678) + } + return BigInt.fromI32(I32.MAX_VALUE) } diff --git a/src/modules/network/index.ts b/src/modules/network/index.ts index 3c4e214..5d33a11 100644 --- a/src/modules/network/index.ts +++ b/src/modules/network/index.ts @@ -2,5 +2,5 @@ import { dataSource } from '@graphprotocol/graph-ts' export function getNetwork(): string { let network = dataSource.network() - return network == "mainnet" ? "ethereum" : network + return network == "mainnet" ? "ethereum" : network == 'polygon-amoy' ? 'amoy' : network } \ No newline at end of file diff --git a/src/modules/rarity/index.ts b/src/modules/rarity/index.ts index 94d9625..fb9f228 100644 --- a/src/modules/rarity/index.ts +++ b/src/modules/rarity/index.ts @@ -4,19 +4,21 @@ import { Rarity } from '../../entities/schema' let ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' let RARITY_MUMBAI = '0x8eabf06f6cf667915bff30138be70543bce2901a' let RARITY_MATIC = '0x17113b44fdd661a156cc01b5031e3acf72c32eb3' +let RARITY_AMOY = '0xddb3781fff645325c8896aa1f067baa381607ecc' let RARITIES_WITH_ORACLE_MUMBAI = '0xb9957735bbe6d42585058af11aa72da8ead9043a' let RARITIES_WITH_ORACLE_MATIC = '0xa9158e22f89bb3f69c5600338895cb5fb81e5090' +let RARITIES_WITH_ORACLE_AMOY = '0x25b6b4bac4adb582a0abd475439da6730777fbf7' export function getRarityAddress(): Address { let network = dataSource.network() - let addressString = network == 'mumbai' ? RARITY_MUMBAI : network == 'matic' ? RARITY_MATIC : ZERO_ADDRESS + let addressString = network == 'polygon-amoy' ? RARITY_AMOY : network == 'mumbai' ? RARITY_MUMBAI : network == 'matic' ? RARITY_MATIC : ZERO_ADDRESS return Address.fromString(addressString) } export function getRaritiesWithOracleAddress(): Address { let network = dataSource.network() - let addressString = network == 'mumbai' ? RARITIES_WITH_ORACLE_MUMBAI : network == 'matic' ? RARITIES_WITH_ORACLE_MATIC : ZERO_ADDRESS + let addressString = network == 'polygon-amoy' ? RARITIES_WITH_ORACLE_AMOY : network == 'mumbai' ? RARITIES_WITH_ORACLE_MUMBAI : network == 'matic' ? RARITIES_WITH_ORACLE_MATIC : ZERO_ADDRESS return Address.fromString(addressString) } diff --git a/src/modules/store/index.ts b/src/modules/store/index.ts index 6789922..45ca5ca 100644 --- a/src/modules/store/index.ts +++ b/src/modules/store/index.ts @@ -13,6 +13,10 @@ export function getStoreAddress(): string { return '0x6ddf1b1924dad850adbc1c02026535464be06b0c' } + if (network == 'polygon-amoy') { + return '0xe36abc9ec616c83caaa386541380829106149d68' + } + log.debug('Could not find store address. Invalid network {}', [network]) return '' }