Skip to content

❄️ Graph Horizon and Subgraph Service ❄️ #944

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 652 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 124 commits
Commits
Show all changes
652 commits
Select commit Hold shift + click to select a range
ea7fb75
Merge pull request #1091 from graphprotocol/mde/merge-horizon-staking…
tmigone Jan 27, 2025
83a3ec6
Merge branch 'horizon' into mde/horizon-migrate-scripts
tmigone Jan 27, 2025
17692b7
Merge pull request #1084 from graphprotocol/mde/horizon-migrate-scripts
tmigone Jan 27, 2025
353902e
Merge branch 'horizon' into tmigone/ignition-v0.15.9
tmigone Jan 27, 2025
519c5d8
Merge pull request #1087 from graphprotocol/tmigone/ignition-v0.15.9
tmigone Jan 27, 2025
835519f
Merge branch 'horizon' into tmigone/ignition-refactor
tmigone Jan 27, 2025
c3c94ca
Merge pull request #1093 from graphprotocol/tmigone/ignition-refactor
tmigone Jan 27, 2025
e8e2e9f
feat: create a base hardhat config
tmigone Jan 27, 2025
e7b02ae
feat: ensure ignition deploy script handles contract ownership
tmigone Jan 27, 2025
07aa0a2
chore: move ownership calls for payments contract to their modules
tmigone Jan 28, 2025
ea21739
fix: transfer payments contracts ownership to governor in migrate script
tmigone Jan 28, 2025
4799228
Merge pull request #1094 from graphprotocol/tmigone/tooling-improvements
tmigone Jan 28, 2025
5711907
feat: breakout ignition migration script by runner
tmigone Jan 28, 2025
a12bb20
fix: ensure governor account is not loaded in any non-governor module
tmigone Jan 28, 2025
7db331d
chore: reduce contract sizes to fit 24kb HorizonStaking and SubgraphS…
Maikol Jan 28, 2025
8c29d86
fix: further decouple governor modules from deployer modules
tmigone Jan 28, 2025
768bc83
chore: add contract address to signer proof message
Maikol Jan 28, 2025
fbdb3f1
feat: create migration scripts for subgraph service
tmigone Jan 28, 2025
5e58c8e
chore: changes to horizon events
Maikol Jan 28, 2025
7e10b2e
fix: add Horizon prefix to stake events
Maikol Jan 29, 2025
e2ea28c
fix: Horizon migration script fixes (#1100)
Maikol Feb 6, 2025
c75a0a4
Merge pull request #1095 from graphprotocol/tmigone/horizon-deploymen…
tmigone Feb 6, 2025
ccfaedc
fix: make legacy allos internal, bump optimizer runs to 100
tmigone Feb 6, 2025
859debf
fix: set optimizer runs on foundry config
tmigone Feb 6, 2025
11a993b
Merge pull request #1096 from graphprotocol/mde/reduce-contract-sizes
tmigone Feb 6, 2025
a4cb2d4
Merge pull request #1099 from graphprotocol/mde/horizon-event-changes
tmigone Feb 6, 2025
dfc6c97
Merge pull request #1098 from graphprotocol/mde/add-contract-address-…
tmigone Feb 6, 2025
6d64b7e
fix: rework base config file
tmigone Feb 6, 2025
88498d1
test: fix test using previously public variable
tmigone Feb 6, 2025
2872fd3
chore: fix linting issues
tmigone Feb 7, 2025
83dae89
ci: build all required packages for subgraph service ci
tmigone Feb 7, 2025
6e8335d
Merge pull request #1101 from graphprotocol/tmigone/horizon-fix-ci
tmigone Feb 7, 2025
33557eb
Merge branch 'main' into horizon
tmigone Feb 7, 2025
8f922a1
chore: remove e2e scenarios tests from contracts package
tmigone Feb 7, 2025
09a6fa8
chore: add paymentId to TAPCollector tokens tracking
Maikol Jan 28, 2025
fe025c3
fix: rename to collectorId and use collectorId on subgraph service
Maikol Feb 7, 2025
2af2e68
chore: rename collectorId to collectionId
tmigone Feb 10, 2025
3dc3140
Merge pull request #1097 from graphprotocol/mde/add-unique-id-to-coll…
tmigone Feb 10, 2025
6d1afc0
feat: extract cancel thaw escrow to its own function
tmigone Dec 11, 2024
74645a2
feat: add collector address to the RAV
tmigone Dec 11, 2024
744bc85
test: improve coverage for GraphPayments
tmigone Dec 13, 2024
eaec959
chore: some minor improvements to GraphPayments and tests
tmigone Dec 13, 2024
9b79fdb
fix: couple minor improvments to PaymentsEscrow and some new tests
tmigone Dec 13, 2024
90978a9
chore: revert adding collector address to RAV
tmigone Feb 6, 2025
20396ba
chore: revert adding collector address to RAV in SubgraphService
tmigone Feb 6, 2025
51976ec
Merge pull request #1078 from graphprotocol/tmigone/post-trust-change…
tmigone Feb 10, 2025
01db6e5
feat: dont issue rewards to allos less than one epoch old
tmigone Feb 10, 2025
7cd08cb
chore: ensure contract size is below 24kB
tmigone Feb 10, 2025
f6923b9
test: fix rewards manager tests
tmigone Feb 10, 2025
d0060b1
Merge pull request #1103 from graphprotocol/tmigone/allo-min-duration
tmigone Feb 11, 2025
dd2e735
chore: rename TAPCollector to GraphTallyCollector
tmigone Feb 11, 2025
94d541a
chore: rename TAPCollector in hardhat-graph-protocol package
tmigone Feb 11, 2025
010277e
Merge pull request #1106 from graphprotocol/tmigone/graph-tally
tmigone Feb 11, 2025
57c5acc
fix: ignition modules to output correct name of contracts
tmigone Feb 11, 2025
c5ca097
fix(horizon): add explicit check of provision existance before accept…
tmigone Feb 12, 2025
375c78f
chore: add request type to thaw request events
tmigone Feb 12, 2025
25376af
chore: modify build script to allow building only horizon packages
tmigone Feb 12, 2025
e9b72a7
test: add test for delegation on a non existing provision
tmigone Feb 13, 2025
0e9f9d3
Merge pull request #1107 from graphprotocol/tmigone/gre-alias
tmigone Feb 13, 2025
1b55b04
fix: Add 'test' to lint:sol (prettier)
matiasedgeandnode Feb 17, 2025
870a073
fix: SubgraphService run lint:sol
matiasedgeandnode Feb 17, 2025
3cccb4b
fix: Horizon add 'test' to lint:sol (prettier)
matiasedgeandnode Feb 17, 2025
3ad5707
fix: Horizon run lint:sol
matiasedgeandnode Feb 17, 2025
0df54e3
Merge pull request #1112 from graphprotocol/ma/horizon-fix-prettier
tmigone Feb 18, 2025
504d85b
feat: refactor deployment tooling, use task instead of script
tmigone Feb 14, 2025
1b9914d
feat: refactor deplyoment tooling for subgraph service
tmigone Feb 14, 2025
f2b120a
chore: update readme
tmigone Feb 14, 2025
6db8d05
fix: couple fixes for migration scripts
tmigone Feb 17, 2025
4260ce6
chore: update README.md
tmigone Feb 17, 2025
f978dbb
chore: remove not used deps
tmigone Feb 17, 2025
176d5b1
fix: dont import tasks on initial build run
tmigone Feb 18, 2025
fac2515
fix: remove dead export
tmigone Feb 18, 2025
9647fa8
chore: skip building token-distribution if api key not set
tmigone Feb 18, 2025
2e57fe7
fix: exit code 0 for token dist script
tmigone Feb 18, 2025
9287fa0
chore: add localnostNoSecureAccounts network to base hardhat config
tmigone Feb 18, 2025
44dd7ea
chore: update hardhat-secure-accounts to latest
tmigone Feb 18, 2025
333f98e
feat: allow overriding localhost rpc
tmigone Feb 18, 2025
e5aa136
chore: make localhost chain id a configurable variable
tmigone Feb 18, 2025
cbeb2e5
fix: ignition script bug
tmigone Feb 18, 2025
7bceb49
Merge pull request #1111 from graphprotocol/tmigone/horizon-deploymen…
tmigone Feb 18, 2025
5e09533
Merge pull request #1108 from graphprotocol/tmigone/horizon-subgraph-…
tmigone Feb 18, 2025
1f065e4
chore: refactor config files naming
tmigone Feb 19, 2025
1869d06
feat: allow overriding localhost accounts
tmigone Feb 19, 2025
9dc80f9
refactor: add Authorizable
matiasedgeandnode Feb 13, 2025
314c6da
Merge pull request #1110 from graphprotocol/ma/horizon-authorizable
matiasedgeandnode Feb 21, 2025
292dc69
fix: only allow subgraph service as verifier during transition period
tmigone Feb 21, 2025
662bf93
chore: fix comments
tmigone Feb 21, 2025
6460b84
chore: invert require checks for gas efficiency
tmigone Feb 21, 2025
c90a4ec
Merge pull request #1114 from graphprotocol/tmigone/fix-escape-hatch
tmigone Feb 21, 2025
cc74032
chore: fix test config to support forge v1
tmigone Feb 21, 2025
7df009f
Merge pull request #1115 from graphprotocol/tmigone/fix-escape-hatch
tmigone Feb 21, 2025
0b7730a
fix: a few fixes
tmigone Feb 24, 2025
26d5caa
Merge pull request #1118 from graphprotocol/tmigone/horizon-last-minu…
tmigone Feb 25, 2025
7187543
chore: change some events for easier indexing
tmigone Feb 25, 2025
830f7e8
fix: ensure subgraph service contracts are owned by governor
tmigone Feb 25, 2025
7bac074
Merge pull request #1119 from graphprotocol/tmigone/more-subgraph-cha…
tmigone Feb 25, 2025
401657e
chore: upload audit reports
tmigone Feb 27, 2025
5a4a550
fix: avoid boolean literals as conditionals
tmigone Feb 27, 2025
28c5bda
chore: natspec and other documentation changes
tmigone Feb 27, 2025
6435f64
chore: natspec documentation changes on subgraph service contracts
tmigone Feb 27, 2025
adf520e
chore: dont run natspec smells on lint
tmigone Feb 27, 2025
56e044a
chore: use calldata instead of memory
tmigone Feb 27, 2025
2e8d285
chore: remove duplicated imports
tmigone Feb 27, 2025
fc83f8f
chore: no todo comments
tmigone Feb 27, 2025
72066de
chore: dont use named returns
tmigone Feb 28, 2025
4f60b0c
chore: add security contact to the contracts
tmigone Feb 28, 2025
77ab0c7
chore: better getter name in dispute manager
tmigone Feb 28, 2025
5557c5e
chore: remove named returns
tmigone Feb 28, 2025
99f215c
chore: use custom errors
tmigone Feb 28, 2025
9e8004e
chore: clarify casting safety
tmigone Feb 28, 2025
36efdac
chore: remove unused modifier
tmigone Feb 28, 2025
da95d8b
Merge pull request #1123 from graphprotocol/tmigone/horizon-pre-audit…
tmigone Mar 3, 2025
2ed8546
fix: add collection id to rav typehash (OZ CR-01)
tmigone Mar 7, 2025
698259d
fix: prevent indexer lockout in subgraph service (OZ CR-02)
tmigone Mar 7, 2025
9d92442
fix: limit allowed thawing period range in the subgraph service (OZ M…
tmigone Mar 21, 2025
c4c3675
fix: save last parameter staged timestamp on provisions (OZ M-01)
tmigone Mar 21, 2025
2918ebe
chore: document importance of maxThawingPeriod variable
tmigone Apr 23, 2025
a43232a
chore: clarify thawing period overflow case
tmigone May 2, 2025
c58197a
fix: ensure invalid thaw requests are ignored by getThawedTokens (OZ …
tmigone Mar 21, 2025
5e27d62
fix: document possible temporary thaw requests blockage when thawing …
tmigone Mar 21, 2025
0a7719f
fix: prevent provision validity grief attack (OZ M-03)
tmigone Mar 25, 2025
c807a94
fix: remove redundant code (OZ N-01)
tmigone Mar 25, 2025
40c9a28
fix: only check conditions for param that is changing when changing p…
tmigone Mar 26, 2025
37faf78
fix: use solidity division instead of fixed point scaling (OZ L-04)
tmigone Mar 27, 2025
5adebe8
fix: rename misleading custom error name (OZ CR-03)
tmigone Mar 7, 2025
5744c86
fix: add extra parameters to contract events (OZ CR-04)
juanmardefago Feb 26, 2025
c8a7944
chore: typo
tmigone May 2, 2025
fc25c39
fix: prevent legacy slash from breaking provision accounting (OZ H-01)
tmigone Apr 23, 2025
927af0d
chore: rename function for clarity (OZ H-01)
tmigone Apr 30, 2025
8e07001
fix: ensure legacy slash unlocks correct amount
tmigone May 16, 2025
8c941cd
fix: default value for delegation ratio (OZ L-06)
tmigone Apr 24, 2025
6216621
fix: use encodeCall instead of unsafe alternatives (OZ L-10)
tmigone Apr 24, 2025
3761755
fix: ensure getRewards and takeRewards return 0 for closed allos (OZ …
tmigone Apr 29, 2025
40706ca
chore: document reentrancy risk vector
tmigone May 2, 2025
a01004e
fix: allow partial RAV collection in subgraph service (OZ L-13)
tmigone Apr 29, 2025
c7656f8
fix: ensure dispute cancellation is not affected by dispute period ch…
tmigone Apr 29, 2025
fec7173
fix: add cancellableAt to indexing disputes as well
tmigone May 2, 2025
3453c00
fix: remove unnecessary restriction (OZ N-02)
tmigone Apr 29, 2025
1012087
chore: remove unused code (OZ N-03)
tmigone Apr 29, 2025
14948be
chore: missing docstrings (OZ N-08)
tmigone Apr 29, 2025
c183fcd
chore: rename shadowed variables (OZ N-09)
tmigone Apr 29, 2025
f288348
chore: update incorrect comments (OZ N-10)
tmigone Apr 29, 2025
de935f0
chore: rename misleading vars (OZ N-11)
tmigone Apr 29, 2025
6fb20d7
chore: gas optimizations (OZ N-12)
tmigone Apr 29, 2025
46010c8
fix: prevent slashing DoS (OZ M-02)
tmigone Apr 30, 2025
7d517bf
fix: ensure delegations are always slashable (OZ H-02)
tmigone Apr 30, 2025
9ce4d11
chore: tests
tmigone May 2, 2025
792302a
chore: fix some copy in dispute manager comments
tmigone Mar 28, 2025
4a3cf2c
feat: require poi metadata when collecting rewards
tmigone Mar 28, 2025
c0e83cf
fix: allow payments to be routed to a provided address
tmigone May 8, 2025
b5fc680
fix: update contracts to allow compilation from horizon package
tmigone May 20, 2025
5787df8
fix: multiple tooling changes
tmigone May 20, 2025
d5bc312
chore: fix pnpm lock file
tmigone May 20, 2025
7d70566
Merge pull request #1116 from graphprotocol/tmigone/horizon-post-oz-a…
tmigone May 20, 2025
dadb233
chore: add latest audit
tmigone May 20, 2025
ad600bb
Merge pull request #1122 from graphprotocol/tmigone/horizon-audit-rep…
tmigone May 20, 2025
1edfe12
ci: update node version to 22
tmigone May 20, 2025
ffa75d1
fix: change hardhat toolshed to export ts
tmigone May 20, 2025
b8a0c14
feat: make transaction logging optional
tmigone May 21, 2025
7715ce2
fix: ensure transaction logging wrapping is disabled with boolean flag
tmigone May 22, 2025
d52644a
fix: ensure toolshed core components dont import hardhat runtime
tmigone May 22, 2025
eeee812
fix: auto balance set in local network
tmigone May 22, 2025
bbdef06
chore: bump version
tmigone May 22, 2025
ea14f20
fix: target undefined error
tmigone May 22, 2025
0247adb
chore: linting and other minor issues
tmigone May 23, 2025
ca4daad
chore: add proper ignition config files for local network
tmigone May 23, 2025
4368221
fix: protocol activity script small fixes
tmigone May 23, 2025
18b34c0
chore: improve activity script
tmigone May 23, 2025
e1663dd
feat: add GNS to deployments
tmigone May 27, 2025
9d6d356
chore: add encode stop service data function
Maikol May 30, 2025
fa4c2f5
chore: bump patch version
Maikol May 30, 2025
a7c9646
chore: publish new toolshed version
tmigone Jun 2, 2025
8f21cdb
fix: type issue with GNS on toolshed
tmigone Jun 2, 2025
f8809ac
ci: fix lockfile
tmigone Jun 2, 2025
3adce5a
fix: proper fix for type issues with GNS and SubgraphNFT
tmigone Jun 2, 2025
d07e8d9
ci: fix package lock
tmigone Jun 2, 2025
7870182
lint: fix linting script
matiasedgeandnode Jun 3, 2025
609bc3d
Merge pull request #1180 from graphprotocol/ma/horizon-lint
matiasedgeandnode Jun 3, 2025
79ed5a1
Add dev container config to Horizon (#1181)
RembrandtK Jun 4, 2025
fa04596
fix: prevent GraphTallyCollector from accepting non QueryFee payments
tmigone Jun 5, 2025
97dceb1
fix: allow creating multiple disputes for same allo/poi tuple
tmigone Jun 5, 2025
d89440a
fix: consider delegation when deciding if an indexer is disputable
tmigone Jun 5, 2025
a7d22d9
Merging from main for Horizon upgrades in preparation for contract PR…
RembrandtK Jun 10, 2025
2eb49a0
chore: update toolshed to use latest lint config
tmigone Jun 11, 2025
c7c8891
chore: update hardhat-graph-protocol to latest linting config
tmigone Jun 11, 2025
fd56cd7
chore: update horizon to latest linting config
tmigone Jun 11, 2025
79f996c
fix: skip token-distribution build if studio api key not set
Maikol Jun 11, 2025
c0ccb8e
chore: use top level solhint config for horizon and add graph rules
tmigone Jun 11, 2025
ab2f60e
Merge branch 'horizon' of github.com:graphprotocol/contracts into hor…
tmigone Jun 11, 2025
767ba2c
chore: update horizon natspec smells config
tmigone Jun 11, 2025
f129d36
chore: update subgraph service to use latest lint config
tmigone Jun 11, 2025
903e83f
chore: some lint fixes
tmigone Jun 11, 2025
8596344
chore: remove unused yarn file
tmigone Jun 11, 2025
c3d96e4
chore: do not use forge dependency system
tmigone Jun 11, 2025
be8d5a1
chore: move all interfaces to dedicated package
tmigone Jun 11, 2025
942c1aa
chore: lint
tmigone Jun 11, 2025
f86ffbb
chore: build interface types
tmigone Jun 11, 2025
63b8c27
fix: import in contracts package
tmigone Jun 11, 2025
32ef00c
chore: move sdk to own repo, update versions
tmigone Jun 12, 2025
f8bb3a5
chore: update toolshed to use interfaces package
tmigone Jun 12, 2025
7f21b0b
chore: break circular dep in toolshed, fix contracts ethers versions
tmigone Jun 12, 2025
be1acc5
chore: lint
tmigone Jun 12, 2025
8aef58d
chore: fully implement interfaces for toolshed
tmigone Jun 13, 2025
0112d1b
chore: import hre statically in horizon and subgraph service
tmigone Jun 13, 2025
9c67f29
chore: remove unused files
tmigone Jun 13, 2025
495e576
chore: lint packages
tmigone Jun 13, 2025
71b90c4
fix: remove dead import
tmigone Jun 13, 2025
0f7080d
feat: create address book if doesnt exist when running deploy task
tmigone Jun 13, 2025
2bfd7e0
fix: add some missing interface details
tmigone Jun 13, 2025
62eb5aa
fix: couple fixes to make integration tests pass
tmigone Jun 13, 2025
5f707a8
chore: update subgraph service to work wiht latest interfaces
tmigone Jun 13, 2025
2c94da4
chore: final changes to use interfaces package
tmigone Jun 17, 2025
5ef5fe9
chore: lint and replace some imports
tmigone Jun 17, 2025
e75ae57
chore: bump package versions and publish
tmigone Jun 18, 2025
039a32e
chore: make interfaces package public
tmigone Jun 18, 2025
f6c2e1c
chore: bump package versions
tmigone Jun 18, 2025
1c7e4cf
fix: ensure close allo behavior consistent with legacy
tmigone Jun 17, 2025
31edeed
fix: ensure dist is published for interfaces package
tmigone Jun 18, 2025
4f23eea
chore: add missing interfaces and fix npm publishing issues
tmigone Jun 18, 2025
fbe38f9
fix: add ICuration to L2Curation interface
tmigone Jun 18, 2025
ed51926
fix: add more stuff missing from interfaces
tmigone Jun 18, 2025
b4fe809
chore: ensure workspace dependencies are not pinned to specific versions
tmigone Jun 19, 2025
a8469af
chore: better gitignore
tmigone Jun 19, 2025
8b7f14c
chore: fix pnpm lock file
tmigone Jun 19, 2025
291c6ff
Revert "fix: prevent GraphTallyCollector from accepting non QueryFee …
tmigone Jul 8, 2025
4d4cffa
chore: add latest audit report
tmigone Jul 8, 2025
77007c0
Merge branch 'horizon' into tmigone/horizon-fixes-june
tmigone Jul 8, 2025
28d810e
Merge branch 'horizon' into tmigone/horizon-interfaces
tmigone Jul 8, 2025
d14870e
test: fix package tests
tmigone Jul 8, 2025
bcb63c1
feat: add wagmi type generation to interface package
tmigone Jul 10, 2025
72162d1
chore: bump package version
tmigone Jul 10, 2025
59154fb
chore: support ethersv5 types for interfaces
tmigone Jul 10, 2025
b762037
feat: add ethers v5 type generation to interfaces package
tmigone Jul 10, 2025
a32f413
ci: remove unnecessary workflows
tmigone Jul 10, 2025
9d85394
chore: add script to compare bytecode
tmigone Jul 14, 2025
523d3b1
chore: use bytecode instead of deployedBytecode in bytecode compare s…
tmigone Jul 14, 2025
8812eb1
Merge pull request #1187 from graphprotocol/tmigone/horizon-interfaces
tmigone Jul 15, 2025
51c2c1d
fix: interfaces architecture and add missing GNS functions
Maikol Jul 22, 2025
bd38c83
feat: add vesting interfaces for Horizon protocol
Maikol Jul 23, 2025
59e87cf
chore: release [email protected] and [email protected]
Maikol Jul 23, 2025
d28477f
fix: export conditions order in interfaces package for Next.js compat…
Maikol Jul 24, 2025
4689fec
chore: extract horizon and subgraph-service addresses to a new addres…
Maikol Jul 29, 2025
ef8b05d
Merge pull request #1211 from graphprotocol/mde/address-book-package
Maikol Jul 30, 2025
0834478
chore: release [email protected]
Maikol Jul 30, 2025
db7fd6d
chore: add CHANGELOG for [email protected]
Maikol Jul 30, 2025
f22e83a
fix: add missing nextAccountSeqID and multicall to IL2GNSToolshed int…
Maikol Aug 4, 2025
f3107aa
chore: release [email protected]
Maikol Aug 4, 2025
d939135
fix: ensure published toolshed does not use workspace nomenclature
tmigone Aug 5, 2025
eaff905
fix(toolshed): address book path resolution
tmigone Aug 5, 2025
3ac3614
chore: bump package version
tmigone Aug 5, 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: 2 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ runs:
using: composite

steps:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Enable corepack for modern yarn
shell: bash
run: corepack enable
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
2 changes: 2 additions & 0 deletions .github/workflows/ci-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Run tests
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/ci-horizon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI - packages/horizon

env:
CI: true

on:
push:
branches: "*"
paths:
- packages/horizon/**
pull_request:
branches: "*"
paths:
- packages/horizon/**
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: Run tests
run: |
pushd packages/horizon
yarn test
30 changes: 30 additions & 0 deletions .github/workflows/ci-subgraph-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI - packages/subgraph-service

env:
CI: true

on:
push:
branches: "*"
paths:
- packages/subgraph-service/**
pull_request:
branches: "*"
paths:
- packages/subgraph-service/**
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: Run tests
run: |
pushd packages/subgraph-service
yarn test
6 changes: 5 additions & 1 deletion .github/workflows/ci-token-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Run tests
run: yarn test
run: |
pushd packages/token-distribution
yarn test
2 changes: 2 additions & 0 deletions .github/workflows/e2e-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Run e2e tests
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Publish 🚀
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/verifydeployed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup

Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ cached/
# Build artifacts
dist/
build/
typechain/
typechain-types/
deployments/hardhat/

# Ignore solc bin output
Expand All @@ -45,8 +47,10 @@ addresses-fork.json
# Keys
.keystore

# Forge artifacts
cache_forge
# Graph client
.graphclient

tx-builder-*.json
!tx-builder-template.json
!tx-builder-template.json
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "packages/subgraph-service/lib/forge-std"]
path = packages/subgraph-service/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "packages/horizon/lib/forge-std"]
path = packages/horizon/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "packages/horizon/lib/openzeppelin-foundry-upgrades"]
path = packages/horizon/lib/openzeppelin-foundry-upgrades
url = https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades
12 changes: 11 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ pushd packages/contracts
npx --no-install lint-staged
popd

# subgraph service
pushd packages/subgraph-service
npx --no-install lint-staged
popd

# data-edge
pushd packages/data-edge
npx --no-install lint-staged
popd
popd

# graph horizon
pushd packages/horizon
npx --no-install lint-staged
popd
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ This repository is a Yarn workspaces monorepo containing the following packages:
| --- | --- | --- |
| [contracts](./packages/contracts) | [![npm version](https://badge.fury.io/js/@graphprotocol%2Fcontracts.svg)](https://badge.fury.io/js/@graphprotocol%2Fcontracts) | Contracts enabling the open and permissionless decentralized network known as The Graph protocol. |
| [eslint-graph-config](./packages/eslint-graph-config) | [![npm version]()]() | Shared linting and formatting rules for TypeScript projects. |
| [token-distribution](./packages/token-distribution) | - | Contracts managing token locks for network participants |
| [horizon](./packages/horizon) | [![npm version]()]() | Contracts for Graph Horizon, the next iteration of The Graph protocol. |
| [sdk](./packages/sdk) | [![npm version](https://badge.fury.io/js/@graphprotocol%2Fsdk.svg)](https://badge.fury.io/js/@graphprotocol%2Fsdk) | TypeScript based SDK to interact with the protocol contracts |
| [solhint-graph-config](./packages/eslint-graph-config) | [![npm version]()]() | Shared linting and formatting rules for Solidity projects. |
| [solhint-graph-config](./packages/solhint-graph-config) | [![npm version]()]() | Shared linting and formatting rules for Solidity projects. |
| [solhint-plugin-graph](./packages/solhint-plugin-graph) | [![npm version]()]() | Plugin for Solhint with specific Graph linting rules. |
| [subgraph-service](./packages/subgraph-service) | [![npm version]()]() | Contracts for the Subgraph data service in Graph Horizon. |
| [token-distribution](./packages/token-distribution) | - | Contracts managing token locks for network participants |


## Development
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
"packages/contracts",
"packages/data-edge",
"packages/eslint-graph-config",
"packages/horizon",
"packages/sdk",
"packages/solhint-graph-config",
"packages/solhint-plugin-graph",
"packages/subgraph-service",
"packages/token-distribution"
],
"scripts": {
Expand Down
14 changes: 0 additions & 14 deletions packages/contracts/.solhint.json

This file was deleted.

8 changes: 0 additions & 8 deletions packages/contracts/.solhintignore

This file was deleted.

6 changes: 6 additions & 0 deletions packages/contracts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @graphprotocol/contracts

## 7.0.0

### Major Changes

- 9686ce1: Add Horizon staking interface

## 6.2.1

### Patch Changes
Expand Down
5 changes: 5 additions & 0 deletions packages/contracts/contracts/arbitrum/Arbitrum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Arbitrum contracts

These contracts have been copied from the [Arbitrum repo](https://github.com/OffchainLabs/arbitrum).

They are also available as part of the npm packages [arb-bridge-eth](https://www.npmjs.com/package/arb-bridge-eth) and [arb-bridge-peripherals](https://www.npmjs.com/package/arb-bridge-peripherals). The reason for copying them rather than installing those packages is the contracts only support Solidity `^0.6.11`, so we had to change the version to `^0.7.6` for it to be compatible with our other contracts.
24 changes: 12 additions & 12 deletions packages/contracts/contracts/arbitrum/ITokenGateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
*/

pragma solidity ^0.7.6;
pragma solidity ^0.7.6 || 0.8.26;

interface ITokenGateway {
/// @notice event deprecated in favor of DepositInitiated and WithdrawalInitiated
Expand All @@ -47,20 +47,20 @@ interface ITokenGateway {
// );

function outboundTransfer(
address _token,
address _to,
uint256 _amount,
uint256 _maxGas,
uint256 _gasPriceBid,
bytes calldata _data
address oken,
address t,
uint256 amunt,
uint256 maxas,
uint256 gasPiceBid,
bytes calldata data
) external payable returns (bytes memory);

function finalizeInboundTransfer(
address _token,
address _from,
address _to,
uint256 _amount,
bytes calldata _data
address token,
address from,
address to,
uint256 amount,
bytes calldata data
) external payable;

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/contracts/curation/ICuration.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later

pragma solidity ^0.7.6;
pragma solidity ^0.7.6 || 0.8.26;

/**
* @title Curation Interface
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/contracts/epochs/IEpochManager.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later

pragma solidity ^0.7.6;
pragma solidity ^0.7.6 || 0.8.26;

interface IEpochManager {
// -- Configuration --
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/contracts/gateway/ICallhookReceiver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* be allowlisted by the governor, but also implement this interface that contains
* the function that will actually be called by the L2GraphTokenGateway.
*/
pragma solidity ^0.7.6;
pragma solidity ^0.7.6 || 0.8.26;

interface ICallhookReceiver {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/contracts/governance/Controller.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later

pragma solidity ^0.7.6;
pragma solidity ^0.7.6 || 0.8.26;

import { IController } from "./IController.sol";
import { IManaged } from "./IManaged.sol";
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/contracts/governance/Governed.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later

pragma solidity ^0.7.6;
pragma solidity ^0.7.6 || 0.8.26;

/**
* @title Graph Governance contract
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/contracts/governance/IController.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later

pragma solidity >=0.6.12 <0.8.0;
pragma solidity ^0.7.6 || 0.8.26;

interface IController {
function getGovernor() external view returns (address);
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/contracts/governance/IManaged.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later

pragma solidity ^0.7.6;
pragma solidity ^0.7.6 || 0.8.26;

import { IController } from "./IController.sol";

Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/contracts/governance/Pausable.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later

pragma solidity ^0.7.6;
pragma solidity ^0.7.6 || 0.8.26;

abstract contract Pausable {
/**
Expand Down
20 changes: 2 additions & 18 deletions packages/contracts/contracts/l2/staking/IL2Staking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pragma abicoder v2;

import { IStaking } from "../../staking/IStaking.sol";
import { IL2StakingBase } from "./IL2StakingBase.sol";
import { IL2StakingTypes } from "./IL2StakingTypes.sol";

/**
* @title Interface for the L2 Staking contract
Expand All @@ -15,21 +16,4 @@ import { IL2StakingBase } from "./IL2StakingBase.sol";
* the custom setup of the Staking contract where part of the functionality is implemented
* in a separate contract (StakingExtension) to which calls are delegated through the fallback function.
*/
interface IL2Staking is IStaking, IL2StakingBase {
/// @dev Message codes for the L1 -> L2 bridge callhook
enum L1MessageCodes {
RECEIVE_INDEXER_STAKE_CODE,
RECEIVE_DELEGATION_CODE
}

/// @dev Encoded message struct when receiving indexer stake through the bridge
struct ReceiveIndexerStakeData {
address indexer;
}

/// @dev Encoded message struct when receiving delegation through the bridge
struct ReceiveDelegationData {
address indexer;
address delegator;
}
}
interface IL2Staking is IStaking, IL2StakingBase, IL2StakingTypes {}
2 changes: 1 addition & 1 deletion packages/contracts/contracts/l2/staking/IL2StakingBase.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later

pragma solidity ^0.7.6;
pragma solidity ^0.7.6 || 0.8.26;

import { ICallhookReceiver } from "../../gateway/ICallhookReceiver.sol";

Expand Down
Loading