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 561 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
561 commits
Select commit Hold shift + click to select a range
a99e216
fix: couple fixes and tweaks
tmigone Nov 22, 2024
6f67600
chore: bump hardhat ignition to 0.15.8
tmigone Nov 22, 2024
b234104
chore: remove deploy files
tmigone Nov 22, 2024
a475c4a
chore: move files and fix test
tmigone Nov 22, 2024
cdf3fb4
feat: add subgraph service to gre
tmigone Nov 22, 2024
4fa4f57
chore: hardcode ignition config
tmigone Nov 25, 2024
e5dc797
fix: update all ignition packages
tmigone Nov 26, 2024
1ce1a17
ci: fix circular dependency in build stage
tmigone Nov 26, 2024
5026fbb
fix: build scripts
tmigone Nov 26, 2024
8f3e0f1
fix: build steps
tmigone Nov 26, 2024
c8efe89
fix: prevent payers from being able to bypass escrow mechanism (TRST-…
tmigone Nov 26, 2024
ce749be
fix: separate delegation and provision thaw request lists (TRST-H02)
Maikol Nov 28, 2024
9dc58d0
fix: disallow signers to be authorized for different payers (TRST-M10)
tmigone Nov 27, 2024
65f4d68
fix: remove collector allowance feature from payments escrow (TRST-CL1)
tmigone Nov 27, 2024
86b998b
fix: make getBalance return 0 if balance is less than thawing amount …
tmigone Nov 27, 2024
a9bf99c
fix: allow partially collecting RAVs (TRST-M05)
tmigone Nov 27, 2024
670fba7
fix: subgraph service test broke after rebase
tmigone Nov 28, 2024
7efedcc
fix: overallocated condition no longer allows force closing (TRST-H05)
tmigone Nov 28, 2024
9a9f53b
fix: use staking contract to check for allo collision (TRST-M06)
tmigone Nov 29, 2024
d02f410
fix: separate delegation and delegationWithBeneficiary thaw requests …
Maikol Nov 29, 2024
167055a
fix: round down tokens thawing when slashing (TRST-H04)
Maikol Dec 2, 2024
4d75947
fix: dispute manager refactor (TRST-M07 / TRST-M08)
tmigone Nov 29, 2024
def8026
fix: ignore thawing tokens on provision token check (TRST-L13)
tmigone Dec 3, 2024
2e10813
fix: clarify data service initialization modes (TRST-L01)
tmigone Dec 3, 2024
2bf4456
fix: verify state transition for tap collector thawing signers (TRST-…
tmigone Dec 3, 2024
abe3321
fix: add legacy slasher for transition period (TRST-H06)
Maikol Dec 3, 2024
63ee9ed
fix: verify state transition for pause guardian (TRST-R03)
tmigone Dec 3, 2024
194b603
fix: add storage gap to upgradeable contract (TRST-R04)
tmigone Dec 4, 2024
29ed2e6
fix: allow setting pause guardian when paused (TRST-R05)
tmigone Dec 4, 2024
c8ede7a
fix: clarify initialization needs for data service extensions (TRST-R06)
tmigone Dec 4, 2024
f254897
fix: add missing legacy withdraw delegated (TRST-H07)
Maikol Dec 4, 2024
91cda56
fix: added minimum delegation for provisions (TRST-M03)
Maikol Dec 4, 2024
07ef418
fix: operator check in closeAllocation (TRST-M12)
Maikol Dec 4, 2024
26e4dc7
fix: getThawedTokens calculation (TRST-L03)
Maikol Dec 4, 2024
c9f8a2f
fix: documentation on unstake (TRST-M11)
Maikol Dec 4, 2024
9271b99
fix: remove unused value from event (TRST-R01)
Maikol Dec 4, 2024
151e63a
fix: round thawing shares up (TRST-R07)
Maikol Dec 5, 2024
4d62209
fix: remove redundant non-zero check (TRST-R09)
Maikol Dec 5, 2024
6e5a295
fix: check shares are not zero when creating a thaw request (TRST-R14)
Maikol Dec 5, 2024
d9c6190
fix: move legacyWithdrawDelegated to withdrawDelegated (TRST-H07)
Maikol Dec 6, 2024
161f8a2
fix: added comment for stack too deep solution
Maikol Dec 6, 2024
43bc72b
fix: added comment to explain minimum delegation (TRST-M03)
Maikol Dec 6, 2024
c59c186
fix: new event for minimum delegation not met (TRST-M03)
Maikol Dec 6, 2024
d1c5cc7
fix: add a new mapping instead of splitting thaw requests (TRST-H02)
Maikol Dec 6, 2024
0a31b58
fix: ensure subgraph service is set before using it (TRST-R10)
tmigone Dec 9, 2024
85de5bd
fix: documentation error (TRST-R09)
tmigone Dec 9, 2024
6ec9710
docs: add missing return value documentation (TRST-R)
tmigone Dec 9, 2024
6e00d17
docs: fix documentation errors (TRST-R09)
tmigone Dec 9, 2024
a065804
fix: refactor payments cut distribution (TRST-L12)
tmigone Dec 10, 2024
25d22e4
fix: added new function for accept dispute in conflict that includes …
Maikol Dec 13, 2024
dc79bd4
fix: add payer to EIP712 rav type hash (TRST-M15)
Maikol Dec 13, 2024
4ba215c
fix: accept dispute documentation
Maikol Dec 16, 2024
d6d376c
fix: legacy slashing underflow (TRST-H08)
Maikol Dec 12, 2024
7d90ad2
fix: underflow in getIdleStake (TRST-L14)
Maikol Dec 12, 2024
57aea44
fix: added thaw request type to thaw request fulfilled event (TRST-R15)
Maikol Dec 12, 2024
bbd23f5
fix: add minimum tokens amount for undelegate with beneficiary (TRST-…
Maikol Dec 13, 2024
399b7a9
fix: natspec for new undelegate error
Maikol Dec 13, 2024
032e4a4
Merge pull request #1073 from graphprotocol/mde/trust-staking-fixes
tmigone Dec 17, 2024
0542ab7
Merge branch 'horizon' into tmigone/trust-fixes-payments
tmigone Dec 17, 2024
1109537
Merge pull request #1072 from graphprotocol/tmigone/trust-fixes-payments
tmigone Dec 17, 2024
4a25bab
Merge branch 'horizon' into tmigone/trust-fixes-data-service
tmigone Dec 17, 2024
8e1144c
Merge pull request #1076 from graphprotocol/tmigone/trust-fixes-data-…
tmigone Dec 17, 2024
ac8a071
Merge branch 'horizon' into tmigone/trust-fixes-subgraph-service
tmigone Dec 17, 2024
2fbe0e1
Merge pull request #1074 from graphprotocol/tmigone/trust-fixes-subgr…
tmigone Dec 17, 2024
8aa05c4
Merge branch 'horizon' into tmigone/trust-fixes-dispute-manager
tmigone Dec 17, 2024
a228e0e
Merge pull request #1075 from graphprotocol/tmigone/trust-fixes-dispu…
tmigone Dec 17, 2024
2b03618
Merge branch 'horizon' into mde/horizon-and-subgrah-service-deploy-fix
tmigone Dec 17, 2024
0f2100d
Merge pull request #1062 from graphprotocol/mde/horizon-and-subgrah-s…
tmigone Dec 17, 2024
b1c1f8e
Merge branch 'horizon' into tmigone/update-hsa
tmigone Dec 17, 2024
27afeb8
Merge pull request #1070 from graphprotocol/tmigone/update-hsa
tmigone Dec 17, 2024
cd24658
Merge branch 'horizon' into tmigone/ignition-v0.15.7
tmigone Dec 17, 2024
170572f
Merge pull request #1069 from graphprotocol/tmigone/ignition-v0.15.7
tmigone Dec 17, 2024
58c518c
Merge branch 'horizon' into horizon-gre
tmigone Dec 17, 2024
468ed2c
Merge pull request #1071 from graphprotocol/horizon-gre
tmigone Dec 17, 2024
1038cf4
fix: use min delegation for SubgraphService tests (#1080)
Maikol Dec 17, 2024
a800d09
fix: cleanup IPaymentCollector + TAPCollector docs
matiasedgeandnode Jan 8, 2025
e1d173d
chore: added script to migrate protocol contracts to Horizon
Maikol Jan 9, 2025
1d097de
Merge pull request #1083 from graphprotocol/ma/horizon-ipayment-colle…
matiasedgeandnode Jan 13, 2025
51d0f7f
fix: add whenNotPaused to closeStaleAllocation (#1081)
Maikol Jan 15, 2025
ca2ef4f
chore: add over delegated test for SubgraphService (#1082)
Maikol Jan 15, 2025
9556549
fix: cleanup IPaymentCollector + TAPCollector docs
matiasedgeandnode Jan 8, 2025
4266a81
chore: update ignition to v0.15.9
tmigone Jan 14, 2025
c615fb0
chore: temp dirty fix for contract size
tmigone Jan 14, 2025
297b08d
feat: add script to patch ignition verification command
tmigone Jan 16, 2025
c21e43f
fix: merge fixes
tmigone Jan 22, 2025
6494bf8
chore: revert contract comments to reduce size
tmigone Jan 22, 2025
bfb85ca
chore: refactor ignition deployment modules
tmigone Jan 23, 2025
406c1fd
fix: merge HorizonStaking and HorizonStakingExtension abis
Maikol Jan 23, 2025
65b6d26
feat: add migrate ignition modules
tmigone Jan 24, 2025
3260bd2
fix: remove rpc
tmigone Jan 24, 2025
5e16b7e
feat: add more improvements to ignition deployment system
tmigone Jan 24, 2025
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
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
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .changeset/smooth-balloons-stare.md

This file was deleted.

13 changes: 9 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ runs:
using: composite

steps:
- name: Enable corepack for modern yarn
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Enable Corepack
shell: bash
run: corepack enable
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
node-version: 22
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
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Build
run: yarn build || yarn build
run: pnpm build || pnpm build
6 changes: 4 additions & 2 deletions .github/workflows/ci-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- 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
55 changes: 55 additions & 0 deletions .github/workflows/ci-horizon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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: 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
- name: Run tests
run: |
pushd packages/horizon
pnpm test
55 changes: 55 additions & 0 deletions .github/workflows/ci-subgraph-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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: 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
- name: Run tests
run: |
pushd packages/subgraph-service
pnpm test
8 changes: 6 additions & 2 deletions .github/workflows/ci-token-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Build
run: |
pushd packages/token-distribution
yarn build
pnpm build
- name: Run tests
run: yarn test
run: |
pushd packages/token-distribution
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
12 changes: 7 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 @@ -23,12 +23,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
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
8 changes: 5 additions & 3 deletions .github/workflows/verifydeployed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup

- 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 @@ -53,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
Loading
Loading