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

Latest non-solidity changes #45

Open
wants to merge 52 commits into
base: audit-20241118
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
59c85f5
docs
novaknole Nov 15, 2024
45185a6
add some hbs
novaknole Nov 15, 2024
47d15ff
remove root
novaknole Nov 15, 2024
79b959d
prettier ignore
novaknole Nov 16, 2024
c9f9363
prettier ignore
novaknole Nov 16, 2024
415894e
docs
novaknole Nov 16, 2024
04502f1
ss
novaknole Nov 16, 2024
9d9b72e
add more
novaknole Nov 16, 2024
d86f2ff
new changes
novaknole Nov 16, 2024
d468db6
new
novaknole Nov 16, 2024
25d1121
add notice
novaknole Nov 16, 2024
377ac63
new
novaknole Nov 16, 2024
18d9d56
new
novaknole Nov 16, 2024
d0e4629
new
novaknole Nov 16, 2024
31a570e
new
novaknole Nov 16, 2024
da0ae28
ss
novaknole Nov 16, 2024
85b05fe
ss
novaknole Nov 16, 2024
d4c1f2a
rename
novaknole Nov 16, 2024
87ccce5
new
novaknole Nov 17, 2024
faca10c
push
novaknole Nov 19, 2024
4225e3c
multisig push
novaknole Nov 19, 2024
ecf7940
push
novaknole Nov 19, 2024
c18662f
push
novaknole Nov 19, 2024
6e4fc62
new changes
novaknole Nov 22, 2024
61ab014
add token voting asciidoc
Rekard0 Dec 5, 2024
9f01f0e
update formating
Rekard0 Dec 5, 2024
948f216
remove purpose column
Rekard0 Dec 5, 2024
cd21a5d
ammend requested modifications
Rekard0 Dec 5, 2024
a105c94
Merge pull request #35 from aragon/feature/hadwritten-doc
novaknole Dec 5, 2024
6225add
docs updated
novaknole Dec 11, 2024
a7cd19b
feat: rename the page Title and make the permission ids and the funct…
clauBv23 Dec 11, 2024
c5ebe57
feat: add warning card
clauBv23 Dec 11, 2024
46c1923
feat: edit warning message
clauBv23 Dec 16, 2024
4036109
update docs
novaknole Dec 16, 2024
96e95dd
fix: import and script
clauBv23 Jan 22, 2025
6a35131
Merge pull request #39 from aragon/fix/typechain-imports
Rekard0 Feb 3, 2025
052d0d1
Merge branch 'develop' into feature/docs
Rekard0 Feb 3, 2025
c917ad2
remove comment
Rekard0 Feb 3, 2025
d4883ac
Merge pull request #43 from aragon/feature/docs
Rekard0 Feb 3, 2025
0ce4aa9
bump versions
Rekard0 Feb 3, 2025
e620432
fix prettier
Rekard0 Feb 3, 2025
dc035fb
reorder package.json in /contracts
Rekard0 Feb 3, 2025
c6b0580
multisig docs remove message
novaknole Feb 4, 2025
69874eb
Merge pull request #44 from aragon/feat/bump-versions
novaknole Feb 4, 2025
daf7eb6
Feat: docs update page title and remove warn messages (#46)
clauBv23 Feb 5, 2025
54e5cc3
Feat: use new sdk version (#49)
clauBv23 Feb 12, 2025
fc3c38e
Feat: use new sdk version (#50)
clauBv23 Feb 12, 2025
1142edb
ABI generation for NPM (#47)
brickpop Feb 12, 2025
93c7c5e
Adding an audit report link to the readme (#51)
brickpop Feb 14, 2025
8d13144
Feat: get deploymet needed addresses from env vars and add script to …
clauBv23 Feb 18, 2025
2177e56
feat: add calldata to json file (#48)
clauBv23 Feb 18, 2025
3e7003c
Feat/add peaq support (#53)
Rekard0 Feb 26, 2025
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
39 changes: 32 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# GENERAL

## The network used for testing purposes
NETWORK_NAME="sepolia" # ["mainnet", "sepolia", "polygon", "mumbai","baseMainnet", "baseGoerli", "baseSepolia", "arbitrum", "arbitrumSepolia"]
NETWORK_NAME="sepolia" # ["mainnet", "sepolia", "polygon"]

## To deploy contracts, you need to set:
## To upload the metadata for deployed contracts
PUB_PINATA_JWT=

# CONTRACTS
Expand All @@ -24,13 +24,38 @@ POLYGONSCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
BASESCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
ARBISCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"


# SUBGRAPH

## The Graph credentials
GRAPH_KEY="zzzzzzzzzzzz"
## Deployment addresses
# Note that addresses will be also used for testing so ensure they are valid on the network you are running the forking tests on.

# optional, address if not provided will get it from the latest deployment on the network or from the ens registrar
# defined in the framework if it supports it. In case it is not found will create a new one.
# For example for mainnet:
# 0x8c278e37D0817210E18A7958524b7D0a1fAA6F7b
PLUGIN_REPO_ADDRESS=0x0000000000000000000000000000000000000000
# not optional, if not provided will not be able to deploy the plugin or run the forking tests.
# For example for mainnet:
# 0xaac9E9cdb8C1eb42d881ADd59Ee9c53847a3a4f3
PLUGIN_REPO_FACTORY_ADDRESS=0x0000000000000000000000000000000000000000
# optional, only needed when a latest versions of the plugin are going to be deploy on a new network.
PLACEHOLDER_SETUP=0x0000000000000000000000000000000000000000
# not optional, if not provided will not be able to transfer the ownership of the plugin when deploying
# the plugin or running the forking tests, or when the plugin is going to be installed on the management dao.
# for example for mainnet:
# 0xf2d594F3C93C19D7B1a6F15B5489FFcE4B01f7dA
MANAGEMENT_DAO_ADDRESS=0x0000000000000000000000000000000000000000
# optional, only needed when the plugin is going to be installed on the management dao.
# for example for mainnet:
# 0xE978942c691e43f65c1B7c7F8f1dc8cDF061B13f
PLUGIN_SETUP_PROCESSOR_ADDRESS=0x0000000000000000000000000000000000000000

## Plugin installation in management DAO
# all of them are optional, only needed when the plugin is going to be installed on the management dao.
MANAGEMENT_DAO_MULTISIG_LISTED_ONLY=true
MANAGEMENT_DAO_MULTISIG_MIN_APPROVALS=1
MANAGEMENT_DAO_MULTISIG_APPROVERS=0x0000000000000000000000000000000000000000,0x1111111111111111111111111111111111111111111111111111,...

## Subgraph
GRAPH_KEY="zzzzzzzzzzzz"
SUBGRAPH_NAME="osx"
SUBGRAPH_VERSION="v1.0.0"
SUBGRAPH_NETWORK_NAME="mainnet" # ["mainnet", "sepolia", "polygon", "base", "arbitrum"]
5 changes: 4 additions & 1 deletion .github/workflows/contracts-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
node-version: 18

- name: 'Install the dependencies'
run: 'yarn install --frozen-lockfile'
run: 'yarn --frozen-lockfile --ignore-scripts'

- name: 'Build the contracts'
run: 'yarn build'
Expand All @@ -37,4 +37,7 @@ jobs:
run: 'yarn coverage'
env:
NETWORK_NAME: ${{ vars.NETWORK_NAME }}
PLUGIN_REPO_FACTORY_ADDRESS: ${{ vars.PLUGIN_REPO_FACTORY_ADDRESS }}
MANAGEMENT_DAO_ADDRESS: ${{ vars.MANAGEMENT_DAO_ADDRESS }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
PUB_PINATA_JWT: ${{ secrets.PUB_PINATA_JWT }}
2 changes: 1 addition & 1 deletion .github/workflows/formatting-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
node-version: 18

- name: 'Install the dependencies'
run: 'yarn install --frozen-lockfile'
run: 'yarn --frozen-lockfile --ignore-scripts'

- name: 'Check code formatting'
run: 'yarn prettier:check'
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/publish-npm-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Publish NPM Artifacts

on:
workflow_dispatch:

jobs:
publish-artifacts-to-npm:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org/'

- name: Configure NPM for Scoped Package
run: |
cd packages/artifacts
SCOPE=$(jq -r '.name' package.json | cut -d'/' -f1)
echo "$SCOPE:registry=https://registry.npmjs.org/" > ~/.npmrc
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc

- name: Get Version from package.json
id: get_version
run: |
cd packages/artifacts
VERSION=$(jq -r '.version' package.json)
TAG_VERSION="v$VERSION"
echo "VERSION=$TAG_VERSION" >> $GITHUB_ENV

- name: Create Git Tag
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git tag $VERSION
git push origin $VERSION

- name: Install Dependencies
run: |
cd packages/artifacts
yarn install

- name: Build Package
env:
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
run: |
cd packages/artifacts
yarn build

- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd packages/artifacts
if [[ "$VERSION" == *"-alpha"* ]]; then
npm publish --tag alpha --access public
else
npm publish --tag latest --access public
fi
6 changes: 3 additions & 3 deletions .github/workflows/subgraph-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
node-version: 18

- name: 'Install root dependencies'
run: 'yarn install --frozen-lockfile'
run: 'yarn --frozen-lockfile --ignore-scripts'
working-directory: .

- name: 'Install dependencies for contracts'
run: 'yarn install --frozen-lockfile'
run: 'yarn --frozen-lockfile --ignore-scripts'
working-directory: packages/contracts

- name: 'Install the dependencies for subgraph'
run: 'yarn install --frozen-lockfile'
run: 'yarn --frozen-lockfile --ignore-scripts'
working-directory: packages/subgraph

- name: 'Build the subgraph'
Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
.coverage_artifacts
.coverage_cache
.coverage_contracts
artifacts
build
cache
coverage
Expand All @@ -16,8 +15,10 @@ packages/subgraph/tests/.bin

packages/contracts/.upgradable
packages/contracts/deployments
packages/contracts/createVersionProposalData*.json
packages/contracts/artifacts

docs
packages/artifacts/src/abi.ts

# files
*.env
Expand All @@ -33,4 +34,4 @@ packages/subgraph/tests/helpers/extended-schema.ts

artifacts-zk
cache-zk
deployments-zk
deployments-zk
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ imported
generated
*/js-client/test/integration/*.test.ts

packages/contracts/docs/templates/contract.hbs
packages/contracts/docs/templates/page.hbs

# files
*.env
*.log
Expand Down
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
[license]: https://opensource.org/licenses/AGPL-v3
[license-badge]: https://img.shields.io/badge/License-AGPL_v3-blue.svg

## Audit

### v1.3.0

**Halborn**: [audit report](https://github.com/aragon/osx/tree/main/audits/Halborn_AragonOSx_v1_4_Smart_Contract_Security_Assessment_Report_2025_01_03.pdf)

- Commit ID: [fffc680f563698cfb7aec962fb89b4196025f629](https://github.com/aragon/multisig-plugin/commit/fffc680f563698cfb7aec962fb89b4196025f629)
- Started: 2024-11-18
- Finished: 2025-02-13

## Project

The root folder of the repo includes two subfolders:
Expand Down Expand Up @@ -35,7 +45,7 @@ The root folder of the repo includes two subfolders:
The root-level `package.json` file contains global `dev-dependencies` for formatting and linting. After installing the dependencies with

```sh
yarn install
yarn --ignore-scripts
```

you can run the associated [formatting](#formatting) and [linting](#linting) commands.
Expand Down Expand Up @@ -79,7 +89,7 @@ Before deploying, you MUST also change the default hardhat private key (`PRIVATE
This package is located in `packages/contracts`, first run

```sh
yarn install
yarn --ignore-scripts
```

### Building
Expand Down Expand Up @@ -235,7 +245,7 @@ yarn deploy:zksync --network zksyncMainnet --tags ...
In `packages/subgraph`, first run

```sh
yarn install
yarn --ignore-scripts
```

which will also run
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@aragon/multisig-plugin",
"description": "A template to fork from when developing an Aragon OSx plugin",
"version": "0.0.1-alpha.1",
"license": "AGPL-3.0-or-later",
"author": {
"name": "Aragon",
Expand Down
11 changes: 11 additions & 0 deletions packages/artifacts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Multisig Plugin artifacts

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.3.0

### Added

- First NPM release of the Plugin's ABI (release 1, build 3)

58 changes: 58 additions & 0 deletions packages/artifacts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Multisig Plugin artifacts

This package contains the ABI of the Multisig Plugin for OSx, as well as the address of its plugin repository on each supported network. Install it with:

```sh
yarn add @aragon/multisig-plugin-artifacts
```

## Usage

```typescript
// ABI definitions
import {
MultisigABI,
IMultisigABI,
ListedCheckConditionABI,
MultisigSetupABI
} from "@aragon/multisig-plugin-artifacts";

// Plugin Repository addresses per-network
import { addresses } from "@aragon/multisig-plugin-artifacts";
```

You can also open [addresses.json](./src/addresses.json) directly.

## Development

### Building the package

Install the dependencies and generate the local ABI definitions.

```sh
yarn --ignore-scripts
yarn build
```

The `build` script will:
1. Move to `packages/contracts`.
2. Install its dependencies.
3. Compile the contracts using Hardhat.
4. Generate their ABI.
5. Extract their ABI and embed it into on `src/abi.ts`.

## Documentation

You can find all documentation regarding how to use this plugin in [Aragon's documentation here](https://docs.aragon.org/multisig/1.x/index.html).

## Contributing

If you like what we're doing and would love to support, please review our `CONTRIBUTING_GUIDE.md` [here](https://github.com/aragon/multisig-plugin/blob/main/CONTRIBUTIONS.md). We'd love to build with you.

## Security

If you believe you've found a security issue, we encourage you to notify us. We welcome working with you to resolve the issue promptly.

Security Contact Email: [email protected]

Please do not use the issue tracker for security issues.
22 changes: 22 additions & 0 deletions packages/artifacts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@aragon/multisig-plugin-artifacts",
"author": "Aragon X",
"version": "1.3.0-alpha",
"license": "AGPL-3.0-or-later",
"description": "The Multisig Plugin ABI definition",
"typings": "dist/index.d.ts",
"main": "dist/index.js",
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "yarn prepare-abi && rm -Rf dist && tsc -p tsconfig.json",
"prepare-abi": "bash prepare-abi.sh"
},
"devDependencies": {
"typescript": "^5.5.4"
}
}
35 changes: 35 additions & 0 deletions packages/artifacts/prepare-abi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash

# Exit on error
set -e

# Constants
CONTRACTS_FOLDER="../contracts"
TARGET_ABI_FILE="./src/abi.ts"

# Move into contracts package and install dependencies
cd $CONTRACTS_FOLDER

yarn --ignore-scripts && yarn build

# Move back to artifacts package
cd - > /dev/null

# Wipe the destination file
echo "// NOTE: Do not edit this file. It is generated automatically." > $TARGET_ABI_FILE

# Extract the abi field and create a TS file
for SRC_CONTRACT_FILE in $(ls $CONTRACTS_FOLDER/src/*.sol )
do
SRC_FILE_NAME=$(basename $(echo $SRC_CONTRACT_FILE))
SRC_FILE_PATH=$CONTRACTS_FOLDER/artifacts/src/$SRC_FILE_NAME/${SRC_FILE_NAME%".sol"}.json

ABI=$(node -e "console.log(JSON.stringify(JSON.parse(fs.readFileSync(\"$SRC_FILE_PATH\").toString()).abi))")
CONTRACT_NAME=${SRC_FILE_NAME%".sol"}

echo "const ${CONTRACT_NAME}ABI = $ABI as const;" >> $TARGET_ABI_FILE
echo "export {${CONTRACT_NAME}ABI};" >> $TARGET_ABI_FILE
echo "" >> $TARGET_ABI_FILE
done

echo "ABI prepared: $TARGET_ABI_FILE"
Loading
Loading