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

feat: Add polygon amoy support #10

Merged
merged 15 commits into from
Jun 20, 2024
Merged
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
15 changes: 8 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
REACT_APP_CHAIN_ID="11155111"
REACT_APP_PEER_URL="https://peer-ue-2.decentraland.zone"
REACT_APP_TRANSACTIONS_API_URL="https://transactions-api.decentraland.zone/v1"
REACT_APP_TPR_SUBGRAPH="https://subgraph.decentraland.org/tpr-matic-amoy"
REACT_APP_SEGMENT_API_KEY=""
REACT_APP_ENVIRONMENT="development"
REACT_APP_WEBSITE_VERSION="0.1.0"
VITE_REACT_APP_CHAIN_ID="11155111"
VITE_REACT_APP_PEER_URL="https://peer.decentraland.zone"
VITE_REACT_APP_TRANSACTIONS_API_URL="https://transactions-api.decentraland.zone/v1"
VITE_REACT_APP_TPR_SUBGRAPH="https://subgraph.decentraland.org/tpr-matic-amoy"
VITE_REACT_APP_SEGMENT_API_KEY=""
VITE_REACT_APP_ENVIRONMENT="development"
VITE_REACT_APP_WEBSITE_VERSION="0.1.0"
PUBLIC_URL=""
VITE_BASE_URL=""
58 changes: 58 additions & 0 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build and release

on:
push:
branches:
- master
release:
types:
- created

jobs:
build-release:
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js 20.x
uses: actions/setup-node@v4.0.1
with:
node-version: 20.x
cache: 'npm'
- name: Set package.json version
uses: menduz/oddish-action@master
with:
deterministic-snapshot: true
only-update-versions: true
- name: Install
run: npm install
env:
HUSKY: 0
- name: Build
run: npm run build
env:
CI: 'false'
NODE_PATH: 'src'
- name: Publish
uses: menduz/oddish-action@master
with:
cwd: './dist'
deterministic-snapshot: true
registry-url: 'https://registry.npmjs.org'
access: public
gitlab-token: ${{ secrets.GITLAB_CDN_DEPLOYER_TOKEN }}
gitlab-pipeline-url: ${{ secrets.GITLAB_CDN_DEPLOYER_URL }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Sentry release
if: github.event_name == 'release' && github.event.action == 'created'
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
sourcemaps: ${{ github.workspace }}/build
version: '${{ vars.SENTRY_RELEASE_PREFIX }}@${{ github.event.release.tag_name }}'
url_prefix: '~'
38 changes: 0 additions & 38 deletions .github/workflows/main.yaml

This file was deleted.

31 changes: 18 additions & 13 deletions .github/workflows/set-rollouts-manual.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
name: Set delivery rollout - Manual
name: Set rollout by path - Manual

on:
workflow_dispatch:
inputs:
packageVersion:
description: "NPM Version of the release (@dcl/third-party-aggregator)"
description: "NPM Version of the release (@dcl/linked-wearables)"
required: true
default: ""
deploymentDomain:
deploymentEnvironment:
type: "choice"
description: "Deployment domain"
description: "Deployment environment"
required: true
default: ".zone"
default: "zone"
options:
- .zone
- .today
- .org
- zone
- today
- org
rolloutPercentage:
description: "The percentage for this rollout"
required: true
default: "100"

jobs:
set-manual-rollout:
set-manual-by-path-rollout:
runs-on: ubuntu-latest
steps:
- uses: hmarr/debug-action@v2
- name: Set Rollout
uses: decentraland/set-rollout-action@main
uses: decentraland/set-rollout-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -32,10 +36,11 @@ jobs:
sha: ${{ github.sha }}

# CDN information
packageName: "@dcl/third-party-aggregator"
packageName: "@dcl/linked-wearables"
packageVersion: ${{ github.event.inputs.packageVersion }}

# Rollout information
deploymentDomain: third-party-aggregator.decentraland${{ github.event.inputs.deploymentDomain }}
deploymentPath: "linked-wearables"
deploymentEnvironment: ${{ github.event.inputs.deploymentEnvironment }}
deploymentName: "_site"
percentage: 100
percentage: ${{ github.event.inputs.rolloutPercentage }}
24 changes: 13 additions & 11 deletions .github/workflows/set-rollouts.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Set delivery rollout
name: Set rollout by path

on: [deployment_status]

Expand All @@ -10,8 +10,8 @@ jobs:
- uses: hmarr/debug-action@v2

# Dev
- name: Set Rollout Dev
uses: decentraland/set-rollout-action@main
- name: Set Rollout - Development
uses: decentraland/set-rollout-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -24,13 +24,14 @@ jobs:
packageVersion: ${{ github.event.deployment.payload.packageVersion }}

# Rollout information
deploymentDomain: "third-party-aggregator.decentraland.zone"
deploymentName: "_site"
deploymentPath: 'linked-wearables'
deploymentEnvironment: 'zone'
deploymentName: '_site'
percentage: 100

# Stg
- name: Set Rollout Stg
uses: decentraland/set-rollout-action@main
- name: Set Rollout - Staging
uses: decentraland/set-rollout-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -43,6 +44,7 @@ jobs:
packageVersion: ${{ github.event.deployment.payload.packageVersion }}

# Rollout information
deploymentDomain: "third-party-aggregator.decentraland.today"
deploymentName: "_site"
percentage: 100
deploymentPath: 'linked-wearables'
deploymentEnvironment: 'today'
deploymentName: '_site'
percentage: 100
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# production
/build
/dist

# misc
.DS_Store
Expand Down
26 changes: 26 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
href="https://fonts.googleapis.com/css?family=Inconsolata&display=swap"
rel="stylesheet"
/>
<link
rel="sitemap"
type="application/xml"
title="Sitemap"
href="/sitemap.xml"
/>
<link rel="manifest" href="/manifest.json" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Decentraland - Third Party Aggregator" />
<title>Decentraland - Third Party Aggregator</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
20 changes: 20 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* eslint-disable */
import type { Config } from 'jest'

export default async (): Promise<Config> => {
return {
verbose: true,
testEnvironment: 'jsdom',
setupFiles: ['<rootDir>/src/tests/beforeSetupTests.tsx'],
setupFilesAfterEnv: ['<rootDir>/src/tests/afterSetupTest.ts'],
transform: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/src/tests/config/fileTransformer.cjs',
'^.+\\.(t|j)sx?$': '@swc/jest'
},
moduleNameMapper: {
'\\.(css|less)$': 'identity-obj-proxy'
},
transformIgnorePatterns: ['node_modules/(?!(multiformats|uint8arrays|@dcl/single-sign-on-client|decentraland-connect|uuid|decentraland-dapps)/)']
}
}
Loading