Skip to content

Commit

Permalink
feat: Goerli for dev (#570)
Browse files Browse the repository at this point in the history
* feat: Change Ropsten to Goerli

* feat: Rename ropsten occurrences to goerli

* chore: Update peer in dev

* chore: Update peer url in action envs
  • Loading branch information
fzavalia committed Aug 16, 2022
1 parent 093ecff commit 6668ec8
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .ci/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ export = async function main() {
value:
env === 'prd' || env === 'stg'
? 'https://peer.decentraland.org'
: 'https://peer.decentraland.zone',
: 'https://peer-ap1.decentraland.zone',
},
{
name: 'CHAIN_NAME',
value: env === 'prd' || env === 'stg' ? 'Ethereum Mainnet' : 'Ropsten',
value: env === 'prd' || env === 'stg' ? 'Ethereum Mainnet' : 'Goerli',
},
{
name: 'COLLECTIONS_GRAPH_URL',
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
AUTH0_DOMAIN: AUTH0_DOMAIN
DEFAULT_ETH_ADDRESS: DEFAULT_ETH_ADDRESS
ANALYTICS_CONNECTION_STRING: ANALYTICS_CONNECTION_STRING
PEER_URL: https://peer.decentraland.zone
CHAIN_NAME: Ropsten
PEER_URL: PEER_URL
CHAIN_NAME: Goerli
THIRD_PARTY_GRAPH_URL: 'http://thid-party-url'
OPEN_SEA_URL: OPEN_SEA_URL
OPEN_SEA_API_KEY: OPEN_SEA_API_KEY
Expand Down
2 changes: 1 addition & 1 deletion src/Collection/Collection.router.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ describe('Collection router', () => {
})

describe('when upserting a collection', () => {
const network = 'ropsten'
const network = 'goerli'
let urn_suffix: string
let third_party_id: string
let urn: string
Expand Down
2 changes: 1 addition & 1 deletion src/Collection/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Collection } from './Collection.model'
import { getChequeMessageHash, getMergedCollection } from './utils'

describe('when decoding the TP collection URN', () => {
const collectionNetwork = 'ropsten'
const collectionNetwork = 'goerli'
const thirdPartyId = `urn:decentraland:${collectionNetwork}:collections-thirdparty:a-third-party-id`
const collectionURNSuffix = 'a-urn-suffix'
let fullUrn: string
Expand Down
2 changes: 1 addition & 1 deletion src/common/matchers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('matchers', () => {

it('should append the other matchers', () => {
expect(matchers.urn).toBe(
'urn:decentraland:(mainnet|ropsten|matic|mumbai):(?:collections-thirdparty:[^:|\\s]+:[^:|\\s]+|collections-v2:0x[a-fA-F0-9]{40})'
'urn:decentraland:(mainnet|goerli|matic|mumbai):(?:collections-thirdparty:[^:|\\s]+:[^:|\\s]+|collections-v2:0x[a-fA-F0-9]{40})'
)
})

Expand Down
2 changes: 1 addition & 1 deletion src/common/matchers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// DCL: urn:decentraland:{network}:collections-v2:{contract-address}
// TP: urn:decentraland:{network}:collections-thirdparty:{third-party-name}:{collection-id}(:{item-id})?

const network = '(mainnet|ropsten|matic|mumbai)'
const network = '(mainnet|goerli|matic|mumbai)'
const address = '0x[a-fA-F0-9]{40}'
const urnSlot = '[^:|\\s]+'
const baseURN = `urn:decentraland:${network}`
Expand Down
12 changes: 6 additions & 6 deletions src/ethereum/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ describe('when obtaining the forwarder address', () => {
})
})

describe('when CHAIN_NAME === "Ropsten"', () => {
describe('when CHAIN_NAME === "Goerli"', () => {
it('should return the address of the forwarder in matic mumbai', () => {
mockEnv.get.mockReturnValueOnce(ChainName.ETHEREUM_ROPSTEN)
mockEnv.get.mockReturnValueOnce(ChainName.ETHEREUM_GOERLI)

expect(getForwarderAddress()).toBe(
'0x71e56Ad57eca3fAAe5077b7F9ea731a25785fF92'
Expand All @@ -47,9 +47,9 @@ describe('when obtaining the collection factory address', () => {
})
})

describe('when CHAIN_NAME === "Ropsten"', () => {
describe('when CHAIN_NAME === "Goerli"', () => {
it('should return the collection factory v3 address on matic mumbai', () => {
mockEnv.get.mockReturnValueOnce(ChainName.ETHEREUM_ROPSTEN)
mockEnv.get.mockReturnValueOnce(ChainName.ETHEREUM_GOERLI)

expect(getFactoryCollectionAddress()).toBe(
'0xDDb3781Fff645325C8896AA1F067bAa381607ecc'
Expand All @@ -69,9 +69,9 @@ describe('when obtaining the codehash', () => {
})
})

describe('when CHAIN_NAME === "Ropsten"', () => {
describe('when CHAIN_NAME === "Goerli"', () => {
it('should return the codehash for the factory v3 in matic mumbai', async () => {
mockEnv.get.mockReturnValueOnce(ChainName.ETHEREUM_ROPSTEN)
mockEnv.get.mockReturnValueOnce(ChainName.ETHEREUM_GOERLI)

expect(getFactoryCollectionCodeHash()).toBe(
'0x7917e9ddbe5e0fd8de84efee3e8089ca7878af7a6aa1a62b4d0b6160821d4de8'
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function getMappedChainIdForCurrentChainName():
switch (chainName) {
case ChainName.ETHEREUM_MAINNET:
return ChainId.MATIC_MAINNET
case ChainName.ETHEREUM_ROPSTEN:
case ChainName.ETHEREUM_GOERLI:
return ChainId.MATIC_MUMBAI
default:
throw new Error(
Expand Down

0 comments on commit 6668ec8

Please sign in to comment.