Skip to content

Horizon: post audit changes - no solidity! #1116

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

Open
wants to merge 85 commits into
base: horizon-oz2/l05-provision-params
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
3881b28
fix: ensure invalid thaw requests are ignored by getThawedTokens (OZ …
tmigone Mar 21, 2025
2853137
fix: document possible temporary thaw requests blockage when thawing …
tmigone Mar 21, 2025
c25cc25
fix: prevent provision validity grief attack (OZ L-03)
tmigone Mar 25, 2025
89dee66
fix: remove redundant code (OZ N-01)
tmigone Mar 25, 2025
2787a52
fix: only check conditions for param that is changing when changing p…
tmigone Mar 26, 2025
f71ecbe
chore: afuera hardhat-storage-layout
tmigone Feb 21, 2025
38caf38
chore: silence lint ignored file warnings
tmigone Feb 21, 2025
00e181f
feat: add deployment test boilerplate and one example
tmigone Feb 21, 2025
02ec0ac
feat: add deployment tests
tmigone Feb 24, 2025
596c7c0
feat: deployment tests
tmigone Feb 25, 2025
60ed29f
chore: gitignore
tmigone Feb 25, 2025
6e59d7e
test: add tests to ensure subgraph service contracts are owned by the…
tmigone Feb 25, 2025
a296df7
chore: only run unit tests with yarn test
tmigone Apr 1, 2025
5580785
chore: add local network to hardhat base config, fix deploy script bug
tmigone Apr 1, 2025
b40dd0b
chore: add addressbooks for local network
tmigone Apr 1, 2025
b6d23f3
chore: service provider integration tests
Maikol Feb 12, 2025
5e32650
fix: import hardhat tasks after build/contracts exist
Maikol Feb 12, 2025
bdd8b9d
fix: run integration tests on CI
Maikol Feb 13, 2025
dfab1db
chore: added operator tests
Maikol Feb 19, 2025
8d6fe67
chore: add delegators integration tests
Maikol Feb 20, 2025
9a0bae7
chore: add to delegation pool integration tests
Maikol Feb 21, 2025
b1c26c4
chore: working on e2e scripts
Maikol Feb 21, 2025
a727158
chore: added pre horizon upgrade state setup scripts
Maikol Mar 10, 2025
b14100a
chore: added operator, permissionless and slasher integration tests
Maikol Mar 18, 2025
5ea9832
fix: ts-lint
Maikol Mar 18, 2025
b08f5d4
chore: cleanup
Maikol Mar 19, 2025
42cc449
fix: during transition period test fixes
Maikol Mar 19, 2025
48bbd4b
chore: rename e2e to integration and moved scripts to hh tasks
Maikol Mar 25, 2025
a1adeb2
wip: moving staking actions to sdk
Maikol Mar 25, 2025
912a10f
chore: reset yarn lock file due to shenanigans
tmigone Mar 25, 2025
420c236
chore: moving actions to SDK
Maikol Mar 26, 2025
59c78fd
fix: renamed signerIndex to accountIndex
Maikol Mar 26, 2025
a375b3a
fix: added comments, change GRT asset holder for a minting account
Maikol Mar 26, 2025
2bcd0d2
chore: added more tests for service provider during transition period
Maikol Mar 27, 2025
dea2561
chore: added more service provider and delegators tests
Maikol Mar 28, 2025
aa51cf1
chore: rebase cleanup
tmigone Apr 3, 2025
7016cf9
chore: add arbitrum sepolia addresses to horizon address book
tmigone Apr 3, 2025
a2ad15a
chore: couple fixes due to rebase
tmigone Apr 3, 2025
d41eec3
Merge pull request #1109 from graphprotocol/mde/integration-tests
tmigone Apr 3, 2025
30356b0
chore: migrate to pnpm
tmigone Apr 4, 2025
cff6e47
wip
tmigone Apr 5, 2025
7577f75
chore: migrate sdk, horizon working
tmigone Apr 8, 2025
ef1ca10
chore: make subgraph service compatible with toolshed
tmigone Apr 8, 2025
8cfe43b
chore: fix path management in toolshed
tmigone Apr 8, 2025
e5a1ed3
chore: remove deployment actions
tmigone Apr 8, 2025
8e8aae2
chore: refactor actions
tmigone Apr 9, 2025
af851a3
chore: remove unnecessary type assertion
tmigone Apr 9, 2025
27b6515
chore: move subgraph service tests to unit test folder
tmigone Apr 9, 2025
eb22d50
chore: split transition tasks
tmigone Apr 9, 2025
806a62b
chore: split horizon tasks, make integration tests idempotent
tmigone Apr 10, 2025
b7e0271
chore: use debug instead of console.log in toolshed
tmigone Apr 10, 2025
e24936c
fix: bug where deployments were loaded multiple times
tmigone Apr 10, 2025
7834589
chore: remove unnecessary assertions
tmigone Apr 10, 2025
efb75b3
chore: remove hardhat-graph-protocol sdk and refactor toolshed folders
tmigone Apr 10, 2025
52acbfa
chore: remove deps
tmigone Apr 10, 2025
82593b1
feat: add transaction logging and auto wait to toolshed deployments
tmigone Apr 10, 2025
663c3f6
chore: final touches to toolshed v1
tmigone Apr 11, 2025
4d87fb4
chore: deprecate sdk
tmigone Apr 11, 2025
23e3838
chore: remove sdk
tmigone Apr 11, 2025
fff226b
Merge pull request #1137 from graphprotocol/tmigone/pnpm
tmigone Apr 11, 2025
0f00bb1
Merge pull request #1139 from graphprotocol/tmigone/toolshed
tmigone Apr 14, 2025
051520e
chore: add addresses of deployed contracts to subgraph service
tmigone Apr 14, 2025
0f9690d
chore: remove unused env vars
tmigone Apr 14, 2025
9b05de4
feat: auto fund test accounts on local networks
tmigone Apr 15, 2025
cf9e754
fix: prevent mnemonic override for local network
tmigone Apr 15, 2025
835a820
fix: unit scaling
tmigone Apr 16, 2025
ad5e7f4
fix: type in comment
tmigone Apr 16, 2025
88b0527
feat: add legacy allo proof encoding
tmigone Apr 21, 2025
25624e0
chore: roll back fn name change encode to generate
tmigone Apr 21, 2025
67140fa
chore: created unit test folder
Maikol Mar 31, 2025
a256776
chore: added subgraph-service integration tests
Maikol Apr 11, 2025
f29cd1a
chore: added integration tests for disputes
Maikol Apr 14, 2025
bbbe5df
chore: rebase and use new toolshed package
Maikol Apr 15, 2025
54a09af
fix: cleanup from rebase
Maikol Apr 16, 2025
121b2fd
fix: delete yarn.lock
Maikol Apr 16, 2025
8452fa9
fix: remove unused lines
Maikol Apr 16, 2025
0b6509a
fix: review comments
Maikol Apr 22, 2025
3e8c024
fix: use new generate allocation helper
Maikol Apr 22, 2025
f88d0c5
fix: missing generate allocation proof
Maikol Apr 22, 2025
06de0a0
chore: set delegation cut parameters and test tokens are added to del…
Maikol Apr 22, 2025
775289e
fix: lint
Maikol Apr 22, 2025
2ecdb21
Merge pull request #1140 from graphprotocol/mde/subgraph-service-inte…
tmigone Apr 22, 2025
a84e794
chore: lint and rename a function for consistency
tmigone Apr 22, 2025
78ae819
chore: remove duplicate poi function
tmigone Apr 22, 2025
17adaa7
chore: more renames for consistency
tmigone Apr 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 6 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ runs:
steps:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Enable corepack for modern yarn
- name: Enable Corepack
shell: bash
run: corepack enable
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
cache: 'pnpm'
- name: Set up pnpm via Corepack
shell: bash
run: corepack prepare [email protected] --activate
- name: Install dependencies
shell: bash
run: yarn --immutable
run: pnpm install --frozen-lockfile
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
- name: Set up environment
uses: ./.github/actions/setup
- name: Build
run: yarn build || yarn build
run: pnpm build || pnpm build
4 changes: 2 additions & 2 deletions .github/workflows/ci-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:
- name: Build
run: |
pushd packages/contracts
yarn build || yarn build
pnpm build || pnpm build
- name: Run tests
run: |
pushd packages/contracts
yarn test:coverage
pnpm test:coverage
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-data-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
- name: Build
run: |
pushd packages/data-edge
yarn build
pnpm build
- name: Run tests
run: yarn test
run: pnpm test
51 changes: 51 additions & 0 deletions .github/workflows/ci-hardhat-graph-protocol.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI - packages/toolshed

env:
CI: true

on:
push:
branches: "*"
paths:
- packages/toolshed/**
pull_request:
branches: "*"
paths:
- packages/toolshed/**
workflow_dispatch:

jobs:
test-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Build contracts
run: |
pushd packages/contracts
pnpm build
popd
- name: Build horizon
run: |
pushd packages/horizon
pnpm build
popd
- name: Build subgraph service
run: |
pushd packages/subgraph-service
pnpm build
popd
- name: Build toolshed
run: |
pushd packages/toolshed
pnpm build
popd
- name: Build hardhat-graph-protocol
run: |
pushd packages/hardhat-graph-protocol
pnpm build
popd
15 changes: 10 additions & 5 deletions .github/workflows/ci-horizon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,29 @@ jobs:
- name: Build contracts
run: |
pushd packages/contracts
yarn build
pnpm build
popd
- name: Build horizon
run: |
pushd packages/horizon
yarn build
pnpm build
popd
- name: Build subgraph service
run: |
pushd packages/subgraph-service
yarn build
pnpm build
popd
- name: Build toolshed
run: |
pushd packages/toolshed
pnpm build
popd
- name: Build hardhat-graph-protocol
run: |
pushd packages/hardhat-graph-protocol
yarn build
pnpm build
popd
- name: Run tests
run: |
pushd packages/horizon
yarn test
pnpm test
15 changes: 10 additions & 5 deletions .github/workflows/ci-subgraph-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,29 @@ jobs:
- name: Build contracts
run: |
pushd packages/contracts
yarn build
pnpm build
popd
- name: Build horizon
run: |
pushd packages/horizon
yarn build
pnpm build
popd
- name: Build subgraph service
run: |
pushd packages/subgraph-service
yarn build
pnpm build
popd
- name: Build toolshed
run: |
pushd packages/toolshed
pnpm build
popd
- name: Build hardhat-graph-protocol
run: |
pushd packages/hardhat-graph-protocol
yarn build
pnpm build
popd
- name: Run tests
run: |
pushd packages/subgraph-service
yarn test
pnpm test
4 changes: 2 additions & 2 deletions .github/workflows/ci-token-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
- name: Build
run: |
pushd packages/token-distribution
yarn build
pnpm build
- name: Run tests
run: |
pushd packages/token-distribution
yarn test
pnpm test
46 changes: 46 additions & 0 deletions .github/workflows/ci-toolshed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI - packages/toolshed

env:
CI: true

on:
push:
branches: "*"
paths:
- packages/toolshed/**
pull_request:
branches: "*"
paths:
- packages/toolshed/**
workflow_dispatch:

jobs:
test-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Build contracts
run: |
pushd packages/contracts
pnpm build
popd
- name: Build horizon
run: |
pushd packages/horizon
pnpm build
popd
- name: Build subgraph service
run: |
pushd packages/subgraph-service
pnpm build
popd
- name: Build toolshed
run: |
pushd packages/toolshed
pnpm build
popd
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
required: true
type: choice
options:
- contracts
- sdk
- contracts
- sdk
tag:
description: 'Tag to publish'
required: true
Expand All @@ -27,10 +27,10 @@ jobs:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Set npm token for publishing
run: pnpm config set //registry.npmjs.org/:_authToken ${{ secrets.GRAPHPROTOCOL_NPM_TOKEN }}
- name: Publish 🚀
shell: bash
run: |
pushd packages/${{ inputs.package }}
yarn npm publish --tag ${{ inputs.tag }} --access public
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.GRAPHPROTOCOL_NPM_TOKEN }}
pnpm publish --tag ${{ inputs.tag }} --access public --no-git-checks
6 changes: 3 additions & 3 deletions .github/workflows/verifydeployed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Build
run: |
pushd packages/contracts
yarn build || yarn build
pnpm build || pnpm build

- name: Save build artifacts
uses: actions/upload-artifact@v3
Expand All @@ -55,14 +55,14 @@ jobs:
- name: Build
run: |
pushd packages/contracts
yarn build || yarn build
pnpm build || pnpm build
- name: Get build artifacts
uses: actions/download-artifact@v3
with:
name: contract-artifacts

- name: Verify contracts on Defender
run: cd packages/contracts && yarn hardhat --network ${{ inputs.network }} verify-defender ${{ inputs.contracts }}
run: cd packages/contracts && pnpm hardhat --network ${{ inputs.network }} verify-defender ${{ inputs.contracts }}
env:
DEFENDER_API_KEY: "${{ secrets.DEFENDER_API_KEY }}"
DEFENDER_API_SECRET: "${{ secrets.DEFENDER_API_SECRET }}"
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Logs
yarn-debug.log*
yarn-error.log*
node.log

# Dependency directories
node_modules/
Expand Down Expand Up @@ -45,7 +46,9 @@ localNetwork.json
arbitrum-addresses-local.json
tx-*.log
addresses-fork.json

addresses-hardhat.json
addresses-localhost.json
addresses-local-network.json
# Keys
.keystore

Expand Down
2 changes: 0 additions & 2 deletions .yarnrc.yml

This file was deleted.

20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

## Packages

This repository is a Yarn workspaces monorepo containing the following packages:
This repository is a pnpm workspaces monorepo containing the following packages:

| Package | Latest version | Description |
| --- | --- | --- |
Expand All @@ -46,26 +46,22 @@ This repository is a Yarn workspaces monorepo containing the following packages:
## Development

### Setup
To set up this project you'll need [git](https://git-scm.com) and [yarn](https://yarnpkg.com/) installed. Note that Yarn v4 is required to install the dependencies and build the project.
To set up this project you'll need [git](https://git-scm.com) and [pnpm](https://pnpm.io/) installed.

From your command line:

```bash
# Enable Yarn v4
corepack enable
yarn set version stable

# Clone this repository
$ git clone https://github.com/graphprotocol/contracts

# Go into the repository
$ cd contracts

# Install dependencies
$ yarn
$ pnpm install

# Build projects
$ yarn build
$ pnpm build
```

### Versioning and publishing packages
Expand All @@ -77,7 +73,7 @@ We use [changesets](https://github.com/changesets/changesets) to manage package
A changeset is a file that describes the changes that have been made to the packages in the repository. To create a changeset, run the following command from the root of the repository:

```bash
$ yarn changeset
$ pnpm changeset
```

Changeset files are stored in the `.changeset` directory until they are packaged into a release. You can commit these files and even merge them into your main branch without publishing a release.
Expand All @@ -87,7 +83,7 @@ Changeset files are stored in the `.changeset` directory until they are packaged
When you are ready to create a new package release, run the following command to package all changesets, this will also bump package versions and dependencies:

```bash
$ yarn changeset version
$ pnpm changeset version
```

### Step 3: Tagging the release
Expand All @@ -97,7 +93,7 @@ __Note__: this step is meant to be run on the main branch.
After creating a package release, you will need to tag the release commit with the version number. To do this, run the following command from the root of the repository:

```bash
$ yarn changeset tag
$ pnpm changeset tag
$ git push --follow-tags
```

Expand All @@ -109,7 +105,7 @@ Packages are published and distributed via NPM. To publish a package, run the fo

```bash
# Publish the package
$ yarn npm publish --access public --tag <tag>
$ pnpm npm publish --access public --tag <tag>
```

Alternatively, there is a GitHub action that can be manually triggered to publish a package.
Expand Down
Loading