Skip to content
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: 0 additions & 3 deletions .babelrc

This file was deleted.

6 changes: 6 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
VITE_ENVIRONMENT=local
VITE_ENVIRONMENT_ID=8545
VITE_NODE=http://127.0.0.1:8545
VITE_GAS_PRICE=60000000
VITE_BLOCK_EXPLORER=https://explorer.rsk.co
VITE_URL=http://localhost:3000/
6 changes: 0 additions & 6 deletions .env.local

This file was deleted.

12 changes: 6 additions & 6 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
REACT_APP_ENVIRONMENT=production
REACT_APP_ENVIRONMENT_ID=30
REACT_APP_NODE=https://public-node.rsk.co
REACT_APP_GAS_PRICE=60000000
REACT_APP_BLOCK_EXPLORER=https://explorer.rsk.co
REACT_APP_URL=https://manager.rns.rifos.org/
VITE_ENVIRONMENT=production
VITE_ENVIRONMENT_ID=30
VITE_NODE=https://public-node.rsk.co
VITE_GAS_PRICE=60000000
VITE_BLOCK_EXPLORER=https://explorer.rsk.co
VITE_URL=https://manager.rns.rifos.org/
6 changes: 6 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
VITE_ENVIRONMENT=testing
VITE_ENVIRONMENT_ID=8545
VITE_NODE=http://127.0.0.1:8545
VITE_GAS_PRICE=60000000
VITE_BLOCK_EXPLORER=https://explorer.testnet.rsk.co
VITE_URL=/
12 changes: 6 additions & 6 deletions .env.testnet
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
REACT_APP_ENVIRONMENT=test
REACT_APP_ENVIRONMENT_ID=31
REACT_APP_NODE=https://public-node.testnet.rsk.co
REACT_APP_GAS_PRICE=60000000
REACT_APP_BLOCK_EXPLORER=https://explorer.testnet.rsk.co
REACT_APP_URL=https://testnet.manager.rns.rifos.org/
VITE_ENVIRONMENT=test
VITE_ENVIRONMENT_ID=31
VITE_NODE=https://public-node.testnet.rsk.co
VITE_GAS_PRICE=60000000
VITE_BLOCK_EXPLORER=https://explorer.testnet.rsk.co
VITE_URL=https://testnet.manager.rns.rifos.org/
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
ecmaVersion: 2020,
sourceType: 'module',
},
plugins: [
Expand All @@ -26,7 +26,7 @@ module.exports = {
rules: {
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react/destructuring-assignment': 'warn',
'react/require-default-props': 'warn',
'react/require-default-props': ['warn', { functions: 'defaultArguments' }],
'import/no-cycle': 'off',
'jsx-a11y/label-has-associated-control': 'off',
},
Expand Down
46 changes: 46 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
# Wait at least 10 days after a new version is released before opening a PR
cooldown:
default-days: 5
Comment on lines +6 to +10
# one PR per week that groups BOTH minor + patch updates
groups:
actions-updates:
patterns:
- "*"
update-types:
- minor
- patch

# Maintain dependencies for npm and yarn
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
# Wait at least 10 days after a new version is released before opening a PR
cooldown:
default-days: 5
semver-major-days: 30
semver-minor-days: 7
semver-patch-days: 3
Comment on lines +23 to +30
# one PR per week that groups BOTH minor + patch updates
groups:
production-dependencies:
dependency-type: "production"
patterns:
- "*"
update-types:
- minor
- patch
development-dependencies:
dependency-type: "development"
patterns:
- "*"
update-types:
- minor
- patch
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 20.x
uses: actions/setup-node@v1
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e #v6.4.0
with:
node-version: 20.x
- run: yarn
node-version-file: '.nvmrc'
- run: yarn install --frozen-lockfile
- run: npm run ganache &
- run: yarn test
- run: yarn lint
48 changes: 48 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: "0 0 * * *"

# Declare default permissions as read only.
permissions: read-all

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [javascript]

steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: Before Index (java)
if: ${{ matrix.language == 'java' }}
run: ./configure.sh

- name: Initialize CodeQL
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
category: "/language:${{ matrix.language }}"
29 changes: 29 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# Once installed, if the workflow run is marked as required,
# PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
name: 'Dependency Review'
on: [pull_request]

# Declare default permissions as read only.
permissions: read-all

jobs:
dependency-review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: 'Checkout Repository'
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: 'Dependency Review'
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
with:
fail-on-severity: high
comment-summary-in-pr: true
28 changes: 14 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: Setup Node 20
uses: actions/setup-node@v1
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e #v6.4.0
with:
node-version: '20'
node-version-file: '.nvmrc'

- name: Install dependencies
run: yarn
run: yarn install --frozen-lockfile

- name: Build site
run: |
export REACT_APP_GIT_HASH=${{ github.sha }}
export VITE_GIT_HASH=${{ github.sha }}
yarn build:testnet

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@254c19bd240aabef8777f48595e9d2d7b972184b #v6.2.1
with:
aws-access-key-id: ${{ secrets.TESTNET_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.TESTNET_AWS_SECRET_ACCESS_KEY }}
Expand All @@ -55,23 +55,23 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: Setup Node 20
uses: actions/setup-node@v1
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e #v6.4.0
with:
node-version: '20'
node-version-file: '.nvmrc'

- name: Install dependencies
run: yarn
run: yarn install --frozen-lockfile

- name: Build site
run: |
export REACT_APP_GIT_HASH=${{ github.sha }}
export VITE_GIT_HASH=${{ github.sha }}
yarn build:mainnet

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@254c19bd240aabef8777f48595e9d2d7b972184b #v6.2.1
with:
aws-access-key-id: ${{ secrets.MAINNET_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.MAINNET_AWS_SECRET_ACCESS_KEY }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/gh-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ jobs:

steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 # persist-credentials must be false in most cases for the deployment to work correctly.
with:
persist-credentials: false

- name: Setup Node 20
uses: actions/setup-node@v1
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e #v6.4.0
with:
node-version: '20'
node-version-file: '.nvmrc'

- name: Install and Build for Testnet 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
run: |
yarn install --network-timeout 100000 || yarn install --network-timeout 100000 || yarn install --network-timeout 100000
export REACT_APP_GIT_HASH=${{ github.sha }}
yarn install --frozen-lockfile --network-timeout 100000 || yarn install --frozen-lockfile --network-timeout 100000 || yarn install --frozen-lockfile --network-timeout 100000
export VITE_GIT_HASH=${{ github.sha }}
yarn build:ghpages

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.6.8
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f #v4.8.0
with:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build # The folder the action should deploy.
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/qa-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: Setup Node 20
uses: actions/setup-node@v1
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e #v6.4.0
with:
node-version: '20'
node-version-file: '.nvmrc'

- name: Install dependencies
run: yarn
run: yarn install --frozen-lockfile

- name: Build site
run: |
export REACT_APP_GIT_HASH=${{ github.sha }}
export VITE_GIT_HASH=${{ github.sha }}
yarn build:mainnet

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@254c19bd240aabef8777f48595e9d2d7b972184b #v6.2.1
with:
aws-access-key-id: ${{ secrets.QA_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.QA_AWS_SECRET_ACCESS_KEY }}
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

Requisites:

- [Node v12](https://nodejs.org/en/)
- [Node v20](https://nodejs.org/en/) (see `.nvmrc`)
- [yarn](https://yarnpkg.com/)

Install dependencies:
Expand Down
13 changes: 0 additions & 13 deletions babel.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion public/index.html → index.html
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
<link href="https://cdn.jsdelivr.net/npm/select2@4.0.12/dist/css/select2.min.css" rel="stylesheet" />
<!--endscustom select tag -->

<link rel="manifest" href="%PUBLIC_URL%/site.webmanifest" />
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no" />
<title>RNS</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion mainnet.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:10
FROM node:20

WORKDIR /app
COPY . ./
Expand Down
Loading
Loading