Skip to content

Commit ea9a7d3

Browse files
committed
feat(contracts): use the latest token-plugin-template
1 parent 24afd8c commit ea9a7d3

File tree

105 files changed

+11803
-6981
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+11803
-6981
lines changed

.env.example

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# GENERAL
22

33
## The network used for testing purposes
4-
NETWORK_NAME="sepolia" # ["mainnet", "sepolia", "polygon", "baseMainnet", "arbitrum"]
4+
NETWORK_NAME="mainnet" # ["mainnet", "sepolia", "polygon"]
5+
6+
## To upload the metadata for deployed contracts
7+
PUB_PINATA_JWT=
58

69
# CONTRACTS
710

@@ -20,13 +23,24 @@ ETHERSCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
2023
POLYGONSCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
2124
BASESCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
2225
ARBISCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
23-
24-
# SUBGRAPH
25-
26-
## The Graph credentials
27-
GRAPH_KEY="zzzzzzzzzzzz"
28-
29-
## Subgraph
30-
SUBGRAPH_NAME="osx"
31-
SUBGRAPH_VERSION="v1.0.0"
32-
SUBGRAPH_NETWORK_NAME="mainnet" # ["mainnet", "sepolia", "polygon", "base", "arbitrum"]
26+
PEAQ_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
27+
28+
## Deployment addresses
29+
# Note that addresses will be also used for testing so ensure they are valid on the network you are running the forking tests on.
30+
31+
# Optional: if not provided will get it from the latest deployment on the network or from the ens registrar
32+
# defined in the framework if it supports it. In case it is not found will create a new one.
33+
# For example for mainnet:
34+
# 0xb7401cD221ceAFC54093168B814Cc3d42579287f
35+
PLUGIN_REPO_ADDRESS=0x0000000000000000000000000000000000000000
36+
# not optional, if not provided will not be able to deploy the plugin or run the forking tests.
37+
# For example for mainnet:
38+
# 0xaac9E9cdb8C1eb42d881ADd59Ee9c53847a3a4f3
39+
PLUGIN_REPO_FACTORY_ADDRESS=0x0000000000000000000000000000000000000000
40+
# optional, only needed when a latest versions of the plugin are going to be deploy on a new network.
41+
PLACEHOLDER_SETUP=0x0000000000000000000000000000000000000000
42+
# not optional, if not provided will not be able to transfer the ownership of the plugin when deploying
43+
# the plugin or running the forking tests, or when the plugin is going to be installed on the management dao.
44+
# for example for mainnet:
45+
# 0xf2d594F3C93C19D7B1a6F15B5489FFcE4B01f7dA
46+
MANAGEMENT_DAO_ADDRESS=0x0000000000000000000000000000000000000000

.github/labeler.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,3 @@
44
contracts:
55
- ./packages/contracts/**/*
66
- ./packages/contracts/*
7-
8-
subgraph:
9-
- ./packages/subgraph/**/*
10-
- ./packages/subgraph/*

.github/pull_request_template.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Description
2+
3+
Please include a summary of the change and be sure you follow the contributions rules we do provide [here](../CONTRIBUTIONS.md)
4+
5+
Task ID: [OS-?](https://aragonassociation.atlassian.net/browse/OS-?)
6+
7+
## Type of change
8+
9+
See the framework lifecylce in `packages/contracts/docs/framework-lifecycle` to decide what kind of change this pull request is.
10+
11+
<!--- Please delete options that are not relevant. -->
12+
13+
- [ ] Bug fix (non-breaking change which fixes an issue)
14+
- [ ] New feature (non-breaking change which adds functionality)
15+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
16+
17+
## Checklist:
18+
19+
- [ ] I have selected the correct base branch.
20+
- [ ] I have performed a self-review of my own code.
21+
- [ ] I have commented my code, particularly in hard-to-understand areas.
22+
- [ ] My changes generate no new warnings.
23+
- [ ] Any dependent changes have been merged and published in downstream modules.
24+
- [ ] I ran all tests with success and extended them if necessary.
25+
- [ ] I have updated the `CHANGELOG.md` file in the root folder.
26+
- [ ] I have updated the `DEPLOYMENT_CHECKLIST` file in the root folder.
27+
- [ ] I have updated the `UPDATE_CHECKLIST` file in the root folder.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Publish Artifacts
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
publish-artifacts-to-npm:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout Repository
12+
uses: actions/checkout@v4
13+
14+
- name: Set up Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '18'
18+
registry-url: 'https://registry.npmjs.org/'
19+
20+
- name: Configure NPM for Scoped Package
21+
run: |
22+
cd packages/artifacts
23+
SCOPE=$(jq -r '.name' package.json | cut -d'/' -f1)
24+
echo "$SCOPE:registry=https://registry.npmjs.org/" > ~/.npmrc
25+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
26+
27+
- name: Get Version from package.json
28+
id: get_version
29+
run: |
30+
cd packages/artifacts
31+
VERSION=$(jq -r '.version' package.json)
32+
TAG_VERSION="v$VERSION"
33+
echo "VERSION=$TAG_VERSION" >> $GITHUB_ENV
34+
35+
- name: Create Git Tag
36+
run: |
37+
git config --global user.name "github-actions"
38+
git config --global user.email "github-actions@github.com"
39+
git tag $VERSION
40+
git push origin $VERSION
41+
42+
- name: Install Dependencies
43+
run: |
44+
cd packages/artifacts
45+
yarn install --frozen-lockfile --ignore-scripts
46+
47+
- name: Build Package
48+
env:
49+
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
50+
run: |
51+
cd packages/artifacts
52+
yarn build
53+
54+
- name: Publish to NPM
55+
env:
56+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
57+
run: |
58+
cd packages/artifacts
59+
if [[ "$VERSION" == *"-alpha"* ]]; then
60+
npm publish --tag alpha --access public
61+
else
62+
npm publish --tag latest --access public
63+
fi

.github/workflows/contracts-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
node-version: 18
2727

2828
- name: 'Install the dependencies'
29-
run: 'yarn install --frozen-lockfile'
29+
run: 'yarn install --frozen-lockfile --ignore-scripts'
3030

3131
- name: 'Build the contracts'
3232
run: 'yarn build'
@@ -37,4 +37,6 @@ jobs:
3737
run: 'yarn coverage'
3838
env:
3939
NETWORK_NAME: ${{ vars.NETWORK_NAME }}
40+
PLUGIN_REPO_FACTORY_ADDRESS: ${{ vars.PLUGIN_REPO_FACTORY_ADDRESS }}
41+
MANAGEMENT_DAO_ADDRESS: ${{ vars.MANAGEMENT_DAO_ADDRESS }}
4042
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}

.github/workflows/formatting-linting.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
node-version: 18
2020

2121
- name: 'Install the dependencies'
22-
run: 'yarn install --frozen-lockfile'
22+
run: 'yarn install --frozen-lockfile --ignore-scripts'
2323

2424
- name: 'Check code formatting'
2525
run: 'yarn prettier:check'
@@ -29,6 +29,3 @@ jobs:
2929

3030
- name: 'Lint contracts ts and js'
3131
run: 'yarn lint:contracts:ts'
32-
33-
- name: 'Lint subgraph ts and js'
34-
run: 'yarn lint:subgraph:ts'

.github/workflows/subgraph-tests.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.gitignore

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,22 @@
22
.coverage_artifacts
33
.coverage_cache
44
.coverage_contracts
5-
artifacts
65
build
76
cache
87
coverage
98
dist
109
node_modules
1110
typechain
1211

13-
packages/subgraph/imported
14-
packages/subgraph/generated
15-
packages/subgraph/tests/.bin
12+
packages/contracts/deployments
13+
packages/contracts/.upgradable/
14+
packages/contracts/createVersionProposalData*.json
15+
16+
packages/contracts/artifacts
17+
18+
packages/artifacts/src/abi.ts
19+
20+
docs
1621

1722
# files
1823
*.env
@@ -21,7 +26,6 @@ packages/subgraph/tests/.bin
2126
.pnp.*
2227
coverage.json
2328

24-
packages/subgraph/deploy-output.txt
25-
packages/subgraph/subgraph.yaml
26-
packages/subgraph/tests/.latest.json
27-
packages/subgraph/tests/helpers/extended-schema.ts
29+
artifacts-zk
30+
cache-zk
31+
deployments-zk

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ imported
1515
generated
1616
*/js-client/test/integration/*.test.ts
1717

18+
packages/contracts/docs/templates/contract.hbs
19+
packages/contracts/docs/templates/page.hbs
20+
1821
# files
1922
*.env
2023
*.log

.solhint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"extends": "solhint:recommended",
33
"plugins": ["prettier"],
44
"rules": {
5-
"code-complexity": ["error", 8],
5+
"code-complexity": ["error", 10],
66
"compiler-version": ["error", ">=0.8.4"],
77
"func-visibility": ["error", {"ignoreConstructors": true}],
88
"max-line-length": ["error", 120],

0 commit comments

Comments
 (0)