Skip to content

Commit

Permalink
Replacing "solidity" references with "solidity-v1"
Browse files Browse the repository at this point in the history
Replaced all references of the "/solidity" dir with
the "/solidity-v1" for legacy beacon code.
We are creating a v2 of random beacon which will be developed
now in the "/solidity/random-beacon" folder.
  • Loading branch information
dimpar committed Oct 1, 2021
1 parent ef8cbbc commit 3c1fa1d
Show file tree
Hide file tree
Showing 25 changed files with 116 additions and 106 deletions.
12 changes: 8 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ Dockerfile
# Solidity stuff.
# We want to include only bare contracts and NPM package configuration for Go code
# generator.
solidity/
!solidity/contracts
!solidity/package.json
!solidity/package-lock.json
solidity-v1/
!solidity-v1/contracts
!solidity-v1/package.json
!solidity-v1/package-lock.json
solidity
!solidity/random-beacon/contracts
!solidity/random-beacon/package.json
!solidity/random-beacon/yarn.lock

# Go stuff.
**/gen/*/**/*.go
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- "infrastructure/**"
- "scripts/**"
- "token-stakedrop/**"
- "solidity/dashboard/**"
- "solidity-v1/dashboard/**"
pull_request:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
with:
filters: |
path-filter:
- './!((docs|infrastructure|scripts|token-stakedrop|(solidity/dashboard))/**)'
- './!((docs|infrastructure|scripts|token-stakedrop|(solidity-v1/dashboard))/**)'
client-build-test-publish:
needs: client-detect-changes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Solidity
name: Solidity v1

on:
schedule:
Expand All @@ -7,8 +7,8 @@ on:
branches:
- main
paths:
- "solidity/**"
- "!solidity/dashboard/**"
- "solidity-v1/**"
- "!solidity-v1/dashboard/**"
pull_request:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
with:
filters: |
path-filter:
- './solidity/!(dashboard)/**'
- './solidity-v1/!(dashboard)/**'
contracts-build-and-test:
needs: contracts-detect-changes
Expand All @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./solidity
working-directory: ./solidity-v1
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./solidity
working-directory: ./solidity-v1
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./solidity
working-directory: ./solidity-v1
outputs:
version: ${{ steps.npm-version-bump.outputs.version }}
steps:
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
id: npm-version-bump
uses: keep-network/npm-version-bump@v2
with:
work-dir: ./solidity
work-dir: ./solidity-v1
environment: ${{ github.event.inputs.environment }}
branch: ${{ github.ref }}
commit: ${{ github.sha }}
Expand All @@ -183,7 +183,7 @@ jobs:
uses: keep-network/tenderly-push-action@v1
continue-on-error: true
with:
working-directory: ./solidity
working-directory: ./solidity-v1
tenderly-token: ${{ secrets.TENDERLY_TOKEN }}
tenderly-project: thesis/keep-test
eth-network-id: ${{ env.NETWORK_ID }}
Expand All @@ -199,7 +199,7 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: Contracts
path: ./solidity/build/contracts/*
path: ./solidity-v1/build/contracts/*

contracts-build-and-publish-initcontainer:
needs: [contracts-migrate-and-publish]
Expand Down Expand Up @@ -258,7 +258,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
with:
module: "github.com/keep-network/keep-core/solidity"
module: "github.com/keep-network/keep-core/solidity-v1"
url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
environment: ${{ github.event.inputs.environment }}
upstream_builds: ${{ github.event.inputs.upstream_builds }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: KEEP Token Dashboard Code Format Checks
name: KEEP Token Dashboard / Code Format Checks

on:
push:
branches:
- main
paths:
- "solidity/dashboard/**"
- "solidity-v1/dashboard/**"
pull_request:
workflow_dispatch:

defaults:
run:
working-directory: ./solidity/dashboard
working-directory: ./solidity-v1/dashboard

jobs:
dashboard-detect-changes:
Expand All @@ -28,7 +28,7 @@ jobs:
with:
filters: |
path-filter:
- './solidity/dashboard/**'
- './solidity-v1/dashboard/**'
dashboard-code-format:
needs: dashboard-detect-changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
branches: [ main ]
paths:
- solidity/dashboard/**
- solidity-v1/dashboard/**

# For pull_request_target:
# - Checkout with repository set to PR repo, ref same (see
Expand All @@ -22,7 +22,7 @@ jobs:
if: startsWith(github.head_ref, 'releases/mainnet/token-dashboard/')
defaults:
run:
working-directory: solidity/dashboard
working-directory: solidity-v1/dashboard
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -46,7 +46,7 @@ jobs:
# service-key: ${{ secrets.KEEP_DASHBOARD_UPLOADER_SERVICE_KEY_JSON }}
# project: keep-prd-210b
# bucket-name: dashboard.keep.network
# build-folder: solidity/dashboard/build
# build-folder: solidity-v1/dashboard/build
# A pull_request event is a PR; deploy to preview bucket.
- if: github.event_name == 'pull_request'
name: Deploy PR preview to GCP
Expand All @@ -56,7 +56,7 @@ jobs:
project: keep-prd-210b
bucket-name: preview.dashboard.keep.network
bucket-path: ${{ github.head_ref }}
build-folder: solidity/dashboard/build
build-folder: solidity-v1/dashboard/build
# A pull_request event is a PR; leave a comment with the preview URL.
- if: github.event_name == 'pull_request'
name: Post preview URL to PR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches:
- main
paths:
- "solidity/dashboard/**"
- "solidity-v1/dashboard/**"
pull_request:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
with:
filters: |
path-filter:
- './solidity/dashboard/**'
- './solidity-v1/dashboard/**'
dashboard-build-and-publish:
needs: dashboard-detect-changes
Expand All @@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./solidity/dashboard
working-directory: ./solidity-v1/dashboard
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
with:
upstream-builds: ${{ github.event.inputs.upstream_builds }}
query: |
keep-core-contracts-version = github.com/keep-network/keep-core/solidity#version
keep-core-contracts-version = github.com/keep-network/keep-core/solidity-v1#version
keep-ecdsa-contracts-version = github.com/keep-network/keep-ecdsa/solidity#version
tbtc-contracts-version = github.com/keep-network/tbtc/solidity#version
tbtc-v2-contracts-version = github.com/keep-network/tbtc-v2/solidity#version
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
set-website: true
home-page-path: index.html
error-page-path: index.html
build-folder: solidity/dashboard/build
build-folder: solidity-v1/dashboard/build

- name: Notify CI about completion of the workflow
if: github.event_name == 'workflow_dispatch'
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- main
paths:
- "docs/**"
- "solidity/**"
- "!solidity/dashboard/**"
- "solidity-v1/**"
- "!solidity-v1/dashboard/**"
pull_request:
workflow_dispatch:

Expand All @@ -25,7 +25,7 @@ jobs:
with:
filters: |
path-filter:
- './((docs|(solidity/!dashboard))/**)'
- './((docs|(solidity-v1/!dashboard))/**)'
docs-tex:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -81,12 +81,12 @@ jobs:
github.event_name != 'pull_request'
|| needs.docs-detect-changes.outputs.path-filter == 'true'
env:
SOLIDITY_DOCS_DIR: ${{ github.workspace }}/docs/solidity
SOLIDITY_DOCS_DIR: ${{ github.workspace }}/docs/solidity-v1
steps:
- uses: actions/checkout@v2

- name: Generate solidity docs
working-directory: ./solidity
working-directory: ./solidity-v1
run: |
npm ci
npx truffle compile
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
continue-on-error: true
with:
name: Solidity Docs
path: ${{ github.workspace }}/docs/solidity
path: ${{ github.workspace }}/docs/solidity-v1

- name: Build HTML docs
id: html
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
continue-on-error: true
with:
name: Solidity Docs
path: ${{ github.workspace }}/docs/solidity
path: ${{ github.workspace }}/docs/solidity-v1

- name: Build PDF docs
id: pdf
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/genesis-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./solidity
working-directory: ./solidity-v1
steps:
- uses: actions/checkout@v2

Expand All @@ -24,7 +24,7 @@ jobs:
with:
node-version: "14.x"
cache: "npm"
cache-dependency-path: solidity/package-lock.json
cache-dependency-path: solidity-v1/package-lock.json

- run: npm ci

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/npm.yml → .github/workflows/npm-v1.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: NPM
name: NPM v1

on:
push:
branches:
- main
paths:
- 'solidity/contracts/**'
- 'solidity/package.json'
- 'solidity/package-lock.json'
- 'solidity-v1/contracts/**'
- 'solidity-v1/package.json'
- 'solidity-v1/package-lock.json'

jobs:
npm-compile-publish-contracts:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./solidity
working-directory: ./solidity-v1
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
id: npm-version-bump
uses: keep-network/npm-version-bump@v2
with:
work-dir: ./solidity
work-dir: ./solidity-v1
environment: dev
branch: ${{ github.ref }}
commit: ${{ github.sha }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/submitter-testnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./solidity
working-directory: ./solidity-v1
steps:
- uses: actions/checkout@v2

Expand All @@ -23,7 +23,7 @@ jobs:
with:
node-version: "14.x"
cache: 'npm'
cache-dependency-path: solidity/package-lock.json
cache-dependency-path: solidity-v1/package-lock.json

- run: npm ci

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules/
./solidity/truffle.js
artifacts/
build/
vendor/
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ repos:
hooks:
- id: lint-sol
name: 'lint solidity sol'
entry: /usr/bin/env bash -c "cd solidity && npm run lint:sol"
entry: /usr/bin/env bash -c "cd solidity-v1 && npm run lint:sol"
files: '\.sol$'
language: script
description: "Checks solidity code according to the package's linter configuration"
- id: lint-js
name: 'lint solidity js'
entry: /usr/bin/env bash -c "cd solidity && npm run lint:js"
files: 'solidity\/.*\.js$'
entry: /usr/bin/env bash -c "cd solidity-v1 && npm run lint:js"
files: 'solidity-v1\/.*\.js$'
language: script
description: "Checks JS code according to the package's linter configuration"
- id: format-dashboard
name: 'format dashboard'
entry: /usr/bin/env bash -c "cd solidity/dashboard && npm run format"
files: 'solidity/dashboard/'
entry: /usr/bin/env bash -c "cd solidity-v1/dashboard && npm run format"
files: 'solidity-v1/dashboard/'
language: script
description: "Checks dashboard code according to the package's formatting configuration"
- id: lint-faucet-js
Expand Down
Loading

0 comments on commit 3c1fa1d

Please sign in to comment.