Skip to content

Commit

Permalink
addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekard0 committed Feb 6, 2025
1 parent c709d00 commit cafd598
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 400 deletions.
2 changes: 1 addition & 1 deletion packages/artifacts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Aragon OSx Commons Artifacts
# Aragon Admin plugin Artifacts

All notable changes to this project will be documented in this file.

Expand Down
38 changes: 16 additions & 22 deletions packages/artifacts/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
# Artifacts Package for Admin Plugin
# Admin Plugin artifacts

This package is responsible for generating and storing ABIs for smart contracts. It checks out the specified branch, compiles the contracts, and saves the ABIs in the `src/abis/` directory. The package can then be published to NPM for use in other projects.
This package contains the ABIs of the OSx Admin plugin, as well as the address of the plugin repository on each network.

## Installation

Run the following command to install dependencies:
```sh
yarn install
yarn add @aragon/admin-plugin-artifacts
```

## Usage
### Generate ABIs
Run:
```sh
yarn generate
```
This will:
1. Check out the `packages/contracts`.
2. Install dependencies.
3. Compile contracts using Hardhat.
4. Generate ABIs using Wagmi.
5. Save the ABIs in `src/abis/`.
## Documentation

## Publishing
You can find all documentation regarding how to use this plugin in [Aragon's documentation here](https://docs.aragon.org/).

To publish the package to NPM, run:
```sh
yarn publish --access public
```
Ensure the package version is updated in `package.json` before publishing.
## Contributing

If you like what we're doing and would love to support, please review our `CONTRIBUTING_GUIDE.md` [here](https://github.com/aragon/admin-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.
7 changes: 4 additions & 3 deletions packages/artifacts/generateAbis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ set -e # Exit on error

# Define directories
CONTRACTS_DIR="../contracts"
GENERATED_ABIS="../contracts/generated/abis.ts"
GENERATED_ABI_FILE="../contracts/generated/abis.ts"
OUTPUT_ABIS_DIR="src/abis"

# Move into contracts package and install dependencies
cd $CONTRACTS_DIR

# build contracts & generate abis
yarn install

yarn build
Expand All @@ -23,8 +24,8 @@ cd -
mkdir -p "$OUTPUT_ABIS_DIR"

# Copy the generated ABIs to the output directory
if [ -f "$GENERATED_ABIS" ]; then
cp "$GENERATED_ABIS" "$OUTPUT_ABIS_DIR/abis.ts"
if [ -f "$GENERATED_ABI_FILE" ]; then
cp "$GENERATED_ABI_FILE" "$OUTPUT_ABIS_DIR/abis.ts"
else
echo "Warning: generated/abis.ts not found."
fi
Expand Down
46 changes: 46 additions & 0 deletions packages/artifacts/src/addresses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"network": {
"mainnet": {
"repoAddress":"0xA4371a239D08bfBA6E8894eccf8466C6323A52C3"
},
"sepolia": {
"repoAddress":"0x152c9E28995E418870b85cbbc0AEE4e53020edb2"
},
"holesky": {
"repoAddress":"0xC56B719Fc71D9056AbC559a0E3e6CE98Abc44a67"
},
"devSepolia": {
"repoAddress":"0xEdA3074437375DC71007AFC9D421644656d72287"
},
"polygon": {
"repoAddress":"0x7fF570473d0876db16A59e8F04EE7F17Ab117309"
},
"mumbai": {
"repoAddress":"0x0DF9b15550fF39149e491dDD154b28f587e0cD16"
},
"base": {
"repoAddress":"0x212eF339C77B3390599caB4D46222D79fAabcb5c"
},
"baseSepolia": {
"repoAddress":"0x152c9E28995E418870b85cbbc0AEE4e53020edb2"
},
"arbitrum": {
"repoAddress":"0x326A2aee6A8eE78D79E7E956DE60C6E452f76a8e"
},
"arbitrumSepolia": {
"repoAddress":"0x152c9E28995E418870b85cbbc0AEE4e53020edb2"
},
"linea": {
"repoAddress":"0x7d56667664ADf9e5aAb436629e6a789162Ad83eA"
},
"lineaSepolia": {
"repoAddress":"0xf79F733e0D5d5e0e3037b221E8B3fd12Fb564101"
},
"zksync": {
"repoAddress":""
},
"zksyncSepolia": {
"repoAddress":""
}
}
}
10 changes: 0 additions & 10 deletions packages/artifacts/src/addresses/addresses.json

This file was deleted.

1 change: 1 addition & 0 deletions packages/artifacts/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './abis/abis';
export { default as addresses } from './addresses.json';
2 changes: 2 additions & 0 deletions packages/artifacts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
"declaration": true,
"outDir": "./dist"
},
Expand Down
Loading

0 comments on commit cafd598

Please sign in to comment.