Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d71b186
fix(collector): align pending RCAU max-claim windowStart with collect…
RembrandtK May 7, 2026
84010ef
refactor(issuance): drop SelfMintingOffset{Accumulated,Reconciled} ev…
RembrandtK May 8, 2026
fe661ba
test(issuance): demonstrate distributePendingIssuance over-issuance bug
RembrandtK May 8, 2026
fbda07a
fix(issuance): always-accumulate selfMintingOffset and collapse singl…
RembrandtK May 8, 2026
918d23a
refactor(issuance): inline _reconcileSelfMintingOffset
RembrandtK May 8, 2026
12ea23c
refactor(collector): drop declared-but-unthrown errors from IRecurrin…
RembrandtK May 8, 2026
12958ea
docs(collector): correct natspec across RC and RAM interfaces
RembrandtK May 8, 2026
41c8047
test: cover IProviderEligibilityManagement supportsInterface and Stak…
RembrandtK May 8, 2026
8d148f3
build(compiler): enable viaIR for production, fast-default forge profile
RembrandtK May 9, 2026
534402c
refactor(data-edge): upgrade to ethers v6 and @nomicfoundation plugins
RembrandtK Apr 10, 2026
1a4374d
fix: horizon test and token-distribution compatibility fixes
RembrandtK Apr 10, 2026
8352fd6
chore: update addresses, contract registries, and MockREO
RembrandtK Apr 10, 2026
0065c45
docs: REO testing plans and rewards behaviour documentation
RembrandtK Apr 10, 2026
23f648e
feat(deployment): GIP-0088 deployment infrastructure
RembrandtK Apr 10, 2026
4834494
chore: update arbitrumSepolia addresses and deployment metadata
RembrandtK Apr 10, 2026
2e34a14
feat(toolshed): RecurringCollector type and DIPs helpers (incl. condi…
RembrandtK May 6, 2026
7adc393
feat(deployment): drive RM revertOnIneligible from network config
RembrandtK Apr 28, 2026
bb4005f
fix(deployment): gate sync rocketh-record seeding on artifact verific…
RembrandtK Apr 28, 2026
c8d907d
fix: correct localNetwork addresses (governor / pauseGuardian / SAO)
RembrandtK Apr 29, 2026
5d8f585
test(deployment): add cross-package config reconciliation
RembrandtK Apr 29, 2026
a50ecc4
fix(deployment): mock REO governance-tx label and RewardsManager sync
RembrandtK May 4, 2026
862da65
chore: bump interfaces 0.7.1-dips.0 / toolshed 1.2.1-dips.2 for audit…
RembrandtK May 6, 2026
8eff386
refactor(subgraph-service): use deployImplementation helper for Subgr…
RembrandtK May 8, 2026
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
175 changes: 175 additions & 0 deletions docs/RewardsBehaviourChanges.md

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"lint:json": "prettier -w --cache --log-level warn 'packages/**/*.json' '.changeset/**/*.json' '*.json'",
"lint:yaml": "npx yaml-lint .github/**/*.{yml,yaml} packages/contracts/task/config/*.yml; prettier -w --cache --log-level warn 'packages/**/*.{yml,yaml}' '.github/**/*.{yml,yaml}'",
"test": "pnpm build && pnpm -r run test:self",
"test:prod": "FOUNDRY_PROFILE=prod pnpm test",
"test:coverage": "pnpm build && pnpm -r run build:self:coverage && pnpm -r run test:coverage:self"
},
"devDependencies": {
Expand Down Expand Up @@ -55,8 +56,17 @@
"overrides": {
"@types/node": "^20.17.50"
},
"packageExtensions": {
"@nomiclabs/hardhat-waffle@*": {
"dependencies": {
"@ethereum-waffle/chai": "*",
"@ethereum-waffle/provider": "*"
}
}
},
"patchedDependencies": {
"typechain@8.3.2": "patches/typechain@8.3.2.patch"
"typechain@8.3.2": "patches/typechain@8.3.2.patch",
"rocketh@0.17.13": "patches/rocketh@0.17.13.patch"
}
},
"lint-staged": {
Expand Down
6 changes: 6 additions & 0 deletions packages/address-book/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @graphprotocol/address-book

## 1.2.0

### Minor Changes

- Upgraded Rewards Manager and Subgraph Service with Rewards Eligibility Oracle and rewards reclaiming.

## 1.1.0

### Minor Changes
Expand Down
108 changes: 108 additions & 0 deletions packages/address-book/docs/PublishingGuide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Publishing @graphprotocol/address-book

Step-by-step guide for releasing a new version of the address-book package and deploying it to the network monitor.

## Prerequisites

- npm publish access for the `@graphprotocol` scope
- Write access to the [network-monitor](https://github.com/edgeandnode/network-monitor) repo
- Ability to trigger GitHub Actions workflows in both repos

## Step 1: Update Address Files

Update the source address files in the contracts monorepo. These live in:

- `packages/horizon/addresses.json`
- `packages/subgraph-service/addresses.json`
- `packages/issuance/addresses.json`

The address-book package symlinks to these files during development, so changes here are automatically reflected locally.

## Step 2: Create a Changeset

From the monorepo root:

```bash
pnpm changeset
```

- Select `@graphprotocol/address-book`
- Choose the bump type (patch/minor/major)
- Describe what changed (e.g., "update arbitrumSepolia addresses after deployment")

## Step 3: Version the Package

```bash
pnpm changeset version
```

This consumes the changeset, bumps the version in `packages/address-book/package.json`, and updates `CHANGELOG.md`.

## Step 4: Commit and Push

```bash
git add .
git commit -m "chore: release @graphprotocol/address-book vX.Y.Z"
git push
```

## Step 5: Publish to npm

1. Go to the contracts monorepo → Actions → "Publish package to NPM"
2. Select `address-book` as the package
3. Set tag to `latest` (or a pre-release tag)
4. Run workflow

The workflow automatically:

- Publishes to npm (symlinks are converted to real files via `prepublishOnly`)
- Creates and pushes a git tag (`@graphprotocol/address-book@X.Y.Z`)

## Step 6: Verify on npm

```bash
npm view @graphprotocol/address-book version
```

Confirm the new version is live.

## Step 7: Update the Network Monitor

In the [network-monitor](https://github.com/edgeandnode/network-monitor) repo:

1. Update `package.json` to reference the new version:

```json
"@graphprotocol/address-book": "X.Y.Z",
```

2. Run `yarn` to update the lockfile
3. Commit and push

The network monitor imports addresses from:

- `@graphprotocol/address-book/horizon/addresses.json` (in `src/env.ts`)
- `@graphprotocol/address-book/subgraph-service/addresses.json` (in `src/env.ts`, `src/tests/contracts.ts`)

## Step 8: Deploy the Network Monitor

1. Go to the network-monitor repo → Actions → "Deployment"
2. Choose the target cluster:
- **`network`** → production (mainnet)
- **`testnet`** → testnet
3. Run workflow

This builds a Docker image, pushes it to `ghcr.io/edgeandnode/network-monitor`, and restarts the StatefulSet on GKE.

## Quick Reference

| Step | Action | Where |
| ---- | ------------------------------- | ----------------------------- |
| 1 | Update address files | contracts monorepo |
| 2 | `pnpm changeset` | contracts monorepo |
| 3 | `pnpm changeset version` | contracts monorepo |
| 4 | Commit + push | contracts monorepo |
| 5 | Publish to npm (auto-tags) | contracts monorepo GH Actions |
| 6 | Verify on npm | npmjs.com |
| 7 | Bump version in network-monitor | network-monitor repo |
| 8 | Deploy network monitor | network-monitor GH Actions |
2 changes: 1 addition & 1 deletion packages/address-book/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphprotocol/address-book",
"version": "1.1.0",
"version": "1.2.0",
"publishConfig": {
"access": "public"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/address-book/scripts/copy-addresses-for-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
/**
* Copy Addresses for Publishing
*
* This script copies the actual addresses.json files from horizon and subgraph-service
* packages to replace the symlinks before npm publish.
* This script copies the actual addresses.json files from horizon, issuance, and
* subgraph-service packages to replace the symlinks before npm publish.
*
* Why we need this:
* - Development uses symlinks (committed to git) for convenience
Expand Down
1 change: 1 addition & 0 deletions packages/address-book/src/issuance/addresses.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { RewardsManager } from '@graphprotocol/contracts'
import { IERC165__factory, IIssuanceTarget__factory, IRewardsManager__factory } from '@graphprotocol/interfaces/types'
import {
IERC165__factory,
IIssuanceTarget__factory,
IProviderEligibilityManagement__factory,
IRewardsManager__factory,
} from '@graphprotocol/interfaces/types'
import { GraphNetworkContracts, toGRT } from '@graphprotocol/sdk'
import type { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'
import { expect } from 'chai'
Expand Down Expand Up @@ -78,6 +83,11 @@ describe('RewardsManager interfaces', () => {
expect(supports).to.be.true
})

it('should support IProviderEligibilityManagement interface', async function () {
const supports = await rewardsManager.supportsInterface(IProviderEligibilityManagement__factory.interfaceId)
expect(supports).to.be.true
})

it('should return false for unsupported interfaces', async function () {
// Test with an unknown interface ID
const unknownInterfaceId = '0x12345678' // Random interface ID
Expand Down
3 changes: 2 additions & 1 deletion packages/contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ const config: HardhatUserConfig = {
etherscan: {
// Use ARBISCAN_API_KEY for Arbitrum networks
// For mainnet Ethereum, use ETHERSCAN_API_KEY
apiKey: vars.has('ARBISCAN_API_KEY') ? vars.get('ARBISCAN_API_KEY') : '',
// Check both keystore (vars) and environment variable
apiKey: vars.has('ARBISCAN_API_KEY') ? vars.get('ARBISCAN_API_KEY') : (process.env.ARBISCAN_API_KEY ?? ''),
},
sourcify: {
enabled: false,
Expand Down
33 changes: 6 additions & 27 deletions packages/data-edge/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import '@typechain/hardhat'
// Plugins
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-etherscan'
import '@nomiclabs/hardhat-waffle'
import '@nomicfoundation/hardhat-ethers'
import '@nomicfoundation/hardhat-chai-matchers'
import '@nomicfoundation/hardhat-verify'
import 'hardhat-abi-exporter'
import 'hardhat-gas-reporter'
import 'hardhat-contract-sizer'
import '@openzeppelin/hardhat-upgrades'
import 'solidity-coverage'
import '@tenderly/hardhat-tenderly'
import 'hardhat-secure-accounts' // for graph config
import 'hardhat-secure-accounts'
// Tasks
import './tasks/craft-calldata'
import './tasks/post-calldata'
Expand All @@ -29,20 +26,12 @@ interface NetworkConfig {

const networkConfigs: NetworkConfig[] = [
{ network: 'mainnet', chainId: 1 },
{ network: 'ropsten', chainId: 3 },
{ network: 'rinkeby', chainId: 4 },
{ network: 'kovan', chainId: 42 },
{ network: 'sepolia', chainId: 11155111 },
{
network: 'arbitrum-one',
chainId: 42161,
url: 'https://arb1.arbitrum.io/rpc',
},
{
network: 'arbitrum-goerli',
chainId: 421613,
url: 'https://goerli-rollup.arbitrum.io/rpc',
},
{
network: 'arbitrum-sepolia',
chainId: 421614,
Expand Down Expand Up @@ -89,10 +78,6 @@ task('accounts', 'Prints the list of accounts', async (_, bre) => {

// Config
const config: HardhatUserConfig = {
graph: {
addressBook: process.env.ADDRESS_BOOK || 'addresses.json',
disableSecureAccounts: true,
},
paths: {
sources: './contracts',
tests: './test',
Expand All @@ -101,7 +86,7 @@ const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: '0.8.12',
version: '0.8.35',
settings: {
optimizer: {
enabled: true,
Expand Down Expand Up @@ -140,10 +125,8 @@ const config: HardhatUserConfig = {
etherscan: {
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY,
goerli: process.env.ETHERSCAN_API_KEY,
sepolia: process.env.ETHERSCAN_API_KEY,
arbitrumOne: process.env.ARBISCAN_API_KEY,
arbitrumGoerli: process.env.ARBISCAN_API_KEY,
arbitrumSepolia: process.env.ARBISCAN_API_KEY,
},
},
Expand All @@ -155,17 +138,13 @@ const config: HardhatUserConfig = {
},
typechain: {
outDir: 'build/types',
target: 'ethers-v5',
target: 'ethers-v6',
},
abiExporter: {
path: './build/abis',
clear: false,
flat: true,
},
tenderly: {
project: process.env.TENDERLY_PROJECT,
username: process.env.TENDERLY_USERNAME,
},
contractSizer: {
alphaSort: true,
runOnCompile: false,
Expand Down
45 changes: 15 additions & 30 deletions packages/data-edge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"license": "GPL-2.0-or-later",
"main": "index.js",
"scripts": {
"prepare": "cd ../.. && husky install packages/contracts/.husky",
"prepublishOnly": "scripts/prepublish",
"build": "pnpm build:self",
"build:self": "scripts/build",
"clean": "rm -rf build/ cache/ dist/ reports/ artifacts/",
Expand All @@ -35,43 +33,30 @@
"LICENSE"
],
"devDependencies": {
"@ethersproject/abi": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/providers": "^5.7.0",
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-etherscan": "^3.1.2",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"@openzeppelin/contracts": "^4.5.0",
"@openzeppelin/hardhat-upgrades": "^1.8.2",
"@tenderly/api-client": "^1.0.13",
"@tenderly/hardhat-tenderly": "^1.0.13",
"@typechain/ethers-v5": "^10.2.1",
"@typechain/hardhat": "^6.1.6",
"@nomicfoundation/hardhat-chai-matchers": "catalog:",
"@nomicfoundation/hardhat-ethers": "catalog:",
"@nomicfoundation/hardhat-verify": "catalog:",
"@typechain/ethers-v6": "^0.5.0",
"@typechain/hardhat": "catalog:",
"@types/mocha": "^9.0.0",
"@types/node": "^20.17.50",
"@types/node": "catalog:",
"@types/sinon-chai": "^3.2.12",
"chai": "^4.2.0",
"dotenv": "^16.0.0",
"chai": "catalog:",
"dotenv": "catalog:",
"eslint": "catalog:",
"ethereum-waffle": "^3.0.2",
"ethers": "^5.7.2",
"ethlint": "^1.2.5",
"ethers": "catalog:",
"hardhat": "catalog:",
"hardhat-abi-exporter": "^2.2.0",
"hardhat-contract-sizer": "^2.0.3",
"hardhat-gas-reporter": "^1.0.4",
"hardhat-secure-accounts": "0.0.6",
"husky": "^7.0.4",
"lint-staged": "^12.3.5",
"lodash": "^4.17.21",
"markdownlint-cli": "0.45.0",
"hardhat-contract-sizer": "catalog:",
"hardhat-gas-reporter": "catalog:",
"hardhat-secure-accounts": "catalog:",
"markdownlint-cli": "catalog:",
"prettier": "catalog:",
"prettier-plugin-solidity": "catalog:",
"solhint": "catalog:",
"solidity-coverage": "^0.8.16",
"truffle-flattener": "^1.4.4",
"ts-node": ">=8.0.0",
"typechain": "^8.3.0",
"ts-node": "catalog:",
"typechain": "catalog:",
"typescript": "catalog:"
}
}
6 changes: 1 addition & 5 deletions packages/data-edge/tasks/craft-calldata.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import '@nomiclabs/hardhat-ethers'

import { Contract } from 'ethers'
import { task } from 'hardhat/config'

Expand Down Expand Up @@ -35,15 +33,13 @@ task('data:craft', 'Build calldata')
.addParam('selector', 'Selector name')
.addParam('data', 'Call data to post')
.setAction(async (taskArgs, hre) => {
// parse input
const edgeAddress = taskArgs.edge
const calldata = taskArgs.data
const selector = taskArgs.selector

// build data
const abi = getAbiForSelector(selector)
const contract = getContract(edgeAddress, abi, hre.ethers.provider)
const tx = await contract.populateTransaction[selector](calldata)
const tx = await contract[selector].populateTransaction(calldata)
const txData = tx.data
console.log(txData)
})
Loading