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

release: v4.0.0 #166

Merged
merged 49 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
a110d1a
feat: remove version storage
superical Feb 2, 2024
beee520
feat: support batched document in issued check
superical Feb 2, 2024
e8b5394
refactor: clean up document store
superical Feb 2, 2024
c9444d7
feat: issue and revoke validation (#146)
superical Mar 5, 2024
8808df1
feat: setup foundry
superical Feb 5, 2024
b13560e
test: add foundry tests
superical Feb 6, 2024
2aa7496
refactor: clean up legacy stuff (#148)
superical Mar 8, 2024
67aab11
refactor: organise tests (#149)
superical Mar 11, 2024
e0b2219
refactor: streamline interfaces (#150)
superical Mar 13, 2024
1066d2c
feat: multicall (#151)
superical Mar 14, 2024
7953172
refactor: milestone clean up (#152)
superical Mar 15, 2024
a1a6429
feat: ownable document store
superical Feb 13, 2024
06ce819
feat: erc5192 for soulbound document
superical Feb 15, 2024
23b07af
refactor: ownable document store storage
superical Feb 15, 2024
a0dcdd8
feat: ownable document store token uri
superical Feb 15, 2024
9a18515
test: ownable document store test fixtures
superical Feb 19, 2024
64d9094
refactor: ownable document store base
superical Feb 19, 2024
a353603
feat: document store upgradeable
superical Feb 19, 2024
23a2d52
feat: ownable document store upgradeable
superical Feb 19, 2024
c121f86
test: add test for upgradeable contracts
superical Feb 21, 2024
791ccc5
refactor: deploy utils
superical Feb 21, 2024
1286caa
refactor: remove constructor params
superical Feb 26, 2024
9231a0d
feat: add initialisable
superical Feb 27, 2024
2e92076
feat: deployment scripts
superical Feb 27, 2024
9f381ad
feat: add upgradeable deployment
superical Feb 27, 2024
cfbb062
refactor: deploy base scripts
superical Feb 27, 2024
feeccdc
ci: new release pipeline
superical Feb 28, 2024
615923c
chore: update pr template
superical Feb 29, 2024
1672c09
chore: update style configs
superical Feb 29, 2024
92bcb59
ci: test coverage
superical Mar 1, 2024
54717b4
style: prettify
superical Mar 25, 2024
0382dab
feat: rename OwnableDocumentStore to TransferableDocumentStore (#157)
superical Mar 26, 2024
0a193a7
chore: typescript in hardhat
superical Mar 1, 2024
80b9b9d
chore: clean up legacy mess
superical Mar 1, 2024
4e3349d
chore: test coverage script
superical Mar 1, 2024
2146c49
refactor: move scripts
superical Mar 1, 2024
2375611
chore: read sender from env
superical Mar 1, 2024
d20c54d
chore: update prettier ignore
superical Mar 7, 2024
ead5216
chore: deploy script default values
superical Mar 12, 2024
ffde72f
ci: update workflows
superical Mar 26, 2024
1e3cae5
test: add deploy utils tests
superical Mar 1, 2024
5ed53a9
feat: pausable transferable document
superical Mar 7, 2024
cc68286
ci: codecov (#161)
superical Apr 1, 2024
87d9400
test: isIssued with unissued doc (#162)
superical Apr 1, 2024
e317640
chore: deployment scripts (#163)
superical Apr 2, 2024
2d30325
chore: update addresses (#164)
superical Apr 2, 2024
a953def
fix: build new readme
superical Mar 28, 2024
6dc0eac
docs: update readme v4
superical Mar 19, 2024
fe6e4bf
docs: update branch names
superical Apr 2, 2024
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
18 changes: 0 additions & 18 deletions .babelrc

This file was deleted.

3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
14 changes: 14 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export API_KEY_INFURA=

export API_KEY_ETHERSCAN=
export API_KEY_POLYGONSCAN=
export API_KEY_ARBISCAN=
export API_KEY_OPTIMISTIC_ETHERSCAN=

export FOUNDRY_PROFILE="default"

export DEPLOYER_ADDRESS=

# Salts are 11 bytes
export SALT_DOCUMENT_STORE=
export SALT_TRANSFERABLE_DOCUMENT_STORE=
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

54 changes: 0 additions & 54 deletions .eslintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

10 changes: 5 additions & 5 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## Summary

What is the background of this pull request?

## Changes
* What are the changes made in this pull request?
* Change this and that, etc...

- What are the changes made in this pull request?
- Change this and that, etc...

## Issues
What are the related issues or stories?

## Releases
Channels: latest
What are the related issues or stories?
11 changes: 3 additions & 8 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
on:
workflow_call:

env:
NODE_ENV: ci

name: "Linters"

jobs:
Expand All @@ -14,15 +11,13 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm ci --ignore-scripts
node-version: 20.x
- run: npm ci --no-fund --no-audit --ignore-scripts
- run: npm run lint

commit-lint:
name: Commit Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Commit Lint Dependencies
run: npm install @commitlint/config-conventional
- uses: JulienKode/[email protected]
- uses: wagoid/commitlint-github-action@v5
114 changes: 114 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
on:
workflow_call:

name: "Publish"

jobs:
prepare-build:
name: Prepare Build
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.check-targets.outputs.MATRIX }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Install Dependencies
run: npm ci --no-fund --no-audit --ignore-scripts

- name: Compile contracts
run: npm run build:hh

- name: Upload contract artefacts
uses: actions/upload-artifact@v4
with:
name: contract-artefacts
path: |
artifacts/src

- name: Check targets
id: check-targets
run: |
echo "Checking targets..."
TARGETS_JSON=$(echo "${{ vars.TYPE_TARGETS }}" | jq -c --raw-input 'split(",")')
echo "MATRIX=$TARGETS_JSON" >> $GITHUB_OUTPUT
echo "Generated matrix: $TARGETS_JSON"

build-targets:
name: Build Targets
needs: prepare-build
runs-on: ubuntu-latest
strategy:
matrix:
targets: ${{fromJson(needs.prepare-build.outputs.matrix)}}
env:
MATRIX_TARGET: ${{ matrix.targets }}
steps:
- name: Print the matrix output from prepare-matrix
run: |
echo "Matrix JSON: $MATRIX_JSON"
env:
MATRIX_JSON: ${{ needs.prepare-build.outputs.matrix }}
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Download artefacts
uses: actions/download-artifact@v4
with:
name: contract-artefacts
path: artifacts/src

- name: Check contract artefacts
run: |
if [ ! -d "artifacts/src" ]; then
echo "Contract artefacts not found." && exit 1
fi

- name: Build types for ${{ env.MATRIX_TARGET }}
run: |
echo "Generating types for ${{ env.MATRIX_TARGET }}"
./bin/build.sh typechain ${{ env.MATRIX_TARGET }}

- name: Upload type targets
uses: actions/upload-artifact@v4
with:
name: types-${{ env.MATRIX_TARGET }}
path: |
.build/types-${{ env.MATRIX_TARGET }}
!.build/types-${{ env.MATRIX_TARGET }}/node_modules

publish:
name: Publish to NPM
needs: build-targets
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.x
registry-url: "https://registry.npmjs.org/"

- name: Install Dependencies
run: npm ci --no-fund --no-audit --ignore-scripts

- name: Download type targets
uses: actions/download-artifact@v4
with:
path: .build
pattern: types-*

- name: Publish to NPM
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "Publishing packages to NPM"
npm run semantic-release
18 changes: 5 additions & 13 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
on:
pull_request:
types: [ opened, reopened, synchronize ]
types: [opened, reopened, synchronize]

env:
NODE_ENV: ci
RELEASE_DRY_RUN: 1

name: "Pull Requests"

Expand All @@ -16,14 +16,6 @@ jobs:
name: Linters
uses: ./.github/workflows/linters.yml

eslint-review:
name: ESLint Review
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release-check:
name: Release Check
uses: ./.github/workflows/publish.yml
26 changes: 6 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
- beta
- +([0-9])?(.{+([0-9]),x}).x

env:
NODE_ENV: ci

name: Release

jobs:
Expand All @@ -21,21 +18,10 @@ jobs:

release:
name: Publish Release
runs-on: ubuntu-latest
needs: [tests, linters]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm ci
- run: npm run build
- uses: codfish/semantic-release-action@v2
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Output new release version
if: steps.semantic.outputs.new-release-published == 'true'
run: |
echo "🎉New Release Published: ${{ steps.semantic.outputs.release-version }}"
uses: ./.github/workflows/publish.yml
secrets: inherit
permissions:
contents: write
issues: write
pull-requests: write
37 changes: 29 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
on:
workflow_call:

env:
NODE_ENV: ci

name: "Tests"

jobs:
run-tests:
name: Run Tests
runs-on: ubuntu-latest
env:
FOUNDRY_PROFILE: ci
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm ci
- run: npm run test
node-version: 20.x
- uses: foundry-rs/foundry-toolchain@v1
- run: sudo apt-get install -y lcov
- run: npm ci --no-fund --no-audit
- run: npm run test:coverage
- uses: actions/upload-artifact@v3
with:
name: test-coverage
path: ./coverage/lcov.info

test-build:
name: Test Build
Expand All @@ -25,6 +30,22 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm ci --ignore-scripts
node-version: 20.x
- uses: foundry-rs/foundry-toolchain@v1
- run: npm ci --no-fund --no-audit --ignore-scripts
- run: npm run build

coverage:
name: Test Coverage
needs: [run-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download coverage
uses: actions/download-artifact@v3
with:
name: test-coverage
- uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
verbose: true
Loading
Loading