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 49 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
49 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
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
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## The network used for testing purposes
NETWORK_NAME="sepolia" # ["mainnet", "sepolia", "polygon", "mumbai","baseMainnet", "baseGoerli", "baseSepolia", "arbitrum", "arbitrumSepolia"]

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

# CONTRACTS
Expand Down
3 changes: 2 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 @@ -38,3 +38,4 @@ jobs:
env:
NETWORK_NAME: ${{ vars.NETWORK_NAME }}
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"
18 changes: 18 additions & 0 deletions packages/artifacts/src/addresses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"pluginRepo": {
"mainnet": "0x8c278e37D0817210E18A7958524b7D0a1fAA6F7b",
"sepolia": "0x9e7956C8758470dE159481e5DD0d08F8B59217A2",
"holesky": "0xde1414F52A885cb9b899870f85bDCdb2Dec7C5dd",
"devSepolia": "0xA0901B5BC6e04F14a9D0d094653E047644586DdE",
"polygon": "0x5A5035E7E8aeff220540F383a9cf8c35929bcF31",
"mumbai": "0x2c4690b8be39adAd4F15A69340d5035aC6E53eEF",
"base": "0xcDC4b0BC63AEfFf3a7826A19D101406C6322A585",
"baseSepolia": "0x9e7956C8758470dE159481e5DD0d08F8B59217A2",
"arbitrum": "0x7553E6Fb020c5740768cF289e603770AA09b7aE2",
"arbitrumSepolia": "0x9e7956C8758470dE159481e5DD0d08F8B59217A2",
"linea": "0x2667636E0f5eA63c771509e1d3377177E9Da056D",
"lineaSepolia": "0x86B433017Ce556ED93e6D34d6Ba0e3a9EB19015C",
"zksync": "0x83f88d380073c8F929fAB649F3d016649c101D3A",
"zksyncSepolia": "0x2cae809b6ca149b49cBcA8B887Da2805174052F3"
}
}
4 changes: 4 additions & 0 deletions packages/artifacts/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from "./abi";

import * as addresses from "./addresses.json";
export {addresses};
10 changes: 10 additions & 0 deletions packages/artifacts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"declaration": true,
"outDir": "./dist",
"resolveJsonModule": true
},
"include": ["src"]
}
8 changes: 8 additions & 0 deletions packages/artifacts/yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


typescript@^5.5.4:
version "5.7.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.3.tgz#919b44a7dbb8583a9b856d162be24a54bf80073e"
integrity sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==
2 changes: 2 additions & 0 deletions packages/contracts/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ ignorePatterns:
- typechain
# files
- coverage.json
- docs/config.js
- scripts/gen-nav.js
11 changes: 11 additions & 0 deletions packages/contracts/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
= Multisig API

== Core

{{Multisig}}

{{MultisigSetup}}

{{ListedCheckCondition}}


Loading
Loading