Skip to content

Commit

Permalink
feat: Add polygon amoy support (#56)
Browse files Browse the repository at this point in the history
* feat: Add polygon amoy support

* fix: Update amoy contracts

* feat: Add Checker contract address

* fix: Add comment
  • Loading branch information
cyaiox authored Apr 16, 2024
1 parent 8ab17de commit 78d6d65
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 28 deletions.
10 changes: 9 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export * from './abis'
export * from './utils'

export type L1Network = 'goerli' | 'mainnet' | 'sepolia'
export type L2Network = 'mumbai' | 'polygon'
export type L2Network = 'mumbai' | 'polygon' | 'amoy'

export const l1Contracts = {
goerli: {
Expand Down Expand Up @@ -71,5 +71,13 @@ export const l2Contracts = {
],
poi: '0xFEC09d5C192aaf7Ec7E2C89Cc8D3224138391B2E',
manaToken: '0xA1c57f48F0Deb89f569dFbE6E2B7f46D33606fD4'
},
amoy: {
checker: '0x0ffc7e6d72ee2f287b877533454210621b1b7822', // This contract address is just a placeholder, it's not required to deploy a contract to the testnet
thirdParty: '',
factories: [{ address: '0x802de0c509add2ee29de24de7225daaff4741c43', sinceBlock: 5763249 }],
commitees: [{ address: '0x53c9c388000b6fc91b91fb466742d0e869785c3b', sinceBlock: 5706678 }],
poi: '0x7a0fad6854de8df1245da952cd3ae7f6893154c1',
manaToken: '0x7ad72b9f944ea9793cf4055d88f81138cc2c63a0'
}
}
32 changes: 5 additions & 27 deletions test/e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,17 @@ const timeout = 100000

describe('e2e', () => {
let mainnet: HTTPProvider
let goerli: HTTPProvider
let sepolia: HTTPProvider
let polygon: HTTPProvider
let mumbai: HTTPProvider
let amoy: HTTPProvider

beforeAll(async () => {
const fetch = createFetchComponent()
const opts = { fetch: fetch.fetch }
mainnet = new HTTPProvider('https://rpc.decentraland.org/mainnet?project=catalyst-contracts-ci', opts)
goerli = new HTTPProvider('https://rpc.decentraland.org/goerli?project=catalyst-contracts-ci', opts)
sepolia = new HTTPProvider('https://rpc.decentraland.org/sepolia?project=catalyst-contracts-ci', opts)
polygon = new HTTPProvider('https://rpc.decentraland.org/polygon?project=catalyst-contracts-ci', opts)
mumbai = new HTTPProvider('https://rpc.decentraland.org/mumbai?project=catalyst-contracts-ci', opts)
amoy = new HTTPProvider('https://rpc.decentraland.org/amoy?project=catalyst-contracts-ci', opts)
})

describe('names denylist', () => {
Expand All @@ -50,16 +48,6 @@ describe('e2e', () => {
timeout
)

it(
'goerli',
async () => {
const contract = await createContract(l1Contracts.goerli.nameDenylist, goerli)
const denylist = await getNameDenylistFromContract(contract)
expect(denylist).toHaveLength(0)
},
timeout
)

it(
'sepolia',
async () => {
Expand Down Expand Up @@ -90,11 +78,11 @@ describe('e2e', () => {
)

it(
'mumbai',
'amoy',
async () => {
const contract = await createContract(l2Contracts.mumbai.poi, mumbai)
const contract = await createContract(l2Contracts.amoy.poi, amoy)
const pois = await getPoisFromContract(contract)
expect(pois.length).toBeGreaterThan(1)
expect(pois.length).toBe(0) // 0 POIs in Amoy at the moment
},
timeout
)
Expand Down Expand Up @@ -132,16 +120,6 @@ describe('e2e', () => {
timeout
)

it(
'goerli',
async () => {
const contract = await createContract(l1Contracts.goerli.catalyst, goerli)
const servers = await getCatalystServersFromDAO(contract)
expect(servers).toHaveLength(0)
},
timeout
)

it(
'sepolia',
async () => {
Expand Down

0 comments on commit 78d6d65

Please sign in to comment.