From 13ea6cab452179a04cbc25928898e2b143995e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Wed, 20 Nov 2024 17:59:40 -0300 Subject: [PATCH 1/9] feat: add gre/sdk with support for horizon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- package.json | 1 + packages/eslint-graph-config/README.md | 4 +- packages/hardhat-graph-protocol/.mocharc.json | 5 + .../hardhat-graph-protocol/eslint.config.js | 14 + packages/hardhat-graph-protocol/package.json | 52 + packages/hardhat-graph-protocol/src/config.ts | 35 + packages/hardhat-graph-protocol/src/gre.ts | 138 ++ packages/hardhat-graph-protocol/src/index.ts | 10 + packages/hardhat-graph-protocol/src/logger.ts | 7 + .../src/sdk/address-book.ts | 214 +++ .../sdk/deployments/horizon/address-book.ts | 74 + .../src/sdk/deployments/horizon/index.ts | 9 + .../src/sdk/deployments/horizon/types.ts | 45 + .../src/sdk/deployments/lib/artifact.ts | 41 + .../src/sdk/deployments/lib/contract.ts | 39 + .../src/sdk/utils/assertion.ts | 11 + .../src/sdk/utils/error.ts | 9 + .../src/sdk/utils/path.ts | 8 + .../src/type-extensions.ts | 53 + packages/hardhat-graph-protocol/src/types.ts | 24 + .../test/config.test.ts | 52 + .../fixtures/default-config/hardhat.config.ts | 8 + .../test/fixtures/files/addresses-global.json | 0 .../test/fixtures/files/addresses-hre.json | 0 .../fixtures/files/addresses-network.json | 0 .../test/fixtures/files/addresses-opt.json | 0 .../global-address-book/hardhat.config.ts | 48 + .../invalid-address-book/hardhat.config.ts | 48 + .../network-address-book/hardhat.config.ts | 49 + .../fixtures/no-path-config/addresses.json | 0 .../fixtures/no-path-config/hardhat.config.ts | 45 + .../fixtures/path-config/hardhat.config.ts | 48 + .../hardhat-graph-protocol/test/gre.test.ts | 58 + .../hardhat-graph-protocol/test/helpers.ts | 26 + packages/hardhat-graph-protocol/tsconfig.json | 15 + packages/horizon/addresses.json | 1453 +++++++++++++++++ packages/horizon/hardhat.config.ts | 9 +- packages/horizon/package.json | 3 +- yarn.lock | 429 ++++- 39 files changed, 3066 insertions(+), 18 deletions(-) create mode 100644 packages/hardhat-graph-protocol/.mocharc.json create mode 100644 packages/hardhat-graph-protocol/eslint.config.js create mode 100644 packages/hardhat-graph-protocol/package.json create mode 100644 packages/hardhat-graph-protocol/src/config.ts create mode 100644 packages/hardhat-graph-protocol/src/gre.ts create mode 100644 packages/hardhat-graph-protocol/src/index.ts create mode 100644 packages/hardhat-graph-protocol/src/logger.ts create mode 100644 packages/hardhat-graph-protocol/src/sdk/address-book.ts create mode 100644 packages/hardhat-graph-protocol/src/sdk/deployments/horizon/address-book.ts create mode 100644 packages/hardhat-graph-protocol/src/sdk/deployments/horizon/index.ts create mode 100644 packages/hardhat-graph-protocol/src/sdk/deployments/horizon/types.ts create mode 100644 packages/hardhat-graph-protocol/src/sdk/deployments/lib/artifact.ts create mode 100644 packages/hardhat-graph-protocol/src/sdk/deployments/lib/contract.ts create mode 100644 packages/hardhat-graph-protocol/src/sdk/utils/assertion.ts create mode 100644 packages/hardhat-graph-protocol/src/sdk/utils/error.ts create mode 100644 packages/hardhat-graph-protocol/src/sdk/utils/path.ts create mode 100644 packages/hardhat-graph-protocol/src/type-extensions.ts create mode 100644 packages/hardhat-graph-protocol/src/types.ts create mode 100644 packages/hardhat-graph-protocol/test/config.test.ts create mode 100644 packages/hardhat-graph-protocol/test/fixtures/default-config/hardhat.config.ts create mode 100644 packages/hardhat-graph-protocol/test/fixtures/files/addresses-global.json create mode 100644 packages/hardhat-graph-protocol/test/fixtures/files/addresses-hre.json create mode 100644 packages/hardhat-graph-protocol/test/fixtures/files/addresses-network.json create mode 100644 packages/hardhat-graph-protocol/test/fixtures/files/addresses-opt.json create mode 100644 packages/hardhat-graph-protocol/test/fixtures/global-address-book/hardhat.config.ts create mode 100644 packages/hardhat-graph-protocol/test/fixtures/invalid-address-book/hardhat.config.ts create mode 100644 packages/hardhat-graph-protocol/test/fixtures/network-address-book/hardhat.config.ts create mode 100644 packages/hardhat-graph-protocol/test/fixtures/no-path-config/addresses.json create mode 100644 packages/hardhat-graph-protocol/test/fixtures/no-path-config/hardhat.config.ts create mode 100644 packages/hardhat-graph-protocol/test/fixtures/path-config/hardhat.config.ts create mode 100644 packages/hardhat-graph-protocol/test/gre.test.ts create mode 100644 packages/hardhat-graph-protocol/test/helpers.ts create mode 100644 packages/hardhat-graph-protocol/tsconfig.json create mode 100644 packages/horizon/addresses.json diff --git a/package.json b/package.json index 6b82fd5a4..eb94a1de7 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "packages/contracts", "packages/data-edge", "packages/eslint-graph-config", + "packages/hardhat-graph-protocol", "packages/horizon", "packages/sdk", "packages/solhint-graph-config", diff --git a/packages/eslint-graph-config/README.md b/packages/eslint-graph-config/README.md index 3e0a41cff..794ad677d 100644 --- a/packages/eslint-graph-config/README.md +++ b/packages/eslint-graph-config/README.md @@ -5,13 +5,13 @@ This repository contains shared linting and formatting rules for TypeScript proj ## Installation ```bash -yarn add --dev eslint eslint-graph-config +yarn add --dev eslint@^8.56.0 eslint-graph-config ``` For projects on this monorepo, you can use the following command to install the package: ```bash -yarn add --dev eslint eslint-graph-config@workspace:^x.y.z +yarn add --dev eslint@^8.56.0 eslint-graph-config@workspace:^x.y.z ``` To enable the rules, you need to create an `eslint.config.js` file in the root of your project with the following content: diff --git a/packages/hardhat-graph-protocol/.mocharc.json b/packages/hardhat-graph-protocol/.mocharc.json new file mode 100644 index 000000000..de4e97026 --- /dev/null +++ b/packages/hardhat-graph-protocol/.mocharc.json @@ -0,0 +1,5 @@ +{ + "require": "ts-node/register/files", + "ignore": ["test/fixtures/**/*"], + "timeout": 6000 +} diff --git a/packages/hardhat-graph-protocol/eslint.config.js b/packages/hardhat-graph-protocol/eslint.config.js new file mode 100644 index 000000000..ed2d51271 --- /dev/null +++ b/packages/hardhat-graph-protocol/eslint.config.js @@ -0,0 +1,14 @@ +const config = require('eslint-graph-config') + +module.exports = [ + ...config.default, + { + rules: { + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + }, + }, +] diff --git a/packages/hardhat-graph-protocol/package.json b/packages/hardhat-graph-protocol/package.json new file mode 100644 index 000000000..fd4416c0e --- /dev/null +++ b/packages/hardhat-graph-protocol/package.json @@ -0,0 +1,52 @@ +{ + "name": "hardhat-graph-protocol", + "version": "0.0.1", + "description": "A hardhat plugin that extends the runtime environment to inject additional functionality related to the usage of the Graph Protocol.", + "keywords": [ + "ethereum", + "smart-contracts", + "hardhat", + "hardhat-plugin", + "graph", + "graph-protocol", + "horizon" + ], + "author": "Tomás Migone ", + "license": "MIT", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "build": "tsc", + "lint": "eslint '**/*.{js,ts}' --fix", + "test": "mocha --exit --recursive 'test/**/*.test.ts'" + }, + "files": [ + "dist/", + "src/", + "LICENSE", + "README.md" + ], + "dependencies": { + "@graphprotocol/contracts": "workspace:^7.0.0", + "@graphprotocol/horizon": "workspace:^0.0.1", + "@nomicfoundation/hardhat-ethers": "^3.0.8", + "debug": "^4.3.7" + }, + "devDependencies": { + "@types/chai": "^4.0.0", + "@types/debug": "^4.1.12", + "@types/mocha": "^10.0.9", + "chai": "^4.0.0", + "eslint": "^8.56.0", + "eslint-graph-config": "workspace:^0.0.1", + "ethers": "^6.13.4", + "hardhat": "^2.22.16", + "mocha": "^10.8.2", + "ts-node": "^8.0.0", + "typescript": "^5.6.3" + }, + "peerDependencies": { + "ethers": "^6.13.4", + "hardhat": "^2.22.16" + } +} diff --git a/packages/hardhat-graph-protocol/src/config.ts b/packages/hardhat-graph-protocol/src/config.ts new file mode 100644 index 000000000..f93bc868e --- /dev/null +++ b/packages/hardhat-graph-protocol/src/config.ts @@ -0,0 +1,35 @@ +import fs from 'fs' +import { GraphPluginError } from './sdk/utils/error' +import { logDebug } from './logger' + +import type { GraphDeployment, GraphRuntimeEnvironmentOptions } from './types' +import type { HardhatRuntimeEnvironment } from 'hardhat/types' +import { normalizePath } from './sdk/utils/path' + +export function getAddressBookPath( + deployment: GraphDeployment, + hre: HardhatRuntimeEnvironment, + opts: GraphRuntimeEnvironmentOptions, +): string { + logDebug(`== ${deployment} - Getting address book path`) + logDebug(`Graph base dir: ${hre.config.paths.graph}`) + logDebug(`1) opts.addressBooks.[deployment]: ${opts.addressBooks?.[deployment]}`) + logDebug(`2) hre.network.config.addressBooks.[deployment]: ${hre.network.config?.addressBooks?.[deployment]}`) + logDebug(`3) hre.config.graph.addressBooks.[deployment]: ${hre.config.graph?.addressBooks?.[deployment]}`) + + let addressBookPath + = opts.addressBooks?.[deployment] ?? hre.network.config?.addressBooks?.[deployment] ?? hre.config.graph?.addressBooks?.[deployment] + + if (addressBookPath === undefined) { + throw new GraphPluginError('Must set a an addressBook path!') + } + + addressBookPath = normalizePath(addressBookPath, hre.config.paths.graph) + + if (!fs.existsSync(addressBookPath)) { + throw new GraphPluginError(`Address book not found: ${addressBookPath}`) + } + + logDebug(`Address book path found: ${addressBookPath}`) + return addressBookPath +} diff --git a/packages/hardhat-graph-protocol/src/gre.ts b/packages/hardhat-graph-protocol/src/gre.ts new file mode 100644 index 000000000..5cc251138 --- /dev/null +++ b/packages/hardhat-graph-protocol/src/gre.ts @@ -0,0 +1,138 @@ +import path from 'path' + +import { GraphDeploymentsList, GraphRuntimeEnvironment, GraphRuntimeEnvironmentOptions, isGraphDeployment } from './types' +import { logDebug, logWarn } from './logger' +import { getAddressBookPath } from './config' +import { GraphHorizonAddressBook } from './sdk/deployments/horizon' +import { HardhatEthersProvider } from '@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider' + +import type { HardhatConfig, HardhatRuntimeEnvironment, HardhatUserConfig } from 'hardhat/types' + +export const greExtendConfig = (config: HardhatConfig, userConfig: Readonly) => { + const userPath = userConfig.paths?.graph + + let newPath: string + if (userPath === undefined) { + newPath = config.paths.root + } else { + if (path.isAbsolute(userPath)) { + newPath = userPath + } else { + newPath = path.normalize(path.join(config.paths.root, userPath)) + } + } + + config.paths.graph = newPath +} + +export const greExtendEnvironment = (hre: HardhatRuntimeEnvironment) => { + hre.graph = (opts: GraphRuntimeEnvironmentOptions = {}) => { + logDebug('*** Initializing Graph Runtime Environment (GRE) ***') + logDebug(`Main network: ${hre.network.name}`) + + const provider = new HardhatEthersProvider(hre.network.provider, hre.network.name) + const deployments = [ + ...Object.keys(opts.addressBooks ?? {}), + ...Object.keys(hre.network.config.addressBooks ?? {}), + ...Object.keys(hre.config.graph?.addressBooks ?? {}), + ] + logDebug(`Detected deployments: ${deployments.join(', ')}`) + + // Build the Graph Runtime Environment (GRE) for each deployment + const gre = {} as GraphRuntimeEnvironment + for (const deployment of deployments) { + if (!isGraphDeployment(deployment)) { + logWarn(`Invalid deployment: ${deployment}. Skipping...`) + continue + } + + logDebug(`Initializing ${deployment} deployment...`) + const addressBookPath = getAddressBookPath(deployment, hre, opts) + let addressBook + switch (deployment) { + case 'horizon': + addressBook = new GraphHorizonAddressBook(addressBookPath, hre.network.config.chainId!) + gre.horizon = { + addressBook: addressBook, + contracts: addressBook.loadContracts(hre.network.config.chainId!, provider), + } + break + + default: + break + } + } + + logDebug('GRE initialized successfully!') + return gre + } +} + +// function buildGraphNetworkEnvironment( +// chainId: number, +// provider: EthersProviderWrapper | undefined, +// graphConfigPath: string | undefined, +// addressBookPath: string, +// isHHL1: boolean, +// enableTxLogging: boolean, +// secureAccounts: boolean, +// fork: boolean, +// getWallets: () => Promise, +// getWallet: (address: string) => Promise, +// unlockProvider: (caller: string) => Promise, +// ): GraphNetworkEnvironment | null { +// if (graphConfigPath === undefined) { +// logWarn( +// `No graph config file provided for chain: ${chainId}. ${ +// isHHL1 ? 'L2' : 'L1' +// } will not be initialized.`, +// ) +// return null +// } + +// if (provider === undefined) { +// logWarn( +// `No provider URL found for: ${chainId}. ${isHHL1 ? 'L2' : 'L1'} will not be initialized.`, +// ) +// return null +// } + +// // Upgrade provider to secure accounts if feature is enabled +// const getUpdatedProvider = async (caller: string) => +// secureAccounts ? await unlockProvider(caller) : provider + +// return { +// chainId: chainId, +// provider: provider, +// addressBook: lazyObject(() => new GraphNetworkAddressBook(addressBookPath, chainId)), +// graphConfig: lazyObject(() => { +// const config = readConfig(graphConfigPath, true) +// config.defaults = getDefaults(config, isHHL1) +// return config +// }), +// contracts: lazyObject(() => +// loadGraphNetworkContracts(addressBookPath, chainId, provider, undefined, { +// enableTxLogging, +// }), +// ), +// getWallets: lazyFunction(() => () => getWallets()), +// getWallet: lazyFunction(() => (address: string) => getWallet(address)), +// getDeployer: lazyFunction( +// () => async () => getDeployer(await getUpdatedProvider('getDeployer')), +// ), +// getNamedAccounts: lazyFunction( +// () => async () => +// getNamedAccounts( +// fork ? provider : await getUpdatedProvider('getNamedAccounts'), +// graphConfigPath, +// ), +// ), +// getTestAccounts: lazyFunction( +// () => async () => +// getTestAccounts(await getUpdatedProvider('getTestAccounts'), graphConfigPath), +// ), +// getAllAccounts: lazyFunction( +// () => async () => getAllAccounts(await getUpdatedProvider('getAllAccounts')), +// ), +// } +// } diff --git a/packages/hardhat-graph-protocol/src/index.ts b/packages/hardhat-graph-protocol/src/index.ts new file mode 100644 index 000000000..f4284811c --- /dev/null +++ b/packages/hardhat-graph-protocol/src/index.ts @@ -0,0 +1,10 @@ +import { extendConfig, extendEnvironment } from 'hardhat/config' +import { greExtendConfig, greExtendEnvironment } from './gre' + +// This import is needed to let the TypeScript compiler know that it should include your type +// extensions in your npm package's types file. +import './type-extensions' + +// ** Graph Runtime Environment (GRE) extensions for the HRE ** +extendConfig(greExtendConfig) +extendEnvironment(greExtendEnvironment) diff --git a/packages/hardhat-graph-protocol/src/logger.ts b/packages/hardhat-graph-protocol/src/logger.ts new file mode 100644 index 000000000..3529373f6 --- /dev/null +++ b/packages/hardhat-graph-protocol/src/logger.ts @@ -0,0 +1,7 @@ +import debug from 'debug' + +const LOG_BASE = 'hardhat:graph' + +export const logDebug = debug(`${LOG_BASE}:debug`) +export const logWarn = debug(`${LOG_BASE}:warn`) +export const logError = debug(`${LOG_BASE}:error`) diff --git a/packages/hardhat-graph-protocol/src/sdk/address-book.ts b/packages/hardhat-graph-protocol/src/sdk/address-book.ts new file mode 100644 index 000000000..a8256caa7 --- /dev/null +++ b/packages/hardhat-graph-protocol/src/sdk/address-book.ts @@ -0,0 +1,214 @@ +import fs from 'fs' + +import { AssertionError } from 'assert' +import { assertObject } from './utils/assertion' + +import { ContractList, loadContract } from './deployments/lib/contract' +import { logDebug, logError } from '../logger' +import { Provider, Signer } from 'ethers' + +// JSON format: +// { +// "": { +// "": { +// "address": "
", +// "proxy": true, +// "implementation": { ... } +// ... +// } +// } +export type AddressBookJson< + ChainId extends number = number, + ContractName extends string = string, +> = Record> + +export type AddressBookEntry = { + address: string + proxy?: boolean + implementation?: AddressBookEntry +} + +/** + * An abstract class to manage the address book + */ +export abstract class AddressBook< + ChainId extends number = number, + ContractName extends string = string, +> { + // The path to the address book file + public file: string + + // The chain id of the network the address book should be loaded for + public chainId: ChainId + + // The raw contents of the address book file + public addressBook: AddressBookJson + + public strictAssert: boolean + + /** + * Constructor for the `AddressBook` class + * + * @param _file the path to the address book file + * @param _chainId the chain id of the network the address book should be loaded for + * + * @throws AssertionError if the target file is not a valid address book + * @throws Error if the target file does not exist + */ + constructor(_file: string, _chainId: number, _strictAssert = false) { + this.strictAssert = _strictAssert + this.file = _file + if (!fs.existsSync(this.file)) throw new Error(`Address book path provided does not exist!`) + + logDebug(`Loading address book for chainId ${_chainId} from ${this.file}`) + this.assertChainId(_chainId) + this.chainId = _chainId + + // Ensure file is a valid address book + this.addressBook = JSON.parse(fs.readFileSync(this.file, 'utf8') || '{}') as AddressBookJson + this.assertAddressBookJson(this.addressBook) + + // If the address book is empty for this chain id, initialize it with an empty object + if (!this.addressBook[this.chainId]) { + this.addressBook[this.chainId] = {} as Record + } + } + + abstract isValidContractName(name: string): boolean + + abstract loadContracts(chainId: number, signerOrProvider?: Signer | Provider): ContractList + + // TODO: implement chain id validation? + assertChainId(chainId: string | number): asserts chainId is ChainId {} + + // Asserts the provided object is a valid address book + // Logs warnings for unsupported chain ids or invalid contract names + assertAddressBookJson( + json: unknown, + ): asserts json is AddressBookJson { + this._assertAddressBookJson(json) + + // // Validate contract names + const contractList = json[this.chainId] + + const contractNames = contractList ? Object.keys(contractList) : [] + for (const contract of contractNames) { + if (!this.isValidContractName(contract)) { + const message = `Detected invalid contract in address book: ${contract}, for chainId ${this.chainId}` + if (this.strictAssert) { + throw new Error(message) + } else { + logError(message) + } + } + } + } + + _assertAddressBookJson(json: unknown): asserts json is AddressBookJson { + assertObject(json, 'Assertion failed: address book is not an object') + + const contractList = json[this.chainId] + try { + assertObject(contractList, 'Assertion failed: chain contract list is not an object') + } catch (error) { + if (this.strictAssert) throw error + else return + } + + const contractNames = Object.keys(contractList) + for (const contractName of contractNames) { + this._assertAddressBookEntry(contractList[contractName]) + } + } + + _assertAddressBookEntry(json: unknown): asserts json is AddressBookEntry { + assertObject(json) + + try { + if (typeof json.address !== 'string') throw new AssertionError({ message: 'Invalid address' }) + if (json.proxy && typeof json.proxy !== 'boolean') + throw new AssertionError({ message: 'Invalid proxy' }) + if (json.implementation && typeof json.implementation !== 'object') + throw new AssertionError({ message: 'Invalid implementation' }) + } catch (error) { + if (this.strictAssert) throw error + else return + } + } + + /** + * List entry names in the address book + * + * @returns a list with all the names of the entries in the address book + */ + listEntries(): ContractName[] { + return Object.keys(this.addressBook[this.chainId]) as ContractName[] + } + + /** + * Get an entry from the address book + * + * @param name the name of the contract to get + * @returns the address book entry for the contract + * Returns an empty address book entry if the contract is not found + */ + getEntry(name: ContractName): AddressBookEntry { + try { + return this.addressBook[this.chainId][name] + } catch (_) { + // TODO: should we throw instead? + return { address: '0x0000000000000000000000000000000000000000' } + } + } + + /** + * Save an entry to the address book + * + * @param name the name of the contract to save + * @param entry the address book entry for the contract + */ + setEntry(name: ContractName, entry: AddressBookEntry): void { + this._assertAddressBookEntry(entry) + this.addressBook[this.chainId][name] = entry + try { + fs.writeFileSync(this.file, JSON.stringify(this.addressBook, null, 2)) + } catch (e: unknown) { + if (e instanceof Error) logError(`Error saving entry: ${e.message}`) + else logError(`Error saving entry`) + } + } + + /** + * Loads all contracts from an address book + * + * @param addressBook Address book to use + * @param signerOrProvider Signer or provider to use + * @param enableTxLogging Enable transaction logging to console and output file. Defaults to `true` + * @returns the loaded contracts + */ + _loadContracts( + artifactsPath: string | string[], + signerOrProvider?: Signer | Provider, + ): ContractList { + const contracts = {} as ContractList + for (const contractName of this.listEntries()) { + try { + const contract = loadContract( + contractName, + this.getEntry(contractName).address, + artifactsPath, + signerOrProvider, + ) + contracts[contractName] = contract + } catch (error) { + if (error instanceof Error) { + throw new Error(`Could not load contracts - ${error.message}`) + } else { + throw new Error(`Could not load contracts`) + } + } + } + + return contracts + } +} diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/address-book.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/address-book.ts new file mode 100644 index 000000000..48b6e59ca --- /dev/null +++ b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/address-book.ts @@ -0,0 +1,74 @@ +import path from 'path' + +import { Contract, Provider, Signer } from 'ethers' +import { logDebug, logError, logWarn } from '../../../logger' +import { AddressBook } from '../../address-book' +import { assertObject } from '../../utils/assertion' +import { GraphHorizonContractNameList } from './types' + +import type { GraphHorizonContractName, GraphHorizonContracts } from './types' + +export class GraphHorizonAddressBook extends AddressBook { + isValidContractName(name: string): boolean { + return isGraphHorizonContractName(name) + } + + loadContracts( + chainId: number, + signerOrProvider?: Signer | Provider, + ): GraphHorizonContracts { + logDebug('Loading Graph Network contracts...') + const artifactsPath = path.resolve('node_modules', '@graphprotocol/contracts/build/contracts') + + const contracts = this._loadContracts( + artifactsPath, + signerOrProvider, + ) + assertGraphHorizonContracts(contracts, chainId) + + // Iterator + contracts[Symbol.iterator] = function* () { + for (const key of Object.keys(this)) { + yield this[key as GraphHorizonContractName] as Contract + } + } + + return contracts + } +} + +function isGraphHorizonContractName(name: unknown): name is GraphHorizonContractName { + return ( + typeof name === 'string' + && GraphHorizonContractNameList.includes(name as GraphHorizonContractName) + ) +} + +function assertGraphHorizonContracts( + contracts: unknown, + chainId: number, + strictAssert?: boolean, +): asserts contracts is GraphHorizonContracts { + assertObject(contracts) + + // Allow loading contracts not defined in contract list but raise a warning + const contractNames = Object.keys(contracts) + if (!contractNames.every(c => isGraphHorizonContractName(c))) { + logWarn( + `Loaded unregistered GraphHorizon contract: ${contractNames.filter( + c => !isGraphHorizonContractName(c), + ).join()}`, + ) + } + + // Assert that all GraphNetworkContracts were loaded + for (const contractName of GraphHorizonContractNameList) { + if (!contracts[contractName]) { + const errMessage = `Missing GraphHorizon contract: ${contractName} for chainId ${chainId}` + logError(errMessage) + if (strictAssert) { + throw new Error(errMessage) + } + } + } +} diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/index.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/index.ts new file mode 100644 index 000000000..b7c7c0285 --- /dev/null +++ b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/index.ts @@ -0,0 +1,9 @@ +import { GraphHorizonAddressBook } from './address-book' + +import type { GraphHorizonContractName, GraphHorizonContracts, GraphHorizonRuntimeEnvironment } from './types' + +export { + GraphHorizonAddressBook, +} + +export type { GraphHorizonContractName, GraphHorizonContracts, GraphHorizonRuntimeEnvironment } diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/types.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/types.ts new file mode 100644 index 000000000..0bbb9bd21 --- /dev/null +++ b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/types.ts @@ -0,0 +1,45 @@ +import type { + Controller, + EpochManager, + GraphProxyAdmin, + L2GraphToken, + L2GraphTokenGateway, + RewardsManager, +} from '@graphprotocol/contracts' +import type { Contract } from 'ethers' +import type { ContractList } from '../lib/contract' +import type { GraphHorizonAddressBook } from './address-book' + +export const GraphHorizonContractNameList = [ + 'GraphProxyAdmin', + 'Controller', + 'EpochManager', + 'RewardsManager', + 'L2GraphToken', + 'L2GraphTokenGateway', +] as const + +export type GraphHorizonContractName = (typeof GraphHorizonContractNameList)[number] + +export interface GraphHorizonContracts extends ContractList { + // Imports from @graphprotocol/contracts use ethers v5 + // We trick the type system by &ing the Contract type + EpochManager: EpochManager & Contract + RewardsManager: RewardsManager & Contract + GraphProxyAdmin: GraphProxyAdmin & Contract + Controller: Controller & Contract + L2GraphToken?: L2GraphToken & Contract + L2GraphTokenGateway?: L2GraphTokenGateway & Contract + + // Aliases + GraphToken: L2GraphToken + GraphTokenGateway: L2GraphTokenGateway + + // Iterator + [Symbol.iterator]: () => Generator +} + +export interface GraphHorizonRuntimeEnvironment { + contracts: GraphHorizonContracts + addressBook: GraphHorizonAddressBook +} diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/lib/artifact.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/lib/artifact.ts new file mode 100644 index 000000000..3c50a1fe6 --- /dev/null +++ b/packages/hardhat-graph-protocol/src/sdk/deployments/lib/artifact.ts @@ -0,0 +1,41 @@ +import { Artifacts } from 'hardhat/internal/artifacts' +import { logError } from '../../../logger' + +import type { Artifact } from 'hardhat/types' + +/** + * Load a contract's artifact from the build output folder + * If multiple build output folders are provided, they will be searched in order + * @param name Name of the contract + * @param buildDir Path to the build output folder(s). Defaults to `build/contracts`. + * @returns The artifact corresponding to the contract name + */ +export const loadArtifact = (name: string, buildDir?: string[] | string): Artifact => { + let artifacts: Artifacts + let artifact: Artifact | undefined + buildDir = buildDir ?? ['build/contracts'] + + if (typeof buildDir === 'string') { + buildDir = [buildDir] + } + + for (const dir of buildDir) { + try { + artifacts = new Artifacts(dir) + artifact = artifacts.readArtifactSync(name) + break + } catch (error) { + if (error instanceof Error) { + logError(`Could not load artifact ${name} from ${dir} - ${error.message}`) + } else { + logError(`Could not load artifact ${name} from ${dir}`) + } + } + } + + if (artifact === undefined) { + throw new Error(`Could not load artifact ${name}`) + } + + return artifact +} diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/lib/contract.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/lib/contract.ts new file mode 100644 index 000000000..18113fb30 --- /dev/null +++ b/packages/hardhat-graph-protocol/src/sdk/deployments/lib/contract.ts @@ -0,0 +1,39 @@ +import { Contract, Provider, Signer } from 'ethers' +import { loadArtifact } from './artifact' + +export type ContractList = Partial> + +/** + * Loads a contract from an address book + * + * @param name Name of the contract + * @param addressBook Address book to use + * @param signerOrProvider Signer or provider to use + * @param enableTxLogging Enable transaction logging to console and output file. Defaults to `true` + * @param optional If true, the contract is optional and will not throw if it cannot be loaded + * @returns the loaded contract + * + * @throws Error if the contract could not be loaded + */ +export function loadContract( + name: ContractName, + address: string, + artifactsPath: string | string[], + signerOrProvider?: Signer | Provider, +): Contract { + try { + let contract = new Contract(address, loadArtifact(name, artifactsPath).abi, signerOrProvider) + + if (signerOrProvider) { + contract = contract.connect(signerOrProvider) as Contract + } + + return contract + } catch (err: unknown) { + if (err instanceof Error) { + throw new Error(`Could not load contract ${name} - ${err.message}`) + } else { + throw new Error(`Could not load contract ${name}`) + } + } +} diff --git a/packages/hardhat-graph-protocol/src/sdk/utils/assertion.ts b/packages/hardhat-graph-protocol/src/sdk/utils/assertion.ts new file mode 100644 index 000000000..f215a9497 --- /dev/null +++ b/packages/hardhat-graph-protocol/src/sdk/utils/assertion.ts @@ -0,0 +1,11 @@ +import { AssertionError } from 'assert' + +export function assertObject( + value: unknown, + errorMessage?: string, +): asserts value is Record { + if (typeof value !== 'object' || value == null) + throw new AssertionError({ + message: errorMessage ?? 'Not an object', + }) +} diff --git a/packages/hardhat-graph-protocol/src/sdk/utils/error.ts b/packages/hardhat-graph-protocol/src/sdk/utils/error.ts new file mode 100644 index 000000000..09df0ac3d --- /dev/null +++ b/packages/hardhat-graph-protocol/src/sdk/utils/error.ts @@ -0,0 +1,9 @@ +import { HardhatPluginError } from 'hardhat/plugins' +import { logError } from '../../logger' + +export class GraphPluginError extends HardhatPluginError { + constructor(message: string) { + super('GraphRuntimeEnvironment', message) + logError(message) + } +} diff --git a/packages/hardhat-graph-protocol/src/sdk/utils/path.ts b/packages/hardhat-graph-protocol/src/sdk/utils/path.ts new file mode 100644 index 000000000..3fcf810d7 --- /dev/null +++ b/packages/hardhat-graph-protocol/src/sdk/utils/path.ts @@ -0,0 +1,8 @@ +import path from 'path' + +export function normalizePath(_path: string, graphPath?: string): string { + if (!path.isAbsolute(_path) && graphPath !== undefined) { + _path = path.join(graphPath, _path) + } + return _path +} diff --git a/packages/hardhat-graph-protocol/src/type-extensions.ts b/packages/hardhat-graph-protocol/src/type-extensions.ts new file mode 100644 index 000000000..f8bfd7427 --- /dev/null +++ b/packages/hardhat-graph-protocol/src/type-extensions.ts @@ -0,0 +1,53 @@ +// To extend one of Hardhat's types, you need to import the module where it has been defined, and redeclare it. +import 'hardhat/types/config' +import 'hardhat/types/runtime' + +import type { GraphRuntimeEnvironment, GraphRuntimeEnvironmentOptions } from './types' + +declare module 'hardhat/types/runtime' { + export interface HardhatRuntimeEnvironment { + graph: (opts?: GraphRuntimeEnvironmentOptions) => GraphRuntimeEnvironment + } +} + +declare module 'hardhat/types/config' { + export interface HardhatConfig { + graph: GraphRuntimeEnvironmentOptions + } + + export interface HardhatUserConfig { + graph: GraphRuntimeEnvironmentOptions + } + + export interface HardhatNetworkConfig { + addressBooks?: { + [deployment: string]: string + } + } + + export interface HardhatNetworkUserConfig { + addressBooks?: { + [deployment: string]: string + } + } + + export interface HttpNetworkConfig { + addressBooks?: { + [deployment: string]: string + } + } + + export interface HttpNetworkUserConfig { + addressBooks?: { + [deployment: string]: string + } + } + + export interface ProjectPathsConfig { + graph?: string + } + + export interface ProjectPathsUserConfig { + graph?: string + } +} diff --git a/packages/hardhat-graph-protocol/src/types.ts b/packages/hardhat-graph-protocol/src/types.ts new file mode 100644 index 000000000..35e1069da --- /dev/null +++ b/packages/hardhat-graph-protocol/src/types.ts @@ -0,0 +1,24 @@ +import type { GraphHorizonRuntimeEnvironment } from './sdk/deployments/horizon' + +export const GraphDeploymentsList = [ + 'horizon', +] as const + +export type GraphDeployment = (typeof GraphDeploymentsList)[number] + +export function isGraphDeployment(deployment: unknown): deployment is GraphDeployment { + return ( + typeof deployment === 'string' + && GraphDeploymentsList.includes(deployment as GraphDeployment) + ) +} + +export type GraphRuntimeEnvironmentOptions = { + addressBooks?: { + [deployment in GraphDeployment]: string + } +} + +export type GraphRuntimeEnvironment = { + [deployment in GraphDeployment]: GraphHorizonRuntimeEnvironment +} diff --git a/packages/hardhat-graph-protocol/test/config.test.ts b/packages/hardhat-graph-protocol/test/config.test.ts new file mode 100644 index 000000000..dbc84342c --- /dev/null +++ b/packages/hardhat-graph-protocol/test/config.test.ts @@ -0,0 +1,52 @@ +import path from 'path' + +import { expect } from 'chai' +import { getAddressBookPath } from '../src/config' +import { useEnvironment } from './helpers' + +describe('GRE init functions', function () { + // No address book - should throw + describe('getAddressBookPath', function () { + useEnvironment('default-config', 'mainnet') + + it('should throw if no address book is specified', function () { + expect(() => getAddressBookPath(this.hre, {})).to.throw('Must set a an addressBook path!') + }) + }) + + describe('getAddressBookPath', function () { + useEnvironment('network-address-book', 'mainnet') + + // Address book via opts should be used + it('should use opts parameter if available', function () { + const addressBook = getAddressBookPath(this.hre, { + addressBook: 'addresses-opt.json', + }) + expect(path.basename(addressBook)).to.equal('addresses-opt.json') + }) + + // Address book via network config should be used + it('should use HH network config', function () { + const addressBook = getAddressBookPath(this.hre, {}) + expect(path.basename(addressBook)).to.equal('addresses-network.json') + }) + }) + + describe('getAddressBookPath', function () { + useEnvironment('global-address-book', 'mainnet') + + // Address book via global config should be used + it('should use HH global config', function () { + const addressBook = getAddressBookPath(this.hre, {}) + expect(path.basename(addressBook)).to.equal('addresses-global.json') + }) + }) + + describe('getAddressBookPath with a non existent address book', function () { + useEnvironment('invalid-address-book', 'mainnet') + + it('should throw if address book doesn\'t exist', function () { + expect(() => getAddressBookPath(this.hre, {})).to.throw(/Address book not found: /) + }) + }) +}) diff --git a/packages/hardhat-graph-protocol/test/fixtures/default-config/hardhat.config.ts b/packages/hardhat-graph-protocol/test/fixtures/default-config/hardhat.config.ts new file mode 100644 index 000000000..17de4a585 --- /dev/null +++ b/packages/hardhat-graph-protocol/test/fixtures/default-config/hardhat.config.ts @@ -0,0 +1,8 @@ +module.exports = { + networks: { + mainnet: { + chainId: 1, + url: `https://mainnet.infura.io/v3/123456`, + }, + }, +} diff --git a/packages/hardhat-graph-protocol/test/fixtures/files/addresses-global.json b/packages/hardhat-graph-protocol/test/fixtures/files/addresses-global.json new file mode 100644 index 000000000..e69de29bb diff --git a/packages/hardhat-graph-protocol/test/fixtures/files/addresses-hre.json b/packages/hardhat-graph-protocol/test/fixtures/files/addresses-hre.json new file mode 100644 index 000000000..e69de29bb diff --git a/packages/hardhat-graph-protocol/test/fixtures/files/addresses-network.json b/packages/hardhat-graph-protocol/test/fixtures/files/addresses-network.json new file mode 100644 index 000000000..e69de29bb diff --git a/packages/hardhat-graph-protocol/test/fixtures/files/addresses-opt.json b/packages/hardhat-graph-protocol/test/fixtures/files/addresses-opt.json new file mode 100644 index 000000000..e69de29bb diff --git a/packages/hardhat-graph-protocol/test/fixtures/global-address-book/hardhat.config.ts b/packages/hardhat-graph-protocol/test/fixtures/global-address-book/hardhat.config.ts new file mode 100644 index 000000000..b7224dfa4 --- /dev/null +++ b/packages/hardhat-graph-protocol/test/fixtures/global-address-book/hardhat.config.ts @@ -0,0 +1,48 @@ +import '../../../src/index' + +import type { HardhatUserConfig } from 'hardhat/config' + +const config: HardhatUserConfig = { + paths: { + graph: '../files', + }, + solidity: '0.8.9', + defaultNetwork: 'hardhat', + networks: { + 'hardhat': { + chainId: 1337, + accounts: { + mnemonic: 'pumpkin orient can short never warm truth legend cereal tourist craft skin', + }, + }, + 'mainnet': { + chainId: 1, + url: `https://mainnet.infura.io/v3/123456`, + }, + 'arbitrum-one': { + chainId: 42161, + url: 'https://arb1.arbitrum.io/rpc', + }, + 'goerli': { + chainId: 5, + url: `https://goerli.infura.io/v3/123456`, + }, + 'arbitrum-goerli': { + chainId: 421613, + url: 'https://goerli-rollup.arbitrum.io/rpc', + }, + 'localhost': { + chainId: 1337, + url: 'http://127.0.0.1:8545', + }, + 'arbitrum-rinkeby': { + chainId: 421611, + url: 'http://127.0.0.1:8545', + }, + }, + graph: { + addressBook: 'addresses-global.json', + }, +} + +export default config diff --git a/packages/hardhat-graph-protocol/test/fixtures/invalid-address-book/hardhat.config.ts b/packages/hardhat-graph-protocol/test/fixtures/invalid-address-book/hardhat.config.ts new file mode 100644 index 000000000..995dacc17 --- /dev/null +++ b/packages/hardhat-graph-protocol/test/fixtures/invalid-address-book/hardhat.config.ts @@ -0,0 +1,48 @@ +import '../../../src/index' + +import type { HardhatUserConfig } from 'hardhat/config' + +const config: HardhatUserConfig = { + paths: { + graph: '../files', + }, + solidity: '0.8.9', + defaultNetwork: 'hardhat', + networks: { + 'hardhat': { + chainId: 1337, + accounts: { + mnemonic: 'pumpkin orient can short never warm truth legend cereal tourist craft skin', + }, + }, + 'mainnet': { + chainId: 1, + url: `https://mainnet.infura.io/v3/123456`, + }, + 'arbitrum-one': { + chainId: 42161, + url: 'https://arb1.arbitrum.io/rpc', + }, + 'goerli': { + chainId: 5, + url: `https://goerli.infura.io/v3/123456`, + }, + 'arbitrum-goerli': { + chainId: 421613, + url: 'https://goerli-rollup.arbitrum.io/rpc', + }, + 'localhost': { + chainId: 1337, + url: 'http://127.0.0.1:8545', + }, + 'arbitrum-rinkeby': { + chainId: 421611, + url: 'http://127.0.0.1:8545', + }, + }, + graph: { + addressBook: 'addresses-invalid.json', + }, +} + +export default config diff --git a/packages/hardhat-graph-protocol/test/fixtures/network-address-book/hardhat.config.ts b/packages/hardhat-graph-protocol/test/fixtures/network-address-book/hardhat.config.ts new file mode 100644 index 000000000..51fd2341c --- /dev/null +++ b/packages/hardhat-graph-protocol/test/fixtures/network-address-book/hardhat.config.ts @@ -0,0 +1,49 @@ +import '../../../src/index' + +import type { HardhatUserConfig } from 'hardhat/config' + +const config: HardhatUserConfig = { + paths: { + graph: '../files', + }, + solidity: '0.8.9', + defaultNetwork: 'hardhat', + networks: { + 'hardhat': { + chainId: 1337, + accounts: { + mnemonic: 'pumpkin orient can short never warm truth legend cereal tourist craft skin', + }, + }, + 'mainnet': { + chainId: 1, + url: `https://mainnet.infura.io/v3/123456`, + addressBook: 'addresses-network.json', + }, + 'arbitrum-one': { + chainId: 42161, + url: 'https://arb1.arbitrum.io/rpc', + }, + 'goerli': { + chainId: 5, + url: `https://goerli.infura.io/v3/123456`, + }, + 'arbitrum-goerli': { + chainId: 421613, + url: 'https://goerli-rollup.arbitrum.io/rpc', + }, + 'localhost': { + chainId: 1337, + url: 'http://127.0.0.1:8545', + }, + 'arbitrum-rinkeby': { + chainId: 421611, + url: 'http://127.0.0.1:8545', + }, + }, + graph: { + addressBook: 'addresses-global.json', + }, +} + +export default config diff --git a/packages/hardhat-graph-protocol/test/fixtures/no-path-config/addresses.json b/packages/hardhat-graph-protocol/test/fixtures/no-path-config/addresses.json new file mode 100644 index 000000000..e69de29bb diff --git a/packages/hardhat-graph-protocol/test/fixtures/no-path-config/hardhat.config.ts b/packages/hardhat-graph-protocol/test/fixtures/no-path-config/hardhat.config.ts new file mode 100644 index 000000000..0329f449e --- /dev/null +++ b/packages/hardhat-graph-protocol/test/fixtures/no-path-config/hardhat.config.ts @@ -0,0 +1,45 @@ +import '../../../src/index' + +import type { HardhatUserConfig } from 'hardhat/config' + +const config: HardhatUserConfig = { + solidity: '0.8.9', + defaultNetwork: 'hardhat', + networks: { + 'hardhat': { + chainId: 1337, + accounts: { + mnemonic: 'pumpkin orient can short never warm truth legend cereal tourist craft skin', + }, + }, + 'mainnet': { + chainId: 1, + url: `https://mainnet.infura.io/v3/123456`, + }, + 'arbitrum-one': { + chainId: 42161, + url: 'https://arb1.arbitrum.io/rpc', + }, + 'goerli': { + chainId: 5, + url: `https://goerli.infura.io/v3/123456`, + }, + 'arbitrum-goerli': { + chainId: 421613, + url: 'https://goerli-rollup.arbitrum.io/rpc', + }, + 'localhost': { + chainId: 1337, + url: 'http://127.0.0.1:8545', + }, + 'arbitrum-rinkeby': { + chainId: 421611, + url: 'http://127.0.0.1:8545', + }, + }, + graph: { + addressBook: 'addresses.json', + }, +} + +export default config diff --git a/packages/hardhat-graph-protocol/test/fixtures/path-config/hardhat.config.ts b/packages/hardhat-graph-protocol/test/fixtures/path-config/hardhat.config.ts new file mode 100644 index 000000000..c8a4b55fc --- /dev/null +++ b/packages/hardhat-graph-protocol/test/fixtures/path-config/hardhat.config.ts @@ -0,0 +1,48 @@ +import '../../../src/index' + +import type { HardhatUserConfig } from 'hardhat/config' + +const config: HardhatUserConfig = { + paths: { + graph: '../files', + }, + solidity: '0.8.9', + defaultNetwork: 'hardhat', + networks: { + 'hardhat': { + chainId: 1337, + accounts: { + mnemonic: 'pumpkin orient can short never warm truth legend cereal tourist craft skin', + }, + }, + 'mainnet': { + chainId: 1, + url: `https://mainnet.infura.io/v3/123456`, + }, + 'arbitrum-one': { + chainId: 42161, + url: 'https://arb1.arbitrum.io/rpc', + }, + 'goerli': { + chainId: 5, + url: `https://goerli.infura.io/v3/123456`, + }, + 'arbitrum-goerli': { + chainId: 421613, + url: 'https://goerli-rollup.arbitrum.io/rpc', + }, + 'localhost': { + chainId: 1337, + url: 'http://127.0.0.1:8545', + }, + 'arbitrum-rinkeby': { + chainId: 421611, + url: 'http://127.0.0.1:8545', + }, + }, + graph: { + addressBook: 'addresses-hre.json', + }, +} + +export default config diff --git a/packages/hardhat-graph-protocol/test/gre.test.ts b/packages/hardhat-graph-protocol/test/gre.test.ts new file mode 100644 index 000000000..4331ed1c4 --- /dev/null +++ b/packages/hardhat-graph-protocol/test/gre.test.ts @@ -0,0 +1,58 @@ +import path from 'path' + +import { assert, expect } from 'chai' +import { useEnvironment } from './helpers' + +describe('GRE usage', function () { + describe('Project not using GRE', function () { + useEnvironment('default-config', 'mainnet') + + it('should throw when accessing hre.graph()', function () { + expect(() => this.hre.graph()).to.throw() + }) + }) + + describe(`Project using GRE: path-config`, function () { + useEnvironment('path-config', 'mainnet') + + it('should add the graph path to the config', function () { + assert.equal( + this.hre.config.paths.graph, + path.join(__dirname, 'fixtures/files'), + ) + }) + }) + + describe(`Project using GRE: no-path-config`, function () { + useEnvironment('no-path-config', 'mainnet') + + it('should add the graph path to the config', function () { + assert.equal( + this.hre.config.paths.graph, + path.join(__dirname, 'fixtures/no-path-config'), + ) + }) + }) + + describe(`Project using GRE: global-address-book`, function () { + useEnvironment('global-address-book', 'mainnet') + + it('should use the global address book', function () { + assert.equal( + this.hre.graph().addressBook.file, + path.join(__dirname, 'fixtures/files/addresses-global.json'), + ) + }) + }) + + describe(`Project using GRE: network-address-book`, function () { + useEnvironment('network-address-book', 'mainnet') + + it('should use the network address book', function () { + assert.equal( + this.hre.graph().addressBook.file, + path.join(__dirname, 'fixtures/files/addresses-network.json'), + ) + }) + }) +}) diff --git a/packages/hardhat-graph-protocol/test/helpers.ts b/packages/hardhat-graph-protocol/test/helpers.ts new file mode 100644 index 000000000..561e59c0e --- /dev/null +++ b/packages/hardhat-graph-protocol/test/helpers.ts @@ -0,0 +1,26 @@ +import path from 'path' +import { resetHardhatContext } from 'hardhat/plugins-testing' + +import type { HardhatRuntimeEnvironment } from 'hardhat/types' + +declare module 'mocha' { + interface Context { + hre: HardhatRuntimeEnvironment + } +} + +export function useEnvironment(fixtureProjectName: string, network?: string): void { + beforeEach('Loading hardhat environment', function () { + process.chdir(path.join(__dirname, 'fixtures', fixtureProjectName)) + + if (network !== undefined) { + process.env.HARDHAT_NETWORK = network + } + this.hre = require('hardhat') + }) + + afterEach('Resetting hardhat', function () { + resetHardhatContext() + delete process.env.HARDHAT_NETWORK + }) +} diff --git a/packages/hardhat-graph-protocol/tsconfig.json b/packages/hardhat-graph-protocol/tsconfig.json new file mode 100644 index 000000000..9ddee2404 --- /dev/null +++ b/packages/hardhat-graph-protocol/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true, + "outDir": "dist", + }, + "include": ["eslint.config.js", "src/**/*.ts"] +} diff --git a/packages/horizon/addresses.json b/packages/horizon/addresses.json new file mode 100644 index 000000000..ae66613a2 --- /dev/null +++ b/packages/horizon/addresses.json @@ -0,0 +1,1453 @@ +{ + "1": { + "IENS": { + "address": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" + }, + "IEthereumDIDRegistry": { + "address": "0xdCa7EF03e98e0DC2B855bE647C39ABe984fcF21B" + }, + "GraphProxyAdmin": { + "address": "0xF3B000a6749259539aF4E49f24EEc74Ea0e71430", + "creationCodeHash": "0x26a6f47e71ad242e264768571ce7223bf5a86fd0113ab6cb8200f65820232904", + "runtimeCodeHash": "0xd5330527cfb09df657adc879d8ad704ce6b8d5917265cabbd3eb073d1399f122", + "txHash": "0xc5fe1a9f70e3cc4d286e19e3ee8ee9a0639c7415aea22a3f308951abf300382c" + }, + "BancorFormula": { + "address": "0xd0C61e8F15d9deF697E1100663eD7dA74d3727dC", + "creationCodeHash": "0x17f6de9ab8a9bcf03a548c01d620a32caf1f29be8d90a9688ebee54295f857ef", + "runtimeCodeHash": "0x97a57f69b0029383398d02587a3a357168950d61622fe9f9710bf02b59740d63", + "txHash": "0xcd0e28e7d328ff306bb1f2079e594ff9d04d09f21bc5f978b790c8d44b02055a" + }, + "Controller": { + "address": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117", + "creationCodeHash": "0x7f37a1844c38fffd5390d2114804ffc4e5cf66dfb5c7bd67a32a4f5d10eebd2d", + "runtimeCodeHash": "0x929c62381fbed59483f832611752177cc2642e1e35fedeeb6cd9703e278448a0", + "txHash": "0x12b13ed4ac6fee14335be09df76171b26223d870977524cfdce46c11112a5c04" + }, + "EpochManager": { + "address": "0x64F990Bf16552A693dCB043BB7bf3866c5E05DdB", + "initArgs": [ + { + "name": "controller", + "value": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117" + }, + { + "name": "lengthInBlocks", + "value": 6646 + } + ], + "creationCodeHash": "0xa02709eb59b9cca8bee1271845b42db037dc1d042dad93410ba532d378a7c79f", + "runtimeCodeHash": "0xdb307489fd9a4a438b5b48909e12020b209280ad777561c0a7451655db097e75", + "txHash": "0x9116a77a4e87eb3fe28514a26b1a6e3ee5ce982f9df3c18aadfc36d4f7f050e7", + "proxy": true, + "implementation": { + "address": "0x3fab259F2392F733c60C19492B5678E5D2D2Ee31", + "creationCodeHash": "0xf03074bb7f026a2574b6ffb5d0f63f0c4fee81e004e1c46ef262dd5802d3384f", + "runtimeCodeHash": "0x0d078a0bf778c6c713c46979ac668161a0a0466356252e47082f80912e4495b2", + "txHash": "0x730141db9a1dc5c9429f7543442e34e9eb994610e2ceabdedb6d322e1bedf2aa" + } + }, + "GraphToken": { + "address": "0xc944E90C64B2c07662A292be6244BDf05Cda44a7", + "constructorArgs": [ + { + "name": "initialSupply", + "value": "10000000000000000000000000000" + } + ], + "creationCodeHash": "0x30da7a30d71fbd41d3327e4d0183401f257af3e905a0c68ebfd18b590b27b530", + "runtimeCodeHash": "0xb964f76194a04272e7582382a4d6bd6271bbb90deb5c1fd3ae3913504ea3a830", + "txHash": "0x079625b9f58a40f1948b396b7007d09ff4aa193d7ec798923910fc179294cab8" + }, + "ServiceRegistry": { + "address": "0xaD0C9DaCf1e515615b0581c8D7E295E296Ec26E6", + "initArgs": [ + { + "name": "controller", + "value": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117" + } + ], + "creationCodeHash": "0xa02709eb59b9cca8bee1271845b42db037dc1d042dad93410ba532d378a7c79f", + "runtimeCodeHash": "0xdb307489fd9a4a438b5b48909e12020b209280ad777561c0a7451655db097e75", + "txHash": "0x94cbb1d3863e33bf92acc6fab534c5ce63a9d1347958a323ae496b06f710f042", + "proxy": true, + "implementation": { + "address": "0x866232Ec9a9F918a821eBa561Cc5FC960Ef5B3aa", + "creationCodeHash": "0xf5fa541b43d15fade518feb63a95a73b9c67626108ead259e444af3a7ae1804f", + "runtimeCodeHash": "0x9856d2c2985f410f2f77e456fe6163827ea5251eb5e3f3768d3d4f8868187882", + "txHash": "0xdf811598fbfbc487b16b5bb3444ed47ae3107d3dcde8dbd770e8810315f942b5" + } + }, + "GraphCurationToken": { + "address": "0xb2E26f17Aea8eFA534e15Bde5C79c25D0C3dfa2e", + "creationCodeHash": "0x7e9a56b6fc05d428d1c1116eaa88a658f05487b493d847bfe5c69e35ec34f092", + "runtimeCodeHash": "0x587f9d4e9ecf9e7048d9f42f027957ca34ee6a95ca37d9758d8cd0ee16e89818", + "txHash": "0x68eb11f4d6eaec5036c97b4c6102a509ac31933f1fe011f275b3e5fee30b6590" + }, + "Curation": { + "address": "0x8FE00a685Bcb3B2cc296ff6FfEaB10acA4CE1538", + "initArgs": [ + { + "name": "controller", + "value": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117" + }, + { + "name": "bondingCurve", + "value": "0xd0C61e8F15d9deF697E1100663eD7dA74d3727dC" + }, + { + "name": "reserveRatio", + "value": 500000 + }, + { + "name": "curationTaxPercentage", + "value": 25000 + }, + { + "name": "minimumCurationDeposit", + "value": "1000000000000000000" + } + ], + "creationCodeHash": "0xa02709eb59b9cca8bee1271845b42db037dc1d042dad93410ba532d378a7c79f", + "runtimeCodeHash": "0xdb307489fd9a4a438b5b48909e12020b209280ad777561c0a7451655db097e75", + "txHash": "0x64d8d94e21f1923bd1793011ba28f24befd57b511622920716238b05595dac7d", + "proxy": true, + "implementation": { + "address": "0xDeb46851907fd85DD475780CcE2eE0D67c969825", + "creationCodeHash": "0x32ec24cd745738aea9b8cb693d4a20f3cf219226da985ab92d270d3e0b5f7f65", + "runtimeCodeHash": "0xfc0db997a425bc44ee6d6f1e2fd6471227489a22c94f1b358b900134e7ce6308", + "txHash": "0xe95fd068849d1c9f49fbeadb3e7618e1748cc581406d7fdf15204a49d90d2f02" + } + }, + "L1GNS": { + "address": "0xaDcA0dd4729c8BA3aCf3E99F3A9f471EF37b6825", + "initArgs": [ + { + "name": "controller", + "value": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117" + }, + { + "name": "bondingCurve", + "value": "0xd0C61e8F15d9deF697E1100663eD7dA74d3727dC" + }, + { + "name": "didRegistry", + "value": "0xdca7ef03e98e0dc2b855be647c39abe984fcf21b" + } + ], + "creationCodeHash": "0xa02709eb59b9cca8bee1271845b42db037dc1d042dad93410ba532d378a7c79f", + "runtimeCodeHash": "0xdb307489fd9a4a438b5b48909e12020b209280ad777561c0a7451655db097e75", + "txHash": "0x7ef90b0477e5c5d05bbd203af7d2bf15224640204e12abb07331df11425d2d00", + "proxy": true, + "implementation": { + "address": "0x83A5B6C542aB20436087Fc79724bdF06ea80f836", + "creationCodeHash": "0xc34de4bdb2c1f364bc3aed96ac77248518578af009a60597835325c0346cc639", + "runtimeCodeHash": "0x134ddad3a28975b2b246e41fc21f647a0b6a6c47d170aea23c9d9ef295cfdd01", + "txHash": "0x0c26745e6d492737a64c253f2384bb2af1ec63a64088799b208e3f0563a528ce" + } + }, + "L1Staking": { + "address": "0xF55041E37E12cD407ad00CE2910B8269B01263b9", + "initArgs": [ + { + "name": "controller", + "value": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117" + }, + { + "name": "minimumIndexerStake", + "value": "100000000000000000000000" + }, + { + "name": "thawingPeriod", + "value": 186092 + }, + { + "name": "protocolPercentage", + "value": 10000 + }, + { + "name": "curationPercentage", + "value": 100000 + }, + { + "name": "channelDisputeEpochs", + "value": 7 + }, + { + "name": "maxAllocationEpochs", + "value": 28 + }, + { + "name": "delegationUnbondingPeriod", + "value": 28 + }, + { + "name": "delegationRatio", + "value": 16 + }, + { + "name": "rebateAlphaNumerator", + "value": 77 + }, + { + "name": "rebateAlphaDenominator", + "value": 100 + } + ], + "creationCodeHash": "0xa02709eb59b9cca8bee1271845b42db037dc1d042dad93410ba532d378a7c79f", + "runtimeCodeHash": "0xdb307489fd9a4a438b5b48909e12020b209280ad777561c0a7451655db097e75", + "txHash": "0x6c92edf1c385983d57be0635cf40e1d1068d778edecf2be1631f51556c731af7", + "proxy": true, + "implementation": { + "address": "0x20a14D78848BC8B3F3d4B77239F2adC3C0259A10", + "creationCodeHash": "0x2f3c1dcd9c0abbafd708a5ba243e4afaa115a18f7a4a7db9728cc75e8a8c48fb", + "runtimeCodeHash": "0x4c9896765a37b29d0de3a6f37df1903f7efe1f62e937cb31fdfedd8be7f3008e", + "txHash": "0x6c096b17b867db5775e8d300f0469dec888dde8dbcee03a2294383e23150fbe5", + "libraries": { + "LibExponential": "0xD0AAe7a0A6Ae551DCA969183e1bB376F8a455Ea1" + } + } + }, + "RewardsManager": { + "address": "0x9Ac758AB77733b4150A901ebd659cbF8cB93ED66", + "initArgs": [ + { + "name": "controller", + "value": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117" + }, + { + "name": "issuanceRate", + "value": "1000000012184945188" + } + ], + "creationCodeHash": "0xa02709eb59b9cca8bee1271845b42db037dc1d042dad93410ba532d378a7c79f", + "runtimeCodeHash": "0xdb307489fd9a4a438b5b48909e12020b209280ad777561c0a7451655db097e75", + "txHash": "0xd3a4d1b3e250e606f56417fd6e43d35bc794e793b1c5be4ffbecc3a43ca1b7b6", + "proxy": true, + "implementation": { + "address": "0xD92944C84826Be7d1D168B239D30AF4583E085e5", + "creationCodeHash": "0x59c1680da2d19124daaf95fd66acc5eae68e6f46dfe2ff0b3ccb777daf9949b2", + "runtimeCodeHash": "0xe33080183ec49ab1ec8d78b80b90158f0f3ac6f2deedf6115a32a9d11d3e4d9b", + "txHash": "0x55256a323baca3666f9c9f4e4141f037aecd7c5110b7db1a3f3ab28802c8dd48" + } + }, + "DisputeManager": { + "address": "0x97307b963662cCA2f7eD50e38dCC555dfFc4FB0b", + "initArgs": [ + { + "name": "controller", + "value": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117" + }, + { + "name": "arbitrator", + "value": "0xE1FDD398329C6b74C14cf19100316f0826a492d3" + }, + { + "name": "minimumDeposit", + "value": "10000000000000000000000" + }, + { + "name": "fishermanRewardPercentage", + "value": 500000 + }, + { + "name": "slashingPercentage", + "value": 25000 + } + ], + "creationCodeHash": "0xa02709eb59b9cca8bee1271845b42db037dc1d042dad93410ba532d378a7c79f", + "runtimeCodeHash": "0xdb307489fd9a4a438b5b48909e12020b209280ad777561c0a7451655db097e75", + "txHash": "0x90cd5852f5824f76d93814ffea26040ff503c81a84c4430e3688f219f9b48465", + "proxy": true, + "implementation": { + "address": "0x444c138bf2b151f28a713b0ee320240365a5bfc2", + "creationCodeHash": "0xc00c4702d9683f70a90f0b73ce1842e66fa4c26b2cf75fb486a016bb7bac2102", + "runtimeCodeHash": "0x2bb6445bf9e12618423efe9ef64d05e14d283979829e751cd24685c1440c403f", + "txHash": "0x413cd4f8e9e70ad482500772c1f13b0be48deb42d7f2d0d5a74b56d5a6bd8a4d" + } + }, + "AllocationExchange": { + "address": "0x4a53cf3b3EdA545dc61dee0cA21eA8996C94385f", + "initArgs": [ + { + "name": "graphToken", + "value": "0xc944e90c64b2c07662a292be6244bdf05cda44a7" + }, + { + "name": "staking", + "value": "0xf55041e37e12cd407ad00ce2910b8269b01263b9" + }, + { + "name": "governor", + "value": "0x74db79268e63302d3fc69fb5a7627f7454a41732" + }, + { + "name": "authority", + "value": "0x79fd74da4c906509862c8fe93e87a9602e370bc4" + } + ], + "creationCodeHash": "0x1c7b0d7e81fc15f8ccc5b159e2cedb1f152653ebbce895b59eb74a1b26826fda", + "runtimeCodeHash": "0xa63c77e0724a5f679660358452e388f60379f1331e74542afb1436ffb213b960", + "txHash": "0x2ecd036c562f2503af9eaa1a9bca3729bd31ec8a91677530eefbecb398b793ba" + }, + "SubgraphNFTDescriptor": { + "address": "0x8F0B7e136891e8Bad6aa4Abcb64EeeFE29dC2Af0", + "creationCodeHash": "0x7ac0757e66857e512df199569ee11c47a61b00a8d812469b79afa5dafa98c0ed", + "runtimeCodeHash": "0x9a34ad6b202bdfa95ea85654ea2e0dd40a4b8b10847f1c3d3d805fa95a078a3d", + "txHash": "0x77d98358726575ae044ac988b98b63f537951ccae2010e7177c4a7833dce9158" + }, + "SubgraphNFT": { + "address": "0x24e36639b3A3aaA9c928a8A6f12d34F942f1ab67", + "creationCodeHash": "0x8c9929ec6293458209f9cbadd96821604765e3656fe3c7b289b99194ede15336", + "runtimeCodeHash": "0x6309a51754b6bec245685c7a81059dc28e3756f1045f18d059abc9294f454a6a", + "txHash": "0x106c31f2c24a5285c47a766422823766f1c939034513e85613d70d99ef697173" + }, + "BridgeEscrow": { + "address": "0x36aFF7001294daE4C2ED4fDEfC478a00De77F090", + "initArgs": ["0x24CCD4D3Ac8529fF08c58F74ff6755036E616117"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x218aff2c804dd3dfe5064b08cab83ffb37382ca2aea1a225c2ead02ec99f38b5", + "proxy": true, + "implementation": { + "address": "0xBcD54513aa593646d72aEA31406c633C235Ad6EA", + "creationCodeHash": "0x6a1fc897c0130a1c99221cde1938d247de13a0861111ac47ad81c691f323df1a", + "runtimeCodeHash": "0xc8e31a4ebea0c3e43ceece974071ba0b6db2bed6725190795e07a2d369d2a8ab", + "txHash": "0x92908e33b54f59ec13a0f7bd29b818c421742294b9974d73859e0bde871bafb9" + } + }, + "L1GraphTokenGateway": { + "address": "0x01cDC91B0A9bA741903aA3699BF4CE31d6C5cC06", + "initArgs": ["0x24CCD4D3Ac8529fF08c58F74ff6755036E616117"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xd327568a286d6fcda1a6b78a14c87d660523a6900be901d6a7fbc2504faff64b", + "proxy": true, + "implementation": { + "address": "0xD41ca6A1d034D178c196DFa916f22f7D1a1B8222", + "creationCodeHash": "0x7d6f46e4801d562a8c6fc37779711cce39b3544ea62c6c6517d4b06e8604e38c", + "runtimeCodeHash": "0xa0c0a37340ee949d31c3d41b642c507c58f225c09da9ae3d378e5148cd27081a", + "txHash": "0x25f4234807c7f09b813d4e413311bbe440c8257bc050c71678f63a7abc6e643e" + } + }, + "StakingExtension": { + "address": "0xA479c00cDa8C07bce458D7a826C7b091672EB92C", + "creationCodeHash": "0xe23c59dbfb94b0cf7ef58f654b905977624ce57eaae2fce692edb28ca3f1b3ba", + "runtimeCodeHash": "0xca8ad20187bc87e0e04a15184f529787dd23a0095047d411e1b271617a951c49", + "txHash": "0x13cd940ba9c8dd576f9f311e805539792f4caa88ada5a1b516355edabc776dd8" + } + }, + "5": { + "GraphProxyAdmin": { + "address": "0x6D47902c3358E0BCC06171DE935cB23D8E276fdd", + "creationCodeHash": "0x8b9a4c23135748eb0e4d0e743f7276d86264ace935d23f9aadcfccd64b482055", + "runtimeCodeHash": "0x47aa67e4a85090fe7324268b55fb7b320ee7a8937f2ad02480b71d4bb3332b13", + "txHash": "0xd4be829c13c741b8b56ca5ee7d98d86237ce44df7c11eff73df26cd87d5cab94" + }, + "BancorFormula": { + "address": "0x2DFDC3e11E035dD96A4aB30Ef67fab4Fb6EC01f2", + "creationCodeHash": "0x7ae36017eddb326ddd79c7363781366121361d42fdb201cf57c57424eede46f4", + "runtimeCodeHash": "0xed6701e196ad93718e28c2a2a44d110d9e9906085bcfe4faf4f6604b08f0116c", + "txHash": "0x97ca33e6e7d1d7d62bdec4827f208076922d9c42bf149693b36ab91429e65740" + }, + "Controller": { + "address": "0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B", + "creationCodeHash": "0x4f2082404e96b71282e9d7a8b7efd0f34996b5edac6711095911d36a57637c88", + "runtimeCodeHash": "0xe31d064a2db44ac10d41d74265b7d4482f86ee95644b9745c04f9fc91006906d", + "txHash": "0x8087bd10cc8d456a7b573bc30308785342db2b90d80f3a750931ab9cf5273b83" + }, + "EpochManager": { + "address": "0x03541c5cd35953CD447261122F93A5E7b812D697", + "initArgs": ["0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B", "554"], + "creationCodeHash": "0x25a7b6cafcebb062169bc25fca9bcce8f23bd7411235859229ae3cc99b9a7d58", + "runtimeCodeHash": "0xaf2d63813a0e5059f63ec46e1b280eb9d129d5ad548f0cdd1649d9798fde10b6", + "txHash": "0xb1c6189514b52091e35c0349dff29357a2572cd9c2f9ad7f623b2b24252826d1", + "proxy": true, + "implementation": { + "address": "0xb6a641879F195448F3Da10fF3b3C4541808a9342", + "creationCodeHash": "0x729aca90fcffdeede93bc42a6e089a93085ec04133e965cf0291cf6245880595", + "runtimeCodeHash": "0xce525d338b6ed471eeb36d2927a26608cca2d5cfe52bd0585945eacc55b525cf", + "txHash": "0x139630c31b6a5799231572aa0b555a44209acd79fb3df98832d80cf9a1013b58" + } + }, + "GraphToken": { + "address": "0x5c946740441C12510a167B447B7dE565C20b9E3C", + "constructorArgs": ["10000000000000000000000000000"], + "creationCodeHash": "0xa749ef173d768ffe0786529cd23238bc525f4a621a91303d8fb176533c18cec2", + "runtimeCodeHash": "0xe584408c8e04a6200bc7a50816343585ad80f699bd394b89bb96964dbc1a2a92", + "txHash": "0x0639808a47da8a5270bc89eb3009c7d29167c8f32f015648920ec5d114225540" + }, + "GraphCurationToken": { + "address": "0x8bEd0a89F18a801Da9dEA994D475DEa74f75A059", + "creationCodeHash": "0x8c076dacbf98f839a0ff25c197eafc836fc3fc1ee5183c7f157acec17678a641", + "runtimeCodeHash": "0xad138b4c4f34501f83aea6c03a49c103a9115526c993860a9acbd6caeaaf0d64", + "txHash": "0xc09739affd3d9dd43f690d3a487b1c149ad8aa50164995cfbc9de73914ff278a" + }, + "ServiceRegistry": { + "address": "0x7CF8aD279E9F26b7DAD2Be452A74068536C8231F", + "initArgs": ["0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B"], + "creationCodeHash": "0x25a7b6cafcebb062169bc25fca9bcce8f23bd7411235859229ae3cc99b9a7d58", + "runtimeCodeHash": "0xaf2d63813a0e5059f63ec46e1b280eb9d129d5ad548f0cdd1649d9798fde10b6", + "txHash": "0xf250ef40f4172e54b96047a59cfd7fc35ffabe14484ff1d518e0262195895282", + "proxy": true, + "implementation": { + "address": "0xdC7Fb3a43B9e069df5F07eDc835f60dAc3fD40BA", + "creationCodeHash": "0x45f56a7ad420cd11a8585594fb29121747d87d412161c8779ea36dfd34a48e88", + "runtimeCodeHash": "0x26aceabe83e2b757b2f000e185017528cdde2323c2129fd612180ac3192adfda", + "txHash": "0x2fdb5fa641f707809322107573ce7799711e125cc781aade99fd2948455847ab" + } + }, + "Curation": { + "address": "0xE59B4820dDE28D2c235Bd9A73aA4e8716Cb93E9B", + "initArgs": [ + "0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B", + "0x2DFDC3e11E035dD96A4aB30Ef67fab4Fb6EC01f2", + "0x8bEd0a89F18a801Da9dEA994D475DEa74f75A059", + "500000", + "10000", + "1000000000000000000" + ], + "creationCodeHash": "0x25a7b6cafcebb062169bc25fca9bcce8f23bd7411235859229ae3cc99b9a7d58", + "runtimeCodeHash": "0xaf2d63813a0e5059f63ec46e1b280eb9d129d5ad548f0cdd1649d9798fde10b6", + "txHash": "0xf1b1f0f28b80068bcc9fd6ef475be6324a8b23cbdb792f7344f05ce00aa997d7", + "proxy": true, + "implementation": { + "address": "0x2b757ad83e4ed51ecae8d4dc9ade8e3fa29f7bdc", + "creationCodeHash": "0xde37904a7c087e05dc5f84e46a7ff35e1f75f013db373c72715d81d21921de4a", + "runtimeCodeHash": "0x867f82ea221eee52ee0db10a2b49ed8051f4ffc4069238d01f8a0110798a51ef", + "txHash": "0x928ed1d624aecbfdb60d5840c2b9cc81573b9dbe3ec96cf6d86dc8194cb7fdac" + } + }, + "SubgraphNFTDescriptor": { + "address": "0xE7e406b4Bfce0B78A751712BFEb1D6B0ce60e8fb", + "creationCodeHash": "0xf16e8ff11d852eea165195ac9e0dfa00f98e48f6ce3c77c469c7df9bf195b651", + "runtimeCodeHash": "0x39583196f2bcb85789b6e64692d8c0aa56f001c46f0ca3d371abbba2c695860f", + "txHash": "0xffee21f6616abd4ffdab0b930dbf44d2ba381a08c3c834798df464fd85e8047e" + }, + "SubgraphNFT": { + "address": "0x083318049968F20EfaEA48b0978EC57bbb0ECbcE", + "constructorArgs": ["0xEfc519BEd6a43a14f1BBBbA9e796C4931f7A5540"], + "creationCodeHash": "0x5de044b15df24beb8781d1ebe71f01301a6b8985183f37eb8d599aa4059a1d3e", + "runtimeCodeHash": "0x6a7751298d6ffdbcf421a3b72faab5b7d425884b04757303123758dbcfb21dfa", + "txHash": "0x8884b65a236c188e4c61cf9593be2f67b27e4f80785939336d659866cfd97aec" + }, + "L1GNS": { + "address": "0x065611D3515325aE6fe14f09AEe5Aa2C0a1f0CA7", + "initArgs": [ + "0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B", + "0x2DFDC3e11E035dD96A4aB30Ef67fab4Fb6EC01f2", + "0x083318049968F20EfaEA48b0978EC57bbb0ECbcE" + ], + "creationCodeHash": "0x25a7b6cafcebb062169bc25fca9bcce8f23bd7411235859229ae3cc99b9a7d58", + "runtimeCodeHash": "0xaf2d63813a0e5059f63ec46e1b280eb9d129d5ad548f0cdd1649d9798fde10b6", + "txHash": "0x0149f062893acb0eafcbf67acc99da99e03aab3ee2b6b40fbe523d91e0fcecd1", + "proxy": true, + "implementation": { + "address": "0xa95ee5A5f6b45Fcf85A7fa0714f462472C467818", + "creationCodeHash": "0x2e71e4aefc1e678cb9c71882c1da67fc640389337a7d6ae43f78d0f13294594a", + "runtimeCodeHash": "0xde0e02c6a36a90e11c768f40a81430b7e9cda261aa6dada14eaad392d42efc21", + "txHash": "0xbc6e9171943020d30c22197282311f003e79374e6eeeaab9c360942bdf4193f4" + } + }, + "L1Staking": { + "address": "0x35e3Cb6B317690d662160d5d02A5b364578F62c9", + "initArgs": [ + "0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B", + "100000000000000000000000", + "6646", + "10000", + "100000", + "2", + "4", + "12", + "16", + "77", + "100" + ], + "creationCodeHash": "0x25a7b6cafcebb062169bc25fca9bcce8f23bd7411235859229ae3cc99b9a7d58", + "runtimeCodeHash": "0xaf2d63813a0e5059f63ec46e1b280eb9d129d5ad548f0cdd1649d9798fde10b6", + "txHash": "0x1960be49029284756037cf3ee8afe9eeaba93de4ba84875c5eefd5d2289903bd", + "proxy": true, + "implementation": { + "address": "0x475e6b44ad3F570907C234A7084df5Df65c7430C", + "creationCodeHash": "0x665ac0b452b51bf138cc1ab67e642a06874e754081432ea0fe3dd093c0eef145", + "runtimeCodeHash": "0x1f4490e6582f31ac25b22700b5704b893b9d7641ece59f7f911856f979f0b672", + "txHash": "0x509f8956d8e7a18c37838d9468e1c424558b1af3080087834da3244fa50cba2a", + "libraries": { + "LibExponential": "0xEB421FC914f8e898711974f13F194BCd21e51433" + } + } + }, + "RewardsManager": { + "address": "0x1246D7c4c903fDd6147d581010BD194102aD4ee2", + "initArgs": ["0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B", "1000000012184945188"], + "creationCodeHash": "0x25a7b6cafcebb062169bc25fca9bcce8f23bd7411235859229ae3cc99b9a7d58", + "runtimeCodeHash": "0xaf2d63813a0e5059f63ec46e1b280eb9d129d5ad548f0cdd1649d9798fde10b6", + "txHash": "0x108efecde4422dacf6ec7a07884cab214ba0a441fc73a6ad82ceb5c73e1c9334", + "proxy": true, + "implementation": { + "address": "0x295b26b449C533bd1831FF7d14c151C95a380e5e", + "creationCodeHash": "0x59c1680da2d19124daaf95fd66acc5eae68e6f46dfe2ff0b3ccb777daf9949b2", + "runtimeCodeHash": "0xe33080183ec49ab1ec8d78b80b90158f0f3ac6f2deedf6115a32a9d11d3e4d9b", + "txHash": "0x112a3c4447e16a75d1ceda6b475df1bdec8353c24de7282f333e734f93da85cc" + } + }, + "DisputeManager": { + "address": "0x8c344366D9269174F10bB588F16945eb47f78dc9", + "initArgs": [ + "0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B", + "0xFD01aa87BeB04D0ac764FC298aCFd05FfC5439cD", + "10000000000000000000000", + "500000", + "25000", + "25000" + ], + "creationCodeHash": "0x25a7b6cafcebb062169bc25fca9bcce8f23bd7411235859229ae3cc99b9a7d58", + "runtimeCodeHash": "0xaf2d63813a0e5059f63ec46e1b280eb9d129d5ad548f0cdd1649d9798fde10b6", + "txHash": "0xe93eba1bda0d262efabbc05d4e01b9ee197f22dd4f798e4c5fc5b1b9c137428e", + "proxy": true, + "implementation": { + "address": "0x476F0b8e5F952f0740aD3b0cb50648a7496c8388", + "creationCodeHash": "0x5b73c9b910d66426fd965ac3110e9debda1d81134c0354a7af8ec1f2ebd765f6", + "runtimeCodeHash": "0xcaf3547f0d675a1e1d2f887cf4666410bc3b084e65ad283ed3f1ff2b1bccc113", + "txHash": "0x6a90b5e2d5dcae2c94fe518ce7f6fb2ffc11e562b9feac6464dcb32e1e90c039" + } + }, + "AllocationExchange": { + "address": "0x67FBea097202f46D601D7C937b5DBb615659aDF2", + "constructorArgs": [ + "0x5c946740441C12510a167B447B7dE565C20b9E3C", + "0x35e3Cb6B317690d662160d5d02A5b364578F62c9", + "0xf1135bFF22512FF2A585b8d4489426CE660f204c", + "0x52e498aE9B8A5eE2A5Cd26805F06A9f29A7F489F" + ], + "creationCodeHash": "0x97714e1a80674ab0af90a10f2c7156cc92794ef81565fe9c7c35ecbe0025cc08", + "runtimeCodeHash": "0x5c20792fefe71126668be8ab19ab26cdb8ab9a6f73efbfa1d90f91e26459fa67", + "txHash": "0x87b35e5289792800832902206cf0ee4b9900e4d38089bd6634d10ea78729bf54" + }, + "IENS": { + "address": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" + }, + "IEthereumDIDRegistry": { + "address": "0xdCa7EF03e98e0DC2B855bE647C39ABe984fcF21B" + }, + "BridgeEscrow": { + "address": "0x8e4145358af77516B886D865e2EcacC0Fd832B75", + "initArgs": ["0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x190ea3c8f731a77a8fd1cbce860f9561f233adeafe559b33201b7d21ccd298cf", + "proxy": true, + "implementation": { + "address": "0xDD569E05D54fBF5d02fE4a26aC03Ea00317A0A2e", + "creationCodeHash": "0x6a1fc897c0130a1c99221cde1938d247de13a0861111ac47ad81c691f323df1a", + "runtimeCodeHash": "0xc8e31a4ebea0c3e43ceece974071ba0b6db2bed6725190795e07a2d369d2a8ab", + "txHash": "0x369038dcc8d8e70d40782dd761a82cc453c7a4f1939284c724a5a72119e3e566" + } + }, + "L1GraphTokenGateway": { + "address": "0xc82fF7b51c3e593D709BA3dE1b3a0d233D1DEca1", + "initArgs": ["0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x4a06731591df5c5f77c11bf8df7851234873eb6727fbbc93f5595a223f7cf3fc", + "proxy": true, + "implementation": { + "address": "0x9e8bab937Cac7c359F5e92248d10C613B3Cd7B8b", + "creationCodeHash": "0x7d6f46e4801d562a8c6fc37779711cce39b3544ea62c6c6517d4b06e8604e38c", + "runtimeCodeHash": "0xa0c0a37340ee949d31c3d41b642c507c58f225c09da9ae3d378e5148cd27081a", + "txHash": "0x517794503416be02d916d289f4e7510359d17567bec987da99319e27e5f40fc1" + } + }, + "StakingExtension": { + "address": "0x163203D9fae9eB88a8B3a11B1778710D6F855907", + "creationCodeHash": "0xe23c59dbfb94b0cf7ef58f654b905977624ce57eaae2fce692edb28ca3f1b3ba", + "runtimeCodeHash": "0xca8ad20187bc87e0e04a15184f529787dd23a0095047d411e1b271617a951c49", + "txHash": "0x20a0c0f2a26258e1c63f33f3a5651580bb74ea4bf0e66076ebbdda4fa41d5955" + } + }, + "42161": { + "GraphProxyAdmin": { + "address": "0x2983936aC20202a6555993448E0d5654AC8Ca5fd", + "creationCodeHash": "0x68b304ac6bce7380d5e0f6b14a122f628bffebcc75f8205cb60f0baf578b79c3", + "runtimeCodeHash": "0x8d9ba87a745cf82ab407ebabe6c1490197084d320efb6c246d94bcc80e804417", + "txHash": "0x3ff82c38ec0e08e8f4194689188edcc1e8acb1f231c14cce8f0223f4dfc6cb76" + }, + "BancorFormula": { + "address": "0xA489FDc65229D6225014C0b357BCD19af6f00eE9", + "creationCodeHash": "0x7ae36017eddb326ddd79c7363781366121361d42fdb201cf57c57424eede46f4", + "runtimeCodeHash": "0xed6701e196ad93718e28c2a2a44d110d9e9906085bcfe4faf4f6604b08f0116c", + "txHash": "0xb2bb14ba3cbd1bb31b08b86aced469745f9888710254bb3baed047f435e788c0" + }, + "Controller": { + "address": "0x0a8491544221dd212964fbb96487467291b2C97e", + "creationCodeHash": "0x798f913fbaa1b2547c917e3dc31679089ab27cba442c511c159803acdba28c15", + "runtimeCodeHash": "0x00ae0824f79c4e48d2d23a8d4e6d075f04f44f3ea30a4f4305c345bb98117c62", + "txHash": "0x2a9d5744ad0e5e2e6bb6733ae890702fed2bce906e4e8b1cc50d2d3912c58d18" + }, + "EpochManager": { + "address": "0x5A843145c43d328B9bB7a4401d94918f131bB281", + "initArgs": ["0x0a8491544221dd212964fbb96487467291b2C97e", "6646"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x4c70b8a56278452898d9eb23787a977d38141ebe48c79417c3acf6748ff921cf", + "proxy": true, + "implementation": { + "address": "0xeEDEdb3660154f439D93bfF612f7902edf07b848", + "creationCodeHash": "0x83bc0b08dbe1a9259666ec209f06223863f7bb9cfbf917a2d4b795c771a727fe", + "runtimeCodeHash": "0xed60261c6dc84ebc16830c36f3ee370a92802601d5a2fe1c3c19f5120dcbc2eb", + "txHash": "0x64fac1c567b7be735084b337a1e4ea9b990a8ffee8190485dc9b8dfcc257146c" + } + }, + "L2GraphToken": { + "address": "0x9623063377AD1B27544C965cCd7342f7EA7e88C7", + "initArgs": ["0x4528FD7868c91Ef64B9907450Ee8d82dC639612c"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x8465190df853c05bbdec00ba6b66139be0e5663fd5b740bdd464ad7409ce2100", + "proxy": true, + "implementation": { + "address": "0xaFFCb96181D920FE8C0Af046C49B2c9eC98b28df", + "creationCodeHash": "0x6c4146427aafa7375a569154be95c8c931bf83aab0315706dd78bdf79c889e4c", + "runtimeCodeHash": "0x004371d1d80011906953dcba17c648503fc94b94e1e0365c8d8c706ff91f93e9", + "txHash": "0xbd7d146ce80831ed7643e9f5b5a84737da354994ae080cb3d7ff7bbc3e696b3d" + } + }, + "GraphCurationToken": { + "address": "0x47a0d56ea574419B524285d52fFe7198297D209c", + "creationCodeHash": "0x1ee42ee271cefe20c33c0de904501e618ac4b56debca67c634d0564cecea9ff2", + "runtimeCodeHash": "0x340e8f378c0117b300f3ec255bc5c3a273f9ab5bd2940fa8eb3b5065b21f86dc", + "txHash": "0x382568f1871a3d57f4d3787b255a2364e9926cb6770fdca3cde6cb04b577ecd5" + }, + "ServiceRegistry": { + "address": "0x072884c745c0A23144753335776c99BE22588f8A", + "initArgs": ["0x0a8491544221dd212964fbb96487467291b2C97e"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x54b1da3f2fdd2327abe01f75ac38a670ee16d3f47bc58641ddaef04f0b9d0f78", + "proxy": true, + "implementation": { + "address": "0xD32569dA3B89b040A0589B5b8D2c721a68472ff3", + "creationCodeHash": "0x50808e8cce93cf78a23c9e6dd7984356bd2bd93be30b358982909140dd61f6ff", + "runtimeCodeHash": "0xaef79c87f7e80107c0dc568cf1f8950459b5174ee3aa565ec487556a655e71db", + "txHash": "0xca363c6bc841b43bd896b6d2098434679884d200a28013dedb48a2c95028ce40" + } + }, + "L2Curation": { + "address": "0x22d78fb4bc72e191C765807f8891B5e1785C8014", + "initArgs": [ + "0x0a8491544221dd212964fbb96487467291b2C97e", + "0xA489FDc65229D6225014C0b357BCD19af6f00eE9", + "0x47a0d56ea574419B524285d52fFe7198297D209c", + "1000000", + "10000", + "1000000000000000000" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x8f856e2090af3243349199f7991e01b1c28de7b70b0185d2370d8ada5ce9c97b", + "proxy": true, + "implementation": { + "address": "0x41Ad970e071aadbE098c17aDFCff2fF3105456Ae", + "creationCodeHash": "0x2c7b48c311e8f0cb03513d4ca4c0010132d7402f1aabb1dd65f28cdcf07255ba", + "runtimeCodeHash": "0xa750bd231f2b1ec9ffaeef4de79eddbde8aca9bdbf4c9125424eea644bf27aff", + "txHash": "0x7b03bc16b3af6a650ff866311b1f580936e8b7264ddb4c6348fb824c508d1dcb" + } + }, + "SubgraphNFTDescriptor": { + "address": "0x96cce9b6489744630A058324FB22e7CD02815ebe", + "creationCodeHash": "0xf16e8ff11d852eea165195ac9e0dfa00f98e48f6ce3c77c469c7df9bf195b651", + "runtimeCodeHash": "0x39583196f2bcb85789b6e64692d8c0aa56f001c46f0ca3d371abbba2c695860f", + "txHash": "0xbb01566726e1d58825cf7aa2860f0f571ff47f92b3837aad0e73e7791fbca48c" + }, + "SubgraphNFT": { + "address": "0x3FbD54f0cc17b7aE649008dEEA12ed7D2622B23f", + "constructorArgs": ["0x4528FD7868c91Ef64B9907450Ee8d82dC639612c"], + "creationCodeHash": "0xc1e58864302084de282dffe54c160e20dd96c6cfff45e00e6ebfc15e04136982", + "runtimeCodeHash": "0x7216e736a8a8754e88688fbf5c0c7e9caf35c55ecc3a0c5a597b951c56cf7458", + "txHash": "0x4334bd64938c1c5c604bde96467a8601875046569f738e6860851594c91681ff" + }, + "L2GNS": { + "address": "0xec9A7fb6CbC2E41926127929c2dcE6e9c5D33Bec", + "initArgs": [ + "0x0a8491544221dd212964fbb96487467291b2C97e", + "0xA489FDc65229D6225014C0b357BCD19af6f00eE9", + "0x3FbD54f0cc17b7aE649008dEEA12ed7D2622B23f" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xf7f2747d1aafd1684ffee7316e727475249cd358af559c6234089b72ffc25f5d", + "proxy": true, + "implementation": { + "address": "0x9B81c7C5A21E65b849FD487540B0A82d3b97b2c7", + "creationCodeHash": "0xd71f45e6c194920a26f90fcec96d8c3375f02c5aef8ad90c1be24e906ffe8342", + "runtimeCodeHash": "0x68ec24512fedb866d7ba7ba6c02160317d0ca34eaacd23bddcc62d2cbcd9869c", + "txHash": "0xfaecc9eb83958359f7440b3dbe1747c2191590acbbde920f191c94352cc0b6d7" + } + }, + "L2Staking": { + "address": "0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03", + "initArgs": [ + "0x0a8491544221dd212964fbb96487467291b2C97e", + "100000000000000000000000", + "186092", + "10000", + "100000", + "7", + "28", + "28", + "16", + "77", + "100" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xa33c0d58ddaed7e3f7381a33e3d5f63e39219863019f00d54ce2fd2446076ac7", + "proxy": true, + "implementation": { + "address": "0x4a886d3E44C7731Dcf888Da704CA5C51ed63DfC8", + "creationCodeHash": "0xa9796308a637b0bfe091f32c1019e4db8efe4bab80788c052fa334e6810c3a98", + "runtimeCodeHash": "0x19d3491cab54b2aae04d05525a532200e946ce9b55573b58f2e3e1606b4514be", + "txHash": "0xc3235306a51c20b28a8b05da69859e03a081a84c9914156c79da07dcc45b3b4e", + "libraries": { + "LibExponential": "0x208f638d8804e4ccc874ec39e240feea3dc289ee" + } + } + }, + "RewardsManager": { + "address": "0x971B9d3d0Ae3ECa029CAB5eA1fB0F72c85e6a525", + "initArgs": ["0x0a8491544221dd212964fbb96487467291b2C97e"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x222e14cb6f49e3e7b76f6a523c1a3c24f96402676be8662bf1b94bb2250ddd0f", + "proxy": true, + "implementation": { + "address": "0x5912Afc5E0f430B0F84b792E9C7CC892b4bE6Bdb", + "creationCodeHash": "0x59c1680da2d19124daaf95fd66acc5eae68e6f46dfe2ff0b3ccb777daf9949b2", + "runtimeCodeHash": "0xe33080183ec49ab1ec8d78b80b90158f0f3ac6f2deedf6115a32a9d11d3e4d9b", + "txHash": "0x4ac3d936067601dab0ccab5ccd544edbe8457b56c43c6e2f370d33acdb806d19" + } + }, + "DisputeManager": { + "address": "0x0Ab2B043138352413Bb02e67E626a70320E3BD46", + "initArgs": [ + "0x0a8491544221dd212964fbb96487467291b2C97e", + "0x113DC95e796836b8F0Fa71eE7fB42f221740c3B0", + "10000000000000000000000", + "500000", + "25000", + "25000" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x68f08fe0a1179170c8b4c7542725d71432b4171604d7456dff824e0ec1c6cdb9", + "proxy": true, + "implementation": { + "address": "0x358bCB57F9893188c1f5CA4e3390C8E84dAAD9B9", + "creationCodeHash": "0xce4c47d94a33d69e03d607dd13a9ad1ed7fa730ef4a2308eb56ddd646ebaa0aa", + "runtimeCodeHash": "0x18d4a1659ccecede3d4d305ef1db4653d8f3dcbd4012f4e52200ae9f0c6c322c", + "txHash": "0xc6b7c7ac5e1b800326fdc99a12262a1528f46fbd0881b5869d7c5a1709c6e0ce" + } + }, + "AllocationExchange": { + "address": "0x993F00C98D1678371a7b261Ed0E0D4b6F42d9aEE", + "constructorArgs": [ + "0x9623063377AD1B27544C965cCd7342f7EA7e88C7", + "0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03", + "0x270Ea4ea9e8A699f8fE54515E3Bb2c418952623b", + "0x79f2212de27912bCb25a452fC102C85c142E3eE3" + ], + "creationCodeHash": "0x96c5b59557c161d80f1617775a7b9537a89b0ecf2258598b3a37724be91ae80a", + "runtimeCodeHash": "0xc86fd1d67a0db0aed4cb310f977ebf3e70865e2095a167f4a103c3792146027c", + "txHash": "0x2bad6b8e5eda0026c8c38a70b925bbedd6a617a1e06952fb30e427fdbc592422" + }, + "L2GraphTokenGateway": { + "address": "0x65E1a5e8946e7E87d9774f5288f41c30a99fD302", + "initArgs": ["0x0a8491544221dd212964fbb96487467291b2C97e"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x50816047ea926423ec02b6b89efb96efcd3d7e7028ea7cf82c3da9fd1bf3869e", + "proxy": true, + "implementation": { + "address": "0x6f37b2AF8A0Cc74f1bFddf2E9302Cb226710127F", + "creationCodeHash": "0xbd52455bd8b14bfc27af623388fe2f9e06ddd4c4be3fc06c51558a912de91770", + "runtimeCodeHash": "0x29e47f693053f978d6b2ac0a327319591bf5b5e8a6e6c0744b8afcc0250bf667", + "txHash": "0x0eaa9d03982b88e765262a15b95548cb688ce9337a48460f39e55f8850690cbe" + } + }, + "EthereumDIDRegistry": { + "address": "0xa9AEb1c6f14f4244547B9a0946C485DA99047638", + "creationCodeHash": "0x20cd202f7991716a84c097da5fbd365fd27f7f35f241f82c529ad7aba18b814b", + "runtimeCodeHash": "0x5f396ffd54b6cd6b3faded0f366c5d7e148cc54743926061be2dfd12a75391de", + "txHash": "0xdd23b546fa3b6be0cea2339abe3023a082153693fbc7bf1bc86d190165823b39" + }, + "IEthereumDIDRegistry": { + "address": "0xa9AEb1c6f14f4244547B9a0946C485DA99047638" + }, + "StakingExtension": { + "address": "0x3bE385576d7C282070Ad91BF94366de9f9ba3571", + "constructorArgs": [], + "creationCodeHash": "0xbfc20ab9b880712ab90b5dec9d2a14c724b0bf7c20f02ede8ea76610bd41b6ef", + "runtimeCodeHash": "0xd7fdd744c7a88993435a2978876b1e4341c5e0fb4d611011bb56e8738ab2485d", + "txHash": "0xcc449d1ca1007fba76b25e987ea0d39164acf4027c10c40bd669ede1c65dc569" + } + }, + "421613": { + "GraphProxyAdmin": { + "address": "0x4037466bb242f51575d32E8B1be693b3E5Cd1386", + "creationCodeHash": "0x68b304ac6bce7380d5e0f6b14a122f628bffebcc75f8205cb60f0baf578b79c3", + "runtimeCodeHash": "0x8d9ba87a745cf82ab407ebabe6c1490197084d320efb6c246d94bcc80e804417", + "txHash": "0x9c4d5f8c0ab5a5bc36b0a063ab1ff04372ce7d917c0b200b94544b5da4f0230d" + }, + "BancorFormula": { + "address": "0x71319060b9fdeD6174b6368bE04F9A1b7c9aCe48", + "creationCodeHash": "0x7ae36017eddb326ddd79c7363781366121361d42fdb201cf57c57424eede46f4", + "runtimeCodeHash": "0xed6701e196ad93718e28c2a2a44d110d9e9906085bcfe4faf4f6604b08f0116c", + "txHash": "0x7fe8cabb7a4fe56311591aa8d68d6c82cb0d5c232fc5aaf28bed4d1ece0e42e5" + }, + "Controller": { + "address": "0x7f734E995010Aa8d28b912703093d532C37b6EAb", + "creationCodeHash": "0x798f913fbaa1b2547c917e3dc31679089ab27cba442c511c159803acdba28c15", + "runtimeCodeHash": "0x00ae0824f79c4e48d2d23a8d4e6d075f04f44f3ea30a4f4305c345bb98117c62", + "txHash": "0x6213da3e6367ef47cd6e1fe23e4d83296f16153a64236a5c91f865f2ec84c089" + }, + "EpochManager": { + "address": "0x8ECedc7631f4616D7f4074f9fC9D0368674794BE", + "initArgs": ["0x7f734E995010Aa8d28b912703093d532C37b6EAb", "554"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x62b0d6b8556be9443397ad1f6030fdc47b1a4a3ebcc63f34cdf4091420aec84b", + "proxy": true, + "implementation": { + "address": "0xAaB195Ed1B445A2A0E357494d9036bC746227AE2", + "creationCodeHash": "0x83bc0b08dbe1a9259666ec209f06223863f7bb9cfbf917a2d4b795c771a727fe", + "runtimeCodeHash": "0xed60261c6dc84ebc16830c36f3ee370a92802601d5a2fe1c3c19f5120dcbc2eb", + "txHash": "0xd4f8780490f63432580e3dd5b2b4d9b39e904e8b4ac5cfd23540658cbafe449d" + } + }, + "L2GraphToken": { + "address": "0x18C924BD5E8b83b47EFaDD632b7178E2Fd36073D", + "initArgs": ["0xEfc519BEd6a43a14f1BBBbA9e796C4931f7A5540"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x7ec14b524141af953959b537c1acbea9b49b12ee906563a6172123b09ab3d1f6", + "proxy": true, + "implementation": { + "address": "0x5dcAcF820D7b9F0640e8a23a5a857675A774C34a", + "creationCodeHash": "0x6c4146427aafa7375a569154be95c8c931bf83aab0315706dd78bdf79c889e4c", + "runtimeCodeHash": "0x004371d1d80011906953dcba17c648503fc94b94e1e0365c8d8c706ff91f93e9", + "txHash": "0xb748498a2ebc90e20dc8da981be832f4e00f08ea9ff289880738705e45d6aeca" + } + }, + "GraphCurationToken": { + "address": "0x2B757ad83e4ed51ecaE8D4dC9AdE8E3Fa29F7BdC", + "creationCodeHash": "0x1ee42ee271cefe20c33c0de904501e618ac4b56debca67c634d0564cecea9ff2", + "runtimeCodeHash": "0x340e8f378c0117b300f3ec255bc5c3a273f9ab5bd2940fa8eb3b5065b21f86dc", + "txHash": "0x1aa753cd01fa4505c71f6866dae35faee723d181141ed91b6e5cf3082ee90f9b" + }, + "ServiceRegistry": { + "address": "0x07ECDD4278D83Cd2425cA86256634f666b659e53", + "initArgs": ["0x7f734E995010Aa8d28b912703093d532C37b6EAb"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x8a13420fdc91139297ab1497fbf5b443c156bbc7b9d2a1ac97fb9f23abde2723", + "proxy": true, + "implementation": { + "address": "0xd18D4B4e84eA4713E04060c93bD079A974BE6C4a", + "creationCodeHash": "0x50808e8cce93cf78a23c9e6dd7984356bd2bd93be30b358982909140dd61f6ff", + "runtimeCodeHash": "0xaef79c87f7e80107c0dc568cf1f8950459b5174ee3aa565ec487556a655e71db", + "txHash": "0x2d6043d89a5f5c4f3d0df0f50264ab7efebc898be0b5d358a00715ba9f657a89" + } + }, + "L2Curation": { + "address": "0x7080AAcC4ADF4b1E72615D6eb24CDdE40a04f6Ca", + "initArgs": [ + "0x7f734E995010Aa8d28b912703093d532C37b6EAb", + "0x71319060b9fdeD6174b6368bE04F9A1b7c9aCe48", + "0x2B757ad83e4ed51ecaE8D4dC9AdE8E3Fa29F7BdC", + "1000000", + "10000", + "1000000000000000000" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x2e5744fa4eca56cf6902e27fcc0509487f39bdb0d29b9eb0181db986235289a0", + "proxy": true, + "implementation": { + "address": "0xDA6c9d39b49c3d41CaC2030c6B75b40Efea09817", + "creationCodeHash": "0xa5fa77df71a72c5aadba812345978c291c5fa1a3a23129b6eba3a38ac85d8b5d", + "runtimeCodeHash": "0x1d265e9f658778b48a0247cfef79bfc9304d1faa1f1e085f2fea85629f68e2d5", + "txHash": "0x815eda87a2599d6f2c7458c7b164e7307d05018f0dd72073a50971d424313377" + } + }, + "SubgraphNFTDescriptor": { + "address": "0x30545f313bD2eb0F85E4f808Ae4D2C016efE78b2", + "creationCodeHash": "0xf16e8ff11d852eea165195ac9e0dfa00f98e48f6ce3c77c469c7df9bf195b651", + "runtimeCodeHash": "0x39583196f2bcb85789b6e64692d8c0aa56f001c46f0ca3d371abbba2c695860f", + "txHash": "0x060839a09e89cbd47adbb8c04cc76b21a00785600a4e8b44939dd928391777e1" + }, + "SubgraphNFT": { + "address": "0x5571D8FE183AD1367dF21eE9968690f0Eabdc593", + "constructorArgs": ["0xEfc519BEd6a43a14f1BBBbA9e796C4931f7A5540"], + "creationCodeHash": "0xc1e58864302084de282dffe54c160e20dd96c6cfff45e00e6ebfc15e04136982", + "runtimeCodeHash": "0x7216e736a8a8754e88688fbf5c0c7e9caf35c55ecc3a0c5a597b951c56cf7458", + "txHash": "0xc11917ffedda6867648fa2cb62cca1df3c0ed485a0a0885284e93a2c5d33455c" + }, + "L2GNS": { + "address": "0x6bf9104e054537301cC23A1023Ca30A6Df79eB21", + "initArgs": [ + "0x7f734E995010Aa8d28b912703093d532C37b6EAb", + "0x71319060b9fdeD6174b6368bE04F9A1b7c9aCe48", + "0x5571D8FE183AD1367dF21eE9968690f0Eabdc593" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x3c2509730e06249d970818319bb507185d4fdea13d5600cef87928a718950c19", + "proxy": true, + "implementation": { + "address": "0x80A6500EFD52C66820dB0E8014088B4eBf8B8f52", + "creationCodeHash": "0xd2aa0d4e2d6ca8d0b2067d249d3202a340b13291a65e23c46f5c04df703bfc0e", + "runtimeCodeHash": "0xa88669e10cde56141250596f6f034629b1bf55086a3ed21ebb0e2bd3b3fca991", + "txHash": "0x3bb004adf949e9c896e85f6e3124ecea0c223470e3a091e42539613d52679c4d" + } + }, + "L2Staking": { + "address": "0xcd549d0C43d915aEB21d3a331dEaB9B7aF186D26", + "initArgs": [ + "0x7f734E995010Aa8d28b912703093d532C37b6EAb", + "100000000000000000000000", + "6646", + "10000", + "100000", + "2", + "4", + "12", + "16", + "77", + "100" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xc98ebdd0a80b97ef8f6305903ef6496a7781db76a5b1b3c3c3b2b10dbd9a7af5", + "proxy": true, + "implementation": { + "address": "0x75CeE6C9EE7c03Ba7cAd82E98FFB57672d7caeBc", + "creationCodeHash": "0x3fd633cabdb4545d667b8e188b5fe8b6326bfd4a8809908f77b7e447c46a22e8", + "runtimeCodeHash": "0x54ba28cc34f7e24b9e1a8e8595f9ecfe4bb7ad70c226444b7a9aa3d26589bbc7", + "txHash": "0x357ab1915642f845527a136aa654c0c18cb43dbb79d4fe297fdf8210fb30082e", + "libraries": { + "LibExponential": "0xdE74fcD55A1E3829EC4FE934f5776bC14bc99917" + } + } + }, + "RewardsManager": { + "address": "0x5F06ABd1CfAcF7AE99530D7Fed60E085f0B15e8D", + "initArgs": ["0x7f734E995010Aa8d28b912703093d532C37b6EAb"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xd4cfa95475e9e867fb24babd6a00a5b6b01d2267533e2412986aa1ff94d51c02", + "proxy": true, + "implementation": { + "address": "0x87f2fAb2C8c422AE0f866D004207fa65bdfD2df2", + "creationCodeHash": "0x59c1680da2d19124daaf95fd66acc5eae68e6f46dfe2ff0b3ccb777daf9949b2", + "runtimeCodeHash": "0xe33080183ec49ab1ec8d78b80b90158f0f3ac6f2deedf6115a32a9d11d3e4d9b", + "txHash": "0xac157ea27b57c36ae336768aef9cd8f74d39b13ff621cd18683db544804b5a3c" + } + }, + "DisputeManager": { + "address": "0x16DEF7E0108A5467A106dbD7537f8591f470342E", + "initArgs": [ + "0x7f734E995010Aa8d28b912703093d532C37b6EAb", + "0xF89688d5d44d73cc4dE880857A3940487076e5A4", + "10000000000000000000000", + "500000", + "25000", + "25000" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x70188c9243c2226ac793ac8c0a9eecd76c9b44e53f7f6f97fa177a34808421a0", + "proxy": true, + "implementation": { + "address": "0x39aEdA1d6ea3B62b76C7c439beBfFCb5369a175C", + "creationCodeHash": "0x2e77ad7a1627b6e04bece0fe18b3ab543ef4a2d6914f2e5e640b2c8175aca3a8", + "runtimeCodeHash": "0x0186afe711eff4ceea28620d091e3c6034fd15be05894119c74a38b020e3a554", + "txHash": "0x4efbd28e55866c0292309964f47bd805922ad417e5980e14e055ad693024582d" + } + }, + "AllocationExchange": { + "address": "0x61809D6Cde07f27D2fcDCb67a42d0Af1988Be5e8", + "constructorArgs": [ + "0x18C924BD5E8b83b47EFaDD632b7178E2Fd36073D", + "0xcd549d0C43d915aEB21d3a331dEaB9B7aF186D26", + "0x05F359b1319f1Ca9b799CB6386F31421c2c49dBA", + "0xD06f366678AE139a94b2AaC2913608De568F1D03" + ], + "creationCodeHash": "0x96c5b59557c161d80f1617775a7b9537a89b0ecf2258598b3a37724be91ae80a", + "runtimeCodeHash": "0xed3d9cce65ddfa8a237d4d7d294ffdb13a082e0adcda3bbd313029cfae1365f3", + "txHash": "0x1df63329a21dca69d20e03c076dd89c350970d35319eeefab028cebbc78d29dc" + }, + "L2GraphTokenGateway": { + "address": "0xef2757855d2802bA53733901F90C91645973f743", + "initArgs": ["0x7f734E995010Aa8d28b912703093d532C37b6EAb"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x47bde4e3ad0bc077897a3de65058c4b7dd710aa447ec25942f716321cbdc590d", + "proxy": true, + "implementation": { + "address": "0xc68cd0d2ca533232Fd86D6e48b907338B2E0a74A", + "creationCodeHash": "0xbd52455bd8b14bfc27af623388fe2f9e06ddd4c4be3fc06c51558a912de91770", + "runtimeCodeHash": "0x29e47f693053f978d6b2ac0a327319591bf5b5e8a6e6c0744b8afcc0250bf667", + "txHash": "0xf68a5e1e516ee9a646f19bbe4d58336fdfcf5fc859f84cdac5e68b00bcd3a09a" + } + }, + "IEthereumDIDRegistry": { + "address": "0x8FFfcD6a85D29E9C33517aaf60b16FE4548f517E" + }, + "StakingExtension": { + "address": "0x5c54fB391003bef3002A79C656a29F09C59E2795", + "creationCodeHash": "0xe23c59dbfb94b0cf7ef58f654b905977624ce57eaae2fce692edb28ca3f1b3ba", + "runtimeCodeHash": "0xca8ad20187bc87e0e04a15184f529787dd23a0095047d411e1b271617a951c49", + "txHash": "0x69eca0ff395bb348cc8d29bb1681afe24515f618bce9a093ad5a02140e15b867" + } + }, + "421614": { + "GraphProxyAdmin": { + "address": "0x7474a6cc5fAeDEc620Db0fa8E4da6eD58477042C", + "creationCodeHash": "0x68b304ac6bce7380d5e0f6b14a122f628bffebcc75f8205cb60f0baf578b79c3", + "runtimeCodeHash": "0x8d9ba87a745cf82ab407ebabe6c1490197084d320efb6c246d94bcc80e804417", + "txHash": "0x71b6defab0d3d7b711b7f6769f20a8c85bc9686eb5939b2a86dfaf587fceab17" + }, + "Controller": { + "address": "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", + "creationCodeHash": "0x5bde9a87bc4e8dd24d41900f0a19321c1dc6d3373d51bba093b130bb5b80a677", + "runtimeCodeHash": "0x7f0479db1d60ecf6295d92ea2359ebdd223640795613558b0594680f5d4922c9", + "txHash": "0xf7b4faa14f9d29bb62dec73fd163d1253184233012bcadf7ae78af7995017f29" + }, + "EpochManager": { + "address": "0x88b3C7f37253bAA1A9b95feAd69bD5320585826D", + "initArgs": ["0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", "554"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x587ea6f421a08ab3a390103f63daba0529901f2e662ca7f6fe575674a439fa79", + "proxy": true, + "implementation": { + "address": "0x646627fa39ec6f6E757Cb4189bC54c92FFBb71da", + "creationCodeHash": "0x9947bd0a1f46027123b8fb4aec8b11af540aea587eb79642475d57b4e347078f", + "runtimeCodeHash": "0xe45a27197726de0e3149014823794708edd432ee56ec8358554c0d2365674ca0", + "txHash": "0x82653a0bd83e0541379b920415af94e4be1d732dfab720e5dead839062781c07" + } + }, + "L2GraphToken": { + "address": "0xf8c05dCF59E8B28BFD5eed176C562bEbcfc7Ac04", + "initArgs": ["0xadE6B8EB69a49B56929C1d4F4b428d791861dB6f"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xbb27939a4e4b5d92da8a10add4b7d0126e907da30b07b5f3d439f1c32a6c8e2c", + "proxy": true, + "implementation": { + "address": "0x4cf968bA38b43dd10be114daa7959C1b369479e5", + "creationCodeHash": "0x6c4146427aafa7375a569154be95c8c931bf83aab0315706dd78bdf79c889e4c", + "runtimeCodeHash": "0x004371d1d80011906953dcba17c648503fc94b94e1e0365c8d8c706ff91f93e9", + "txHash": "0x3fab5697addf0c0e16b8e2249f2b833c6f256e699b293d184089c96de8deaa44" + } + }, + "GraphCurationToken": { + "address": "0x00FBd5D46FFAc54862c1Dd27BE08924BB17f5CDa", + "creationCodeHash": "0x1ee42ee271cefe20c33c0de904501e618ac4b56debca67c634d0564cecea9ff2", + "runtimeCodeHash": "0x340e8f378c0117b300f3ec255bc5c3a273f9ab5bd2940fa8eb3b5065b21f86dc", + "txHash": "0x045d64dc3ebb7ae6c4976854ce0a797a04524d22a6ef5f526bfc27f744bc68e5" + }, + "ServiceRegistry": { + "address": "0x888541878CbDDEd880Cd58c728f1Af5C47343F86", + "initArgs": ["0x9DB3ee191681f092607035d9BDA6e59FbEaCa695"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xdaa1228e8cd8569c1e5562b63d2fd89caf897ab67da05922636d3309b838e289", + "proxy": true, + "implementation": { + "address": "0x05E732280bf9F37054346Cb83f5Fd58C5B44F6A8", + "creationCodeHash": "0xec9cb879003a06609541ad87efd4bc5dfc8ea60e4e77cfa5ae2cb5208742e7bc", + "runtimeCodeHash": "0x5161b534164413a88d851832f9c9d1dd1bca32fe2bbb62bb35d112c1dc8b69ab", + "txHash": "0xe1fce867f5dd708e60518b7f257fdbcb28f460d1e3b82045b82d03e64345b210" + } + }, + "L2Curation": { + "address": "0xDe761f075200E75485F4358978FB4d1dC8644FD5", + "initArgs": [ + "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", + "0x00FBd5D46FFAc54862c1Dd27BE08924BB17f5CDa", + "10000", + "1" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xe9298239bcb3c386cf66e6dd493cf6e7cdd9771c65fa2225e0b34d17550d6805", + "proxy": true, + "implementation": { + "address": "0xd90022aB67920212D0F902F5c427DE82732DE136", + "creationCodeHash": "0x2287d9023bf7d91e688e1eb029eff7657ef3b87e37b5222b01fd50985d0928f9", + "runtimeCodeHash": "0xd799b2b74e9634d6b6ef15b5710409264bed04a60f9519b9d8f05ac183199d16", + "txHash": "0x436bcf91fed712dc8d54f449726b2078fb63cd770f90b492a9622efac5817762" + } + }, + "SubgraphNFTDescriptor": { + "address": "0x4032F7B6b27FfC9862106f826379DaB1716C71d7", + "creationCodeHash": "0xf16e8ff11d852eea165195ac9e0dfa00f98e48f6ce3c77c469c7df9bf195b651", + "runtimeCodeHash": "0x39583196f2bcb85789b6e64692d8c0aa56f001c46f0ca3d371abbba2c695860f", + "txHash": "0xb7e7aeeecc693f34f491b01c56950533119810a4e3e2642081efc127f11cb782" + }, + "SubgraphNFT": { + "address": "0xF21Df5BbA7EB9b54D8F60C560aFb9bA63e6aED1A", + "constructorArgs": ["0xadE6B8EB69a49B56929C1d4F4b428d791861dB6f"], + "creationCodeHash": "0xc1e58864302084de282dffe54c160e20dd96c6cfff45e00e6ebfc15e04136982", + "runtimeCodeHash": "0x7216e736a8a8754e88688fbf5c0c7e9caf35c55ecc3a0c5a597b951c56cf7458", + "txHash": "0x1309c1caea76f4014ba612de092cc746816119b1440d635d11b6bc7e361a32b0" + }, + "L2GNS": { + "address": "0x3133948342F35b8699d8F94aeE064AbB76eDe965", + "initArgs": [ + "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", + "0xF21Df5BbA7EB9b54D8F60C560aFb9bA63e6aED1A" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x137140783a99a3e9a60048d607124626ca87e2b972e8cc05efb41ac87c3cbcc4", + "proxy": true, + "implementation": { + "address": "0x00CBF5024d454255577Bf2b0fB6A43328a6828c9", + "creationCodeHash": "0xd71f45e6c194920a26f90fcec96d8c3375f02c5aef8ad90c1be24e906ffe8342", + "runtimeCodeHash": "0x68ec24512fedb866d7ba7ba6c02160317d0ca34eaacd23bddcc62d2cbcd9869c", + "txHash": "0x54619944731edec530b7b0cd587f9c2faae332aa1671fe5e8d7e7e5c7e291a77" + } + }, + "StakingExtension": { + "address": "0x05709dd705A5674346B7206a2bC657C8bAb3301B", + "creationCodeHash": "0x7ae74140871330ecabb7040182dc8288c2c84693393a519230036f39c2281138", + "runtimeCodeHash": "0x4994aa74e9e29c36a8158af690a245ccd1cf4d955223e5fcb1ca62810b37ed57", + "txHash": "0xbe1ff9cb949a53209b778708265740dfa2a08a93cfce4c897a53989a5d93f8c1" + }, + "L2Staking": { + "address": "0x865365C425f3A593Ffe698D9c4E6707D14d51e08", + "initArgs": [ + "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", + "100000000000000000000000", + "6646", + "10000", + "100000", + "8", + "12", + "16", + "100,100,60,100", + "0x876fB4B13D7Ed146757D3664B7E962b36936001C" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x326cf1f2849da4bb4d7e39f2783779e3c99fa48e4ee8ef004cfdd50c62e775df", + "proxy": true, + "implementation": { + "address": "0xD07dFD514dc1b57020e6C1F49e05c48d0658C99f", + "creationCodeHash": "0x6a763345e5f166ea4e73ce9a116a49c9fc0833d9ea235a86fa5a997e91cf09e5", + "runtimeCodeHash": "0xb4c31859ac132241f04c802d4add70a94c7f2c6eb9dfd4bf224048d249dbc7bc", + "txHash": "0x68b34eda64287b84582c8f005c4e96162252d36c9c5c9b84332336a7c2e3d6d3", + "libraries": { + "LibExponential": "0xd844116f6d79a280b117Bb6d9EBf4121D4e8B44b" + } + } + }, + "RewardsManager": { + "address": "0x1F49caE7669086c8ba53CC35d1E9f80176d67E79", + "initArgs": ["0x9DB3ee191681f092607035d9BDA6e59FbEaCa695"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xd8765fb87e11e8d41951f9071188b888829022a889cf66fdc2357f1f9f15c8e2", + "proxy": true, + "implementation": { + "address": "0x714B54e5249C90414fecA240e2F5B618C243F0aE", + "creationCodeHash": "0x59c1680da2d19124daaf95fd66acc5eae68e6f46dfe2ff0b3ccb777daf9949b2", + "runtimeCodeHash": "0xe33080183ec49ab1ec8d78b80b90158f0f3ac6f2deedf6115a32a9d11d3e4d9b", + "txHash": "0x8192f6c0e63a9beede3b025878af6a49367564c8bc32cb11a64f5f1e8351c7cd" + } + }, + "DisputeManager": { + "address": "0x7C9B82717f9433932507dF6EdA93A9678b258698", + "initArgs": [ + "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", + "0xF89688d5d44d73cc4dE880857A3940487076e5A4", + "10000000000000000000000", + "500000", + "25000", + "25000" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xb3764f4b576b46ee8dc6cbf680cad650b3ba80aa93dc6cf099862cfe8efc8a68", + "proxy": true, + "implementation": { + "address": "0x887aC2f58D62Ac86d4E9aEc07c953991e3ca1bA3", + "creationCodeHash": "0xce4c47d94a33d69e03d607dd13a9ad1ed7fa730ef4a2308eb56ddd646ebaa0aa", + "runtimeCodeHash": "0x18d4a1659ccecede3d4d305ef1db4653d8f3dcbd4012f4e52200ae9f0c6c322c", + "txHash": "0x59d99afb9cefbb5c2275d9ac2d7230ac7f4a4cfb2440636408988a66075c032a" + } + }, + "AllocationExchange": { + "address": "0x9BD4FBDa981D628AbA16F261f810dD59E5bAf9eA", + "constructorArgs": [ + "0xf8c05dCF59E8B28BFD5eed176C562bEbcfc7Ac04", + "0x865365C425f3A593Ffe698D9c4E6707D14d51e08", + "0x72ee30d43Fb5A90B3FE983156C5d2fBE6F6d07B3", + "0x49D4CFC037430cA9355B422bAeA7E9391e1d3215" + ], + "creationCodeHash": "0x2963baeedb2d0f5a95fa41f6c89e48e5bf177ca439379fc6becd54870d330ab0", + "runtimeCodeHash": "0xd8b53b3f65b49198d35392e0fd11da229a40d15a96151bca2976cbbe36b909d5", + "txHash": "0xa1a9410662d43463c39802e887f33a1401ed0fc35bf22c5be275e62141eae442" + }, + "L2GraphTokenGateway": { + "address": "0xB24Ce0f8c18c4DdDa584A7EeC132F49C966813bb", + "initArgs": ["0x9DB3ee191681f092607035d9BDA6e59FbEaCa695"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x90949db305a73b85e7208aa6b8d03c5181945eedc3df38e90f215a0dec8b02ae", + "proxy": true, + "implementation": { + "address": "0x3C2eB5E561f70c0573E5f6c92358e988E32cb5eC", + "creationCodeHash": "0x90253be19d23d542b29e95e6faf52304fcff91b21edfdb5f79e165051740d1ab", + "runtimeCodeHash": "0x3a7fab6792b4dad58c7b59da19c5b65b3985d1be77024a9f86cb135965e9b462", + "txHash": "0x78ff2e39d5c33ddfb89b1dbee89bdbc24452843a051f860c94e4e9dd75ded9c3" + } + }, + "EthereumDIDRegistry": { + "address": "0xF5f4cA61481558709AFa94AdEDa7B5F180f4AD59", + "creationCodeHash": "0x20cd202f7991716a84c097da5fbd365fd27f7f35f241f82c529ad7aba18b814b", + "runtimeCodeHash": "0x5f396ffd54b6cd6b3faded0f366c5d7e148cc54743926061be2dfd12a75391de", + "txHash": "0x2cefbc169b8ae51c263d0298956d86a397b05f11f076b71c918551f63fe33784" + } + }, + "11155111": { + "GraphProxyAdmin": { + "address": "0xe2011488ea6B02692Ee58717698aecDdfBf4756F", + "creationCodeHash": "0x68b304ac6bce7380d5e0f6b14a122f628bffebcc75f8205cb60f0baf578b79c3", + "runtimeCodeHash": "0x8d9ba87a745cf82ab407ebabe6c1490197084d320efb6c246d94bcc80e804417", + "txHash": "0x104f9104e7364f3605b1522c017aa8302344a689c059e58ad43c6cc6cd9f4e2a" + }, + "BancorFormula": { + "address": "0x56b9f17D3Ca520b229F56D13a988dFAE9924C91E", + "creationCodeHash": "0x7ae36017eddb326ddd79c7363781366121361d42fdb201cf57c57424eede46f4", + "runtimeCodeHash": "0xed6701e196ad93718e28c2a2a44d110d9e9906085bcfe4faf4f6604b08f0116c", + "txHash": "0xb32bbff4bdf106e1f02ea826c0c412d66e2e081acd43aaba5f75676c28f969a2" + }, + "Controller": { + "address": "0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C", + "creationCodeHash": "0x5bde9a87bc4e8dd24d41900f0a19321c1dc6d3373d51bba093b130bb5b80a677", + "runtimeCodeHash": "0x7f0479db1d60ecf6295d92ea2359ebdd223640795613558b0594680f5d4922c9", + "txHash": "0xe9ab682c6d6b68d5f99d5253c8a6201f9b9f352dac337579d8ddeff6d9738f50" + }, + "EpochManager": { + "address": "0x3C39036a76104D7c6D3eF13a21477C0fE23A3Aa2", + "initArgs": ["0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C", "554"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xc44a6798882df720a50df98fa0daa3ad32641afc18cb054047a44bcbf5e54dae", + "proxy": true, + "implementation": { + "address": "0xA1af9300209cc60de6Ce39752d57F04AB7E29432", + "creationCodeHash": "0x9947bd0a1f46027123b8fb4aec8b11af540aea587eb79642475d57b4e347078f", + "runtimeCodeHash": "0xe45a27197726de0e3149014823794708edd432ee56ec8358554c0d2365674ca0", + "txHash": "0x5f8205a69175903cafb8d688578c01b2fbcdaf970102194994851af7d2ace4d8" + } + }, + "GraphToken": { + "address": "0xCA59cCeb39bE1808d7aA607153f4A5062daF3a83", + "constructorArgs": ["10000000000000000000000000000"], + "creationCodeHash": "0x9c50586e9e305b3a299f1cdf92ca9bb04fad5f43b5e0f7505054d79783fd8b69", + "runtimeCodeHash": "0xfe612acbb09bdb23fe60014e890054621fd34d74bf12bd94fb73351d474cd641", + "txHash": "0xe034493538c9604e629129ede83a4298ec9fd97d5c8b2e1be67c01877464effe" + }, + "GraphCurationToken": { + "address": "0xE04cE530c532538F1F63cA911849925425C2A1Aa", + "creationCodeHash": "0x1ee42ee271cefe20c33c0de904501e618ac4b56debca67c634d0564cecea9ff2", + "runtimeCodeHash": "0x340e8f378c0117b300f3ec255bc5c3a273f9ab5bd2940fa8eb3b5065b21f86dc", + "txHash": "0xe5684e296859ae9ef5662ef1a16d520e201253d51d8068ddb07c94aa17b1f217" + }, + "ServiceRegistry": { + "address": "0x0Ee47634c94E6606f67301b3A868319073CB0FC2", + "initArgs": ["0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xe60ff360c1a53a81aea3c26213a41c3335bd9e93928df504276e69911255bbb7", + "proxy": true, + "implementation": { + "address": "0xe4484C9c5F18482d4c2E2f3BB0639f092922D97a", + "creationCodeHash": "0xec9cb879003a06609541ad87efd4bc5dfc8ea60e4e77cfa5ae2cb5208742e7bc", + "runtimeCodeHash": "0x5161b534164413a88d851832f9c9d1dd1bca32fe2bbb62bb35d112c1dc8b69ab", + "txHash": "0x5dead3a8e67425b461bf0167bbe6a1e48232d1ce04d213c7e8ed173cff4019b8" + } + }, + "Curation": { + "address": "0x77A6e5F2f13218B33A97Aec56d591dB18D60FFb1", + "initArgs": [ + "0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C", + "0x56b9f17D3Ca520b229F56D13a988dFAE9924C91E", + "0xE04cE530c532538F1F63cA911849925425C2A1Aa", + "500000", + "10000", + "1000000000000000000" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x5cd28f416034ea0fe8dcf3fe31661128a7103678ce60f1385ff843cc7b3314f8", + "proxy": true, + "implementation": { + "address": "0x54C6639e45F9Eb5Ab55A370d4071e77e5f1b9FF6", + "creationCodeHash": "0x666b377dfbba2be2e9cda6f1a1297819aae39b6571935a9f65314435f1cbd943", + "runtimeCodeHash": "0xbca44d6f233be6574d7db9cf0d0db09697d9ad6f36e69d5d9e22ad7004e83c51", + "txHash": "0x92bb03a530c6a3d33974c783bc3560a3e3c68910a48c951029d052d4234c02bd" + } + }, + "SubgraphNFTDescriptor": { + "address": "0xC9b2011A082d75c01C5C3eEA132f29ebaD182BD5", + "creationCodeHash": "0xf16e8ff11d852eea165195ac9e0dfa00f98e48f6ce3c77c469c7df9bf195b651", + "runtimeCodeHash": "0x39583196f2bcb85789b6e64692d8c0aa56f001c46f0ca3d371abbba2c695860f", + "txHash": "0xd191fe32ca3538322628fcea353becca0eee1e4855c265552a54682e1c44541f" + }, + "SubgraphNFT": { + "address": "0x120005c38D2624Ef70185fEf3a051Dd57b27a491", + "constructorArgs": ["0x559081D91F5Ff43dfE51A07C216F8E6893805B35"], + "creationCodeHash": "0xc1e58864302084de282dffe54c160e20dd96c6cfff45e00e6ebfc15e04136982", + "runtimeCodeHash": "0x7216e736a8a8754e88688fbf5c0c7e9caf35c55ecc3a0c5a597b951c56cf7458", + "txHash": "0x67192875a3b846c1ff81e5fcaa5fde0f9948834bec3b11fef4d5bb2ab4226fa2" + }, + "L1GNS": { + "address": "0x5461D48556B94e7fdD8ED5A8f865Ba4F1A3b5454", + "initArgs": [ + "0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C", + "0x120005c38D2624Ef70185fEf3a051Dd57b27a491" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xf92078845db80bcb42a1cf8d8fe230a9e3c86cc6f66e15c8a81368e5fad42885", + "proxy": true, + "implementation": { + "address": "0x4Ac3832d773FE6B6dcC8EB6241B83212F1a55096", + "creationCodeHash": "0xad517d289662731ecf3e0341e1612dc51bd6b63993f78057e17e1f9654740879", + "runtimeCodeHash": "0x3143b8a44a2a8e6590a85580ddf69baf87012d8865fa20fac25bbdfda5d5648e", + "txHash": "0x999f9af5e1e25a4558a315ebe76e7808bf0afa99fc97694a01c73d0a1eef060a" + } + }, + "StakingExtension": { + "address": "0x3fF97b5bdC1D46B0bbD1a3166F232683470a0ce3", + "creationCodeHash": "0xe23c59dbfb94b0cf7ef58f654b905977624ce57eaae2fce692edb28ca3f1b3ba", + "runtimeCodeHash": "0xca8ad20187bc87e0e04a15184f529787dd23a0095047d411e1b271617a951c49", + "txHash": "0x060e4f03881b4e1cf03be197ec3533b43a1a550a74f8adbdaba829f867a761ae" + }, + "L1Staking": { + "address": "0x14e9B07Dc56A0B03ac8A58453B5cCCB289d6ec90", + "initArgs": [ + "0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C", + "100000000000000000000000", + "6646", + "10000", + "100000", + "4", + "12", + "16", + "100,100,60,100", + "0x3fF97b5bdC1D46B0bbD1a3166F232683470a0ce3" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xe766e786e2d2f1c0af821c785178915e98f4251832bf523540d0e4ff93212a6f", + "proxy": true, + "implementation": { + "address": "0x88aec82f14002a56014819f4e23a22eB32F528b1", + "creationCodeHash": "0x8244555e05aae22fb53a3c3f8717b83d26306748faccc9e9828d43ceaa4b9e67", + "runtimeCodeHash": "0x33ecbc61c2f077b9cc37d5f3d4f6863f576e31ffaa310630ec0a89dd9a8fa940", + "txHash": "0xa56f2052e6c761c12a24459949320e5c11c56219c00a78821505f35bd023c573", + "libraries": { + "LibExponential": "0xc63d7df28b01e6f20b17834B106948baEbF04441" + } + } + }, + "RewardsManager": { + "address": "0x175f483AfAB4Fc52A6E07F9e9d46C90eB95941b5", + "initArgs": ["0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x6b128afe0d58657c7df7ef6d86a997d3767b166afb671406999ccc69d6c72a61", + "proxy": true, + "implementation": { + "address": "0x3a7382e41d56f6085fcdE56546884ecfcCe8e949", + "creationCodeHash": "0x59c1680da2d19124daaf95fd66acc5eae68e6f46dfe2ff0b3ccb777daf9949b2", + "runtimeCodeHash": "0xe33080183ec49ab1ec8d78b80b90158f0f3ac6f2deedf6115a32a9d11d3e4d9b", + "txHash": "0x3666a68a84e1e2175e45862da197a122439c6f3d7c35f795914bd52fc0c1da3b" + } + }, + "DisputeManager": { + "address": "0x1Da0DF3435cde4199650D35690E3B0885dfc38B1", + "initArgs": [ + "0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C", + "0xd6ff9e98F0Fd99ccB658832F586e23F4D8Cb8Bad", + "10000000000000000000000", + "500000", + "25000", + "25000" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xd19578ab4bc280cfc890cc2f9b29bc57a8153cc879bbd22ab4202197078286ab", + "proxy": true, + "implementation": { + "address": "0x38d343aBB283452a6855572F6343193A8799Ef7e", + "creationCodeHash": "0x9d7257851678e3a0bd8ef74c219c314de490ebe91e6263129a3030d841dfc74b", + "runtimeCodeHash": "0xe490c3ae892d23d6ebed61a6081d70045ee6618f5196f25c28e6d7d66f798fee", + "txHash": "0xe6a215fe9ed86e23b7fad7b40938500ba64292f5c17b771ace1b00d4d2cd8c25" + } + }, + "AllocationExchange": { + "address": "0xd49670f70f68F7dc62c8B287F6388d250C5487E2", + "constructorArgs": [ + "0xCA59cCeb39bE1808d7aA607153f4A5062daF3a83", + "0x14e9B07Dc56A0B03ac8A58453B5cCCB289d6ec90", + "0x4EBf30832eC2db76aE228D5d239083B59f530d1f", + "0x840daec5dF962D49cf2EFd789c4E40A7b7e0117D" + ], + "creationCodeHash": "0x2963baeedb2d0f5a95fa41f6c89e48e5bf177ca439379fc6becd54870d330ab0", + "runtimeCodeHash": "0x9463db858ad818a01e751412460a5c8e6b249dd92ec564a7d0ef9663eaad3e33", + "txHash": "0x760473d4ea2805869979650079788d553dc9fe8e871764ea1c994c194239bf3e" + }, + "L1GraphTokenGateway": { + "address": "0x549DCB0b510Ee7C8d6E8e346ab9aC75E22DD78B3", + "initArgs": ["0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x098fb600073aa336154343c9f6f565e190e28792a357c69235b06fc86e2bc9fe", + "proxy": true, + "implementation": { + "address": "0xF1De736CcBb1a37591f7fCA4CA415932a4a8d632", + "creationCodeHash": "0xf21eb0fd5bf5a54dd522b653f6c1da315876355e1e90fedeb08b1fe94f1b54d9", + "runtimeCodeHash": "0xe2964bc67225afc1c732a4216824911ad847bbe8f2188c835e25c2b255c69685", + "txHash": "0xcadae13c0f824e387a3ae07f6929258d5540b3e909f231bba6aca7f70d0558be" + } + }, + "BridgeEscrow": { + "address": "0x428Ab6E9EeF41Dc5098a34a6993Cdd5Be5BA24a6", + "initArgs": ["0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xb4a922195600c6291cd485f1e98d0bb1f1c25673759015f512e16f53ab9e7665", + "proxy": true, + "implementation": { + "address": "0x4F1aBAa9ec53c2E5d4902Edd099C74B2d8a0aAdD", + "creationCodeHash": "0x27276d0e03aa52bfd4664ca5608cb3fac28fa42034c0d859d06dbc4174342192", + "runtimeCodeHash": "0x796b2cef94bab38e2cc4f82fef882d4c3441ef229329468d46fa72e1fd74be4a", + "txHash": "0xbadc145e826c54b4a4a0263701a29d6ecd11f8c6533c0d8e1cfe5422321d55f6" + } + }, + "EthereumDIDRegistry": { + "address": "0xDe57D27e530c99bDa15Fe231B8C632E4a37E7343", + "creationCodeHash": "0x20cd202f7991716a84c097da5fbd365fd27f7f35f241f82c529ad7aba18b814b", + "runtimeCodeHash": "0x5f396ffd54b6cd6b3faded0f366c5d7e148cc54743926061be2dfd12a75391de", + "txHash": "0x8f3c9ae70242ed54c51a8f22c8d97f3ebc34cd65ccc4cc87054637b47610cf3a" + } + } +} diff --git a/packages/horizon/hardhat.config.ts b/packages/horizon/hardhat.config.ts index 6a57472a5..a1a177afd 100644 --- a/packages/horizon/hardhat.config.ts +++ b/packages/horizon/hardhat.config.ts @@ -4,8 +4,9 @@ import '@nomicfoundation/hardhat-ignition-ethers' import 'hardhat-storage-layout' import 'hardhat-contract-sizer' import 'hardhat-secure-accounts' +import 'hardhat-graph-protocol' -import { HardhatUserConfig } from 'hardhat/config' +import type { HardhatUserConfig } from 'hardhat/config' const config: HardhatUserConfig = { solidity: { @@ -34,9 +35,15 @@ const config: HardhatUserConfig = { }, }, arbitrumSepolia: { + chainId: 421614, url: 'https://sepolia-rollup.arbitrum.io/rpc', }, }, + graph: { + addressBooks: { + horizon: 'addresses.json', + }, + }, etherscan: { apiKey: { arbitrumSepolia: process.env.ETHERSCAN_API_KEY ?? '', diff --git a/packages/horizon/package.json b/packages/horizon/package.json index 7c3d26153..37657c1a9 100644 --- a/packages/horizon/package.json +++ b/packages/horizon/package.json @@ -34,9 +34,10 @@ "eslint": "^8.56.0", "eslint-graph-config": "workspace:^0.0.1", "ethers": "^6.13.2", - "hardhat": "^2.20.1", + "hardhat": "^2.22.0", "hardhat-contract-sizer": "^2.10.0", "hardhat-gas-reporter": "^1.0.8", + "hardhat-graph-protocol": "workspace:^0.0.1", "hardhat-secure-accounts": "^1.0.4", "hardhat-storage-layout": "^0.1.7", "lint-staged": "^15.2.2", diff --git a/yarn.lock b/yarn.lock index c6850b143..f93b6e586 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2950,9 +2950,10 @@ __metadata: eslint: "npm:^8.56.0" eslint-graph-config: "workspace:^0.0.1" ethers: "npm:^6.13.2" - hardhat: "npm:^2.20.1" + hardhat: "npm:^2.22.0" hardhat-contract-sizer: "npm:^2.10.0" hardhat-gas-reporter: "npm:^1.0.8" + hardhat-graph-protocol: "workspace:^0.0.1" hardhat-secure-accounts: "npm:^1.0.4" hardhat-storage-layout: "npm:^0.1.7" lint-staged: "npm:^15.2.2" @@ -4217,6 +4218,13 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-darwin-arm64@npm:0.6.5": + version: 0.6.5 + resolution: "@nomicfoundation/edr-darwin-arm64@npm:0.6.5" + checksum: 1ed23f670f280834db7b0cc144d8287b3a572639917240beb6c743ff0f842fadf200eb3e226a13f0650d8a611f5092ace093679090ceb726d97fb4c6023073e6 + languageName: node + linkType: hard + "@nomicfoundation/edr-darwin-x64@npm:0.3.8": version: 0.3.8 resolution: "@nomicfoundation/edr-darwin-x64@npm:0.3.8" @@ -4224,6 +4232,13 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-darwin-x64@npm:0.6.5": + version: 0.6.5 + resolution: "@nomicfoundation/edr-darwin-x64@npm:0.6.5" + checksum: 298810fe1ed61568beeb4e4a8ddfb4d3e3cf49d51f89578d5edb5817a7d131069c371d07ea000b246daa2fd57fa4853ab983e3a2e2afc9f27005156e5abfa500 + languageName: node + linkType: hard + "@nomicfoundation/edr-linux-arm64-gnu@npm:0.3.8": version: 0.3.8 resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.3.8" @@ -4231,6 +4246,13 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-linux-arm64-gnu@npm:0.6.5": + version: 0.6.5 + resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.6.5" + checksum: 695850a75dda9ad00899ca2bd150c72c6b7a2470c352348540791e55459dc6f87ff88b3b647efe07dfe24d4b6aa9d9039724a9761ffc7a557e3e75a784c302a1 + languageName: node + linkType: hard + "@nomicfoundation/edr-linux-arm64-musl@npm:0.3.8": version: 0.3.8 resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.3.8" @@ -4238,6 +4260,13 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-linux-arm64-musl@npm:0.6.5": + version: 0.6.5 + resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.6.5" + checksum: 9a6e01a545491b12673334628b6e1601c7856cb3973451ba1a4c29cf279e9a4874b5e5082fc67d899af7930b6576565e2c7e3dbe67824bfe454bf9ce87435c56 + languageName: node + linkType: hard + "@nomicfoundation/edr-linux-x64-gnu@npm:0.3.8": version: 0.3.8 resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.3.8" @@ -4245,6 +4274,13 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-linux-x64-gnu@npm:0.6.5": + version: 0.6.5 + resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.6.5" + checksum: 959b62520cc9375284fcc1ae2ad67c5711d387912216e0b0ab7a3d087ef03967e2c8c8bd2e87697a3b1369fc6a96ec60399e3d71317a8be0cb8864d456a30e36 + languageName: node + linkType: hard + "@nomicfoundation/edr-linux-x64-musl@npm:0.3.8": version: 0.3.8 resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.3.8" @@ -4252,6 +4288,13 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-linux-x64-musl@npm:0.6.5": + version: 0.6.5 + resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.6.5" + checksum: d91153a8366005e6a6124893a1da377568157709a147e6c9a18fe6dacae21d3847f02d2e9e89794dc6cb8dbdcd7ee7e49e6c9d3dc74c8dc80cea44e4810752da + languageName: node + linkType: hard + "@nomicfoundation/edr-win32-x64-msvc@npm:0.3.8": version: 0.3.8 resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.3.8" @@ -4259,6 +4302,13 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-win32-x64-msvc@npm:0.6.5": + version: 0.6.5 + resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.6.5" + checksum: 96c2f68393b517f9b45cb4e777eb594a969abc3fea10bf11756cd050a7e8cefbe27808bd44d8e8a16dc9c425133a110a2ad186e1e6d29b49f234811db52a1edb + languageName: node + linkType: hard + "@nomicfoundation/edr@npm:^0.3.7": version: 0.3.8 resolution: "@nomicfoundation/edr@npm:0.3.8" @@ -4274,6 +4324,21 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr@npm:^0.6.4": + version: 0.6.5 + resolution: "@nomicfoundation/edr@npm:0.6.5" + dependencies: + "@nomicfoundation/edr-darwin-arm64": "npm:0.6.5" + "@nomicfoundation/edr-darwin-x64": "npm:0.6.5" + "@nomicfoundation/edr-linux-arm64-gnu": "npm:0.6.5" + "@nomicfoundation/edr-linux-arm64-musl": "npm:0.6.5" + "@nomicfoundation/edr-linux-x64-gnu": "npm:0.6.5" + "@nomicfoundation/edr-linux-x64-musl": "npm:0.6.5" + "@nomicfoundation/edr-win32-x64-msvc": "npm:0.6.5" + checksum: 4344efbc7173119bd69dd37c5e60a232ab8307153e9cc329014df95a60f160026042afdd4dc34188f29fc8e8c926f0a3abdf90fb69bed92be031a206da3a6df5 + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-block@npm:4.2.2": version: 4.2.2 resolution: "@nomicfoundation/ethereumjs-block@npm:4.2.2" @@ -5914,6 +5979,13 @@ __metadata: languageName: node linkType: hard +"@types/chai@npm:^4.0.0": + version: 4.3.20 + resolution: "@types/chai@npm:4.3.20" + checksum: 4601189d611752e65018f1ecadac82e94eed29f348e1d5430e5681a60b01e1ecf855d9bcc74ae43b07394751f184f6970fac2b5561fc57a1f36e93a0f5ffb6e8 + languageName: node + linkType: hard + "@types/concat-stream@npm:^1.6.0": version: 1.6.1 resolution: "@types/concat-stream@npm:1.6.1" @@ -5923,7 +5995,7 @@ __metadata: languageName: node linkType: hard -"@types/debug@npm:^4.1.10, @types/debug@npm:^4.1.7, @types/debug@npm:^4.1.8": +"@types/debug@npm:^4.1.10, @types/debug@npm:^4.1.12, @types/debug@npm:^4.1.7, @types/debug@npm:^4.1.8": version: 4.1.12 resolution: "@types/debug@npm:4.1.12" dependencies: @@ -6080,6 +6152,13 @@ __metadata: languageName: node linkType: hard +"@types/mocha@npm:^10.0.9": + version: 10.0.9 + resolution: "@types/mocha@npm:10.0.9" + checksum: 76dd782ac7e971ea159d4a7fd40c929afa051e040be3f41187ff03a2d7b3279e19828ddaa498ba1757b3e6b91316263bb7640db0e906938275b97a06e087b989 + languageName: node + linkType: hard + "@types/mocha@npm:^8.2.2": version: 8.2.3 resolution: "@types/mocha@npm:8.2.3" @@ -6127,6 +6206,15 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:22.7.5": + version: 22.7.5 + resolution: "@types/node@npm:22.7.5" + dependencies: + undici-types: "npm:~6.19.2" + checksum: cf11f74f1a26053ec58066616e3a8685b6bcd7259bc569738b8f752009f9f0f7f85a1b2d24908e5b0f752482d1e8b6babdf1fbb25758711ec7bb9500bfcd6e60 + languageName: node + linkType: hard + "@types/node@npm:^10.0.3": version: 10.17.60 resolution: "@types/node@npm:10.17.60" @@ -8655,7 +8743,7 @@ __metadata: languageName: node linkType: hard -"browser-stdout@npm:1.3.1": +"browser-stdout@npm:1.3.1, browser-stdout@npm:^1.3.1": version: 1.3.1 resolution: "browser-stdout@npm:1.3.1" checksum: c40e482fd82be872b6ea7b9f7591beafbf6f5ba522fe3dade98ba1573a1c29a11101564993e4eb44e5488be8f44510af072df9a9637c739217eb155ceb639205 @@ -9161,6 +9249,21 @@ __metadata: languageName: node linkType: hard +"chai@npm:^4.0.0": + version: 4.5.0 + resolution: "chai@npm:4.5.0" + dependencies: + assertion-error: "npm:^1.1.0" + check-error: "npm:^1.0.3" + deep-eql: "npm:^4.1.3" + get-func-name: "npm:^2.0.2" + loupe: "npm:^2.3.6" + pathval: "npm:^1.1.1" + type-detect: "npm:^4.1.0" + checksum: b8cb596bd1aece1aec659e41a6e479290c7d9bee5b3ad63d2898ad230064e5b47889a3bc367b20100a0853b62e026e2dc514acf25a3c9385f936aa3614d4ab4d + languageName: node + linkType: hard + "chai@npm:^4.2.0, chai@npm:^4.3.10, chai@npm:^4.3.4": version: 4.4.1 resolution: "chai@npm:4.4.1" @@ -9344,7 +9447,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:^3.4.0, chokidar@npm:^3.5.2": +"chokidar@npm:^3.4.0, chokidar@npm:^3.5.2, chokidar@npm:^3.5.3": version: 3.6.0 resolution: "chokidar@npm:3.6.0" dependencies: @@ -9363,6 +9466,15 @@ __metadata: languageName: node linkType: hard +"chokidar@npm:^4.0.0": + version: 4.0.1 + resolution: "chokidar@npm:4.0.1" + dependencies: + readdirp: "npm:^4.0.1" + checksum: 4bb7a3adc304059810bb6c420c43261a15bb44f610d77c35547addc84faa0374265c3adc67f25d06f363d9a4571962b02679268c40de07676d260de1986efea9 + languageName: node + linkType: hard + "chownr@npm:^1.1.4": version: 1.1.4 resolution: "chownr@npm:1.1.4" @@ -9858,6 +9970,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^8.1.0": + version: 8.3.0 + resolution: "commander@npm:8.3.0" + checksum: 8b043bb8322ea1c39664a1598a95e0495bfe4ca2fad0d84a92d7d1d8d213e2a155b441d2470c8e08de7c4a28cf2bc6e169211c49e1b21d9f7edc6ae4d9356060 + languageName: node + linkType: hard + "commander@npm:^9.3.0, commander@npm:^9.4.0": version: 9.5.0 resolution: "commander@npm:9.5.0" @@ -10511,6 +10630,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.3.5, debug@npm:^4.3.7": + version: 4.3.7 + resolution: "debug@npm:4.3.7" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 1471db19c3b06d485a622d62f65947a19a23fbd0dd73f7fd3eafb697eec5360cde447fb075919987899b1a2096e85d35d4eb5a4de09a57600ac9cf7e6c8e768b + languageName: node + linkType: hard + "decamelize-keys@npm:^1.1.0": version: 1.1.1 resolution: "decamelize-keys@npm:1.1.1" @@ -10840,7 +10971,7 @@ __metadata: languageName: node linkType: hard -"diff@npm:^5.0.0": +"diff@npm:^5.0.0, diff@npm:^5.2.0": version: 5.2.0 resolution: "diff@npm:5.2.0" checksum: aed0941f206fe261ecb258dc8d0ceea8abbde3ace5827518ff8d302f0fc9cc81ce116c4d8f379151171336caf0516b79e01abdc1ed1201b6440d895a66689eb4 @@ -12253,6 +12384,21 @@ __metadata: languageName: node linkType: hard +"ethers@npm:^6.13.4": + version: 6.13.4 + resolution: "ethers@npm:6.13.4" + dependencies: + "@adraffy/ens-normalize": "npm:1.10.1" + "@noble/curves": "npm:1.2.0" + "@noble/hashes": "npm:1.3.2" + "@types/node": "npm:22.7.5" + aes-js: "npm:4.0.0-beta.5" + tslib: "npm:2.7.0" + ws: "npm:8.17.1" + checksum: efcf9f39f841e38af68ec23cdbd745432c239c256aac4929842d1af04e55d7be0ff65e462f1cf3e93586f43f7bdcc0098fd56f2f7234f36d73e466521a5766ce + languageName: node + linkType: hard + "ethjs-unit@npm:0.1.6": version: 0.1.6 resolution: "ethjs-unit@npm:0.1.6" @@ -12823,6 +12969,18 @@ __metadata: languageName: node linkType: hard +"fdir@npm:^6.4.2": + version: 6.4.2 + resolution: "fdir@npm:6.4.2" + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + checksum: 34829886f34a3ca4170eca7c7180ec4de51a3abb4d380344063c0ae2e289b11d2ba8b724afee974598c83027fea363ff598caf2b51bc4e6b1e0d8b80cc530573 + languageName: node + linkType: hard + "fecha@npm:^4.2.0": version: 4.2.3 resolution: "fecha@npm:4.2.3" @@ -13713,7 +13871,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:8.1.0, glob@npm:^8.0.3": +"glob@npm:8.1.0, glob@npm:^8.0.3, glob@npm:^8.1.0": version: 8.1.0 resolution: "glob@npm:8.1.0" dependencies: @@ -14216,6 +14374,31 @@ __metadata: languageName: node linkType: hard +"hardhat-graph-protocol@workspace:^0.0.1, hardhat-graph-protocol@workspace:packages/hardhat-graph-protocol": + version: 0.0.0-use.local + resolution: "hardhat-graph-protocol@workspace:packages/hardhat-graph-protocol" + dependencies: + "@graphprotocol/contracts": "workspace:^7.0.0" + "@graphprotocol/horizon": "workspace:^0.0.1" + "@nomicfoundation/hardhat-ethers": "npm:^3.0.8" + "@types/chai": "npm:^4.0.0" + "@types/debug": "npm:^4.1.12" + "@types/mocha": "npm:^10.0.9" + chai: "npm:^4.0.0" + debug: "npm:^4.3.7" + eslint: "npm:^8.56.0" + eslint-graph-config: "workspace:^0.0.1" + ethers: "npm:^6.13.4" + hardhat: "npm:^2.22.16" + mocha: "npm:^10.8.2" + ts-node: "npm:^8.0.0" + typescript: "npm:^5.6.3" + peerDependencies: + ethers: ^6.13.4 + hardhat: ^2.22.16 + languageName: unknown + linkType: soft + "hardhat-secure-accounts@npm:0.0.5": version: 0.0.5 resolution: "hardhat-secure-accounts@npm:0.0.5" @@ -14360,6 +14543,68 @@ __metadata: languageName: node linkType: hard +"hardhat@npm:^2.22.0, hardhat@npm:^2.22.16": + version: 2.22.16 + resolution: "hardhat@npm:2.22.16" + dependencies: + "@ethersproject/abi": "npm:^5.1.2" + "@metamask/eth-sig-util": "npm:^4.0.0" + "@nomicfoundation/edr": "npm:^0.6.4" + "@nomicfoundation/ethereumjs-common": "npm:4.0.4" + "@nomicfoundation/ethereumjs-tx": "npm:5.0.4" + "@nomicfoundation/ethereumjs-util": "npm:9.0.4" + "@nomicfoundation/solidity-analyzer": "npm:^0.1.0" + "@sentry/node": "npm:^5.18.1" + "@types/bn.js": "npm:^5.1.0" + "@types/lru-cache": "npm:^5.1.0" + adm-zip: "npm:^0.4.16" + aggregate-error: "npm:^3.0.0" + ansi-escapes: "npm:^4.3.0" + boxen: "npm:^5.1.2" + chokidar: "npm:^4.0.0" + ci-info: "npm:^2.0.0" + debug: "npm:^4.1.1" + enquirer: "npm:^2.3.0" + env-paths: "npm:^2.2.0" + ethereum-cryptography: "npm:^1.0.3" + ethereumjs-abi: "npm:^0.6.8" + find-up: "npm:^5.0.0" + fp-ts: "npm:1.19.3" + fs-extra: "npm:^7.0.1" + immutable: "npm:^4.0.0-rc.12" + io-ts: "npm:1.10.4" + json-stream-stringify: "npm:^3.1.4" + keccak: "npm:^3.0.2" + lodash: "npm:^4.17.11" + mnemonist: "npm:^0.38.0" + mocha: "npm:^10.0.0" + p-map: "npm:^4.0.0" + picocolors: "npm:^1.1.0" + raw-body: "npm:^2.4.1" + resolve: "npm:1.17.0" + semver: "npm:^6.3.0" + solc: "npm:0.8.26" + source-map-support: "npm:^0.5.13" + stacktrace-parser: "npm:^0.1.10" + tinyglobby: "npm:^0.2.6" + tsort: "npm:0.0.1" + undici: "npm:^5.14.0" + uuid: "npm:^8.3.2" + ws: "npm:^7.4.6" + peerDependencies: + ts-node: "*" + typescript: "*" + peerDependenciesMeta: + ts-node: + optional: true + typescript: + optional: true + bin: + hardhat: internal/cli/bootstrap.js + checksum: d193d8dbd02aba9875fc4df23c49fe8cf441afb63382c9e248c776c75aca6e081e9b7b75fb262739f20bff152f9e0e4112bb22e3609dfa63ed4469d3ea46c0ca + languageName: node + linkType: hard + "hardhat@npm:~2.14.0": version: 2.14.1 resolution: "hardhat@npm:2.14.1" @@ -14616,7 +14861,7 @@ __metadata: languageName: node linkType: hard -"he@npm:1.2.0": +"he@npm:1.2.0, he@npm:^1.2.0": version: 1.2.0 resolution: "he@npm:1.2.0" bin: @@ -16385,6 +16630,13 @@ __metadata: languageName: node linkType: hard +"json-stream-stringify@npm:^3.1.4": + version: 3.1.6 + resolution: "json-stream-stringify@npm:3.1.6" + checksum: cb45e65143f4634ebb2dc0732410a942eaf86f88a7938b2f6397f4c6b96a7ba936e74d4d17db48c9221f669153996362b2ff50fe8c7fed8a7548646f98ae1f58 + languageName: node + linkType: hard + "json-stringify-safe@npm:^5.0.1, json-stringify-safe@npm:~5.0.1": version: 5.0.1 resolution: "json-stringify-safe@npm:5.0.1" @@ -17873,7 +18125,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^5.0.1": +"minimatch@npm:^5.0.1, minimatch@npm:^5.1.6": version: 5.1.6 resolution: "minimatch@npm:5.1.6" dependencies: @@ -18116,6 +18368,37 @@ __metadata: languageName: node linkType: hard +"mocha@npm:^10.8.2": + version: 10.8.2 + resolution: "mocha@npm:10.8.2" + dependencies: + ansi-colors: "npm:^4.1.3" + browser-stdout: "npm:^1.3.1" + chokidar: "npm:^3.5.3" + debug: "npm:^4.3.5" + diff: "npm:^5.2.0" + escape-string-regexp: "npm:^4.0.0" + find-up: "npm:^5.0.0" + glob: "npm:^8.1.0" + he: "npm:^1.2.0" + js-yaml: "npm:^4.1.0" + log-symbols: "npm:^4.1.0" + minimatch: "npm:^5.1.6" + ms: "npm:^2.1.3" + serialize-javascript: "npm:^6.0.2" + strip-json-comments: "npm:^3.1.1" + supports-color: "npm:^8.1.1" + workerpool: "npm:^6.5.1" + yargs: "npm:^16.2.0" + yargs-parser: "npm:^20.2.9" + yargs-unparser: "npm:^2.0.0" + bin: + _mocha: bin/_mocha + mocha: bin/mocha.js + checksum: 1f786290a32a1c234f66afe2bfcc68aa50fe9c7356506bd39cca267efb0b4714a63a0cb333815578d63785ba2fba058bf576c2512db73997c0cae0d659a88beb + languageName: node + linkType: hard + "mocha@npm:^4.0.1": version: 4.1.0 resolution: "mocha@npm:4.1.0" @@ -18208,7 +18491,7 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.3, ms@npm:^2.1.1": +"ms@npm:2.1.3, ms@npm:^2.1.1, ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 @@ -19737,6 +20020,13 @@ __metadata: languageName: node linkType: hard +"picocolors@npm:^1.1.0": + version: 1.1.1 + resolution: "picocolors@npm:1.1.1" + checksum: e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58 + languageName: node + linkType: hard + "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -20679,6 +20969,13 @@ __metadata: languageName: node linkType: hard +"readdirp@npm:^4.0.1": + version: 4.0.2 + resolution: "readdirp@npm:4.0.2" + checksum: a16ecd8ef3286dcd90648c3b103e3826db2b766cdb4a988752c43a83f683d01c7059158d623cbcd8bdfb39e65d302d285be2d208e7d9f34d022d912b929217dd + languageName: node + linkType: hard + "readdirp@npm:~3.6.0": version: 3.6.0 resolution: "readdirp@npm:3.6.0" @@ -21651,6 +21948,15 @@ __metadata: languageName: node linkType: hard +"serialize-javascript@npm:^6.0.2": + version: 6.0.2 + resolution: "serialize-javascript@npm:6.0.2" + dependencies: + randombytes: "npm:^2.1.0" + checksum: 2dd09ef4b65a1289ba24a788b1423a035581bef60817bea1f01eda8e3bda623f86357665fe7ac1b50f6d4f583f97db9615b3f07b2a2e8cbcb75033965f771dd2 + languageName: node + linkType: hard + "serve-static@npm:1.14.2": version: 1.14.2 resolution: "serve-static@npm:1.14.2" @@ -22097,6 +22403,23 @@ __metadata: languageName: node linkType: hard +"solc@npm:0.8.26": + version: 0.8.26 + resolution: "solc@npm:0.8.26" + dependencies: + command-exists: "npm:^1.2.8" + commander: "npm:^8.1.0" + follow-redirects: "npm:^1.12.1" + js-sha3: "npm:0.8.0" + memorystream: "npm:^0.3.1" + semver: "npm:^5.5.0" + tmp: "npm:0.0.33" + bin: + solcjs: solc.js + checksum: 1eea35da99c228d0dc1d831c29f7819e7921b67824c889a5e5f2e471a2ef5856a15fabc0b5de067f5ba994fa36fb5a563361963646fe98dad58a0e4fa17c8b2d + languageName: node + linkType: hard + "solc@npm:^0.4.20": version: 0.4.26 resolution: "solc@npm:0.4.26" @@ -22374,7 +22697,7 @@ __metadata: languageName: node linkType: hard -"source-map-support@npm:^0.5.13, source-map-support@npm:^0.5.16": +"source-map-support@npm:^0.5.13, source-map-support@npm:^0.5.16, source-map-support@npm:^0.5.17": version: 0.5.21 resolution: "source-map-support@npm:0.5.21" dependencies: @@ -22900,7 +23223,7 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:8.1.1": +"supports-color@npm:8.1.1, supports-color@npm:^8.1.1": version: 8.1.1 resolution: "supports-color@npm:8.1.1" dependencies: @@ -23268,6 +23591,16 @@ __metadata: languageName: node linkType: hard +"tinyglobby@npm:^0.2.6": + version: 0.2.10 + resolution: "tinyglobby@npm:0.2.10" + dependencies: + fdir: "npm:^6.4.2" + picomatch: "npm:^4.0.2" + checksum: ce946135d39b8c0e394e488ad59f4092e8c4ecd675ef1bcd4585c47de1b325e61ec6adfbfbe20c3c2bfa6fd674c5b06de2a2e65c433f752ae170aff11793e5ef + languageName: node + linkType: hard + "title-case@npm:^3.0.3": version: 3.0.3 resolution: "title-case@npm:3.0.3" @@ -23535,6 +23868,26 @@ __metadata: languageName: node linkType: hard +"ts-node@npm:^8.0.0": + version: 8.10.2 + resolution: "ts-node@npm:8.10.2" + dependencies: + arg: "npm:^4.1.0" + diff: "npm:^4.0.1" + make-error: "npm:^1.1.1" + source-map-support: "npm:^0.5.17" + yn: "npm:3.1.1" + peerDependencies: + typescript: ">=2.7" + bin: + ts-node: dist/bin.js + ts-node-script: dist/bin-script.js + ts-node-transpile-only: dist/bin-transpile.js + ts-script: dist/bin-script-deprecated.js + checksum: 628343f62fff2543b4559a93eb27005084aea7609945e77f311031c5e96c4099736646856e1792605b90e8007d2c060fe80783be21c94788d91d6f259aab92e2 + languageName: node + linkType: hard + "tsconfig-paths@npm:^4.2.0": version: 4.2.0 resolution: "tsconfig-paths@npm:4.2.0" @@ -23553,6 +23906,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:2.7.0": + version: 2.7.0 + resolution: "tslib@npm:2.7.0" + checksum: 469e1d5bf1af585742128827000711efa61010b699cb040ab1800bcd3ccdd37f63ec30642c9e07c4439c1db6e46345582614275daca3e0f4abae29b0083f04a6 + languageName: node + linkType: hard + "tslib@npm:^1.11.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" @@ -23667,6 +24027,13 @@ __metadata: languageName: node linkType: hard +"type-detect@npm:^4.1.0": + version: 4.1.0 + resolution: "type-detect@npm:4.1.0" + checksum: df8157ca3f5d311edc22885abc134e18ff8ffbc93d6a9848af5b682730ca6a5a44499259750197250479c5331a8a75b5537529df5ec410622041650a7f293e2a + languageName: node + linkType: hard + "type-fest@npm:^0.13.1": version: 0.13.1 resolution: "type-fest@npm:0.13.1" @@ -23920,6 +24287,16 @@ __metadata: languageName: node linkType: hard +"typescript@npm:^5.6.3": + version: 5.6.3 + resolution: "typescript@npm:5.6.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 44f61d3fb15c35359bc60399cb8127c30bae554cd555b8e2b46d68fa79d680354b83320ad419ff1b81a0bdf324197b29affe6cc28988cd6a74d4ac60c94f9799 + languageName: node + linkType: hard + "typescript@patch:typescript@npm%3A^4.0.2#optional!builtin, typescript@patch:typescript@npm%3A^4.4.3#optional!builtin": version: 4.9.5 resolution: "typescript@patch:typescript@npm%3A4.9.5#optional!builtin::version=4.9.5&hash=289587" @@ -23940,6 +24317,16 @@ __metadata: languageName: node linkType: hard +"typescript@patch:typescript@npm%3A^5.6.3#optional!builtin": + version: 5.6.3 + resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin::version=5.6.3&hash=e012d7" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: ac8307bb06bbfd08ae7137da740769b7d8c3ee5943188743bb622c621f8ad61d244767480f90fbd840277fbf152d8932aa20c33f867dea1bb5e79b187ca1a92f + languageName: node + linkType: hard + "typewise-core@npm:^1.2, typewise-core@npm:^1.2.0": version: 1.2.0 resolution: "typewise-core@npm:1.2.0" @@ -24075,6 +24462,13 @@ __metadata: languageName: node linkType: hard +"undici-types@npm:~6.19.2": + version: 6.19.8 + resolution: "undici-types@npm:6.19.8" + checksum: 078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344 + languageName: node + linkType: hard + "undici@npm:^5.14.0": version: 5.28.4 resolution: "undici@npm:5.28.4" @@ -25573,6 +25967,13 @@ __metadata: languageName: node linkType: hard +"workerpool@npm:^6.5.1": + version: 6.5.1 + resolution: "workerpool@npm:6.5.1" + checksum: 58e8e969782292cb3a7bfba823f1179a7615250a0cefb4841d5166234db1880a3d0fe83a31dd8d648329ec92c2d0cd1890ad9ec9e53674bb36ca43e9753cdeac + languageName: node + linkType: hard + "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": version: 7.0.0 resolution: "wrap-ansi@npm:7.0.0" @@ -25887,7 +26288,7 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.3": +"yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.3, yargs-parser@npm:^20.2.9": version: 20.2.9 resolution: "yargs-parser@npm:20.2.9" checksum: 0685a8e58bbfb57fab6aefe03c6da904a59769bd803a722bb098bd5b0f29d274a1357762c7258fb487512811b8063fb5d2824a3415a0a4540598335b3b086c72 @@ -25910,7 +26311,7 @@ __metadata: languageName: node linkType: hard -"yargs-unparser@npm:2.0.0": +"yargs-unparser@npm:2.0.0, yargs-unparser@npm:^2.0.0": version: 2.0.0 resolution: "yargs-unparser@npm:2.0.0" dependencies: @@ -25922,7 +26323,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:16.2.0": +"yargs@npm:16.2.0, yargs@npm:^16.2.0": version: 16.2.0 resolution: "yargs@npm:16.2.0" dependencies: From 411160088329ee5f3cea4c318fe4929de931044f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Thu, 21 Nov 2024 17:26:52 -0300 Subject: [PATCH 2/9] feat(gre): working version for horizon with legacy contracts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- packages/hardhat-graph-protocol/src/config.ts | 42 ++++--- .../hardhat-graph-protocol/src/deployments.ts | 22 ++++ packages/hardhat-graph-protocol/src/gre.ts | 104 ++++-------------- .../sdk/deployments/horizon/address-book.ts | 8 +- .../src/sdk/deployments/horizon/index.ts | 4 +- .../src/sdk/deployments/horizon/types.ts | 10 +- .../src/type-extensions.ts | 67 +++++++++-- packages/hardhat-graph-protocol/src/types.ts | 24 ---- .../test/config.test.ts | 63 +++++++---- .../files/addresses-global-short.json | 0 .../files/addresses-network-short.json | 0 .../global-address-book/hardhat.config.ts | 6 +- .../invalid-address-book/hardhat.config.ts | 6 +- .../network-address-book/hardhat.config.ts | 12 +- .../fixtures/no-path-config/hardhat.config.ts | 6 +- .../fixtures/path-config/hardhat.config.ts | 6 +- .../hardhat-graph-protocol/test/gre.test.ts | 49 ++++----- .../hardhat-graph-protocol/test/helpers.ts | 30 +++-- packages/hardhat-graph-protocol/tsconfig.json | 2 +- packages/horizon/hardhat.config.ts | 6 +- 20 files changed, 258 insertions(+), 209 deletions(-) create mode 100644 packages/hardhat-graph-protocol/src/deployments.ts delete mode 100644 packages/hardhat-graph-protocol/src/types.ts create mode 100644 packages/hardhat-graph-protocol/test/fixtures/files/addresses-global-short.json create mode 100644 packages/hardhat-graph-protocol/test/fixtures/files/addresses-network-short.json diff --git a/packages/hardhat-graph-protocol/src/config.ts b/packages/hardhat-graph-protocol/src/config.ts index f93bc868e..3e5021b78 100644 --- a/packages/hardhat-graph-protocol/src/config.ts +++ b/packages/hardhat-graph-protocol/src/config.ts @@ -1,35 +1,49 @@ import fs from 'fs' + import { GraphPluginError } from './sdk/utils/error' import { logDebug } from './logger' +import { normalizePath } from './sdk/utils/path' -import type { GraphDeployment, GraphRuntimeEnvironmentOptions } from './types' +import type { GraphDeployment } from './deployments' +import type { GraphRuntimeEnvironmentOptions } from './type-extensions' import type { HardhatRuntimeEnvironment } from 'hardhat/types' -import { normalizePath } from './sdk/utils/path' export function getAddressBookPath( deployment: GraphDeployment, hre: HardhatRuntimeEnvironment, opts: GraphRuntimeEnvironmentOptions, ): string { + const optsPath = getPath(opts.deployments?.[deployment]) + const networkPath = getPath(hre.network.config.deployments?.[deployment]) + const globalPath = getPath(hre.config.graph?.deployments?.[deployment]) + logDebug(`== ${deployment} - Getting address book path`) logDebug(`Graph base dir: ${hre.config.paths.graph}`) - logDebug(`1) opts.addressBooks.[deployment]: ${opts.addressBooks?.[deployment]}`) - logDebug(`2) hre.network.config.addressBooks.[deployment]: ${hre.network.config?.addressBooks?.[deployment]}`) - logDebug(`3) hre.config.graph.addressBooks.[deployment]: ${hre.config.graph?.addressBooks?.[deployment]}`) - - let addressBookPath - = opts.addressBooks?.[deployment] ?? hre.network.config?.addressBooks?.[deployment] ?? hre.config.graph?.addressBooks?.[deployment] + logDebug(`1) opts: ${optsPath}`) + logDebug(`2) network: ${networkPath}`) + logDebug(`3) global: ${globalPath}`) + const addressBookPath = optsPath ?? networkPath ?? globalPath if (addressBookPath === undefined) { throw new GraphPluginError('Must set a an addressBook path!') } - addressBookPath = normalizePath(addressBookPath, hre.config.paths.graph) - - if (!fs.existsSync(addressBookPath)) { - throw new GraphPluginError(`Address book not found: ${addressBookPath}`) + const normalizedAddressBookPath = normalizePath(addressBookPath, hre.config.paths.graph) + if (!fs.existsSync(normalizedAddressBookPath)) { + throw new GraphPluginError(`Address book not found: ${normalizedAddressBookPath}`) } - logDebug(`Address book path found: ${addressBookPath}`) - return addressBookPath + logDebug(`Address book path found: ${normalizedAddressBookPath}`) + return normalizedAddressBookPath +} + +function getPath(value: string | { + addressBook: string +} | undefined): string | undefined { + if (typeof value === 'string') { + return value + } else if (value && typeof value == 'object') { + return value.addressBook + } + return } diff --git a/packages/hardhat-graph-protocol/src/deployments.ts b/packages/hardhat-graph-protocol/src/deployments.ts new file mode 100644 index 000000000..8074977b1 --- /dev/null +++ b/packages/hardhat-graph-protocol/src/deployments.ts @@ -0,0 +1,22 @@ +import type { GraphHorizonAddressBook, GraphHorizonContracts } from './sdk/deployments/horizon' + +// List of supported Graph deployments +const GraphDeploymentsList = [ + 'horizon', +] as const + +export type GraphDeployment = (typeof GraphDeploymentsList)[number] + +export type GraphDeploymentRuntimeEnvironmentMap = { + horizon: { + contracts: GraphHorizonContracts + addressBook: GraphHorizonAddressBook + } +} + +export function isGraphDeployment(deployment: unknown): deployment is GraphDeployment { + return ( + typeof deployment === 'string' + && GraphDeploymentsList.includes(deployment as GraphDeployment) + ) +} diff --git a/packages/hardhat-graph-protocol/src/gre.ts b/packages/hardhat-graph-protocol/src/gre.ts index 5cc251138..a307583b8 100644 --- a/packages/hardhat-graph-protocol/src/gre.ts +++ b/packages/hardhat-graph-protocol/src/gre.ts @@ -1,12 +1,14 @@ import path from 'path' -import { GraphDeploymentsList, GraphRuntimeEnvironment, GraphRuntimeEnvironmentOptions, isGraphDeployment } from './types' -import { logDebug, logWarn } from './logger' +import { assertGraphRuntimeEnvironment } from './type-extensions' import { getAddressBookPath } from './config' import { GraphHorizonAddressBook } from './sdk/deployments/horizon' import { HardhatEthersProvider } from '@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider' +import { isGraphDeployment } from './deployments' +import { logDebug } from './logger' import type { HardhatConfig, HardhatRuntimeEnvironment, HardhatUserConfig } from 'hardhat/types' +import type { GraphRuntimeEnvironmentOptions } from './type-extensions' export const greExtendConfig = (config: HardhatConfig, userConfig: Readonly) => { const userPath = userConfig.paths?.graph @@ -26,113 +28,45 @@ export const greExtendConfig = (config: HardhatConfig, userConfig: Readonly { - hre.graph = (opts: GraphRuntimeEnvironmentOptions = {}) => { + hre.graph = (opts: GraphRuntimeEnvironmentOptions = { deployments: {} }) => { logDebug('*** Initializing Graph Runtime Environment (GRE) ***') logDebug(`Main network: ${hre.network.name}`) - const provider = new HardhatEthersProvider(hre.network.provider, hre.network.name) const deployments = [ - ...Object.keys(opts.addressBooks ?? {}), - ...Object.keys(hre.network.config.addressBooks ?? {}), - ...Object.keys(hre.config.graph?.addressBooks ?? {}), - ] + ...Object.keys(opts.deployments ?? {}), + ...Object.keys(hre.network.config.deployments ?? {}), + ...Object.keys(hre.config.graph?.deployments ?? {}), + ].filter(v => isGraphDeployment(v)) logDebug(`Detected deployments: ${deployments.join(', ')}`) // Build the Graph Runtime Environment (GRE) for each deployment - const gre = {} as GraphRuntimeEnvironment + const provider = new HardhatEthersProvider(hre.network.provider, hre.network.name) + const greDeployments: Record = {} for (const deployment of deployments) { - if (!isGraphDeployment(deployment)) { - logWarn(`Invalid deployment: ${deployment}. Skipping...`) - continue - } - logDebug(`Initializing ${deployment} deployment...`) const addressBookPath = getAddressBookPath(deployment, hre, opts) let addressBook + switch (deployment) { case 'horizon': addressBook = new GraphHorizonAddressBook(addressBookPath, hre.network.config.chainId!) - gre.horizon = { + greDeployments.horizon = { addressBook: addressBook, contracts: addressBook.loadContracts(hre.network.config.chainId!, provider), } break - default: break } } + const gre = { + ...greDeployments, + provider, + chainId: async () => (await provider.getNetwork()).chainId, + } + assertGraphRuntimeEnvironment(gre) logDebug('GRE initialized successfully!') return gre } } - -// function buildGraphNetworkEnvironment( -// chainId: number, -// provider: EthersProviderWrapper | undefined, -// graphConfigPath: string | undefined, -// addressBookPath: string, -// isHHL1: boolean, -// enableTxLogging: boolean, -// secureAccounts: boolean, -// fork: boolean, -// getWallets: () => Promise, -// getWallet: (address: string) => Promise, -// unlockProvider: (caller: string) => Promise, -// ): GraphNetworkEnvironment | null { -// if (graphConfigPath === undefined) { -// logWarn( -// `No graph config file provided for chain: ${chainId}. ${ -// isHHL1 ? 'L2' : 'L1' -// } will not be initialized.`, -// ) -// return null -// } - -// if (provider === undefined) { -// logWarn( -// `No provider URL found for: ${chainId}. ${isHHL1 ? 'L2' : 'L1'} will not be initialized.`, -// ) -// return null -// } - -// // Upgrade provider to secure accounts if feature is enabled -// const getUpdatedProvider = async (caller: string) => -// secureAccounts ? await unlockProvider(caller) : provider - -// return { -// chainId: chainId, -// provider: provider, -// addressBook: lazyObject(() => new GraphNetworkAddressBook(addressBookPath, chainId)), -// graphConfig: lazyObject(() => { -// const config = readConfig(graphConfigPath, true) -// config.defaults = getDefaults(config, isHHL1) -// return config -// }), -// contracts: lazyObject(() => -// loadGraphNetworkContracts(addressBookPath, chainId, provider, undefined, { -// enableTxLogging, -// }), -// ), -// getWallets: lazyFunction(() => () => getWallets()), -// getWallet: lazyFunction(() => (address: string) => getWallet(address)), -// getDeployer: lazyFunction( -// () => async () => getDeployer(await getUpdatedProvider('getDeployer')), -// ), -// getNamedAccounts: lazyFunction( -// () => async () => -// getNamedAccounts( -// fork ? provider : await getUpdatedProvider('getNamedAccounts'), -// graphConfigPath, -// ), -// ), -// getTestAccounts: lazyFunction( -// () => async () => -// getTestAccounts(await getUpdatedProvider('getTestAccounts'), graphConfigPath), -// ), -// getAllAccounts: lazyFunction( -// () => async () => getAllAccounts(await getUpdatedProvider('getAllAccounts')), -// ), -// } -// } diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/address-book.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/address-book.ts index 48b6e59ca..0ed701686 100644 --- a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/address-book.ts +++ b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/address-book.ts @@ -17,7 +17,7 @@ export class GraphHorizonAddressBook extends AddressBook Generator } - -export interface GraphHorizonRuntimeEnvironment { - contracts: GraphHorizonContracts - addressBook: GraphHorizonAddressBook -} diff --git a/packages/hardhat-graph-protocol/src/type-extensions.ts b/packages/hardhat-graph-protocol/src/type-extensions.ts index f8bfd7427..c7cf609d4 100644 --- a/packages/hardhat-graph-protocol/src/type-extensions.ts +++ b/packages/hardhat-graph-protocol/src/type-extensions.ts @@ -2,7 +2,48 @@ import 'hardhat/types/config' import 'hardhat/types/runtime' -import type { GraphRuntimeEnvironment, GraphRuntimeEnvironmentOptions } from './types' +import type { GraphDeployment, GraphDeploymentRuntimeEnvironmentMap } from './deployments' +import type { HardhatEthersProvider } from '@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider' + +export type GraphRuntimeEnvironmentOptions = { + deployments?: { + [deployment in GraphDeployment]?: string | { + addressBook: string + } + } +} + +export type GraphRuntimeEnvironment = { + [deployment in keyof GraphDeploymentRuntimeEnvironmentMap]?: GraphDeploymentRuntimeEnvironmentMap[deployment] +} & { + provider: HardhatEthersProvider + chainId: () => Promise +} + +export function assertGraphRuntimeEnvironment( + obj: unknown, +): obj is GraphRuntimeEnvironment { + if (typeof obj !== 'object' || obj === null) return false + + const deployments = obj as Partial + + for (const deployment in deployments) { + const environment = deployments[deployment as keyof GraphDeploymentRuntimeEnvironmentMap] + if (!environment || typeof environment !== 'object') { + return false + } + } + + if (typeof (obj as GraphRuntimeEnvironment).provider !== 'object') { + return false + } + + if (typeof (obj as GraphRuntimeEnvironment).chainId !== 'function') { + return false + } + + return true +} declare module 'hardhat/types/runtime' { export interface HardhatRuntimeEnvironment { @@ -20,26 +61,34 @@ declare module 'hardhat/types/config' { } export interface HardhatNetworkConfig { - addressBooks?: { - [deployment: string]: string + deployments?: { + [deployment in GraphDeployment]?: string | { + addressBook: string + } } } export interface HardhatNetworkUserConfig { - addressBooks?: { - [deployment: string]: string + deployments?: { + [deployment in GraphDeployment]?: string | { + addressBook: string + } } } export interface HttpNetworkConfig { - addressBooks?: { - [deployment: string]: string + deployments?: { + [deployment in GraphDeployment]?: string | { + addressBook: string + } } } export interface HttpNetworkUserConfig { - addressBooks?: { - [deployment: string]: string + deployments?: { + [deployment in GraphDeployment]?: string | { + addressBook: string + } } } diff --git a/packages/hardhat-graph-protocol/src/types.ts b/packages/hardhat-graph-protocol/src/types.ts deleted file mode 100644 index 35e1069da..000000000 --- a/packages/hardhat-graph-protocol/src/types.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { GraphHorizonRuntimeEnvironment } from './sdk/deployments/horizon' - -export const GraphDeploymentsList = [ - 'horizon', -] as const - -export type GraphDeployment = (typeof GraphDeploymentsList)[number] - -export function isGraphDeployment(deployment: unknown): deployment is GraphDeployment { - return ( - typeof deployment === 'string' - && GraphDeploymentsList.includes(deployment as GraphDeployment) - ) -} - -export type GraphRuntimeEnvironmentOptions = { - addressBooks?: { - [deployment in GraphDeployment]: string - } -} - -export type GraphRuntimeEnvironment = { - [deployment in GraphDeployment]: GraphHorizonRuntimeEnvironment -} diff --git a/packages/hardhat-graph-protocol/test/config.test.ts b/packages/hardhat-graph-protocol/test/config.test.ts index dbc84342c..3cd005c31 100644 --- a/packages/hardhat-graph-protocol/test/config.test.ts +++ b/packages/hardhat-graph-protocol/test/config.test.ts @@ -2,51 +2,74 @@ import path from 'path' import { expect } from 'chai' import { getAddressBookPath } from '../src/config' -import { useEnvironment } from './helpers' +import { loadHardhatContext } from './helpers' describe('GRE init functions', function () { // No address book - should throw describe('getAddressBookPath', function () { - useEnvironment('default-config', 'mainnet') - it('should throw if no address book is specified', function () { - expect(() => getAddressBookPath(this.hre, {})).to.throw('Must set a an addressBook path!') + this.hre = loadHardhatContext('default-config', 'mainnet') + expect(() => getAddressBookPath('horizon', this.hre, {})).to.throw('Must set a an addressBook path!') }) - }) - describe('getAddressBookPath', function () { - useEnvironment('network-address-book', 'mainnet') + it('should throw if address book doesn\'t exist', function () { + this.hre = loadHardhatContext('invalid-address-book', 'mainnet') + expect(() => getAddressBookPath('horizon', this.hre, {})).to.throw(/Address book not found: /) + }) // Address book via opts should be used it('should use opts parameter if available', function () { - const addressBook = getAddressBookPath(this.hre, { - addressBook: 'addresses-opt.json', + this.hre = loadHardhatContext('network-address-book', 'mainnet') + const addressBook = getAddressBookPath('horizon', this.hre, { + deployments: { + horizon: { + addressBook: 'addresses-opt.json', + }, + }, + }) + expect(path.basename(addressBook)).to.equal('addresses-opt.json') + }) + + it('should use opts parameter if available - shortcut syntax', function () { + this.hre = loadHardhatContext('network-address-book', 'mainnet') + const addressBook = getAddressBookPath('horizon', this.hre, { + deployments: { + horizon: 'addresses-opt.json', + }, }) expect(path.basename(addressBook)).to.equal('addresses-opt.json') }) // Address book via network config should be used it('should use HH network config', function () { - const addressBook = getAddressBookPath(this.hre, {}) + this.hre = loadHardhatContext('network-address-book', 'mainnet') + const addressBook = getAddressBookPath('horizon', this.hre, {}) expect(path.basename(addressBook)).to.equal('addresses-network.json') }) - }) - describe('getAddressBookPath', function () { - useEnvironment('global-address-book', 'mainnet') + it('should use HH network config - shortcut syntax', function () { + this.hre = loadHardhatContext('network-address-book', 'mainnet') + if (this.hre.network.config.deployments) { + this.hre.network.config.deployments.horizon = 'addresses-network-short.json' + } + const addressBook = getAddressBookPath('horizon', this.hre, {}) + expect(path.basename(addressBook)).to.equal('addresses-network-short.json') + }) // Address book via global config should be used it('should use HH global config', function () { - const addressBook = getAddressBookPath(this.hre, {}) + this.hre = loadHardhatContext('global-address-book', 'mainnet') + const addressBook = getAddressBookPath('horizon', this.hre, {}) expect(path.basename(addressBook)).to.equal('addresses-global.json') }) - }) - - describe('getAddressBookPath with a non existent address book', function () { - useEnvironment('invalid-address-book', 'mainnet') - it('should throw if address book doesn\'t exist', function () { - expect(() => getAddressBookPath(this.hre, {})).to.throw(/Address book not found: /) + it('should use HH global config - shortcut syntax', function () { + this.hre = loadHardhatContext('global-address-book', 'mainnet') + if (this.hre.config.graph.deployments) { + this.hre.config.graph.deployments.horizon = 'addresses-global-short.json' + } + const addressBook = getAddressBookPath('horizon', this.hre, {}) + expect(path.basename(addressBook)).to.equal('addresses-global-short.json') }) }) }) diff --git a/packages/hardhat-graph-protocol/test/fixtures/files/addresses-global-short.json b/packages/hardhat-graph-protocol/test/fixtures/files/addresses-global-short.json new file mode 100644 index 000000000..e69de29bb diff --git a/packages/hardhat-graph-protocol/test/fixtures/files/addresses-network-short.json b/packages/hardhat-graph-protocol/test/fixtures/files/addresses-network-short.json new file mode 100644 index 000000000..e69de29bb diff --git a/packages/hardhat-graph-protocol/test/fixtures/global-address-book/hardhat.config.ts b/packages/hardhat-graph-protocol/test/fixtures/global-address-book/hardhat.config.ts index b7224dfa4..1f7718d54 100644 --- a/packages/hardhat-graph-protocol/test/fixtures/global-address-book/hardhat.config.ts +++ b/packages/hardhat-graph-protocol/test/fixtures/global-address-book/hardhat.config.ts @@ -41,7 +41,11 @@ const config: HardhatUserConfig = { }, }, graph: { - addressBook: 'addresses-global.json', + deployments: { + horizon: { + addressBook: 'addresses-global.json', + }, + }, }, } diff --git a/packages/hardhat-graph-protocol/test/fixtures/invalid-address-book/hardhat.config.ts b/packages/hardhat-graph-protocol/test/fixtures/invalid-address-book/hardhat.config.ts index 995dacc17..e4569c04a 100644 --- a/packages/hardhat-graph-protocol/test/fixtures/invalid-address-book/hardhat.config.ts +++ b/packages/hardhat-graph-protocol/test/fixtures/invalid-address-book/hardhat.config.ts @@ -41,7 +41,11 @@ const config: HardhatUserConfig = { }, }, graph: { - addressBook: 'addresses-invalid.json', + deployments: { + horizon: { + addressBook: 'addresses-invalid.json', + }, + }, }, } diff --git a/packages/hardhat-graph-protocol/test/fixtures/network-address-book/hardhat.config.ts b/packages/hardhat-graph-protocol/test/fixtures/network-address-book/hardhat.config.ts index 51fd2341c..c75c71e4e 100644 --- a/packages/hardhat-graph-protocol/test/fixtures/network-address-book/hardhat.config.ts +++ b/packages/hardhat-graph-protocol/test/fixtures/network-address-book/hardhat.config.ts @@ -18,7 +18,11 @@ const config: HardhatUserConfig = { 'mainnet': { chainId: 1, url: `https://mainnet.infura.io/v3/123456`, - addressBook: 'addresses-network.json', + deployments: { + horizon: { + addressBook: 'addresses-network.json', + }, + }, }, 'arbitrum-one': { chainId: 42161, @@ -42,7 +46,11 @@ const config: HardhatUserConfig = { }, }, graph: { - addressBook: 'addresses-global.json', + deployments: { + horizon: { + addressBook: 'addresses-global.json', + }, + }, }, } diff --git a/packages/hardhat-graph-protocol/test/fixtures/no-path-config/hardhat.config.ts b/packages/hardhat-graph-protocol/test/fixtures/no-path-config/hardhat.config.ts index 0329f449e..c9199325a 100644 --- a/packages/hardhat-graph-protocol/test/fixtures/no-path-config/hardhat.config.ts +++ b/packages/hardhat-graph-protocol/test/fixtures/no-path-config/hardhat.config.ts @@ -38,7 +38,11 @@ const config: HardhatUserConfig = { }, }, graph: { - addressBook: 'addresses.json', + deployments: { + horizon: { + addressBook: 'addresses-hre.json', + }, + }, }, } diff --git a/packages/hardhat-graph-protocol/test/fixtures/path-config/hardhat.config.ts b/packages/hardhat-graph-protocol/test/fixtures/path-config/hardhat.config.ts index c8a4b55fc..836815e33 100644 --- a/packages/hardhat-graph-protocol/test/fixtures/path-config/hardhat.config.ts +++ b/packages/hardhat-graph-protocol/test/fixtures/path-config/hardhat.config.ts @@ -41,7 +41,11 @@ const config: HardhatUserConfig = { }, }, graph: { - addressBook: 'addresses-hre.json', + deployments: { + horizon: { + addressBook: 'addresses-hre.json', + }, + }, }, } diff --git a/packages/hardhat-graph-protocol/test/gre.test.ts b/packages/hardhat-graph-protocol/test/gre.test.ts index 4331ed1c4..d66a3fe75 100644 --- a/packages/hardhat-graph-protocol/test/gre.test.ts +++ b/packages/hardhat-graph-protocol/test/gre.test.ts @@ -1,57 +1,52 @@ import path from 'path' import { assert, expect } from 'chai' -import { useEnvironment } from './helpers' +import { loadHardhatContext, useHardhatProject } from './helpers' +import { GraphHorizonAddressBook } from '../src/sdk/deployments/horizon' describe('GRE usage', function () { describe('Project not using GRE', function () { - useEnvironment('default-config', 'mainnet') + useHardhatProject('default-config', 'mainnet') it('should throw when accessing hre.graph()', function () { expect(() => this.hre.graph()).to.throw() }) }) - describe(`Project using GRE: path-config`, function () { - useEnvironment('path-config', 'mainnet') - + describe(`Project using GRE - graph path`, function () { it('should add the graph path to the config', function () { + this.hre = loadHardhatContext('no-path-config', 'mainnet') assert.equal( this.hre.config.paths.graph, - path.join(__dirname, 'fixtures/files'), + path.join(__dirname, 'fixtures/no-path-config'), ) }) - }) - describe(`Project using GRE: no-path-config`, function () { - useEnvironment('no-path-config', 'mainnet') - - it('should add the graph path to the config', function () { + it('should add the graph path to the config from custom path', function () { + this.hre = loadHardhatContext('path-config', 'mainnet') assert.equal( this.hre.config.paths.graph, - path.join(__dirname, 'fixtures/no-path-config'), + path.join(__dirname, 'fixtures/files'), ) }) }) - describe(`Project using GRE: global-address-book`, function () { - useEnvironment('global-address-book', 'mainnet') + describe(`Project using GRE - deployments`, function () { + useHardhatProject('path-config', 'mainnet') - it('should use the global address book', function () { - assert.equal( - this.hre.graph().addressBook.file, - path.join(__dirname, 'fixtures/files/addresses-global.json'), - ) - }) - }) + it('should load Horizon deployment', function () { + const graph = this.hre.graph() + assert.isDefined(graph.horizon) + assert.isObject(graph.horizon) - describe(`Project using GRE: network-address-book`, function () { - useEnvironment('network-address-book', 'mainnet') + assert.isDefined(graph.horizon.contracts) + assert.isObject(graph.horizon.contracts) - it('should use the network address book', function () { - assert.equal( - this.hre.graph().addressBook.file, - path.join(__dirname, 'fixtures/files/addresses-network.json'), + assert.isDefined(graph.horizon.addressBook) + assert.isObject(graph.horizon.addressBook) + assert.instanceOf( + graph.horizon.addressBook, + GraphHorizonAddressBook, ) }) }) diff --git a/packages/hardhat-graph-protocol/test/helpers.ts b/packages/hardhat-graph-protocol/test/helpers.ts index 561e59c0e..1c7050e05 100644 --- a/packages/hardhat-graph-protocol/test/helpers.ts +++ b/packages/hardhat-graph-protocol/test/helpers.ts @@ -1,6 +1,6 @@ import path from 'path' -import { resetHardhatContext } from 'hardhat/plugins-testing' +import { resetHardhatContext as _resetHardhatContext } from 'hardhat/plugins-testing' import type { HardhatRuntimeEnvironment } from 'hardhat/types' declare module 'mocha' { @@ -9,18 +9,30 @@ declare module 'mocha' { } } -export function useEnvironment(fixtureProjectName: string, network?: string): void { +export function useHardhatProject(fixtureProjectName: string, network?: string): void { beforeEach('Loading hardhat environment', function () { - process.chdir(path.join(__dirname, 'fixtures', fixtureProjectName)) - - if (network !== undefined) { - process.env.HARDHAT_NETWORK = network - } - this.hre = require('hardhat') + this.hre = loadHardhatContext(fixtureProjectName, network) }) afterEach('Resetting hardhat', function () { resetHardhatContext() - delete process.env.HARDHAT_NETWORK }) } + +export function loadHardhatContext(fixtureProjectName: string, network?: string): HardhatRuntimeEnvironment { + resetHardhatContext() + delete process.env.HARDHAT_NETWORK + + process.chdir(path.join(__dirname, 'fixtures', fixtureProjectName)) + + if (network !== undefined) { + process.env.HARDHAT_NETWORK = network + } + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + return require('hardhat') +} + +export function resetHardhatContext(): void { + _resetHardhatContext() + delete process.env.HARDHAT_NETWORK +} diff --git a/packages/hardhat-graph-protocol/tsconfig.json b/packages/hardhat-graph-protocol/tsconfig.json index 9ddee2404..18d89b091 100644 --- a/packages/hardhat-graph-protocol/tsconfig.json +++ b/packages/hardhat-graph-protocol/tsconfig.json @@ -11,5 +11,5 @@ "resolveJsonModule": true, "outDir": "dist", }, - "include": ["eslint.config.js", "src/**/*.ts"] + "include": ["eslint.config.js", "src/**/*.ts", "test/**/*.ts"], } diff --git a/packages/horizon/hardhat.config.ts b/packages/horizon/hardhat.config.ts index a1a177afd..dca9b466a 100644 --- a/packages/horizon/hardhat.config.ts +++ b/packages/horizon/hardhat.config.ts @@ -40,8 +40,10 @@ const config: HardhatUserConfig = { }, }, graph: { - addressBooks: { - horizon: 'addresses.json', + deployments: { + horizon: { + addressBook: 'addresses.json', + }, }, }, etherscan: { From 42b43b615200c07db819faaa1521c66effd6103a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Fri, 22 Nov 2024 12:44:06 -0300 Subject: [PATCH 3/9] feat: gre now loads all horizon contracts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- packages/hardhat-graph-protocol/package.json | 4 +- packages/hardhat-graph-protocol/src/config.ts | 2 +- packages/hardhat-graph-protocol/src/gre.ts | 13 +- .../src/sdk/address-book.ts | 227 +++++++++--------- .../sdk/deployments/horizon/address-book.ts | 70 ++---- .../src/sdk/deployments/horizon/contracts.ts | 75 ++++++ .../src/sdk/deployments/horizon/index.ts | 2 +- .../src/sdk/deployments/horizon/types.ts | 39 --- .../src/sdk/deployments/lib/contract.ts | 2 +- .../src/type-extensions.ts | 2 +- packages/horizon/addresses.json | 22 +- packages/horizon/hardhat.config.ts | 2 + packages/horizon/package.json | 8 +- packages/horizon/tsconfig.json | 1 + yarn.lock | 2 +- 15 files changed, 254 insertions(+), 217 deletions(-) create mode 100644 packages/hardhat-graph-protocol/src/sdk/deployments/horizon/contracts.ts delete mode 100644 packages/hardhat-graph-protocol/src/sdk/deployments/horizon/types.ts diff --git a/packages/hardhat-graph-protocol/package.json b/packages/hardhat-graph-protocol/package.json index fd4416c0e..0774a1f55 100644 --- a/packages/hardhat-graph-protocol/package.json +++ b/packages/hardhat-graph-protocol/package.json @@ -13,8 +13,8 @@ ], "author": "Tomás Migone ", "license": "MIT", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", "scripts": { "build": "tsc", "lint": "eslint '**/*.{js,ts}' --fix", diff --git a/packages/hardhat-graph-protocol/src/config.ts b/packages/hardhat-graph-protocol/src/config.ts index 3e5021b78..b73dd80a5 100644 --- a/packages/hardhat-graph-protocol/src/config.ts +++ b/packages/hardhat-graph-protocol/src/config.ts @@ -17,7 +17,7 @@ export function getAddressBookPath( const networkPath = getPath(hre.network.config.deployments?.[deployment]) const globalPath = getPath(hre.config.graph?.deployments?.[deployment]) - logDebug(`== ${deployment} - Getting address book path`) + logDebug(`Getting address book path...`) logDebug(`Graph base dir: ${hre.config.paths.graph}`) logDebug(`1) opts: ${optsPath}`) logDebug(`2) network: ${networkPath}`) diff --git a/packages/hardhat-graph-protocol/src/gre.ts b/packages/hardhat-graph-protocol/src/gre.ts index a307583b8..3424a4c91 100644 --- a/packages/hardhat-graph-protocol/src/gre.ts +++ b/packages/hardhat-graph-protocol/src/gre.ts @@ -31,6 +31,11 @@ export const greExtendEnvironment = (hre: HardhatRuntimeEnvironment) => { hre.graph = (opts: GraphRuntimeEnvironmentOptions = { deployments: {} }) => { logDebug('*** Initializing Graph Runtime Environment (GRE) ***') logDebug(`Main network: ${hre.network.name}`) + const chainId = hre.network.config.chainId + if (chainId === undefined) { + throw new Error('Please define chainId in your Hardhat network configuration') + } + logDebug(`Chain Id: ${chainId}`) const deployments = [ ...Object.keys(opts.deployments ?? {}), @@ -43,16 +48,16 @@ export const greExtendEnvironment = (hre: HardhatRuntimeEnvironment) => { const provider = new HardhatEthersProvider(hre.network.provider, hre.network.name) const greDeployments: Record = {} for (const deployment of deployments) { - logDebug(`Initializing ${deployment} deployment...`) + logDebug(`== Initializing deployment: ${deployment} ==`) const addressBookPath = getAddressBookPath(deployment, hre, opts) let addressBook switch (deployment) { case 'horizon': - addressBook = new GraphHorizonAddressBook(addressBookPath, hre.network.config.chainId!) + addressBook = new GraphHorizonAddressBook(addressBookPath, chainId) greDeployments.horizon = { addressBook: addressBook, - contracts: addressBook.loadContracts(hre.network.config.chainId!, provider), + contracts: addressBook.loadContracts(provider), } break default: @@ -63,7 +68,7 @@ export const greExtendEnvironment = (hre: HardhatRuntimeEnvironment) => { const gre = { ...greDeployments, provider, - chainId: async () => (await provider.getNetwork()).chainId, + chainId, } assertGraphRuntimeEnvironment(gre) logDebug('GRE initialized successfully!') diff --git a/packages/hardhat-graph-protocol/src/sdk/address-book.ts b/packages/hardhat-graph-protocol/src/sdk/address-book.ts index a8256caa7..2e8b89ad9 100644 --- a/packages/hardhat-graph-protocol/src/sdk/address-book.ts +++ b/packages/hardhat-graph-protocol/src/sdk/address-book.ts @@ -4,19 +4,9 @@ import { AssertionError } from 'assert' import { assertObject } from './utils/assertion' import { ContractList, loadContract } from './deployments/lib/contract' -import { logDebug, logError } from '../logger' +import { logDebug, logError, logWarn } from '../logger' import { Provider, Signer } from 'ethers' -// JSON format: -// { -// "": { -// "": { -// "address": "
", -// "proxy": true, -// "implementation": { ... } -// ... -// } -// } export type AddressBookJson< ChainId extends number = number, ContractName extends string = string, @@ -29,7 +19,21 @@ export type AddressBookEntry = { } /** - * An abstract class to manage the address book + * An abstract class to manage an address book + * The address book must be a JSON file with the following structure: + * { + * "": { + * "": { + * "address": "
", + * "proxy": true, // optional + * "implementation": { ... } // optional, nested contract structure + * ... + * } + * } + * Uses generics to allow specifying a ContractName type to indicate which contracts should be loaded from the address book + * Implementation should provide: + * - `isContractName(name: string): name is ContractName`, a type predicate to check if a given string is a ContractName + * - `loadContracts(signerOrProvider?: Signer | Provider): ContractList` to load contracts from the address book */ export abstract class AddressBook< ChainId extends number = number, @@ -44,29 +48,40 @@ export abstract class AddressBook< // The raw contents of the address book file public addressBook: AddressBookJson - public strictAssert: boolean + // Contracts in the address book of type ContractName + private validContracts: ContractName[] = [] + + // Contracts in the address book that are not of type ContractName, these are ignored + private invalidContracts: string[] = [] + + // Type predicate to check if a given string is a ContractName + abstract isContractName(name: string): name is ContractName + + // Method to load valid contracts from the address book + abstract loadContracts(signerOrProvider?: Signer | Provider): ContractList /** * Constructor for the `AddressBook` class * * @param _file the path to the address book file * @param _chainId the chain id of the network the address book should be loaded for + * @param _strictAssert * * @throws AssertionError if the target file is not a valid address book * @throws Error if the target file does not exist */ - constructor(_file: string, _chainId: number, _strictAssert = false) { - this.strictAssert = _strictAssert + constructor(_file: string, _chainId: ChainId, _strictAssert = false) { this.file = _file - if (!fs.existsSync(this.file)) throw new Error(`Address book path provided does not exist!`) - - logDebug(`Loading address book for chainId ${_chainId} from ${this.file}`) - this.assertChainId(_chainId) this.chainId = _chainId - // Ensure file is a valid address book - this.addressBook = JSON.parse(fs.readFileSync(this.file, 'utf8') || '{}') as AddressBookJson - this.assertAddressBookJson(this.addressBook) + logDebug(`Loading address book from ${this.file}.`) + if (!fs.existsSync(this.file)) throw new Error(`Address book path provided does not exist!`) + + // Load address book and validate its shape + const fileContents = JSON.parse(fs.readFileSync(this.file, 'utf8') || '{}') + this.assertAddressBookJson(fileContents) + this.addressBook = fileContents + this._parseAddressBook() // If the address book is empty for this chain id, initialize it with an empty object if (!this.addressBook[this.chainId]) { @@ -74,75 +89,13 @@ export abstract class AddressBook< } } - abstract isValidContractName(name: string): boolean - - abstract loadContracts(chainId: number, signerOrProvider?: Signer | Provider): ContractList - - // TODO: implement chain id validation? - assertChainId(chainId: string | number): asserts chainId is ChainId {} - - // Asserts the provided object is a valid address book - // Logs warnings for unsupported chain ids or invalid contract names - assertAddressBookJson( - json: unknown, - ): asserts json is AddressBookJson { - this._assertAddressBookJson(json) - - // // Validate contract names - const contractList = json[this.chainId] - - const contractNames = contractList ? Object.keys(contractList) : [] - for (const contract of contractNames) { - if (!this.isValidContractName(contract)) { - const message = `Detected invalid contract in address book: ${contract}, for chainId ${this.chainId}` - if (this.strictAssert) { - throw new Error(message) - } else { - logError(message) - } - } - } - } - - _assertAddressBookJson(json: unknown): asserts json is AddressBookJson { - assertObject(json, 'Assertion failed: address book is not an object') - - const contractList = json[this.chainId] - try { - assertObject(contractList, 'Assertion failed: chain contract list is not an object') - } catch (error) { - if (this.strictAssert) throw error - else return - } - - const contractNames = Object.keys(contractList) - for (const contractName of contractNames) { - this._assertAddressBookEntry(contractList[contractName]) - } - } - - _assertAddressBookEntry(json: unknown): asserts json is AddressBookEntry { - assertObject(json) - - try { - if (typeof json.address !== 'string') throw new AssertionError({ message: 'Invalid address' }) - if (json.proxy && typeof json.proxy !== 'boolean') - throw new AssertionError({ message: 'Invalid proxy' }) - if (json.implementation && typeof json.implementation !== 'object') - throw new AssertionError({ message: 'Invalid implementation' }) - } catch (error) { - if (this.strictAssert) throw error - else return - } - } - /** * List entry names in the address book * * @returns a list with all the names of the entries in the address book */ listEntries(): ContractName[] { - return Object.keys(this.addressBook[this.chainId]) as ContractName[] + return this.validContracts } /** @@ -154,7 +107,9 @@ export abstract class AddressBook< */ getEntry(name: ContractName): AddressBookEntry { try { - return this.addressBook[this.chainId][name] + const entry = this.addressBook[this.chainId][name] + this._assertAddressBookEntry(entry) + return entry } catch (_) { // TODO: should we throw instead? return { address: '0x0000000000000000000000000000000000000000' } @@ -179,36 +134,92 @@ export abstract class AddressBook< } /** - * Loads all contracts from an address book - * - * @param addressBook Address book to use - * @param signerOrProvider Signer or provider to use - * @param enableTxLogging Enable transaction logging to console and output file. Defaults to `true` - * @returns the loaded contracts - */ + * Parse address book and separate valid and invalid contracts + */ + _parseAddressBook() { + const contractList = this.addressBook[this.chainId] + + const contractNames = contractList ? Object.keys(contractList) : [] + for (const contract of contractNames) { + if (!this.isContractName(contract)) { + this.invalidContracts.push(contract) + } else { + this.validContracts.push(contract) + } + } + + if (this.invalidContracts.length > 0) { + logWarn(`Detected invalid contracts in address book - these will not be loaded: ${this.invalidContracts.join(', ')}`) + } + } + + /** + * Loads all valid contracts from an address book + * + * @param addressBook Address book to use + * @param signerOrProvider Signer or provider to use + * @returns the loaded contracts + */ _loadContracts( - artifactsPath: string | string[], + artifactsPath: string | string[] | Record, signerOrProvider?: Signer | Provider, ): ContractList { const contracts = {} as ContractList for (const contractName of this.listEntries()) { - try { - const contract = loadContract( - contractName, - this.getEntry(contractName).address, - artifactsPath, - signerOrProvider, - ) - contracts[contractName] = contract - } catch (error) { - if (error instanceof Error) { - throw new Error(`Could not load contracts - ${error.message}`) - } else { - throw new Error(`Could not load contracts`) - } + const artifactPath = typeof artifactsPath === 'object' && !Array.isArray(artifactsPath) + ? artifactsPath[contractName] + : artifactsPath + + if (Array.isArray(artifactPath) + ? !artifactPath.some(fs.existsSync) + : !fs.existsSync(artifactPath)) { + logWarn(`Could not load contract ${contractName} - artifact not found`) + logWarn(artifactPath) + continue } + logDebug(`Loading contract ${contractName}`) + + const contract = loadContract( + contractName, + this.getEntry(contractName).address, + artifactPath, + signerOrProvider, + ) + contracts[contractName] = contract } return contracts } + + // Asserts the provided object has the correct JSON format shape for an address book + // This method can be overridden by subclasses to provide custom validation + assertAddressBookJson( + json: unknown, + ): asserts json is AddressBookJson { + this._assertAddressBookJson(json) + } + + // Asserts the provided object is a valid address book + _assertAddressBookJson(json: unknown): asserts json is AddressBookJson { + assertObject(json, 'Assertion failed: address book is not an object') + + const contractList = json[this.chainId] + assertObject(contractList, 'Assertion failed: chain contract list is not an object') + + const contractNames = Object.keys(contractList) + for (const contractName of contractNames) { + this._assertAddressBookEntry(contractList[contractName]) + } + } + + // Asserts the provided object is a valid address book entry + _assertAddressBookEntry(json: unknown): asserts json is AddressBookEntry { + assertObject(json) + + if (typeof json.address !== 'string') throw new AssertionError({ message: 'Invalid address' }) + if (json.proxy && typeof json.proxy !== 'boolean') + throw new AssertionError({ message: 'Invalid proxy' }) + if (json.implementation && typeof json.implementation !== 'object') + throw new AssertionError({ message: 'Invalid implementation' }) + } } diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/address-book.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/address-book.ts index 0ed701686..4511757da 100644 --- a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/address-book.ts +++ b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/address-book.ts @@ -1,77 +1,47 @@ -import path from 'path' - -import { Contract, Provider, Signer } from 'ethers' -import { logDebug, logError, logWarn } from '../../../logger' +import { GraphHorizonArtifactsMap, GraphHorizonContractNameList } from './contracts' +import { logDebug, logError } from '../../../logger' +import { Provider, Signer } from 'ethers' import { AddressBook } from '../../address-book' import { assertObject } from '../../utils/assertion' -import { GraphHorizonContractNameList } from './types' -import type { GraphHorizonContractName, GraphHorizonContracts } from './types' +import type { GraphHorizonContractName, GraphHorizonContracts } from './contracts' export class GraphHorizonAddressBook extends AddressBook { - isValidContractName(name: string): boolean { - return isGraphHorizonContractName(name) + isContractName(name: unknown): name is GraphHorizonContractName { + return ( + typeof name === 'string' + && GraphHorizonContractNameList.includes(name as GraphHorizonContractName) + ) } loadContracts( - chainId: number, signerOrProvider?: Signer | Provider, ): GraphHorizonContracts { logDebug('Loading Graph Horizon contracts...') - const artifactsPath = path.resolve('node_modules', '@graphprotocol/contracts/build/contracts') const contracts = this._loadContracts( - artifactsPath, + GraphHorizonArtifactsMap, signerOrProvider, ) - assertGraphHorizonContracts(contracts, chainId) + this._assertGraphHorizonContracts(contracts) // Aliases contracts.GraphToken = contracts.L2GraphToken contracts.GraphTokenGateway = contracts.L2GraphTokenGateway - // Iterator - contracts[Symbol.iterator] = function* () { - for (const key of Object.keys(this)) { - yield this[key as GraphHorizonContractName] as Contract - } - } - return contracts } -} -function isGraphHorizonContractName(name: unknown): name is GraphHorizonContractName { - return ( - typeof name === 'string' - && GraphHorizonContractNameList.includes(name as GraphHorizonContractName) - ) -} - -function assertGraphHorizonContracts( - contracts: unknown, - chainId: number, - strictAssert?: boolean, -): asserts contracts is GraphHorizonContracts { - assertObject(contracts) - - // Allow loading contracts not defined in contract list but raise a warning - const contractNames = Object.keys(contracts) - if (!contractNames.every(c => isGraphHorizonContractName(c))) { - logWarn( - `Loaded unregistered GraphHorizon contract: ${contractNames.filter( - c => !isGraphHorizonContractName(c), - ).join()}`, - ) - } + _assertGraphHorizonContracts( + contracts: unknown, + ): asserts contracts is GraphHorizonContracts { + assertObject(contracts) - // Assert that all GraphHorizonContracts were loaded - for (const contractName of GraphHorizonContractNameList) { - if (!contracts[contractName]) { - const errMessage = `Missing GraphHorizon contract: ${contractName} for chainId ${chainId}` - logError(errMessage) - if (strictAssert) { - throw new Error(errMessage) + // Assert that all GraphHorizonContracts were loaded + for (const contractName of GraphHorizonContractNameList) { + if (!contracts[contractName]) { + const errMessage = `Missing GraphHorizon contract: ${contractName}` + logError(errMessage) } } } diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/contracts.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/contracts.ts new file mode 100644 index 000000000..d2bdb00ef --- /dev/null +++ b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/contracts.ts @@ -0,0 +1,75 @@ +import path from 'path' + +import type { + Controller, + EpochManager, + GraphProxyAdmin, + L2GraphToken, + L2GraphTokenGateway, + RewardsManager, +} from '@graphprotocol/contracts' +import type { + GraphPayments, + HorizonStaking, + PaymentsEscrow, + TAPCollector, +} from '@graphprotocol/horizon' +import type { ContractList } from '../lib/contract' + +export const GraphHorizonContractNameList = [ + // @graphprotocol/contracts + 'GraphProxyAdmin', + 'Controller', + 'EpochManager', + 'RewardsManager', + 'L2GraphToken', + 'L2GraphTokenGateway', + + // @graphprotocol/horizon + 'HorizonStaking', + 'GraphPayments', + 'PaymentsEscrow', + 'TAPCollector', +] as const + +const root = path.resolve(__dirname, '../../../../..') // hardhat-graph-protocol root +export const CONTRACTS_ARTIFACTS_PATH = path.resolve(root, 'node_modules', '@graphprotocol/contracts/build/contracts') +export const HORIZON_ARTIFACTS_PATH = path.resolve(root, 'node_modules', '@graphprotocol/horizon/build/contracts') + +export const GraphHorizonArtifactsMap = { + // @graphprotocol/contracts + GraphProxyAdmin: CONTRACTS_ARTIFACTS_PATH, + Controller: CONTRACTS_ARTIFACTS_PATH, + EpochManager: CONTRACTS_ARTIFACTS_PATH, + RewardsManager: CONTRACTS_ARTIFACTS_PATH, + L2GraphToken: CONTRACTS_ARTIFACTS_PATH, + L2GraphTokenGateway: CONTRACTS_ARTIFACTS_PATH, + + // @graphprotocol/horizon + HorizonStaking: HORIZON_ARTIFACTS_PATH, + GraphPayments: HORIZON_ARTIFACTS_PATH, + PaymentsEscrow: HORIZON_ARTIFACTS_PATH, + TAPCollector: HORIZON_ARTIFACTS_PATH, +} as const + +export interface GraphHorizonContracts extends ContractList { + // @graphprotocol/contracts + EpochManager: EpochManager + RewardsManager: RewardsManager + GraphProxyAdmin: GraphProxyAdmin + Controller: Controller + L2GraphToken: L2GraphToken + L2GraphTokenGateway: L2GraphTokenGateway + + // @graphprotocol/horizon + HorizonStaking: HorizonStaking + GraphPayments: GraphPayments + PaymentsEscrow: PaymentsEscrow + TAPCollector: TAPCollector + + // Aliases + GraphToken: L2GraphToken + GraphTokenGateway: L2GraphTokenGateway +} + +export type GraphHorizonContractName = (typeof GraphHorizonContractNameList)[number] diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/index.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/index.ts index 719452bcd..8bbcb8449 100644 --- a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/index.ts +++ b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/index.ts @@ -1,6 +1,6 @@ import { GraphHorizonAddressBook } from './address-book' -import type { GraphHorizonContractName, GraphHorizonContracts } from './types' +import type { GraphHorizonContractName, GraphHorizonContracts } from './contracts' export { GraphHorizonAddressBook, diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/types.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/types.ts deleted file mode 100644 index 1e7fbbb66..000000000 --- a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/types.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { - Controller, - EpochManager, - GraphProxyAdmin, - L2GraphToken, - L2GraphTokenGateway, - RewardsManager, -} from '@graphprotocol/contracts' -import type { Contract } from 'ethers' -import type { ContractList } from '../lib/contract' - -export const GraphHorizonContractNameList = [ - 'GraphProxyAdmin', - 'Controller', - 'EpochManager', - 'RewardsManager', - 'L2GraphToken', - 'L2GraphTokenGateway', -] as const - -export type GraphHorizonContractName = (typeof GraphHorizonContractNameList)[number] - -export interface GraphHorizonContracts extends ContractList { - // Imports from @graphprotocol/contracts use ethers v5 - // We trick the type system by &ing the Contract type - EpochManager: EpochManager & Contract - RewardsManager: RewardsManager & Contract - GraphProxyAdmin: GraphProxyAdmin & Contract - Controller: Controller & Contract - L2GraphToken: L2GraphToken & Contract - L2GraphTokenGateway: L2GraphTokenGateway & Contract - - // Aliases - GraphToken: L2GraphToken - GraphTokenGateway: L2GraphTokenGateway - - // Iterator - [Symbol.iterator]: () => Generator -} diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/lib/contract.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/lib/contract.ts index 18113fb30..827237756 100644 --- a/packages/hardhat-graph-protocol/src/sdk/deployments/lib/contract.ts +++ b/packages/hardhat-graph-protocol/src/sdk/deployments/lib/contract.ts @@ -1,7 +1,7 @@ import { Contract, Provider, Signer } from 'ethers' import { loadArtifact } from './artifact' -export type ContractList = Partial> +export type ContractList = Partial> /** * Loads a contract from an address book diff --git a/packages/hardhat-graph-protocol/src/type-extensions.ts b/packages/hardhat-graph-protocol/src/type-extensions.ts index c7cf609d4..833722b63 100644 --- a/packages/hardhat-graph-protocol/src/type-extensions.ts +++ b/packages/hardhat-graph-protocol/src/type-extensions.ts @@ -17,7 +17,7 @@ export type GraphRuntimeEnvironment = { [deployment in keyof GraphDeploymentRuntimeEnvironmentMap]?: GraphDeploymentRuntimeEnvironmentMap[deployment] } & { provider: HardhatEthersProvider - chainId: () => Promise + chainId: number } export function assertGraphRuntimeEnvironment( diff --git a/packages/horizon/addresses.json b/packages/horizon/addresses.json index ae66613a2..fe4dc467b 100644 --- a/packages/horizon/addresses.json +++ b/packages/horizon/addresses.json @@ -1012,6 +1012,18 @@ } }, "421614": { + "HorizonStaking": { + "address": "0xFf2Ee30de92F276018642A59Fb7Be95b3F9088Af" + }, + "GraphPayments": { + "address": "0xf5B3661BbB8CD48571C7f41ba2D896a3589C9753" + }, + "PaymentsEscrow": { + "address": "0x09B985a2042848A08bA59060EaF0f07c6F5D4d54" + }, + "TAPCollector": { + "address": "0xacC71844EF6beEF70106ABe6E51013189A1f3738" + }, "GraphProxyAdmin": { "address": "0x7474a6cc5fAeDEc620Db0fa8E4da6eD58477042C", "creationCodeHash": "0x68b304ac6bce7380d5e0f6b14a122f628bffebcc75f8205cb60f0baf578b79c3", @@ -1106,10 +1118,7 @@ }, "L2GNS": { "address": "0x3133948342F35b8699d8F94aeE064AbB76eDe965", - "initArgs": [ - "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", - "0xF21Df5BbA7EB9b54D8F60C560aFb9bA63e6aED1A" - ], + "initArgs": ["0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", "0xF21Df5BbA7EB9b54D8F60C560aFb9bA63e6aED1A"], "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", "txHash": "0x137140783a99a3e9a60048d607124626ca87e2b972e8cc05efb41ac87c3cbcc4", @@ -1319,10 +1328,7 @@ }, "L1GNS": { "address": "0x5461D48556B94e7fdD8ED5A8f865Ba4F1A3b5454", - "initArgs": [ - "0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C", - "0x120005c38D2624Ef70185fEf3a051Dd57b27a491" - ], + "initArgs": ["0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C", "0x120005c38D2624Ef70185fEf3a051Dd57b27a491"], "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", "txHash": "0xf92078845db80bcb42a1cf8d8fe230a9e3c86cc6f66e15c8a81368e5fad42885", diff --git a/packages/horizon/hardhat.config.ts b/packages/horizon/hardhat.config.ts index dca9b466a..9d9f4c57c 100644 --- a/packages/horizon/hardhat.config.ts +++ b/packages/horizon/hardhat.config.ts @@ -8,6 +8,8 @@ import 'hardhat-graph-protocol' import type { HardhatUserConfig } from 'hardhat/config' +import 'tasks/test' + const config: HardhatUserConfig = { solidity: { version: '0.8.27', diff --git a/packages/horizon/package.json b/packages/horizon/package.json index 37657c1a9..79f9c6b91 100644 --- a/packages/horizon/package.json +++ b/packages/horizon/package.json @@ -4,6 +4,12 @@ "description": "", "author": "The Graph core devs", "license": "GPL-2.0-or-later", + "types": "typechain-types/index.ts", + "files": [ + "build/contracts/**/*", + "README.md", + "addresses.json" + ], "scripts": { "lint:ts": "eslint '**/*.{js,ts}' --fix", "lint:sol": "prettier --write contracts/**/*.sol && solhint --noPrompt --fix contracts/**/*.sol --config node_modules/solhint-graph-config/index.js", @@ -33,7 +39,7 @@ "chai": "^4.2.0", "eslint": "^8.56.0", "eslint-graph-config": "workspace:^0.0.1", - "ethers": "^6.13.2", + "ethers": "^6.13.4", "hardhat": "^2.22.0", "hardhat-contract-sizer": "^2.10.0", "hardhat-gas-reporter": "^1.0.8", diff --git a/packages/horizon/tsconfig.json b/packages/horizon/tsconfig.json index 8de96f814..806f1c23e 100644 --- a/packages/horizon/tsconfig.json +++ b/packages/horizon/tsconfig.json @@ -11,6 +11,7 @@ "include": [ "hardhat.config.ts", "scripts/**/*.ts", + "tasks/**/*.ts", "test/**/*.ts", "ignition/**/*.ts", "eslint.config.js", diff --git a/yarn.lock b/yarn.lock index f93b6e586..3b8fcd674 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2949,7 +2949,7 @@ __metadata: chai: "npm:^4.2.0" eslint: "npm:^8.56.0" eslint-graph-config: "workspace:^0.0.1" - ethers: "npm:^6.13.2" + ethers: "npm:^6.13.4" hardhat: "npm:^2.22.0" hardhat-contract-sizer: "npm:^2.10.0" hardhat-gas-reporter: "npm:^1.0.8" From a99e216fd292a0ac357a5ace6d1c656acbbf3c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Fri, 22 Nov 2024 15:30:56 -0300 Subject: [PATCH 4/9] fix: couple fixes and tweaks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- packages/hardhat-graph-protocol/package.json | 3 +- packages/hardhat-graph-protocol/src/config.ts | 3 +- .../{deployments.ts => deployment-list.ts} | 11 +-- packages/hardhat-graph-protocol/src/gre.ts | 4 +- .../src/sdk/address-book.ts | 12 +-- .../src/type-extensions.ts | 86 +++---------------- packages/hardhat-graph-protocol/src/types.ts | 57 ++++++++++++ packages/hardhat-graph-protocol/tsconfig.json | 1 + packages/horizon/hardhat.config.ts | 2 - packages/horizon/package.json | 2 +- packages/horizon/tsconfig.json | 4 +- .../horizon/types/hardhat-graph-protocol.d.ts | 45 ++++++++++ yarn.lock | 8 +- 13 files changed, 137 insertions(+), 101 deletions(-) rename packages/hardhat-graph-protocol/src/{deployments.ts => deployment-list.ts} (50%) create mode 100644 packages/hardhat-graph-protocol/src/types.ts create mode 100644 packages/horizon/types/hardhat-graph-protocol.d.ts diff --git a/packages/hardhat-graph-protocol/package.json b/packages/hardhat-graph-protocol/package.json index 0774a1f55..5d81d0dd5 100644 --- a/packages/hardhat-graph-protocol/package.json +++ b/packages/hardhat-graph-protocol/package.json @@ -18,7 +18,8 @@ "scripts": { "build": "tsc", "lint": "eslint '**/*.{js,ts}' --fix", - "test": "mocha --exit --recursive 'test/**/*.test.ts'" + "test": "mocha --exit --recursive 'test/**/*.test.ts'", + "prepublishOnly": "npm run build" }, "files": [ "dist/", diff --git a/packages/hardhat-graph-protocol/src/config.ts b/packages/hardhat-graph-protocol/src/config.ts index b73dd80a5..acd966db0 100644 --- a/packages/hardhat-graph-protocol/src/config.ts +++ b/packages/hardhat-graph-protocol/src/config.ts @@ -4,8 +4,7 @@ import { GraphPluginError } from './sdk/utils/error' import { logDebug } from './logger' import { normalizePath } from './sdk/utils/path' -import type { GraphDeployment } from './deployments' -import type { GraphRuntimeEnvironmentOptions } from './type-extensions' +import type { GraphDeployment, GraphRuntimeEnvironmentOptions } from './types' import type { HardhatRuntimeEnvironment } from 'hardhat/types' export function getAddressBookPath( diff --git a/packages/hardhat-graph-protocol/src/deployments.ts b/packages/hardhat-graph-protocol/src/deployment-list.ts similarity index 50% rename from packages/hardhat-graph-protocol/src/deployments.ts rename to packages/hardhat-graph-protocol/src/deployment-list.ts index 8074977b1..a37b85680 100644 --- a/packages/hardhat-graph-protocol/src/deployments.ts +++ b/packages/hardhat-graph-protocol/src/deployment-list.ts @@ -1,22 +1,13 @@ import type { GraphHorizonAddressBook, GraphHorizonContracts } from './sdk/deployments/horizon' // List of supported Graph deployments -const GraphDeploymentsList = [ +export const GraphDeploymentsList = [ 'horizon', ] as const -export type GraphDeployment = (typeof GraphDeploymentsList)[number] - export type GraphDeploymentRuntimeEnvironmentMap = { horizon: { contracts: GraphHorizonContracts addressBook: GraphHorizonAddressBook } } - -export function isGraphDeployment(deployment: unknown): deployment is GraphDeployment { - return ( - typeof deployment === 'string' - && GraphDeploymentsList.includes(deployment as GraphDeployment) - ) -} diff --git a/packages/hardhat-graph-protocol/src/gre.ts b/packages/hardhat-graph-protocol/src/gre.ts index 3424a4c91..d8f4c0825 100644 --- a/packages/hardhat-graph-protocol/src/gre.ts +++ b/packages/hardhat-graph-protocol/src/gre.ts @@ -1,14 +1,12 @@ import path from 'path' -import { assertGraphRuntimeEnvironment } from './type-extensions' import { getAddressBookPath } from './config' import { GraphHorizonAddressBook } from './sdk/deployments/horizon' import { HardhatEthersProvider } from '@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider' -import { isGraphDeployment } from './deployments' import { logDebug } from './logger' +import { assertGraphRuntimeEnvironment, type GraphRuntimeEnvironmentOptions, isGraphDeployment } from './types' import type { HardhatConfig, HardhatRuntimeEnvironment, HardhatUserConfig } from 'hardhat/types' -import type { GraphRuntimeEnvironmentOptions } from './type-extensions' export const greExtendConfig = (config: HardhatConfig, userConfig: Readonly) => { const userPath = userConfig.paths?.graph diff --git a/packages/hardhat-graph-protocol/src/sdk/address-book.ts b/packages/hardhat-graph-protocol/src/sdk/address-book.ts index 2e8b89ad9..aa18cccb3 100644 --- a/packages/hardhat-graph-protocol/src/sdk/address-book.ts +++ b/packages/hardhat-graph-protocol/src/sdk/address-book.ts @@ -78,15 +78,14 @@ export abstract class AddressBook< if (!fs.existsSync(this.file)) throw new Error(`Address book path provided does not exist!`) // Load address book and validate its shape + // If it's empty, initialize it with an empty object const fileContents = JSON.parse(fs.readFileSync(this.file, 'utf8') || '{}') + if (!fileContents[this.chainId]) { + fileContents[this.chainId] = {} as Record + } this.assertAddressBookJson(fileContents) this.addressBook = fileContents this._parseAddressBook() - - // If the address book is empty for this chain id, initialize it with an empty object - if (!this.addressBook[this.chainId]) { - this.addressBook[this.chainId] = {} as Record - } } /** @@ -165,6 +164,9 @@ export abstract class AddressBook< signerOrProvider?: Signer | Provider, ): ContractList { const contracts = {} as ContractList + if (this.listEntries().length == 0) { + throw Error('No valid contracts found in address book') + } for (const contractName of this.listEntries()) { const artifactPath = typeof artifactsPath === 'object' && !Array.isArray(artifactsPath) ? artifactsPath[contractName] diff --git a/packages/hardhat-graph-protocol/src/type-extensions.ts b/packages/hardhat-graph-protocol/src/type-extensions.ts index 833722b63..f42df8eaa 100644 --- a/packages/hardhat-graph-protocol/src/type-extensions.ts +++ b/packages/hardhat-graph-protocol/src/type-extensions.ts @@ -1,102 +1,44 @@ // To extend one of Hardhat's types, you need to import the module where it has been defined, and redeclare it. import 'hardhat/types/config' import 'hardhat/types/runtime' - -import type { GraphDeployment, GraphDeploymentRuntimeEnvironmentMap } from './deployments' -import type { HardhatEthersProvider } from '@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider' - -export type GraphRuntimeEnvironmentOptions = { - deployments?: { - [deployment in GraphDeployment]?: string | { - addressBook: string - } - } -} - -export type GraphRuntimeEnvironment = { - [deployment in keyof GraphDeploymentRuntimeEnvironmentMap]?: GraphDeploymentRuntimeEnvironmentMap[deployment] -} & { - provider: HardhatEthersProvider - chainId: number -} - -export function assertGraphRuntimeEnvironment( - obj: unknown, -): obj is GraphRuntimeEnvironment { - if (typeof obj !== 'object' || obj === null) return false - - const deployments = obj as Partial - - for (const deployment in deployments) { - const environment = deployments[deployment as keyof GraphDeploymentRuntimeEnvironmentMap] - if (!environment || typeof environment !== 'object') { - return false - } - } - - if (typeof (obj as GraphRuntimeEnvironment).provider !== 'object') { - return false - } - - if (typeof (obj as GraphRuntimeEnvironment).chainId !== 'function') { - return false - } - - return true -} +import type { GraphDeployments, GraphRuntimeEnvironment, GraphRuntimeEnvironmentOptions } from './types' declare module 'hardhat/types/runtime' { - export interface HardhatRuntimeEnvironment { + interface HardhatRuntimeEnvironment { graph: (opts?: GraphRuntimeEnvironmentOptions) => GraphRuntimeEnvironment } } declare module 'hardhat/types/config' { - export interface HardhatConfig { + interface HardhatConfig { graph: GraphRuntimeEnvironmentOptions } - export interface HardhatUserConfig { + interface HardhatUserConfig { graph: GraphRuntimeEnvironmentOptions } - export interface HardhatNetworkConfig { - deployments?: { - [deployment in GraphDeployment]?: string | { - addressBook: string - } - } + interface HardhatNetworkConfig { + deployments?: GraphDeployments } - export interface HardhatNetworkUserConfig { - deployments?: { - [deployment in GraphDeployment]?: string | { - addressBook: string - } - } + interface HardhatNetworkUserConfig { + deployments?: GraphDeployments } - export interface HttpNetworkConfig { - deployments?: { - [deployment in GraphDeployment]?: string | { - addressBook: string - } - } + interface HttpNetworkConfig { + deployments?: GraphDeployments } - export interface HttpNetworkUserConfig { - deployments?: { - [deployment in GraphDeployment]?: string | { - addressBook: string - } - } + interface HttpNetworkUserConfig { + deployments?: GraphDeployments } - export interface ProjectPathsConfig { + interface ProjectPathsConfig { graph?: string } - export interface ProjectPathsUserConfig { + interface ProjectPathsUserConfig { graph?: string } } diff --git a/packages/hardhat-graph-protocol/src/types.ts b/packages/hardhat-graph-protocol/src/types.ts new file mode 100644 index 000000000..b15045849 --- /dev/null +++ b/packages/hardhat-graph-protocol/src/types.ts @@ -0,0 +1,57 @@ +import { type GraphDeploymentRuntimeEnvironmentMap, GraphDeploymentsList } from './deployment-list' +import type { HardhatEthersProvider } from '@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider' + +export type GraphDeployment = (typeof GraphDeploymentsList)[number] + +export type GraphDeployments = { + [deployment in GraphDeployment]?: string | { + addressBook: string + } +} + +export type GraphRuntimeEnvironmentOptions = { + deployments?: { + [deployment in GraphDeployment]?: string | { + addressBook: string + } + } +} + +export type GraphRuntimeEnvironment = { + [deployment in keyof GraphDeploymentRuntimeEnvironmentMap]?: GraphDeploymentRuntimeEnvironmentMap[deployment] +} & { + provider: HardhatEthersProvider + chainId: number +} + +export function isGraphDeployment(deployment: unknown): deployment is GraphDeployment { + return ( + typeof deployment === 'string' + && GraphDeploymentsList.includes(deployment as GraphDeployment) + ) +} + +export function assertGraphRuntimeEnvironment( + obj: unknown, +): obj is GraphRuntimeEnvironment { + if (typeof obj !== 'object' || obj === null) return false + + const deployments = obj as Partial + + for (const deployment in deployments) { + const environment = deployments[deployment as keyof GraphDeploymentRuntimeEnvironmentMap] + if (!environment || typeof environment !== 'object') { + return false + } + } + + if (typeof (obj as GraphRuntimeEnvironment).provider !== 'object') { + return false + } + + if (typeof (obj as GraphRuntimeEnvironment).chainId !== 'function') { + return false + } + + return true +} diff --git a/packages/hardhat-graph-protocol/tsconfig.json b/packages/hardhat-graph-protocol/tsconfig.json index 18d89b091..41ba7e8bc 100644 --- a/packages/hardhat-graph-protocol/tsconfig.json +++ b/packages/hardhat-graph-protocol/tsconfig.json @@ -4,6 +4,7 @@ "module": "commonjs", "declaration": true, "declarationMap": true, + "sourceMap": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "strict": true, diff --git a/packages/horizon/hardhat.config.ts b/packages/horizon/hardhat.config.ts index 9d9f4c57c..dca9b466a 100644 --- a/packages/horizon/hardhat.config.ts +++ b/packages/horizon/hardhat.config.ts @@ -8,8 +8,6 @@ import 'hardhat-graph-protocol' import type { HardhatUserConfig } from 'hardhat/config' -import 'tasks/test' - const config: HardhatUserConfig = { solidity: { version: '0.8.27', diff --git a/packages/horizon/package.json b/packages/horizon/package.json index 79f9c6b91..e2363022a 100644 --- a/packages/horizon/package.json +++ b/packages/horizon/package.json @@ -55,7 +55,7 @@ "solidity-coverage": "^0.8.0", "ts-node": ">=8.0.0", "typechain": "^8.3.0", - "typescript": "^5.3.3" + "typescript": "^5.6.3" }, "lint-staged": { "contracts/**/*.sol": [ diff --git a/packages/horizon/tsconfig.json b/packages/horizon/tsconfig.json index 806f1c23e..202a9923e 100644 --- a/packages/horizon/tsconfig.json +++ b/packages/horizon/tsconfig.json @@ -6,10 +6,12 @@ "forceConsistentCasingInFileNames": true, "strict": true, "skipLibCheck": true, - "resolveJsonModule": true + "resolveJsonModule": true, + "outDir": "dist" }, "include": [ "hardhat.config.ts", + "types/**/*.ts", "scripts/**/*.ts", "tasks/**/*.ts", "test/**/*.ts", diff --git a/packages/horizon/types/hardhat-graph-protocol.d.ts b/packages/horizon/types/hardhat-graph-protocol.d.ts new file mode 100644 index 000000000..ab3c30b4b --- /dev/null +++ b/packages/horizon/types/hardhat-graph-protocol.d.ts @@ -0,0 +1,45 @@ +// TypeScript does not resolve correctly the type extensions when they are symlinked from the same monorepo. +// So we need to re-type it... this file should be a copy of hardhat-graph-protocol/src/type-extensions.ts +import 'hardhat/types/config' +import 'hardhat/types/runtime' +import type { GraphDeployments, GraphRuntimeEnvironment, GraphRuntimeEnvironmentOptions } from 'hardhat-graph-protocol/src/types' + +declare module 'hardhat/types/runtime' { + interface HardhatRuntimeEnvironment { + graph: (opts?: GraphRuntimeEnvironmentOptions) => GraphRuntimeEnvironment + } +} + +declare module 'hardhat/types/config' { + interface HardhatConfig { + graph: GraphRuntimeEnvironmentOptions + } + + interface HardhatUserConfig { + graph: GraphRuntimeEnvironmentOptions + } + + interface HardhatNetworkConfig { + deployments?: GraphDeployments + } + + interface HardhatNetworkUserConfig { + deployments?: GraphDeployments + } + + interface HttpNetworkConfig { + deployments?: GraphDeployments + } + + interface HttpNetworkUserConfig { + deployments?: GraphDeployments + } + + interface ProjectPathsConfig { + graph?: string + } + + interface ProjectPathsUserConfig { + graph?: string + } +} diff --git a/yarn.lock b/yarn.lock index 3b8fcd674..ce5384ed2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2965,7 +2965,7 @@ __metadata: solidity-coverage: "npm:^0.8.0" ts-node: "npm:>=8.0.0" typechain: "npm:^8.3.0" - typescript: "npm:^5.3.3" + typescript: "npm:^5.6.3" languageName: unknown linkType: soft @@ -6153,9 +6153,9 @@ __metadata: linkType: hard "@types/mocha@npm:^10.0.9": - version: 10.0.9 - resolution: "@types/mocha@npm:10.0.9" - checksum: 76dd782ac7e971ea159d4a7fd40c929afa051e040be3f41187ff03a2d7b3279e19828ddaa498ba1757b3e6b91316263bb7640db0e906938275b97a06e087b989 + version: 10.0.10 + resolution: "@types/mocha@npm:10.0.10" + checksum: d2b8c48138cde6923493e42b38e839695eb42edd04629abe480a8f34c0e3f50dd82a55832c2e8d2b6e6f9e4deb492d7d733e600fbbdd5a0ceccbcfc6844ff9d5 languageName: node linkType: hard From a475c4ac8a351cca1cfea9f5aed1898f4ed9a379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Fri, 22 Nov 2024 16:15:37 -0300 Subject: [PATCH 5/9] chore: move files and fix test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- .../src/sdk/address-book.ts | 2 +- .../src/sdk/deployments/horizon/contracts.ts | 2 +- .../src/sdk/{deployments => }/lib/artifact.ts | 2 +- .../src/sdk/{deployments => }/lib/contract.ts | 0 .../test/fixtures/files/addresses-arbsep.json | 226 ++++++++++++++++++ .../fixtures/path-config/hardhat.config.ts | 7 + .../hardhat-graph-protocol/test/gre.test.ts | 2 +- 7 files changed, 237 insertions(+), 4 deletions(-) rename packages/hardhat-graph-protocol/src/sdk/{deployments => }/lib/artifact.ts (96%) rename packages/hardhat-graph-protocol/src/sdk/{deployments => }/lib/contract.ts (100%) create mode 100644 packages/hardhat-graph-protocol/test/fixtures/files/addresses-arbsep.json diff --git a/packages/hardhat-graph-protocol/src/sdk/address-book.ts b/packages/hardhat-graph-protocol/src/sdk/address-book.ts index aa18cccb3..b9b16cedf 100644 --- a/packages/hardhat-graph-protocol/src/sdk/address-book.ts +++ b/packages/hardhat-graph-protocol/src/sdk/address-book.ts @@ -3,7 +3,7 @@ import fs from 'fs' import { AssertionError } from 'assert' import { assertObject } from './utils/assertion' -import { ContractList, loadContract } from './deployments/lib/contract' +import { ContractList, loadContract } from './lib/contract' import { logDebug, logError, logWarn } from '../logger' import { Provider, Signer } from 'ethers' diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/contracts.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/contracts.ts index d2bdb00ef..7cb828e73 100644 --- a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/contracts.ts +++ b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/contracts.ts @@ -14,7 +14,7 @@ import type { PaymentsEscrow, TAPCollector, } from '@graphprotocol/horizon' -import type { ContractList } from '../lib/contract' +import type { ContractList } from '../../lib/contract' export const GraphHorizonContractNameList = [ // @graphprotocol/contracts diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/lib/artifact.ts b/packages/hardhat-graph-protocol/src/sdk/lib/artifact.ts similarity index 96% rename from packages/hardhat-graph-protocol/src/sdk/deployments/lib/artifact.ts rename to packages/hardhat-graph-protocol/src/sdk/lib/artifact.ts index 3c50a1fe6..eff3fc601 100644 --- a/packages/hardhat-graph-protocol/src/sdk/deployments/lib/artifact.ts +++ b/packages/hardhat-graph-protocol/src/sdk/lib/artifact.ts @@ -1,5 +1,5 @@ import { Artifacts } from 'hardhat/internal/artifacts' -import { logError } from '../../../logger' +import { logError } from '../../logger' import type { Artifact } from 'hardhat/types' diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/lib/contract.ts b/packages/hardhat-graph-protocol/src/sdk/lib/contract.ts similarity index 100% rename from packages/hardhat-graph-protocol/src/sdk/deployments/lib/contract.ts rename to packages/hardhat-graph-protocol/src/sdk/lib/contract.ts diff --git a/packages/hardhat-graph-protocol/test/fixtures/files/addresses-arbsep.json b/packages/hardhat-graph-protocol/test/fixtures/files/addresses-arbsep.json new file mode 100644 index 000000000..530fd98ae --- /dev/null +++ b/packages/hardhat-graph-protocol/test/fixtures/files/addresses-arbsep.json @@ -0,0 +1,226 @@ +{ + "421614": { + "HorizonStaking": { + "address": "0xFf2Ee30de92F276018642A59Fb7Be95b3F9088Af" + }, + "GraphPayments": { + "address": "0xf5B3661BbB8CD48571C7f41ba2D896a3589C9753" + }, + "PaymentsEscrow": { + "address": "0x09B985a2042848A08bA59060EaF0f07c6F5D4d54" + }, + "TAPCollector": { + "address": "0xacC71844EF6beEF70106ABe6E51013189A1f3738" + }, + "GraphProxyAdmin": { + "address": "0x7474a6cc5fAeDEc620Db0fa8E4da6eD58477042C", + "creationCodeHash": "0x68b304ac6bce7380d5e0f6b14a122f628bffebcc75f8205cb60f0baf578b79c3", + "runtimeCodeHash": "0x8d9ba87a745cf82ab407ebabe6c1490197084d320efb6c246d94bcc80e804417", + "txHash": "0x71b6defab0d3d7b711b7f6769f20a8c85bc9686eb5939b2a86dfaf587fceab17" + }, + "Controller": { + "address": "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", + "creationCodeHash": "0x5bde9a87bc4e8dd24d41900f0a19321c1dc6d3373d51bba093b130bb5b80a677", + "runtimeCodeHash": "0x7f0479db1d60ecf6295d92ea2359ebdd223640795613558b0594680f5d4922c9", + "txHash": "0xf7b4faa14f9d29bb62dec73fd163d1253184233012bcadf7ae78af7995017f29" + }, + "EpochManager": { + "address": "0x88b3C7f37253bAA1A9b95feAd69bD5320585826D", + "initArgs": ["0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", "554"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x587ea6f421a08ab3a390103f63daba0529901f2e662ca7f6fe575674a439fa79", + "proxy": true, + "implementation": { + "address": "0x646627fa39ec6f6E757Cb4189bC54c92FFBb71da", + "creationCodeHash": "0x9947bd0a1f46027123b8fb4aec8b11af540aea587eb79642475d57b4e347078f", + "runtimeCodeHash": "0xe45a27197726de0e3149014823794708edd432ee56ec8358554c0d2365674ca0", + "txHash": "0x82653a0bd83e0541379b920415af94e4be1d732dfab720e5dead839062781c07" + } + }, + "L2GraphToken": { + "address": "0xf8c05dCF59E8B28BFD5eed176C562bEbcfc7Ac04", + "initArgs": ["0xadE6B8EB69a49B56929C1d4F4b428d791861dB6f"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xbb27939a4e4b5d92da8a10add4b7d0126e907da30b07b5f3d439f1c32a6c8e2c", + "proxy": true, + "implementation": { + "address": "0x4cf968bA38b43dd10be114daa7959C1b369479e5", + "creationCodeHash": "0x6c4146427aafa7375a569154be95c8c931bf83aab0315706dd78bdf79c889e4c", + "runtimeCodeHash": "0x004371d1d80011906953dcba17c648503fc94b94e1e0365c8d8c706ff91f93e9", + "txHash": "0x3fab5697addf0c0e16b8e2249f2b833c6f256e699b293d184089c96de8deaa44" + } + }, + "GraphCurationToken": { + "address": "0x00FBd5D46FFAc54862c1Dd27BE08924BB17f5CDa", + "creationCodeHash": "0x1ee42ee271cefe20c33c0de904501e618ac4b56debca67c634d0564cecea9ff2", + "runtimeCodeHash": "0x340e8f378c0117b300f3ec255bc5c3a273f9ab5bd2940fa8eb3b5065b21f86dc", + "txHash": "0x045d64dc3ebb7ae6c4976854ce0a797a04524d22a6ef5f526bfc27f744bc68e5" + }, + "ServiceRegistry": { + "address": "0x888541878CbDDEd880Cd58c728f1Af5C47343F86", + "initArgs": ["0x9DB3ee191681f092607035d9BDA6e59FbEaCa695"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xdaa1228e8cd8569c1e5562b63d2fd89caf897ab67da05922636d3309b838e289", + "proxy": true, + "implementation": { + "address": "0x05E732280bf9F37054346Cb83f5Fd58C5B44F6A8", + "creationCodeHash": "0xec9cb879003a06609541ad87efd4bc5dfc8ea60e4e77cfa5ae2cb5208742e7bc", + "runtimeCodeHash": "0x5161b534164413a88d851832f9c9d1dd1bca32fe2bbb62bb35d112c1dc8b69ab", + "txHash": "0xe1fce867f5dd708e60518b7f257fdbcb28f460d1e3b82045b82d03e64345b210" + } + }, + "L2Curation": { + "address": "0xDe761f075200E75485F4358978FB4d1dC8644FD5", + "initArgs": [ + "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", + "0x00FBd5D46FFAc54862c1Dd27BE08924BB17f5CDa", + "10000", + "1" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xe9298239bcb3c386cf66e6dd493cf6e7cdd9771c65fa2225e0b34d17550d6805", + "proxy": true, + "implementation": { + "address": "0xd90022aB67920212D0F902F5c427DE82732DE136", + "creationCodeHash": "0x2287d9023bf7d91e688e1eb029eff7657ef3b87e37b5222b01fd50985d0928f9", + "runtimeCodeHash": "0xd799b2b74e9634d6b6ef15b5710409264bed04a60f9519b9d8f05ac183199d16", + "txHash": "0x436bcf91fed712dc8d54f449726b2078fb63cd770f90b492a9622efac5817762" + } + }, + "SubgraphNFTDescriptor": { + "address": "0x4032F7B6b27FfC9862106f826379DaB1716C71d7", + "creationCodeHash": "0xf16e8ff11d852eea165195ac9e0dfa00f98e48f6ce3c77c469c7df9bf195b651", + "runtimeCodeHash": "0x39583196f2bcb85789b6e64692d8c0aa56f001c46f0ca3d371abbba2c695860f", + "txHash": "0xb7e7aeeecc693f34f491b01c56950533119810a4e3e2642081efc127f11cb782" + }, + "SubgraphNFT": { + "address": "0xF21Df5BbA7EB9b54D8F60C560aFb9bA63e6aED1A", + "constructorArgs": ["0xadE6B8EB69a49B56929C1d4F4b428d791861dB6f"], + "creationCodeHash": "0xc1e58864302084de282dffe54c160e20dd96c6cfff45e00e6ebfc15e04136982", + "runtimeCodeHash": "0x7216e736a8a8754e88688fbf5c0c7e9caf35c55ecc3a0c5a597b951c56cf7458", + "txHash": "0x1309c1caea76f4014ba612de092cc746816119b1440d635d11b6bc7e361a32b0" + }, + "L2GNS": { + "address": "0x3133948342F35b8699d8F94aeE064AbB76eDe965", + "initArgs": [ + "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", + "0xF21Df5BbA7EB9b54D8F60C560aFb9bA63e6aED1A" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x137140783a99a3e9a60048d607124626ca87e2b972e8cc05efb41ac87c3cbcc4", + "proxy": true, + "implementation": { + "address": "0x00CBF5024d454255577Bf2b0fB6A43328a6828c9", + "creationCodeHash": "0xd71f45e6c194920a26f90fcec96d8c3375f02c5aef8ad90c1be24e906ffe8342", + "runtimeCodeHash": "0x68ec24512fedb866d7ba7ba6c02160317d0ca34eaacd23bddcc62d2cbcd9869c", + "txHash": "0x54619944731edec530b7b0cd587f9c2faae332aa1671fe5e8d7e7e5c7e291a77" + } + }, + "StakingExtension": { + "address": "0x05709dd705A5674346B7206a2bC657C8bAb3301B", + "creationCodeHash": "0x7ae74140871330ecabb7040182dc8288c2c84693393a519230036f39c2281138", + "runtimeCodeHash": "0x4994aa74e9e29c36a8158af690a245ccd1cf4d955223e5fcb1ca62810b37ed57", + "txHash": "0xbe1ff9cb949a53209b778708265740dfa2a08a93cfce4c897a53989a5d93f8c1" + }, + "L2Staking": { + "address": "0x865365C425f3A593Ffe698D9c4E6707D14d51e08", + "initArgs": [ + "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", + "100000000000000000000000", + "6646", + "10000", + "100000", + "8", + "12", + "16", + "100,100,60,100", + "0x876fB4B13D7Ed146757D3664B7E962b36936001C" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x326cf1f2849da4bb4d7e39f2783779e3c99fa48e4ee8ef004cfdd50c62e775df", + "proxy": true, + "implementation": { + "address": "0xD07dFD514dc1b57020e6C1F49e05c48d0658C99f", + "creationCodeHash": "0x6a763345e5f166ea4e73ce9a116a49c9fc0833d9ea235a86fa5a997e91cf09e5", + "runtimeCodeHash": "0xb4c31859ac132241f04c802d4add70a94c7f2c6eb9dfd4bf224048d249dbc7bc", + "txHash": "0x68b34eda64287b84582c8f005c4e96162252d36c9c5c9b84332336a7c2e3d6d3", + "libraries": { + "LibExponential": "0xd844116f6d79a280b117Bb6d9EBf4121D4e8B44b" + } + } + }, + "RewardsManager": { + "address": "0x1F49caE7669086c8ba53CC35d1E9f80176d67E79", + "initArgs": ["0x9DB3ee191681f092607035d9BDA6e59FbEaCa695"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xd8765fb87e11e8d41951f9071188b888829022a889cf66fdc2357f1f9f15c8e2", + "proxy": true, + "implementation": { + "address": "0x714B54e5249C90414fecA240e2F5B618C243F0aE", + "creationCodeHash": "0x59c1680da2d19124daaf95fd66acc5eae68e6f46dfe2ff0b3ccb777daf9949b2", + "runtimeCodeHash": "0xe33080183ec49ab1ec8d78b80b90158f0f3ac6f2deedf6115a32a9d11d3e4d9b", + "txHash": "0x8192f6c0e63a9beede3b025878af6a49367564c8bc32cb11a64f5f1e8351c7cd" + } + }, + "DisputeManager": { + "address": "0x7C9B82717f9433932507dF6EdA93A9678b258698", + "initArgs": [ + "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", + "0xF89688d5d44d73cc4dE880857A3940487076e5A4", + "10000000000000000000000", + "500000", + "25000", + "25000" + ], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0xb3764f4b576b46ee8dc6cbf680cad650b3ba80aa93dc6cf099862cfe8efc8a68", + "proxy": true, + "implementation": { + "address": "0x887aC2f58D62Ac86d4E9aEc07c953991e3ca1bA3", + "creationCodeHash": "0xce4c47d94a33d69e03d607dd13a9ad1ed7fa730ef4a2308eb56ddd646ebaa0aa", + "runtimeCodeHash": "0x18d4a1659ccecede3d4d305ef1db4653d8f3dcbd4012f4e52200ae9f0c6c322c", + "txHash": "0x59d99afb9cefbb5c2275d9ac2d7230ac7f4a4cfb2440636408988a66075c032a" + } + }, + "AllocationExchange": { + "address": "0x9BD4FBDa981D628AbA16F261f810dD59E5bAf9eA", + "constructorArgs": [ + "0xf8c05dCF59E8B28BFD5eed176C562bEbcfc7Ac04", + "0x865365C425f3A593Ffe698D9c4E6707D14d51e08", + "0x72ee30d43Fb5A90B3FE983156C5d2fBE6F6d07B3", + "0x49D4CFC037430cA9355B422bAeA7E9391e1d3215" + ], + "creationCodeHash": "0x2963baeedb2d0f5a95fa41f6c89e48e5bf177ca439379fc6becd54870d330ab0", + "runtimeCodeHash": "0xd8b53b3f65b49198d35392e0fd11da229a40d15a96151bca2976cbbe36b909d5", + "txHash": "0xa1a9410662d43463c39802e887f33a1401ed0fc35bf22c5be275e62141eae442" + }, + "L2GraphTokenGateway": { + "address": "0xB24Ce0f8c18c4DdDa584A7EeC132F49C966813bb", + "initArgs": ["0x9DB3ee191681f092607035d9BDA6e59FbEaCa695"], + "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", + "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", + "txHash": "0x90949db305a73b85e7208aa6b8d03c5181945eedc3df38e90f215a0dec8b02ae", + "proxy": true, + "implementation": { + "address": "0x3C2eB5E561f70c0573E5f6c92358e988E32cb5eC", + "creationCodeHash": "0x90253be19d23d542b29e95e6faf52304fcff91b21edfdb5f79e165051740d1ab", + "runtimeCodeHash": "0x3a7fab6792b4dad58c7b59da19c5b65b3985d1be77024a9f86cb135965e9b462", + "txHash": "0x78ff2e39d5c33ddfb89b1dbee89bdbc24452843a051f860c94e4e9dd75ded9c3" + } + }, + "EthereumDIDRegistry": { + "address": "0xF5f4cA61481558709AFa94AdEDa7B5F180f4AD59", + "creationCodeHash": "0x20cd202f7991716a84c097da5fbd365fd27f7f35f241f82c529ad7aba18b814b", + "runtimeCodeHash": "0x5f396ffd54b6cd6b3faded0f366c5d7e148cc54743926061be2dfd12a75391de", + "txHash": "0x2cefbc169b8ae51c263d0298956d86a397b05f11f076b71c918551f63fe33784" + } + } +} diff --git a/packages/hardhat-graph-protocol/test/fixtures/path-config/hardhat.config.ts b/packages/hardhat-graph-protocol/test/fixtures/path-config/hardhat.config.ts index 836815e33..0d689a80e 100644 --- a/packages/hardhat-graph-protocol/test/fixtures/path-config/hardhat.config.ts +++ b/packages/hardhat-graph-protocol/test/fixtures/path-config/hardhat.config.ts @@ -31,6 +31,13 @@ const config: HardhatUserConfig = { chainId: 421613, url: 'https://goerli-rollup.arbitrum.io/rpc', }, + 'arbitrumSepolia': { + chainId: 421614, + url: 'https://goerli-rollup.arbitrum.io/rpc', + deployments: { + horizon: 'addresses-arbsep.json', + }, + }, 'localhost': { chainId: 1337, url: 'http://127.0.0.1:8545', diff --git a/packages/hardhat-graph-protocol/test/gre.test.ts b/packages/hardhat-graph-protocol/test/gre.test.ts index d66a3fe75..d1fbbd6cd 100644 --- a/packages/hardhat-graph-protocol/test/gre.test.ts +++ b/packages/hardhat-graph-protocol/test/gre.test.ts @@ -32,7 +32,7 @@ describe('GRE usage', function () { }) describe(`Project using GRE - deployments`, function () { - useHardhatProject('path-config', 'mainnet') + useHardhatProject('path-config', 'arbitrumSepolia') it('should load Horizon deployment', function () { const graph = this.hre.graph() From cdf3fb4f9785f336829c00feecbad25fe93e0ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Fri, 22 Nov 2024 17:01:46 -0300 Subject: [PATCH 6/9] feat: add subgraph service to gre MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- packages/hardhat-graph-protocol/README.md | 32 + packages/hardhat-graph-protocol/package.json | 1 + .../src/deployment-list.ts | 6 + packages/hardhat-graph-protocol/src/gre.ts | 11 +- .../src/sdk/deployments/horizon/index.ts | 5 +- .../subgraph-service/address-book.ts | 48 + .../deployments/subgraph-service/contracts.ts | 60 + .../sdk/deployments/subgraph-service/index.ts | 6 + packages/horizon/addresses.json | 1241 +---------------- packages/subgraph-service/addresses.json | 34 + packages/subgraph-service/hardhat.config.ts | 8 + packages/subgraph-service/package.json | 7 + packages/subgraph-service/tsconfig.json | 1 + .../types/hardhat-graph-protocol.d.ts | 45 + yarn.lock | 4 +- 15 files changed, 266 insertions(+), 1243 deletions(-) create mode 100644 packages/hardhat-graph-protocol/README.md create mode 100644 packages/hardhat-graph-protocol/src/sdk/deployments/subgraph-service/address-book.ts create mode 100644 packages/hardhat-graph-protocol/src/sdk/deployments/subgraph-service/contracts.ts create mode 100644 packages/hardhat-graph-protocol/src/sdk/deployments/subgraph-service/index.ts create mode 100644 packages/subgraph-service/addresses.json create mode 100644 packages/subgraph-service/types/hardhat-graph-protocol.d.ts diff --git a/packages/hardhat-graph-protocol/README.md b/packages/hardhat-graph-protocol/README.md new file mode 100644 index 000000000..9f9d6eb71 --- /dev/null +++ b/packages/hardhat-graph-protocol/README.md @@ -0,0 +1,32 @@ +# hardhat-graph-protocol + + +## Usage + +Install with yarn + +```bash +yarn add --dev hardhat-graph-protocol + +# From the monorepo +yarn add --dev hardhat-graph-protocol@workspace:^x.y.z +``` + +And add it to your `hardhat.config.ts`: + +```ts +import "hardhat-graph-protocol"; + +export default { + ... + graph: { + deployments: { + horizon: require.resolve('@graphprotocol/horizon/addresses.json'), + subgraphService: require.resolve('@graphprotocol/subgraph-service/addresses.json'), + } + }, + ... +}; +``` + +_Note_: When using the plugin from within this monorepo TypeScript fails to properly apply the type extension typings. This is a known issue and can be worked around by adding a `types/hardhat-graph-protocol.d.ts` file with the same content as the `type-extensions.ts` file in this repository. \ No newline at end of file diff --git a/packages/hardhat-graph-protocol/package.json b/packages/hardhat-graph-protocol/package.json index 5d81d0dd5..f5752731e 100644 --- a/packages/hardhat-graph-protocol/package.json +++ b/packages/hardhat-graph-protocol/package.json @@ -30,6 +30,7 @@ "dependencies": { "@graphprotocol/contracts": "workspace:^7.0.0", "@graphprotocol/horizon": "workspace:^0.0.1", + "@graphprotocol/subgraph-service": "workspace:^0.0.1", "@nomicfoundation/hardhat-ethers": "^3.0.8", "debug": "^4.3.7" }, diff --git a/packages/hardhat-graph-protocol/src/deployment-list.ts b/packages/hardhat-graph-protocol/src/deployment-list.ts index a37b85680..fb3e46fab 100644 --- a/packages/hardhat-graph-protocol/src/deployment-list.ts +++ b/packages/hardhat-graph-protocol/src/deployment-list.ts @@ -1,8 +1,10 @@ import type { GraphHorizonAddressBook, GraphHorizonContracts } from './sdk/deployments/horizon' +import type { SubgraphServiceAddressBook, SubgraphServiceContracts } from './sdk/deployments/subgraph-service' // List of supported Graph deployments export const GraphDeploymentsList = [ 'horizon', + 'subgraphService', ] as const export type GraphDeploymentRuntimeEnvironmentMap = { @@ -10,4 +12,8 @@ export type GraphDeploymentRuntimeEnvironmentMap = { contracts: GraphHorizonContracts addressBook: GraphHorizonAddressBook } + subgraphService: { + contracts: SubgraphServiceContracts + addressBook: SubgraphServiceAddressBook + } } diff --git a/packages/hardhat-graph-protocol/src/gre.ts b/packages/hardhat-graph-protocol/src/gre.ts index d8f4c0825..028df6229 100644 --- a/packages/hardhat-graph-protocol/src/gre.ts +++ b/packages/hardhat-graph-protocol/src/gre.ts @@ -1,10 +1,12 @@ import path from 'path' import { getAddressBookPath } from './config' -import { GraphHorizonAddressBook } from './sdk/deployments/horizon' import { HardhatEthersProvider } from '@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider' import { logDebug } from './logger' +import { GraphHorizonAddressBook } from './sdk/deployments/horizon' +import { SubgraphServiceAddressBook } from './sdk/deployments/subgraph-service' + import { assertGraphRuntimeEnvironment, type GraphRuntimeEnvironmentOptions, isGraphDeployment } from './types' import type { HardhatConfig, HardhatRuntimeEnvironment, HardhatUserConfig } from 'hardhat/types' @@ -58,6 +60,13 @@ export const greExtendEnvironment = (hre: HardhatRuntimeEnvironment) => { contracts: addressBook.loadContracts(provider), } break + case 'subgraphService': + addressBook = new SubgraphServiceAddressBook(addressBookPath, chainId) + greDeployments.subgraphService = { + addressBook: addressBook, + contracts: addressBook.loadContracts(provider), + } + break default: break } diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/index.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/index.ts index 8bbcb8449..1a451a161 100644 --- a/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/index.ts +++ b/packages/hardhat-graph-protocol/src/sdk/deployments/horizon/index.ts @@ -2,8 +2,5 @@ import { GraphHorizonAddressBook } from './address-book' import type { GraphHorizonContractName, GraphHorizonContracts } from './contracts' -export { - GraphHorizonAddressBook, -} - +export { GraphHorizonAddressBook } export type { GraphHorizonContractName, GraphHorizonContracts } diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/subgraph-service/address-book.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/subgraph-service/address-book.ts new file mode 100644 index 000000000..3fca297a0 --- /dev/null +++ b/packages/hardhat-graph-protocol/src/sdk/deployments/subgraph-service/address-book.ts @@ -0,0 +1,48 @@ +import { logDebug, logError } from '../../../logger' +import { Provider, Signer } from 'ethers' +import { SubgraphServiceArtifactsMap, SubgraphServiceContractNameList } from './contracts' +import { AddressBook } from '../../address-book' +import { assertObject } from '../../utils/assertion' + +import type { SubgraphServiceContractName, SubgraphServiceContracts } from './contracts' + +export class SubgraphServiceAddressBook extends AddressBook { + isContractName(name: unknown): name is SubgraphServiceContractName { + return ( + typeof name === 'string' + && SubgraphServiceContractNameList.includes(name as SubgraphServiceContractName) + ) + } + + loadContracts( + signerOrProvider?: Signer | Provider, + ): SubgraphServiceContracts { + logDebug('Loading Subgraph Service contracts...') + + const contracts = this._loadContracts( + SubgraphServiceArtifactsMap, + signerOrProvider, + ) + this._assertSubgraphServiceContracts(contracts) + + // Aliases + contracts.Curation = contracts.L2Curation + contracts.GNS = contracts.L2GNS + + return contracts + } + + _assertSubgraphServiceContracts( + contracts: unknown, + ): asserts contracts is SubgraphServiceContracts { + assertObject(contracts) + + // Assert that all SubgraphServiceContracts were loaded + for (const contractName of SubgraphServiceContractNameList) { + if (!contracts[contractName]) { + const errMessage = `Missing SubgraphService contract: ${contractName}` + logError(errMessage) + } + } + } +} diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/subgraph-service/contracts.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/subgraph-service/contracts.ts new file mode 100644 index 000000000..7d0ef1ebc --- /dev/null +++ b/packages/hardhat-graph-protocol/src/sdk/deployments/subgraph-service/contracts.ts @@ -0,0 +1,60 @@ +import path from 'path' + +import type { + L2Curation, + L2GNS, + ServiceRegistry, + SubgraphNFT, +} from '@graphprotocol/contracts' + +import type { + DisputeManager, + SubgraphService, +} from '@graphprotocol/subgraph-service' +import type { ContractList } from '../../lib/contract' + +export const SubgraphServiceContractNameList = [ + // @graphprotocol/contracts + 'L2Curation', + 'L2GNS', + 'SubgraphNFT', + 'ServiceRegistry', + + // @graphprotocol/subgraph-service + 'SubgraphService', + 'DisputeManager', +] as const + +const root = path.resolve(__dirname, '../../../../..') // hardhat-graph-protocol root +export const CONTRACTS_ARTIFACTS_PATH = path.resolve(root, 'node_modules', '@graphprotocol/contracts/build/contracts') +export const SUBGRAPH_SERVICE_ARTIFACTS_PATH = path.resolve(root, 'node_modules', '@graphprotocol/subgraph-service/build/contracts') + +export const SubgraphServiceArtifactsMap = { + // @graphprotocol/contracts + L2Curation: CONTRACTS_ARTIFACTS_PATH, + L2GNS: CONTRACTS_ARTIFACTS_PATH, + SubgraphNFT: CONTRACTS_ARTIFACTS_PATH, + ServiceRegistry: CONTRACTS_ARTIFACTS_PATH, + + // @graphprotocol/subgraph-service + SubgraphService: SUBGRAPH_SERVICE_ARTIFACTS_PATH, + DisputeManager: SUBGRAPH_SERVICE_ARTIFACTS_PATH, +} as const + +export interface SubgraphServiceContracts extends ContractList { + // @graphprotocol/contracts + L2Curation: L2Curation + L2GNS: L2GNS + SubgraphNFT: SubgraphNFT + ServiceRegistry: ServiceRegistry + + // @graphprotocol/subgraph-service + SubgraphService: SubgraphService + DisputeManager: DisputeManager + + // Aliases + Curation: L2Curation + GNS: L2GNS +} + +export type SubgraphServiceContractName = (typeof SubgraphServiceContractNameList)[number] diff --git a/packages/hardhat-graph-protocol/src/sdk/deployments/subgraph-service/index.ts b/packages/hardhat-graph-protocol/src/sdk/deployments/subgraph-service/index.ts new file mode 100644 index 000000000..8f9d7bfa6 --- /dev/null +++ b/packages/hardhat-graph-protocol/src/sdk/deployments/subgraph-service/index.ts @@ -0,0 +1,6 @@ +import { SubgraphServiceAddressBook } from './address-book' + +import type { SubgraphServiceContractName, SubgraphServiceContracts } from './contracts' + +export { SubgraphServiceAddressBook } +export type { SubgraphServiceContractName, SubgraphServiceContracts } diff --git a/packages/horizon/addresses.json b/packages/horizon/addresses.json index fe4dc467b..530fd98ae 100644 --- a/packages/horizon/addresses.json +++ b/packages/horizon/addresses.json @@ -1,1016 +1,4 @@ { - "1": { - "IENS": { - "address": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" - }, - "IEthereumDIDRegistry": { - "address": "0xdCa7EF03e98e0DC2B855bE647C39ABe984fcF21B" - }, - "GraphProxyAdmin": { - "address": "0xF3B000a6749259539aF4E49f24EEc74Ea0e71430", - "creationCodeHash": "0x26a6f47e71ad242e264768571ce7223bf5a86fd0113ab6cb8200f65820232904", - "runtimeCodeHash": "0xd5330527cfb09df657adc879d8ad704ce6b8d5917265cabbd3eb073d1399f122", - "txHash": "0xc5fe1a9f70e3cc4d286e19e3ee8ee9a0639c7415aea22a3f308951abf300382c" - }, - "BancorFormula": { - "address": "0xd0C61e8F15d9deF697E1100663eD7dA74d3727dC", - "creationCodeHash": "0x17f6de9ab8a9bcf03a548c01d620a32caf1f29be8d90a9688ebee54295f857ef", - "runtimeCodeHash": "0x97a57f69b0029383398d02587a3a357168950d61622fe9f9710bf02b59740d63", - "txHash": "0xcd0e28e7d328ff306bb1f2079e594ff9d04d09f21bc5f978b790c8d44b02055a" - }, - "Controller": { - "address": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117", - "creationCodeHash": "0x7f37a1844c38fffd5390d2114804ffc4e5cf66dfb5c7bd67a32a4f5d10eebd2d", - "runtimeCodeHash": "0x929c62381fbed59483f832611752177cc2642e1e35fedeeb6cd9703e278448a0", - "txHash": "0x12b13ed4ac6fee14335be09df76171b26223d870977524cfdce46c11112a5c04" - }, - "EpochManager": { - "address": "0x64F990Bf16552A693dCB043BB7bf3866c5E05DdB", - "initArgs": [ - { - "name": "controller", - "value": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117" - }, - { - "name": "lengthInBlocks", - "value": 6646 - } - ], - "creationCodeHash": "0xa02709eb59b9cca8bee1271845b42db037dc1d042dad93410ba532d378a7c79f", - "runtimeCodeHash": "0xdb307489fd9a4a438b5b48909e12020b209280ad777561c0a7451655db097e75", - "txHash": "0x9116a77a4e87eb3fe28514a26b1a6e3ee5ce982f9df3c18aadfc36d4f7f050e7", - "proxy": true, - "implementation": { - "address": "0x3fab259F2392F733c60C19492B5678E5D2D2Ee31", - "creationCodeHash": "0xf03074bb7f026a2574b6ffb5d0f63f0c4fee81e004e1c46ef262dd5802d3384f", - "runtimeCodeHash": "0x0d078a0bf778c6c713c46979ac668161a0a0466356252e47082f80912e4495b2", - "txHash": "0x730141db9a1dc5c9429f7543442e34e9eb994610e2ceabdedb6d322e1bedf2aa" - } - }, - "GraphToken": { - "address": "0xc944E90C64B2c07662A292be6244BDf05Cda44a7", - "constructorArgs": [ - { - "name": "initialSupply", - "value": "10000000000000000000000000000" - } - ], - "creationCodeHash": "0x30da7a30d71fbd41d3327e4d0183401f257af3e905a0c68ebfd18b590b27b530", - "runtimeCodeHash": "0xb964f76194a04272e7582382a4d6bd6271bbb90deb5c1fd3ae3913504ea3a830", - "txHash": "0x079625b9f58a40f1948b396b7007d09ff4aa193d7ec798923910fc179294cab8" - }, - "ServiceRegistry": { - "address": "0xaD0C9DaCf1e515615b0581c8D7E295E296Ec26E6", - "initArgs": [ - { - "name": "controller", - "value": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117" - } - ], - "creationCodeHash": "0xa02709eb59b9cca8bee1271845b42db037dc1d042dad93410ba532d378a7c79f", - "runtimeCodeHash": "0xdb307489fd9a4a438b5b48909e12020b209280ad777561c0a7451655db097e75", - "txHash": "0x94cbb1d3863e33bf92acc6fab534c5ce63a9d1347958a323ae496b06f710f042", - "proxy": true, - "implementation": { - "address": "0x866232Ec9a9F918a821eBa561Cc5FC960Ef5B3aa", - "creationCodeHash": "0xf5fa541b43d15fade518feb63a95a73b9c67626108ead259e444af3a7ae1804f", - "runtimeCodeHash": "0x9856d2c2985f410f2f77e456fe6163827ea5251eb5e3f3768d3d4f8868187882", - "txHash": "0xdf811598fbfbc487b16b5bb3444ed47ae3107d3dcde8dbd770e8810315f942b5" - } - }, - "GraphCurationToken": { - "address": "0xb2E26f17Aea8eFA534e15Bde5C79c25D0C3dfa2e", - "creationCodeHash": "0x7e9a56b6fc05d428d1c1116eaa88a658f05487b493d847bfe5c69e35ec34f092", - "runtimeCodeHash": "0x587f9d4e9ecf9e7048d9f42f027957ca34ee6a95ca37d9758d8cd0ee16e89818", - "txHash": "0x68eb11f4d6eaec5036c97b4c6102a509ac31933f1fe011f275b3e5fee30b6590" - }, - "Curation": { - "address": "0x8FE00a685Bcb3B2cc296ff6FfEaB10acA4CE1538", - "initArgs": [ - { - "name": "controller", - "value": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117" - }, - { - "name": "bondingCurve", - "value": "0xd0C61e8F15d9deF697E1100663eD7dA74d3727dC" - }, - { - "name": "reserveRatio", - "value": 500000 - }, - { - "name": "curationTaxPercentage", - "value": 25000 - }, - { - "name": "minimumCurationDeposit", - "value": "1000000000000000000" - } - ], - "creationCodeHash": "0xa02709eb59b9cca8bee1271845b42db037dc1d042dad93410ba532d378a7c79f", - "runtimeCodeHash": "0xdb307489fd9a4a438b5b48909e12020b209280ad777561c0a7451655db097e75", - "txHash": "0x64d8d94e21f1923bd1793011ba28f24befd57b511622920716238b05595dac7d", - "proxy": true, - "implementation": { - "address": "0xDeb46851907fd85DD475780CcE2eE0D67c969825", - "creationCodeHash": "0x32ec24cd745738aea9b8cb693d4a20f3cf219226da985ab92d270d3e0b5f7f65", - "runtimeCodeHash": "0xfc0db997a425bc44ee6d6f1e2fd6471227489a22c94f1b358b900134e7ce6308", - "txHash": "0xe95fd068849d1c9f49fbeadb3e7618e1748cc581406d7fdf15204a49d90d2f02" - } - }, - "L1GNS": { - "address": "0xaDcA0dd4729c8BA3aCf3E99F3A9f471EF37b6825", - "initArgs": [ - { - "name": "controller", - "value": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117" - }, - { - "name": "bondingCurve", - "value": "0xd0C61e8F15d9deF697E1100663eD7dA74d3727dC" - }, - { - "name": "didRegistry", - "value": "0xdca7ef03e98e0dc2b855be647c39abe984fcf21b" - } - ], - "creationCodeHash": "0xa02709eb59b9cca8bee1271845b42db037dc1d042dad93410ba532d378a7c79f", - "runtimeCodeHash": "0xdb307489fd9a4a438b5b48909e12020b209280ad777561c0a7451655db097e75", - "txHash": "0x7ef90b0477e5c5d05bbd203af7d2bf15224640204e12abb07331df11425d2d00", - "proxy": true, - "implementation": { - "address": "0x83A5B6C542aB20436087Fc79724bdF06ea80f836", - "creationCodeHash": "0xc34de4bdb2c1f364bc3aed96ac77248518578af009a60597835325c0346cc639", - "runtimeCodeHash": "0x134ddad3a28975b2b246e41fc21f647a0b6a6c47d170aea23c9d9ef295cfdd01", - "txHash": "0x0c26745e6d492737a64c253f2384bb2af1ec63a64088799b208e3f0563a528ce" - } - }, - "L1Staking": { - "address": "0xF55041E37E12cD407ad00CE2910B8269B01263b9", - "initArgs": [ - { - "name": "controller", - "value": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117" - }, - { - "name": "minimumIndexerStake", - "value": "100000000000000000000000" - }, - { - "name": "thawingPeriod", - "value": 186092 - }, - { - "name": "protocolPercentage", - "value": 10000 - }, - { - "name": "curationPercentage", - "value": 100000 - }, - { - "name": "channelDisputeEpochs", - "value": 7 - }, - { - "name": "maxAllocationEpochs", - "value": 28 - }, - { - "name": "delegationUnbondingPeriod", - "value": 28 - }, - { - "name": "delegationRatio", - "value": 16 - }, - { - "name": "rebateAlphaNumerator", - "value": 77 - }, - { - "name": "rebateAlphaDenominator", - "value": 100 - } - ], - "creationCodeHash": "0xa02709eb59b9cca8bee1271845b42db037dc1d042dad93410ba532d378a7c79f", - "runtimeCodeHash": "0xdb307489fd9a4a438b5b48909e12020b209280ad777561c0a7451655db097e75", - "txHash": "0x6c92edf1c385983d57be0635cf40e1d1068d778edecf2be1631f51556c731af7", - "proxy": true, - "implementation": { - "address": "0x20a14D78848BC8B3F3d4B77239F2adC3C0259A10", - "creationCodeHash": "0x2f3c1dcd9c0abbafd708a5ba243e4afaa115a18f7a4a7db9728cc75e8a8c48fb", - "runtimeCodeHash": "0x4c9896765a37b29d0de3a6f37df1903f7efe1f62e937cb31fdfedd8be7f3008e", - "txHash": "0x6c096b17b867db5775e8d300f0469dec888dde8dbcee03a2294383e23150fbe5", - "libraries": { - "LibExponential": "0xD0AAe7a0A6Ae551DCA969183e1bB376F8a455Ea1" - } - } - }, - "RewardsManager": { - "address": "0x9Ac758AB77733b4150A901ebd659cbF8cB93ED66", - "initArgs": [ - { - "name": "controller", - "value": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117" - }, - { - "name": "issuanceRate", - "value": "1000000012184945188" - } - ], - "creationCodeHash": "0xa02709eb59b9cca8bee1271845b42db037dc1d042dad93410ba532d378a7c79f", - "runtimeCodeHash": "0xdb307489fd9a4a438b5b48909e12020b209280ad777561c0a7451655db097e75", - "txHash": "0xd3a4d1b3e250e606f56417fd6e43d35bc794e793b1c5be4ffbecc3a43ca1b7b6", - "proxy": true, - "implementation": { - "address": "0xD92944C84826Be7d1D168B239D30AF4583E085e5", - "creationCodeHash": "0x59c1680da2d19124daaf95fd66acc5eae68e6f46dfe2ff0b3ccb777daf9949b2", - "runtimeCodeHash": "0xe33080183ec49ab1ec8d78b80b90158f0f3ac6f2deedf6115a32a9d11d3e4d9b", - "txHash": "0x55256a323baca3666f9c9f4e4141f037aecd7c5110b7db1a3f3ab28802c8dd48" - } - }, - "DisputeManager": { - "address": "0x97307b963662cCA2f7eD50e38dCC555dfFc4FB0b", - "initArgs": [ - { - "name": "controller", - "value": "0x24CCD4D3Ac8529fF08c58F74ff6755036E616117" - }, - { - "name": "arbitrator", - "value": "0xE1FDD398329C6b74C14cf19100316f0826a492d3" - }, - { - "name": "minimumDeposit", - "value": "10000000000000000000000" - }, - { - "name": "fishermanRewardPercentage", - "value": 500000 - }, - { - "name": "slashingPercentage", - "value": 25000 - } - ], - "creationCodeHash": "0xa02709eb59b9cca8bee1271845b42db037dc1d042dad93410ba532d378a7c79f", - "runtimeCodeHash": "0xdb307489fd9a4a438b5b48909e12020b209280ad777561c0a7451655db097e75", - "txHash": "0x90cd5852f5824f76d93814ffea26040ff503c81a84c4430e3688f219f9b48465", - "proxy": true, - "implementation": { - "address": "0x444c138bf2b151f28a713b0ee320240365a5bfc2", - "creationCodeHash": "0xc00c4702d9683f70a90f0b73ce1842e66fa4c26b2cf75fb486a016bb7bac2102", - "runtimeCodeHash": "0x2bb6445bf9e12618423efe9ef64d05e14d283979829e751cd24685c1440c403f", - "txHash": "0x413cd4f8e9e70ad482500772c1f13b0be48deb42d7f2d0d5a74b56d5a6bd8a4d" - } - }, - "AllocationExchange": { - "address": "0x4a53cf3b3EdA545dc61dee0cA21eA8996C94385f", - "initArgs": [ - { - "name": "graphToken", - "value": "0xc944e90c64b2c07662a292be6244bdf05cda44a7" - }, - { - "name": "staking", - "value": "0xf55041e37e12cd407ad00ce2910b8269b01263b9" - }, - { - "name": "governor", - "value": "0x74db79268e63302d3fc69fb5a7627f7454a41732" - }, - { - "name": "authority", - "value": "0x79fd74da4c906509862c8fe93e87a9602e370bc4" - } - ], - "creationCodeHash": "0x1c7b0d7e81fc15f8ccc5b159e2cedb1f152653ebbce895b59eb74a1b26826fda", - "runtimeCodeHash": "0xa63c77e0724a5f679660358452e388f60379f1331e74542afb1436ffb213b960", - "txHash": "0x2ecd036c562f2503af9eaa1a9bca3729bd31ec8a91677530eefbecb398b793ba" - }, - "SubgraphNFTDescriptor": { - "address": "0x8F0B7e136891e8Bad6aa4Abcb64EeeFE29dC2Af0", - "creationCodeHash": "0x7ac0757e66857e512df199569ee11c47a61b00a8d812469b79afa5dafa98c0ed", - "runtimeCodeHash": "0x9a34ad6b202bdfa95ea85654ea2e0dd40a4b8b10847f1c3d3d805fa95a078a3d", - "txHash": "0x77d98358726575ae044ac988b98b63f537951ccae2010e7177c4a7833dce9158" - }, - "SubgraphNFT": { - "address": "0x24e36639b3A3aaA9c928a8A6f12d34F942f1ab67", - "creationCodeHash": "0x8c9929ec6293458209f9cbadd96821604765e3656fe3c7b289b99194ede15336", - "runtimeCodeHash": "0x6309a51754b6bec245685c7a81059dc28e3756f1045f18d059abc9294f454a6a", - "txHash": "0x106c31f2c24a5285c47a766422823766f1c939034513e85613d70d99ef697173" - }, - "BridgeEscrow": { - "address": "0x36aFF7001294daE4C2ED4fDEfC478a00De77F090", - "initArgs": ["0x24CCD4D3Ac8529fF08c58F74ff6755036E616117"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x218aff2c804dd3dfe5064b08cab83ffb37382ca2aea1a225c2ead02ec99f38b5", - "proxy": true, - "implementation": { - "address": "0xBcD54513aa593646d72aEA31406c633C235Ad6EA", - "creationCodeHash": "0x6a1fc897c0130a1c99221cde1938d247de13a0861111ac47ad81c691f323df1a", - "runtimeCodeHash": "0xc8e31a4ebea0c3e43ceece974071ba0b6db2bed6725190795e07a2d369d2a8ab", - "txHash": "0x92908e33b54f59ec13a0f7bd29b818c421742294b9974d73859e0bde871bafb9" - } - }, - "L1GraphTokenGateway": { - "address": "0x01cDC91B0A9bA741903aA3699BF4CE31d6C5cC06", - "initArgs": ["0x24CCD4D3Ac8529fF08c58F74ff6755036E616117"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0xd327568a286d6fcda1a6b78a14c87d660523a6900be901d6a7fbc2504faff64b", - "proxy": true, - "implementation": { - "address": "0xD41ca6A1d034D178c196DFa916f22f7D1a1B8222", - "creationCodeHash": "0x7d6f46e4801d562a8c6fc37779711cce39b3544ea62c6c6517d4b06e8604e38c", - "runtimeCodeHash": "0xa0c0a37340ee949d31c3d41b642c507c58f225c09da9ae3d378e5148cd27081a", - "txHash": "0x25f4234807c7f09b813d4e413311bbe440c8257bc050c71678f63a7abc6e643e" - } - }, - "StakingExtension": { - "address": "0xA479c00cDa8C07bce458D7a826C7b091672EB92C", - "creationCodeHash": "0xe23c59dbfb94b0cf7ef58f654b905977624ce57eaae2fce692edb28ca3f1b3ba", - "runtimeCodeHash": "0xca8ad20187bc87e0e04a15184f529787dd23a0095047d411e1b271617a951c49", - "txHash": "0x13cd940ba9c8dd576f9f311e805539792f4caa88ada5a1b516355edabc776dd8" - } - }, - "5": { - "GraphProxyAdmin": { - "address": "0x6D47902c3358E0BCC06171DE935cB23D8E276fdd", - "creationCodeHash": "0x8b9a4c23135748eb0e4d0e743f7276d86264ace935d23f9aadcfccd64b482055", - "runtimeCodeHash": "0x47aa67e4a85090fe7324268b55fb7b320ee7a8937f2ad02480b71d4bb3332b13", - "txHash": "0xd4be829c13c741b8b56ca5ee7d98d86237ce44df7c11eff73df26cd87d5cab94" - }, - "BancorFormula": { - "address": "0x2DFDC3e11E035dD96A4aB30Ef67fab4Fb6EC01f2", - "creationCodeHash": "0x7ae36017eddb326ddd79c7363781366121361d42fdb201cf57c57424eede46f4", - "runtimeCodeHash": "0xed6701e196ad93718e28c2a2a44d110d9e9906085bcfe4faf4f6604b08f0116c", - "txHash": "0x97ca33e6e7d1d7d62bdec4827f208076922d9c42bf149693b36ab91429e65740" - }, - "Controller": { - "address": "0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B", - "creationCodeHash": "0x4f2082404e96b71282e9d7a8b7efd0f34996b5edac6711095911d36a57637c88", - "runtimeCodeHash": "0xe31d064a2db44ac10d41d74265b7d4482f86ee95644b9745c04f9fc91006906d", - "txHash": "0x8087bd10cc8d456a7b573bc30308785342db2b90d80f3a750931ab9cf5273b83" - }, - "EpochManager": { - "address": "0x03541c5cd35953CD447261122F93A5E7b812D697", - "initArgs": ["0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B", "554"], - "creationCodeHash": "0x25a7b6cafcebb062169bc25fca9bcce8f23bd7411235859229ae3cc99b9a7d58", - "runtimeCodeHash": "0xaf2d63813a0e5059f63ec46e1b280eb9d129d5ad548f0cdd1649d9798fde10b6", - "txHash": "0xb1c6189514b52091e35c0349dff29357a2572cd9c2f9ad7f623b2b24252826d1", - "proxy": true, - "implementation": { - "address": "0xb6a641879F195448F3Da10fF3b3C4541808a9342", - "creationCodeHash": "0x729aca90fcffdeede93bc42a6e089a93085ec04133e965cf0291cf6245880595", - "runtimeCodeHash": "0xce525d338b6ed471eeb36d2927a26608cca2d5cfe52bd0585945eacc55b525cf", - "txHash": "0x139630c31b6a5799231572aa0b555a44209acd79fb3df98832d80cf9a1013b58" - } - }, - "GraphToken": { - "address": "0x5c946740441C12510a167B447B7dE565C20b9E3C", - "constructorArgs": ["10000000000000000000000000000"], - "creationCodeHash": "0xa749ef173d768ffe0786529cd23238bc525f4a621a91303d8fb176533c18cec2", - "runtimeCodeHash": "0xe584408c8e04a6200bc7a50816343585ad80f699bd394b89bb96964dbc1a2a92", - "txHash": "0x0639808a47da8a5270bc89eb3009c7d29167c8f32f015648920ec5d114225540" - }, - "GraphCurationToken": { - "address": "0x8bEd0a89F18a801Da9dEA994D475DEa74f75A059", - "creationCodeHash": "0x8c076dacbf98f839a0ff25c197eafc836fc3fc1ee5183c7f157acec17678a641", - "runtimeCodeHash": "0xad138b4c4f34501f83aea6c03a49c103a9115526c993860a9acbd6caeaaf0d64", - "txHash": "0xc09739affd3d9dd43f690d3a487b1c149ad8aa50164995cfbc9de73914ff278a" - }, - "ServiceRegistry": { - "address": "0x7CF8aD279E9F26b7DAD2Be452A74068536C8231F", - "initArgs": ["0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B"], - "creationCodeHash": "0x25a7b6cafcebb062169bc25fca9bcce8f23bd7411235859229ae3cc99b9a7d58", - "runtimeCodeHash": "0xaf2d63813a0e5059f63ec46e1b280eb9d129d5ad548f0cdd1649d9798fde10b6", - "txHash": "0xf250ef40f4172e54b96047a59cfd7fc35ffabe14484ff1d518e0262195895282", - "proxy": true, - "implementation": { - "address": "0xdC7Fb3a43B9e069df5F07eDc835f60dAc3fD40BA", - "creationCodeHash": "0x45f56a7ad420cd11a8585594fb29121747d87d412161c8779ea36dfd34a48e88", - "runtimeCodeHash": "0x26aceabe83e2b757b2f000e185017528cdde2323c2129fd612180ac3192adfda", - "txHash": "0x2fdb5fa641f707809322107573ce7799711e125cc781aade99fd2948455847ab" - } - }, - "Curation": { - "address": "0xE59B4820dDE28D2c235Bd9A73aA4e8716Cb93E9B", - "initArgs": [ - "0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B", - "0x2DFDC3e11E035dD96A4aB30Ef67fab4Fb6EC01f2", - "0x8bEd0a89F18a801Da9dEA994D475DEa74f75A059", - "500000", - "10000", - "1000000000000000000" - ], - "creationCodeHash": "0x25a7b6cafcebb062169bc25fca9bcce8f23bd7411235859229ae3cc99b9a7d58", - "runtimeCodeHash": "0xaf2d63813a0e5059f63ec46e1b280eb9d129d5ad548f0cdd1649d9798fde10b6", - "txHash": "0xf1b1f0f28b80068bcc9fd6ef475be6324a8b23cbdb792f7344f05ce00aa997d7", - "proxy": true, - "implementation": { - "address": "0x2b757ad83e4ed51ecae8d4dc9ade8e3fa29f7bdc", - "creationCodeHash": "0xde37904a7c087e05dc5f84e46a7ff35e1f75f013db373c72715d81d21921de4a", - "runtimeCodeHash": "0x867f82ea221eee52ee0db10a2b49ed8051f4ffc4069238d01f8a0110798a51ef", - "txHash": "0x928ed1d624aecbfdb60d5840c2b9cc81573b9dbe3ec96cf6d86dc8194cb7fdac" - } - }, - "SubgraphNFTDescriptor": { - "address": "0xE7e406b4Bfce0B78A751712BFEb1D6B0ce60e8fb", - "creationCodeHash": "0xf16e8ff11d852eea165195ac9e0dfa00f98e48f6ce3c77c469c7df9bf195b651", - "runtimeCodeHash": "0x39583196f2bcb85789b6e64692d8c0aa56f001c46f0ca3d371abbba2c695860f", - "txHash": "0xffee21f6616abd4ffdab0b930dbf44d2ba381a08c3c834798df464fd85e8047e" - }, - "SubgraphNFT": { - "address": "0x083318049968F20EfaEA48b0978EC57bbb0ECbcE", - "constructorArgs": ["0xEfc519BEd6a43a14f1BBBbA9e796C4931f7A5540"], - "creationCodeHash": "0x5de044b15df24beb8781d1ebe71f01301a6b8985183f37eb8d599aa4059a1d3e", - "runtimeCodeHash": "0x6a7751298d6ffdbcf421a3b72faab5b7d425884b04757303123758dbcfb21dfa", - "txHash": "0x8884b65a236c188e4c61cf9593be2f67b27e4f80785939336d659866cfd97aec" - }, - "L1GNS": { - "address": "0x065611D3515325aE6fe14f09AEe5Aa2C0a1f0CA7", - "initArgs": [ - "0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B", - "0x2DFDC3e11E035dD96A4aB30Ef67fab4Fb6EC01f2", - "0x083318049968F20EfaEA48b0978EC57bbb0ECbcE" - ], - "creationCodeHash": "0x25a7b6cafcebb062169bc25fca9bcce8f23bd7411235859229ae3cc99b9a7d58", - "runtimeCodeHash": "0xaf2d63813a0e5059f63ec46e1b280eb9d129d5ad548f0cdd1649d9798fde10b6", - "txHash": "0x0149f062893acb0eafcbf67acc99da99e03aab3ee2b6b40fbe523d91e0fcecd1", - "proxy": true, - "implementation": { - "address": "0xa95ee5A5f6b45Fcf85A7fa0714f462472C467818", - "creationCodeHash": "0x2e71e4aefc1e678cb9c71882c1da67fc640389337a7d6ae43f78d0f13294594a", - "runtimeCodeHash": "0xde0e02c6a36a90e11c768f40a81430b7e9cda261aa6dada14eaad392d42efc21", - "txHash": "0xbc6e9171943020d30c22197282311f003e79374e6eeeaab9c360942bdf4193f4" - } - }, - "L1Staking": { - "address": "0x35e3Cb6B317690d662160d5d02A5b364578F62c9", - "initArgs": [ - "0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B", - "100000000000000000000000", - "6646", - "10000", - "100000", - "2", - "4", - "12", - "16", - "77", - "100" - ], - "creationCodeHash": "0x25a7b6cafcebb062169bc25fca9bcce8f23bd7411235859229ae3cc99b9a7d58", - "runtimeCodeHash": "0xaf2d63813a0e5059f63ec46e1b280eb9d129d5ad548f0cdd1649d9798fde10b6", - "txHash": "0x1960be49029284756037cf3ee8afe9eeaba93de4ba84875c5eefd5d2289903bd", - "proxy": true, - "implementation": { - "address": "0x475e6b44ad3F570907C234A7084df5Df65c7430C", - "creationCodeHash": "0x665ac0b452b51bf138cc1ab67e642a06874e754081432ea0fe3dd093c0eef145", - "runtimeCodeHash": "0x1f4490e6582f31ac25b22700b5704b893b9d7641ece59f7f911856f979f0b672", - "txHash": "0x509f8956d8e7a18c37838d9468e1c424558b1af3080087834da3244fa50cba2a", - "libraries": { - "LibExponential": "0xEB421FC914f8e898711974f13F194BCd21e51433" - } - } - }, - "RewardsManager": { - "address": "0x1246D7c4c903fDd6147d581010BD194102aD4ee2", - "initArgs": ["0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B", "1000000012184945188"], - "creationCodeHash": "0x25a7b6cafcebb062169bc25fca9bcce8f23bd7411235859229ae3cc99b9a7d58", - "runtimeCodeHash": "0xaf2d63813a0e5059f63ec46e1b280eb9d129d5ad548f0cdd1649d9798fde10b6", - "txHash": "0x108efecde4422dacf6ec7a07884cab214ba0a441fc73a6ad82ceb5c73e1c9334", - "proxy": true, - "implementation": { - "address": "0x295b26b449C533bd1831FF7d14c151C95a380e5e", - "creationCodeHash": "0x59c1680da2d19124daaf95fd66acc5eae68e6f46dfe2ff0b3ccb777daf9949b2", - "runtimeCodeHash": "0xe33080183ec49ab1ec8d78b80b90158f0f3ac6f2deedf6115a32a9d11d3e4d9b", - "txHash": "0x112a3c4447e16a75d1ceda6b475df1bdec8353c24de7282f333e734f93da85cc" - } - }, - "DisputeManager": { - "address": "0x8c344366D9269174F10bB588F16945eb47f78dc9", - "initArgs": [ - "0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B", - "0xFD01aa87BeB04D0ac764FC298aCFd05FfC5439cD", - "10000000000000000000000", - "500000", - "25000", - "25000" - ], - "creationCodeHash": "0x25a7b6cafcebb062169bc25fca9bcce8f23bd7411235859229ae3cc99b9a7d58", - "runtimeCodeHash": "0xaf2d63813a0e5059f63ec46e1b280eb9d129d5ad548f0cdd1649d9798fde10b6", - "txHash": "0xe93eba1bda0d262efabbc05d4e01b9ee197f22dd4f798e4c5fc5b1b9c137428e", - "proxy": true, - "implementation": { - "address": "0x476F0b8e5F952f0740aD3b0cb50648a7496c8388", - "creationCodeHash": "0x5b73c9b910d66426fd965ac3110e9debda1d81134c0354a7af8ec1f2ebd765f6", - "runtimeCodeHash": "0xcaf3547f0d675a1e1d2f887cf4666410bc3b084e65ad283ed3f1ff2b1bccc113", - "txHash": "0x6a90b5e2d5dcae2c94fe518ce7f6fb2ffc11e562b9feac6464dcb32e1e90c039" - } - }, - "AllocationExchange": { - "address": "0x67FBea097202f46D601D7C937b5DBb615659aDF2", - "constructorArgs": [ - "0x5c946740441C12510a167B447B7dE565C20b9E3C", - "0x35e3Cb6B317690d662160d5d02A5b364578F62c9", - "0xf1135bFF22512FF2A585b8d4489426CE660f204c", - "0x52e498aE9B8A5eE2A5Cd26805F06A9f29A7F489F" - ], - "creationCodeHash": "0x97714e1a80674ab0af90a10f2c7156cc92794ef81565fe9c7c35ecbe0025cc08", - "runtimeCodeHash": "0x5c20792fefe71126668be8ab19ab26cdb8ab9a6f73efbfa1d90f91e26459fa67", - "txHash": "0x87b35e5289792800832902206cf0ee4b9900e4d38089bd6634d10ea78729bf54" - }, - "IENS": { - "address": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" - }, - "IEthereumDIDRegistry": { - "address": "0xdCa7EF03e98e0DC2B855bE647C39ABe984fcF21B" - }, - "BridgeEscrow": { - "address": "0x8e4145358af77516B886D865e2EcacC0Fd832B75", - "initArgs": ["0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x190ea3c8f731a77a8fd1cbce860f9561f233adeafe559b33201b7d21ccd298cf", - "proxy": true, - "implementation": { - "address": "0xDD569E05D54fBF5d02fE4a26aC03Ea00317A0A2e", - "creationCodeHash": "0x6a1fc897c0130a1c99221cde1938d247de13a0861111ac47ad81c691f323df1a", - "runtimeCodeHash": "0xc8e31a4ebea0c3e43ceece974071ba0b6db2bed6725190795e07a2d369d2a8ab", - "txHash": "0x369038dcc8d8e70d40782dd761a82cc453c7a4f1939284c724a5a72119e3e566" - } - }, - "L1GraphTokenGateway": { - "address": "0xc82fF7b51c3e593D709BA3dE1b3a0d233D1DEca1", - "initArgs": ["0x48eD7AfbaB432d1Fc6Ea84EEC70E745d9DAcaF3B"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x4a06731591df5c5f77c11bf8df7851234873eb6727fbbc93f5595a223f7cf3fc", - "proxy": true, - "implementation": { - "address": "0x9e8bab937Cac7c359F5e92248d10C613B3Cd7B8b", - "creationCodeHash": "0x7d6f46e4801d562a8c6fc37779711cce39b3544ea62c6c6517d4b06e8604e38c", - "runtimeCodeHash": "0xa0c0a37340ee949d31c3d41b642c507c58f225c09da9ae3d378e5148cd27081a", - "txHash": "0x517794503416be02d916d289f4e7510359d17567bec987da99319e27e5f40fc1" - } - }, - "StakingExtension": { - "address": "0x163203D9fae9eB88a8B3a11B1778710D6F855907", - "creationCodeHash": "0xe23c59dbfb94b0cf7ef58f654b905977624ce57eaae2fce692edb28ca3f1b3ba", - "runtimeCodeHash": "0xca8ad20187bc87e0e04a15184f529787dd23a0095047d411e1b271617a951c49", - "txHash": "0x20a0c0f2a26258e1c63f33f3a5651580bb74ea4bf0e66076ebbdda4fa41d5955" - } - }, - "42161": { - "GraphProxyAdmin": { - "address": "0x2983936aC20202a6555993448E0d5654AC8Ca5fd", - "creationCodeHash": "0x68b304ac6bce7380d5e0f6b14a122f628bffebcc75f8205cb60f0baf578b79c3", - "runtimeCodeHash": "0x8d9ba87a745cf82ab407ebabe6c1490197084d320efb6c246d94bcc80e804417", - "txHash": "0x3ff82c38ec0e08e8f4194689188edcc1e8acb1f231c14cce8f0223f4dfc6cb76" - }, - "BancorFormula": { - "address": "0xA489FDc65229D6225014C0b357BCD19af6f00eE9", - "creationCodeHash": "0x7ae36017eddb326ddd79c7363781366121361d42fdb201cf57c57424eede46f4", - "runtimeCodeHash": "0xed6701e196ad93718e28c2a2a44d110d9e9906085bcfe4faf4f6604b08f0116c", - "txHash": "0xb2bb14ba3cbd1bb31b08b86aced469745f9888710254bb3baed047f435e788c0" - }, - "Controller": { - "address": "0x0a8491544221dd212964fbb96487467291b2C97e", - "creationCodeHash": "0x798f913fbaa1b2547c917e3dc31679089ab27cba442c511c159803acdba28c15", - "runtimeCodeHash": "0x00ae0824f79c4e48d2d23a8d4e6d075f04f44f3ea30a4f4305c345bb98117c62", - "txHash": "0x2a9d5744ad0e5e2e6bb6733ae890702fed2bce906e4e8b1cc50d2d3912c58d18" - }, - "EpochManager": { - "address": "0x5A843145c43d328B9bB7a4401d94918f131bB281", - "initArgs": ["0x0a8491544221dd212964fbb96487467291b2C97e", "6646"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x4c70b8a56278452898d9eb23787a977d38141ebe48c79417c3acf6748ff921cf", - "proxy": true, - "implementation": { - "address": "0xeEDEdb3660154f439D93bfF612f7902edf07b848", - "creationCodeHash": "0x83bc0b08dbe1a9259666ec209f06223863f7bb9cfbf917a2d4b795c771a727fe", - "runtimeCodeHash": "0xed60261c6dc84ebc16830c36f3ee370a92802601d5a2fe1c3c19f5120dcbc2eb", - "txHash": "0x64fac1c567b7be735084b337a1e4ea9b990a8ffee8190485dc9b8dfcc257146c" - } - }, - "L2GraphToken": { - "address": "0x9623063377AD1B27544C965cCd7342f7EA7e88C7", - "initArgs": ["0x4528FD7868c91Ef64B9907450Ee8d82dC639612c"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x8465190df853c05bbdec00ba6b66139be0e5663fd5b740bdd464ad7409ce2100", - "proxy": true, - "implementation": { - "address": "0xaFFCb96181D920FE8C0Af046C49B2c9eC98b28df", - "creationCodeHash": "0x6c4146427aafa7375a569154be95c8c931bf83aab0315706dd78bdf79c889e4c", - "runtimeCodeHash": "0x004371d1d80011906953dcba17c648503fc94b94e1e0365c8d8c706ff91f93e9", - "txHash": "0xbd7d146ce80831ed7643e9f5b5a84737da354994ae080cb3d7ff7bbc3e696b3d" - } - }, - "GraphCurationToken": { - "address": "0x47a0d56ea574419B524285d52fFe7198297D209c", - "creationCodeHash": "0x1ee42ee271cefe20c33c0de904501e618ac4b56debca67c634d0564cecea9ff2", - "runtimeCodeHash": "0x340e8f378c0117b300f3ec255bc5c3a273f9ab5bd2940fa8eb3b5065b21f86dc", - "txHash": "0x382568f1871a3d57f4d3787b255a2364e9926cb6770fdca3cde6cb04b577ecd5" - }, - "ServiceRegistry": { - "address": "0x072884c745c0A23144753335776c99BE22588f8A", - "initArgs": ["0x0a8491544221dd212964fbb96487467291b2C97e"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x54b1da3f2fdd2327abe01f75ac38a670ee16d3f47bc58641ddaef04f0b9d0f78", - "proxy": true, - "implementation": { - "address": "0xD32569dA3B89b040A0589B5b8D2c721a68472ff3", - "creationCodeHash": "0x50808e8cce93cf78a23c9e6dd7984356bd2bd93be30b358982909140dd61f6ff", - "runtimeCodeHash": "0xaef79c87f7e80107c0dc568cf1f8950459b5174ee3aa565ec487556a655e71db", - "txHash": "0xca363c6bc841b43bd896b6d2098434679884d200a28013dedb48a2c95028ce40" - } - }, - "L2Curation": { - "address": "0x22d78fb4bc72e191C765807f8891B5e1785C8014", - "initArgs": [ - "0x0a8491544221dd212964fbb96487467291b2C97e", - "0xA489FDc65229D6225014C0b357BCD19af6f00eE9", - "0x47a0d56ea574419B524285d52fFe7198297D209c", - "1000000", - "10000", - "1000000000000000000" - ], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x8f856e2090af3243349199f7991e01b1c28de7b70b0185d2370d8ada5ce9c97b", - "proxy": true, - "implementation": { - "address": "0x41Ad970e071aadbE098c17aDFCff2fF3105456Ae", - "creationCodeHash": "0x2c7b48c311e8f0cb03513d4ca4c0010132d7402f1aabb1dd65f28cdcf07255ba", - "runtimeCodeHash": "0xa750bd231f2b1ec9ffaeef4de79eddbde8aca9bdbf4c9125424eea644bf27aff", - "txHash": "0x7b03bc16b3af6a650ff866311b1f580936e8b7264ddb4c6348fb824c508d1dcb" - } - }, - "SubgraphNFTDescriptor": { - "address": "0x96cce9b6489744630A058324FB22e7CD02815ebe", - "creationCodeHash": "0xf16e8ff11d852eea165195ac9e0dfa00f98e48f6ce3c77c469c7df9bf195b651", - "runtimeCodeHash": "0x39583196f2bcb85789b6e64692d8c0aa56f001c46f0ca3d371abbba2c695860f", - "txHash": "0xbb01566726e1d58825cf7aa2860f0f571ff47f92b3837aad0e73e7791fbca48c" - }, - "SubgraphNFT": { - "address": "0x3FbD54f0cc17b7aE649008dEEA12ed7D2622B23f", - "constructorArgs": ["0x4528FD7868c91Ef64B9907450Ee8d82dC639612c"], - "creationCodeHash": "0xc1e58864302084de282dffe54c160e20dd96c6cfff45e00e6ebfc15e04136982", - "runtimeCodeHash": "0x7216e736a8a8754e88688fbf5c0c7e9caf35c55ecc3a0c5a597b951c56cf7458", - "txHash": "0x4334bd64938c1c5c604bde96467a8601875046569f738e6860851594c91681ff" - }, - "L2GNS": { - "address": "0xec9A7fb6CbC2E41926127929c2dcE6e9c5D33Bec", - "initArgs": [ - "0x0a8491544221dd212964fbb96487467291b2C97e", - "0xA489FDc65229D6225014C0b357BCD19af6f00eE9", - "0x3FbD54f0cc17b7aE649008dEEA12ed7D2622B23f" - ], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0xf7f2747d1aafd1684ffee7316e727475249cd358af559c6234089b72ffc25f5d", - "proxy": true, - "implementation": { - "address": "0x9B81c7C5A21E65b849FD487540B0A82d3b97b2c7", - "creationCodeHash": "0xd71f45e6c194920a26f90fcec96d8c3375f02c5aef8ad90c1be24e906ffe8342", - "runtimeCodeHash": "0x68ec24512fedb866d7ba7ba6c02160317d0ca34eaacd23bddcc62d2cbcd9869c", - "txHash": "0xfaecc9eb83958359f7440b3dbe1747c2191590acbbde920f191c94352cc0b6d7" - } - }, - "L2Staking": { - "address": "0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03", - "initArgs": [ - "0x0a8491544221dd212964fbb96487467291b2C97e", - "100000000000000000000000", - "186092", - "10000", - "100000", - "7", - "28", - "28", - "16", - "77", - "100" - ], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0xa33c0d58ddaed7e3f7381a33e3d5f63e39219863019f00d54ce2fd2446076ac7", - "proxy": true, - "implementation": { - "address": "0x4a886d3E44C7731Dcf888Da704CA5C51ed63DfC8", - "creationCodeHash": "0xa9796308a637b0bfe091f32c1019e4db8efe4bab80788c052fa334e6810c3a98", - "runtimeCodeHash": "0x19d3491cab54b2aae04d05525a532200e946ce9b55573b58f2e3e1606b4514be", - "txHash": "0xc3235306a51c20b28a8b05da69859e03a081a84c9914156c79da07dcc45b3b4e", - "libraries": { - "LibExponential": "0x208f638d8804e4ccc874ec39e240feea3dc289ee" - } - } - }, - "RewardsManager": { - "address": "0x971B9d3d0Ae3ECa029CAB5eA1fB0F72c85e6a525", - "initArgs": ["0x0a8491544221dd212964fbb96487467291b2C97e"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x222e14cb6f49e3e7b76f6a523c1a3c24f96402676be8662bf1b94bb2250ddd0f", - "proxy": true, - "implementation": { - "address": "0x5912Afc5E0f430B0F84b792E9C7CC892b4bE6Bdb", - "creationCodeHash": "0x59c1680da2d19124daaf95fd66acc5eae68e6f46dfe2ff0b3ccb777daf9949b2", - "runtimeCodeHash": "0xe33080183ec49ab1ec8d78b80b90158f0f3ac6f2deedf6115a32a9d11d3e4d9b", - "txHash": "0x4ac3d936067601dab0ccab5ccd544edbe8457b56c43c6e2f370d33acdb806d19" - } - }, - "DisputeManager": { - "address": "0x0Ab2B043138352413Bb02e67E626a70320E3BD46", - "initArgs": [ - "0x0a8491544221dd212964fbb96487467291b2C97e", - "0x113DC95e796836b8F0Fa71eE7fB42f221740c3B0", - "10000000000000000000000", - "500000", - "25000", - "25000" - ], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x68f08fe0a1179170c8b4c7542725d71432b4171604d7456dff824e0ec1c6cdb9", - "proxy": true, - "implementation": { - "address": "0x358bCB57F9893188c1f5CA4e3390C8E84dAAD9B9", - "creationCodeHash": "0xce4c47d94a33d69e03d607dd13a9ad1ed7fa730ef4a2308eb56ddd646ebaa0aa", - "runtimeCodeHash": "0x18d4a1659ccecede3d4d305ef1db4653d8f3dcbd4012f4e52200ae9f0c6c322c", - "txHash": "0xc6b7c7ac5e1b800326fdc99a12262a1528f46fbd0881b5869d7c5a1709c6e0ce" - } - }, - "AllocationExchange": { - "address": "0x993F00C98D1678371a7b261Ed0E0D4b6F42d9aEE", - "constructorArgs": [ - "0x9623063377AD1B27544C965cCd7342f7EA7e88C7", - "0x00669A4CF01450B64E8A2A20E9b1FCB71E61eF03", - "0x270Ea4ea9e8A699f8fE54515E3Bb2c418952623b", - "0x79f2212de27912bCb25a452fC102C85c142E3eE3" - ], - "creationCodeHash": "0x96c5b59557c161d80f1617775a7b9537a89b0ecf2258598b3a37724be91ae80a", - "runtimeCodeHash": "0xc86fd1d67a0db0aed4cb310f977ebf3e70865e2095a167f4a103c3792146027c", - "txHash": "0x2bad6b8e5eda0026c8c38a70b925bbedd6a617a1e06952fb30e427fdbc592422" - }, - "L2GraphTokenGateway": { - "address": "0x65E1a5e8946e7E87d9774f5288f41c30a99fD302", - "initArgs": ["0x0a8491544221dd212964fbb96487467291b2C97e"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x50816047ea926423ec02b6b89efb96efcd3d7e7028ea7cf82c3da9fd1bf3869e", - "proxy": true, - "implementation": { - "address": "0x6f37b2AF8A0Cc74f1bFddf2E9302Cb226710127F", - "creationCodeHash": "0xbd52455bd8b14bfc27af623388fe2f9e06ddd4c4be3fc06c51558a912de91770", - "runtimeCodeHash": "0x29e47f693053f978d6b2ac0a327319591bf5b5e8a6e6c0744b8afcc0250bf667", - "txHash": "0x0eaa9d03982b88e765262a15b95548cb688ce9337a48460f39e55f8850690cbe" - } - }, - "EthereumDIDRegistry": { - "address": "0xa9AEb1c6f14f4244547B9a0946C485DA99047638", - "creationCodeHash": "0x20cd202f7991716a84c097da5fbd365fd27f7f35f241f82c529ad7aba18b814b", - "runtimeCodeHash": "0x5f396ffd54b6cd6b3faded0f366c5d7e148cc54743926061be2dfd12a75391de", - "txHash": "0xdd23b546fa3b6be0cea2339abe3023a082153693fbc7bf1bc86d190165823b39" - }, - "IEthereumDIDRegistry": { - "address": "0xa9AEb1c6f14f4244547B9a0946C485DA99047638" - }, - "StakingExtension": { - "address": "0x3bE385576d7C282070Ad91BF94366de9f9ba3571", - "constructorArgs": [], - "creationCodeHash": "0xbfc20ab9b880712ab90b5dec9d2a14c724b0bf7c20f02ede8ea76610bd41b6ef", - "runtimeCodeHash": "0xd7fdd744c7a88993435a2978876b1e4341c5e0fb4d611011bb56e8738ab2485d", - "txHash": "0xcc449d1ca1007fba76b25e987ea0d39164acf4027c10c40bd669ede1c65dc569" - } - }, - "421613": { - "GraphProxyAdmin": { - "address": "0x4037466bb242f51575d32E8B1be693b3E5Cd1386", - "creationCodeHash": "0x68b304ac6bce7380d5e0f6b14a122f628bffebcc75f8205cb60f0baf578b79c3", - "runtimeCodeHash": "0x8d9ba87a745cf82ab407ebabe6c1490197084d320efb6c246d94bcc80e804417", - "txHash": "0x9c4d5f8c0ab5a5bc36b0a063ab1ff04372ce7d917c0b200b94544b5da4f0230d" - }, - "BancorFormula": { - "address": "0x71319060b9fdeD6174b6368bE04F9A1b7c9aCe48", - "creationCodeHash": "0x7ae36017eddb326ddd79c7363781366121361d42fdb201cf57c57424eede46f4", - "runtimeCodeHash": "0xed6701e196ad93718e28c2a2a44d110d9e9906085bcfe4faf4f6604b08f0116c", - "txHash": "0x7fe8cabb7a4fe56311591aa8d68d6c82cb0d5c232fc5aaf28bed4d1ece0e42e5" - }, - "Controller": { - "address": "0x7f734E995010Aa8d28b912703093d532C37b6EAb", - "creationCodeHash": "0x798f913fbaa1b2547c917e3dc31679089ab27cba442c511c159803acdba28c15", - "runtimeCodeHash": "0x00ae0824f79c4e48d2d23a8d4e6d075f04f44f3ea30a4f4305c345bb98117c62", - "txHash": "0x6213da3e6367ef47cd6e1fe23e4d83296f16153a64236a5c91f865f2ec84c089" - }, - "EpochManager": { - "address": "0x8ECedc7631f4616D7f4074f9fC9D0368674794BE", - "initArgs": ["0x7f734E995010Aa8d28b912703093d532C37b6EAb", "554"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x62b0d6b8556be9443397ad1f6030fdc47b1a4a3ebcc63f34cdf4091420aec84b", - "proxy": true, - "implementation": { - "address": "0xAaB195Ed1B445A2A0E357494d9036bC746227AE2", - "creationCodeHash": "0x83bc0b08dbe1a9259666ec209f06223863f7bb9cfbf917a2d4b795c771a727fe", - "runtimeCodeHash": "0xed60261c6dc84ebc16830c36f3ee370a92802601d5a2fe1c3c19f5120dcbc2eb", - "txHash": "0xd4f8780490f63432580e3dd5b2b4d9b39e904e8b4ac5cfd23540658cbafe449d" - } - }, - "L2GraphToken": { - "address": "0x18C924BD5E8b83b47EFaDD632b7178E2Fd36073D", - "initArgs": ["0xEfc519BEd6a43a14f1BBBbA9e796C4931f7A5540"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x7ec14b524141af953959b537c1acbea9b49b12ee906563a6172123b09ab3d1f6", - "proxy": true, - "implementation": { - "address": "0x5dcAcF820D7b9F0640e8a23a5a857675A774C34a", - "creationCodeHash": "0x6c4146427aafa7375a569154be95c8c931bf83aab0315706dd78bdf79c889e4c", - "runtimeCodeHash": "0x004371d1d80011906953dcba17c648503fc94b94e1e0365c8d8c706ff91f93e9", - "txHash": "0xb748498a2ebc90e20dc8da981be832f4e00f08ea9ff289880738705e45d6aeca" - } - }, - "GraphCurationToken": { - "address": "0x2B757ad83e4ed51ecaE8D4dC9AdE8E3Fa29F7BdC", - "creationCodeHash": "0x1ee42ee271cefe20c33c0de904501e618ac4b56debca67c634d0564cecea9ff2", - "runtimeCodeHash": "0x340e8f378c0117b300f3ec255bc5c3a273f9ab5bd2940fa8eb3b5065b21f86dc", - "txHash": "0x1aa753cd01fa4505c71f6866dae35faee723d181141ed91b6e5cf3082ee90f9b" - }, - "ServiceRegistry": { - "address": "0x07ECDD4278D83Cd2425cA86256634f666b659e53", - "initArgs": ["0x7f734E995010Aa8d28b912703093d532C37b6EAb"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x8a13420fdc91139297ab1497fbf5b443c156bbc7b9d2a1ac97fb9f23abde2723", - "proxy": true, - "implementation": { - "address": "0xd18D4B4e84eA4713E04060c93bD079A974BE6C4a", - "creationCodeHash": "0x50808e8cce93cf78a23c9e6dd7984356bd2bd93be30b358982909140dd61f6ff", - "runtimeCodeHash": "0xaef79c87f7e80107c0dc568cf1f8950459b5174ee3aa565ec487556a655e71db", - "txHash": "0x2d6043d89a5f5c4f3d0df0f50264ab7efebc898be0b5d358a00715ba9f657a89" - } - }, - "L2Curation": { - "address": "0x7080AAcC4ADF4b1E72615D6eb24CDdE40a04f6Ca", - "initArgs": [ - "0x7f734E995010Aa8d28b912703093d532C37b6EAb", - "0x71319060b9fdeD6174b6368bE04F9A1b7c9aCe48", - "0x2B757ad83e4ed51ecaE8D4dC9AdE8E3Fa29F7BdC", - "1000000", - "10000", - "1000000000000000000" - ], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x2e5744fa4eca56cf6902e27fcc0509487f39bdb0d29b9eb0181db986235289a0", - "proxy": true, - "implementation": { - "address": "0xDA6c9d39b49c3d41CaC2030c6B75b40Efea09817", - "creationCodeHash": "0xa5fa77df71a72c5aadba812345978c291c5fa1a3a23129b6eba3a38ac85d8b5d", - "runtimeCodeHash": "0x1d265e9f658778b48a0247cfef79bfc9304d1faa1f1e085f2fea85629f68e2d5", - "txHash": "0x815eda87a2599d6f2c7458c7b164e7307d05018f0dd72073a50971d424313377" - } - }, - "SubgraphNFTDescriptor": { - "address": "0x30545f313bD2eb0F85E4f808Ae4D2C016efE78b2", - "creationCodeHash": "0xf16e8ff11d852eea165195ac9e0dfa00f98e48f6ce3c77c469c7df9bf195b651", - "runtimeCodeHash": "0x39583196f2bcb85789b6e64692d8c0aa56f001c46f0ca3d371abbba2c695860f", - "txHash": "0x060839a09e89cbd47adbb8c04cc76b21a00785600a4e8b44939dd928391777e1" - }, - "SubgraphNFT": { - "address": "0x5571D8FE183AD1367dF21eE9968690f0Eabdc593", - "constructorArgs": ["0xEfc519BEd6a43a14f1BBBbA9e796C4931f7A5540"], - "creationCodeHash": "0xc1e58864302084de282dffe54c160e20dd96c6cfff45e00e6ebfc15e04136982", - "runtimeCodeHash": "0x7216e736a8a8754e88688fbf5c0c7e9caf35c55ecc3a0c5a597b951c56cf7458", - "txHash": "0xc11917ffedda6867648fa2cb62cca1df3c0ed485a0a0885284e93a2c5d33455c" - }, - "L2GNS": { - "address": "0x6bf9104e054537301cC23A1023Ca30A6Df79eB21", - "initArgs": [ - "0x7f734E995010Aa8d28b912703093d532C37b6EAb", - "0x71319060b9fdeD6174b6368bE04F9A1b7c9aCe48", - "0x5571D8FE183AD1367dF21eE9968690f0Eabdc593" - ], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x3c2509730e06249d970818319bb507185d4fdea13d5600cef87928a718950c19", - "proxy": true, - "implementation": { - "address": "0x80A6500EFD52C66820dB0E8014088B4eBf8B8f52", - "creationCodeHash": "0xd2aa0d4e2d6ca8d0b2067d249d3202a340b13291a65e23c46f5c04df703bfc0e", - "runtimeCodeHash": "0xa88669e10cde56141250596f6f034629b1bf55086a3ed21ebb0e2bd3b3fca991", - "txHash": "0x3bb004adf949e9c896e85f6e3124ecea0c223470e3a091e42539613d52679c4d" - } - }, - "L2Staking": { - "address": "0xcd549d0C43d915aEB21d3a331dEaB9B7aF186D26", - "initArgs": [ - "0x7f734E995010Aa8d28b912703093d532C37b6EAb", - "100000000000000000000000", - "6646", - "10000", - "100000", - "2", - "4", - "12", - "16", - "77", - "100" - ], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0xc98ebdd0a80b97ef8f6305903ef6496a7781db76a5b1b3c3c3b2b10dbd9a7af5", - "proxy": true, - "implementation": { - "address": "0x75CeE6C9EE7c03Ba7cAd82E98FFB57672d7caeBc", - "creationCodeHash": "0x3fd633cabdb4545d667b8e188b5fe8b6326bfd4a8809908f77b7e447c46a22e8", - "runtimeCodeHash": "0x54ba28cc34f7e24b9e1a8e8595f9ecfe4bb7ad70c226444b7a9aa3d26589bbc7", - "txHash": "0x357ab1915642f845527a136aa654c0c18cb43dbb79d4fe297fdf8210fb30082e", - "libraries": { - "LibExponential": "0xdE74fcD55A1E3829EC4FE934f5776bC14bc99917" - } - } - }, - "RewardsManager": { - "address": "0x5F06ABd1CfAcF7AE99530D7Fed60E085f0B15e8D", - "initArgs": ["0x7f734E995010Aa8d28b912703093d532C37b6EAb"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0xd4cfa95475e9e867fb24babd6a00a5b6b01d2267533e2412986aa1ff94d51c02", - "proxy": true, - "implementation": { - "address": "0x87f2fAb2C8c422AE0f866D004207fa65bdfD2df2", - "creationCodeHash": "0x59c1680da2d19124daaf95fd66acc5eae68e6f46dfe2ff0b3ccb777daf9949b2", - "runtimeCodeHash": "0xe33080183ec49ab1ec8d78b80b90158f0f3ac6f2deedf6115a32a9d11d3e4d9b", - "txHash": "0xac157ea27b57c36ae336768aef9cd8f74d39b13ff621cd18683db544804b5a3c" - } - }, - "DisputeManager": { - "address": "0x16DEF7E0108A5467A106dbD7537f8591f470342E", - "initArgs": [ - "0x7f734E995010Aa8d28b912703093d532C37b6EAb", - "0xF89688d5d44d73cc4dE880857A3940487076e5A4", - "10000000000000000000000", - "500000", - "25000", - "25000" - ], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x70188c9243c2226ac793ac8c0a9eecd76c9b44e53f7f6f97fa177a34808421a0", - "proxy": true, - "implementation": { - "address": "0x39aEdA1d6ea3B62b76C7c439beBfFCb5369a175C", - "creationCodeHash": "0x2e77ad7a1627b6e04bece0fe18b3ab543ef4a2d6914f2e5e640b2c8175aca3a8", - "runtimeCodeHash": "0x0186afe711eff4ceea28620d091e3c6034fd15be05894119c74a38b020e3a554", - "txHash": "0x4efbd28e55866c0292309964f47bd805922ad417e5980e14e055ad693024582d" - } - }, - "AllocationExchange": { - "address": "0x61809D6Cde07f27D2fcDCb67a42d0Af1988Be5e8", - "constructorArgs": [ - "0x18C924BD5E8b83b47EFaDD632b7178E2Fd36073D", - "0xcd549d0C43d915aEB21d3a331dEaB9B7aF186D26", - "0x05F359b1319f1Ca9b799CB6386F31421c2c49dBA", - "0xD06f366678AE139a94b2AaC2913608De568F1D03" - ], - "creationCodeHash": "0x96c5b59557c161d80f1617775a7b9537a89b0ecf2258598b3a37724be91ae80a", - "runtimeCodeHash": "0xed3d9cce65ddfa8a237d4d7d294ffdb13a082e0adcda3bbd313029cfae1365f3", - "txHash": "0x1df63329a21dca69d20e03c076dd89c350970d35319eeefab028cebbc78d29dc" - }, - "L2GraphTokenGateway": { - "address": "0xef2757855d2802bA53733901F90C91645973f743", - "initArgs": ["0x7f734E995010Aa8d28b912703093d532C37b6EAb"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x47bde4e3ad0bc077897a3de65058c4b7dd710aa447ec25942f716321cbdc590d", - "proxy": true, - "implementation": { - "address": "0xc68cd0d2ca533232Fd86D6e48b907338B2E0a74A", - "creationCodeHash": "0xbd52455bd8b14bfc27af623388fe2f9e06ddd4c4be3fc06c51558a912de91770", - "runtimeCodeHash": "0x29e47f693053f978d6b2ac0a327319591bf5b5e8a6e6c0744b8afcc0250bf667", - "txHash": "0xf68a5e1e516ee9a646f19bbe4d58336fdfcf5fc859f84cdac5e68b00bcd3a09a" - } - }, - "IEthereumDIDRegistry": { - "address": "0x8FFfcD6a85D29E9C33517aaf60b16FE4548f517E" - }, - "StakingExtension": { - "address": "0x5c54fB391003bef3002A79C656a29F09C59E2795", - "creationCodeHash": "0xe23c59dbfb94b0cf7ef58f654b905977624ce57eaae2fce692edb28ca3f1b3ba", - "runtimeCodeHash": "0xca8ad20187bc87e0e04a15184f529787dd23a0095047d411e1b271617a951c49", - "txHash": "0x69eca0ff395bb348cc8d29bb1681afe24515f618bce9a093ad5a02140e15b867" - } - }, "421614": { "HorizonStaking": { "address": "0xFf2Ee30de92F276018642A59Fb7Be95b3F9088Af" @@ -1118,7 +106,10 @@ }, "L2GNS": { "address": "0x3133948342F35b8699d8F94aeE064AbB76eDe965", - "initArgs": ["0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", "0xF21Df5BbA7EB9b54D8F60C560aFb9bA63e6aED1A"], + "initArgs": [ + "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695", + "0xF21Df5BbA7EB9b54D8F60C560aFb9bA63e6aED1A" + ], "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", "txHash": "0x137140783a99a3e9a60048d607124626ca87e2b972e8cc05efb41ac87c3cbcc4", @@ -1231,229 +222,5 @@ "runtimeCodeHash": "0x5f396ffd54b6cd6b3faded0f366c5d7e148cc54743926061be2dfd12a75391de", "txHash": "0x2cefbc169b8ae51c263d0298956d86a397b05f11f076b71c918551f63fe33784" } - }, - "11155111": { - "GraphProxyAdmin": { - "address": "0xe2011488ea6B02692Ee58717698aecDdfBf4756F", - "creationCodeHash": "0x68b304ac6bce7380d5e0f6b14a122f628bffebcc75f8205cb60f0baf578b79c3", - "runtimeCodeHash": "0x8d9ba87a745cf82ab407ebabe6c1490197084d320efb6c246d94bcc80e804417", - "txHash": "0x104f9104e7364f3605b1522c017aa8302344a689c059e58ad43c6cc6cd9f4e2a" - }, - "BancorFormula": { - "address": "0x56b9f17D3Ca520b229F56D13a988dFAE9924C91E", - "creationCodeHash": "0x7ae36017eddb326ddd79c7363781366121361d42fdb201cf57c57424eede46f4", - "runtimeCodeHash": "0xed6701e196ad93718e28c2a2a44d110d9e9906085bcfe4faf4f6604b08f0116c", - "txHash": "0xb32bbff4bdf106e1f02ea826c0c412d66e2e081acd43aaba5f75676c28f969a2" - }, - "Controller": { - "address": "0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C", - "creationCodeHash": "0x5bde9a87bc4e8dd24d41900f0a19321c1dc6d3373d51bba093b130bb5b80a677", - "runtimeCodeHash": "0x7f0479db1d60ecf6295d92ea2359ebdd223640795613558b0594680f5d4922c9", - "txHash": "0xe9ab682c6d6b68d5f99d5253c8a6201f9b9f352dac337579d8ddeff6d9738f50" - }, - "EpochManager": { - "address": "0x3C39036a76104D7c6D3eF13a21477C0fE23A3Aa2", - "initArgs": ["0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C", "554"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0xc44a6798882df720a50df98fa0daa3ad32641afc18cb054047a44bcbf5e54dae", - "proxy": true, - "implementation": { - "address": "0xA1af9300209cc60de6Ce39752d57F04AB7E29432", - "creationCodeHash": "0x9947bd0a1f46027123b8fb4aec8b11af540aea587eb79642475d57b4e347078f", - "runtimeCodeHash": "0xe45a27197726de0e3149014823794708edd432ee56ec8358554c0d2365674ca0", - "txHash": "0x5f8205a69175903cafb8d688578c01b2fbcdaf970102194994851af7d2ace4d8" - } - }, - "GraphToken": { - "address": "0xCA59cCeb39bE1808d7aA607153f4A5062daF3a83", - "constructorArgs": ["10000000000000000000000000000"], - "creationCodeHash": "0x9c50586e9e305b3a299f1cdf92ca9bb04fad5f43b5e0f7505054d79783fd8b69", - "runtimeCodeHash": "0xfe612acbb09bdb23fe60014e890054621fd34d74bf12bd94fb73351d474cd641", - "txHash": "0xe034493538c9604e629129ede83a4298ec9fd97d5c8b2e1be67c01877464effe" - }, - "GraphCurationToken": { - "address": "0xE04cE530c532538F1F63cA911849925425C2A1Aa", - "creationCodeHash": "0x1ee42ee271cefe20c33c0de904501e618ac4b56debca67c634d0564cecea9ff2", - "runtimeCodeHash": "0x340e8f378c0117b300f3ec255bc5c3a273f9ab5bd2940fa8eb3b5065b21f86dc", - "txHash": "0xe5684e296859ae9ef5662ef1a16d520e201253d51d8068ddb07c94aa17b1f217" - }, - "ServiceRegistry": { - "address": "0x0Ee47634c94E6606f67301b3A868319073CB0FC2", - "initArgs": ["0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0xe60ff360c1a53a81aea3c26213a41c3335bd9e93928df504276e69911255bbb7", - "proxy": true, - "implementation": { - "address": "0xe4484C9c5F18482d4c2E2f3BB0639f092922D97a", - "creationCodeHash": "0xec9cb879003a06609541ad87efd4bc5dfc8ea60e4e77cfa5ae2cb5208742e7bc", - "runtimeCodeHash": "0x5161b534164413a88d851832f9c9d1dd1bca32fe2bbb62bb35d112c1dc8b69ab", - "txHash": "0x5dead3a8e67425b461bf0167bbe6a1e48232d1ce04d213c7e8ed173cff4019b8" - } - }, - "Curation": { - "address": "0x77A6e5F2f13218B33A97Aec56d591dB18D60FFb1", - "initArgs": [ - "0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C", - "0x56b9f17D3Ca520b229F56D13a988dFAE9924C91E", - "0xE04cE530c532538F1F63cA911849925425C2A1Aa", - "500000", - "10000", - "1000000000000000000" - ], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x5cd28f416034ea0fe8dcf3fe31661128a7103678ce60f1385ff843cc7b3314f8", - "proxy": true, - "implementation": { - "address": "0x54C6639e45F9Eb5Ab55A370d4071e77e5f1b9FF6", - "creationCodeHash": "0x666b377dfbba2be2e9cda6f1a1297819aae39b6571935a9f65314435f1cbd943", - "runtimeCodeHash": "0xbca44d6f233be6574d7db9cf0d0db09697d9ad6f36e69d5d9e22ad7004e83c51", - "txHash": "0x92bb03a530c6a3d33974c783bc3560a3e3c68910a48c951029d052d4234c02bd" - } - }, - "SubgraphNFTDescriptor": { - "address": "0xC9b2011A082d75c01C5C3eEA132f29ebaD182BD5", - "creationCodeHash": "0xf16e8ff11d852eea165195ac9e0dfa00f98e48f6ce3c77c469c7df9bf195b651", - "runtimeCodeHash": "0x39583196f2bcb85789b6e64692d8c0aa56f001c46f0ca3d371abbba2c695860f", - "txHash": "0xd191fe32ca3538322628fcea353becca0eee1e4855c265552a54682e1c44541f" - }, - "SubgraphNFT": { - "address": "0x120005c38D2624Ef70185fEf3a051Dd57b27a491", - "constructorArgs": ["0x559081D91F5Ff43dfE51A07C216F8E6893805B35"], - "creationCodeHash": "0xc1e58864302084de282dffe54c160e20dd96c6cfff45e00e6ebfc15e04136982", - "runtimeCodeHash": "0x7216e736a8a8754e88688fbf5c0c7e9caf35c55ecc3a0c5a597b951c56cf7458", - "txHash": "0x67192875a3b846c1ff81e5fcaa5fde0f9948834bec3b11fef4d5bb2ab4226fa2" - }, - "L1GNS": { - "address": "0x5461D48556B94e7fdD8ED5A8f865Ba4F1A3b5454", - "initArgs": ["0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C", "0x120005c38D2624Ef70185fEf3a051Dd57b27a491"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0xf92078845db80bcb42a1cf8d8fe230a9e3c86cc6f66e15c8a81368e5fad42885", - "proxy": true, - "implementation": { - "address": "0x4Ac3832d773FE6B6dcC8EB6241B83212F1a55096", - "creationCodeHash": "0xad517d289662731ecf3e0341e1612dc51bd6b63993f78057e17e1f9654740879", - "runtimeCodeHash": "0x3143b8a44a2a8e6590a85580ddf69baf87012d8865fa20fac25bbdfda5d5648e", - "txHash": "0x999f9af5e1e25a4558a315ebe76e7808bf0afa99fc97694a01c73d0a1eef060a" - } - }, - "StakingExtension": { - "address": "0x3fF97b5bdC1D46B0bbD1a3166F232683470a0ce3", - "creationCodeHash": "0xe23c59dbfb94b0cf7ef58f654b905977624ce57eaae2fce692edb28ca3f1b3ba", - "runtimeCodeHash": "0xca8ad20187bc87e0e04a15184f529787dd23a0095047d411e1b271617a951c49", - "txHash": "0x060e4f03881b4e1cf03be197ec3533b43a1a550a74f8adbdaba829f867a761ae" - }, - "L1Staking": { - "address": "0x14e9B07Dc56A0B03ac8A58453B5cCCB289d6ec90", - "initArgs": [ - "0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C", - "100000000000000000000000", - "6646", - "10000", - "100000", - "4", - "12", - "16", - "100,100,60,100", - "0x3fF97b5bdC1D46B0bbD1a3166F232683470a0ce3" - ], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0xe766e786e2d2f1c0af821c785178915e98f4251832bf523540d0e4ff93212a6f", - "proxy": true, - "implementation": { - "address": "0x88aec82f14002a56014819f4e23a22eB32F528b1", - "creationCodeHash": "0x8244555e05aae22fb53a3c3f8717b83d26306748faccc9e9828d43ceaa4b9e67", - "runtimeCodeHash": "0x33ecbc61c2f077b9cc37d5f3d4f6863f576e31ffaa310630ec0a89dd9a8fa940", - "txHash": "0xa56f2052e6c761c12a24459949320e5c11c56219c00a78821505f35bd023c573", - "libraries": { - "LibExponential": "0xc63d7df28b01e6f20b17834B106948baEbF04441" - } - } - }, - "RewardsManager": { - "address": "0x175f483AfAB4Fc52A6E07F9e9d46C90eB95941b5", - "initArgs": ["0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x6b128afe0d58657c7df7ef6d86a997d3767b166afb671406999ccc69d6c72a61", - "proxy": true, - "implementation": { - "address": "0x3a7382e41d56f6085fcdE56546884ecfcCe8e949", - "creationCodeHash": "0x59c1680da2d19124daaf95fd66acc5eae68e6f46dfe2ff0b3ccb777daf9949b2", - "runtimeCodeHash": "0xe33080183ec49ab1ec8d78b80b90158f0f3ac6f2deedf6115a32a9d11d3e4d9b", - "txHash": "0x3666a68a84e1e2175e45862da197a122439c6f3d7c35f795914bd52fc0c1da3b" - } - }, - "DisputeManager": { - "address": "0x1Da0DF3435cde4199650D35690E3B0885dfc38B1", - "initArgs": [ - "0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C", - "0xd6ff9e98F0Fd99ccB658832F586e23F4D8Cb8Bad", - "10000000000000000000000", - "500000", - "25000", - "25000" - ], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0xd19578ab4bc280cfc890cc2f9b29bc57a8153cc879bbd22ab4202197078286ab", - "proxy": true, - "implementation": { - "address": "0x38d343aBB283452a6855572F6343193A8799Ef7e", - "creationCodeHash": "0x9d7257851678e3a0bd8ef74c219c314de490ebe91e6263129a3030d841dfc74b", - "runtimeCodeHash": "0xe490c3ae892d23d6ebed61a6081d70045ee6618f5196f25c28e6d7d66f798fee", - "txHash": "0xe6a215fe9ed86e23b7fad7b40938500ba64292f5c17b771ace1b00d4d2cd8c25" - } - }, - "AllocationExchange": { - "address": "0xd49670f70f68F7dc62c8B287F6388d250C5487E2", - "constructorArgs": [ - "0xCA59cCeb39bE1808d7aA607153f4A5062daF3a83", - "0x14e9B07Dc56A0B03ac8A58453B5cCCB289d6ec90", - "0x4EBf30832eC2db76aE228D5d239083B59f530d1f", - "0x840daec5dF962D49cf2EFd789c4E40A7b7e0117D" - ], - "creationCodeHash": "0x2963baeedb2d0f5a95fa41f6c89e48e5bf177ca439379fc6becd54870d330ab0", - "runtimeCodeHash": "0x9463db858ad818a01e751412460a5c8e6b249dd92ec564a7d0ef9663eaad3e33", - "txHash": "0x760473d4ea2805869979650079788d553dc9fe8e871764ea1c994c194239bf3e" - }, - "L1GraphTokenGateway": { - "address": "0x549DCB0b510Ee7C8d6E8e346ab9aC75E22DD78B3", - "initArgs": ["0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0x098fb600073aa336154343c9f6f565e190e28792a357c69235b06fc86e2bc9fe", - "proxy": true, - "implementation": { - "address": "0xF1De736CcBb1a37591f7fCA4CA415932a4a8d632", - "creationCodeHash": "0xf21eb0fd5bf5a54dd522b653f6c1da315876355e1e90fedeb08b1fe94f1b54d9", - "runtimeCodeHash": "0xe2964bc67225afc1c732a4216824911ad847bbe8f2188c835e25c2b255c69685", - "txHash": "0xcadae13c0f824e387a3ae07f6929258d5540b3e909f231bba6aca7f70d0558be" - } - }, - "BridgeEscrow": { - "address": "0x428Ab6E9EeF41Dc5098a34a6993Cdd5Be5BA24a6", - "initArgs": ["0xf53B3910ecaeED1Aac4Bb5Ba9840d25E36e52b7C"], - "creationCodeHash": "0xcdd28bb3db05f1267ca0f5ea29536c61841be5937ce711b813924f8ff38918cc", - "runtimeCodeHash": "0x4ca8c37c807bdfda1d6dcf441324b7ea14c6ddec5db37c20c2bf05aeae49bc0d", - "txHash": "0xb4a922195600c6291cd485f1e98d0bb1f1c25673759015f512e16f53ab9e7665", - "proxy": true, - "implementation": { - "address": "0x4F1aBAa9ec53c2E5d4902Edd099C74B2d8a0aAdD", - "creationCodeHash": "0x27276d0e03aa52bfd4664ca5608cb3fac28fa42034c0d859d06dbc4174342192", - "runtimeCodeHash": "0x796b2cef94bab38e2cc4f82fef882d4c3441ef229329468d46fa72e1fd74be4a", - "txHash": "0xbadc145e826c54b4a4a0263701a29d6ecd11f8c6533c0d8e1cfe5422321d55f6" - } - }, - "EthereumDIDRegistry": { - "address": "0xDe57D27e530c99bDa15Fe231B8C632E4a37E7343", - "creationCodeHash": "0x20cd202f7991716a84c097da5fbd365fd27f7f35f241f82c529ad7aba18b814b", - "runtimeCodeHash": "0x5f396ffd54b6cd6b3faded0f366c5d7e148cc54743926061be2dfd12a75391de", - "txHash": "0x8f3c9ae70242ed54c51a8f22c8d97f3ebc34cd65ccc4cc87054637b47610cf3a" - } } } diff --git a/packages/subgraph-service/addresses.json b/packages/subgraph-service/addresses.json new file mode 100644 index 000000000..0fb2088ec --- /dev/null +++ b/packages/subgraph-service/addresses.json @@ -0,0 +1,34 @@ +{ + "421614": { + "SubgraphService": { + "address": "0x2268247782f4b7AdB2DA810EFD6e43B27a37af54" + }, + "DisputeManager": { + "address": "0x8e436E815226C8Bd5e775C7FF693DAe6a94bE7d1" + }, + "ServiceRegistry": { + "address": "0x888541878CbDDEd880Cd58c728f1Af5C47343F86", + "proxy": true, + "implementation": { + "address": "0x05E732280bf9F37054346Cb83f5Fd58C5B44F6A8" + } + }, + "L2Curation": { + "address": "0xDe761f075200E75485F4358978FB4d1dC8644FD5", + "proxy": true, + "implementation": { + "address": "0xd90022aB67920212D0F902F5c427DE82732DE136" + } + }, + "SubgraphNFT": { + "address": "0xF21Df5BbA7EB9b54D8F60C560aFb9bA63e6aED1A" + }, + "L2GNS": { + "address": "0x3133948342F35b8699d8F94aeE064AbB76eDe965", + "proxy": true, + "implementation": { + "address": "0x00CBF5024d454255577Bf2b0fB6A43328a6828c9" + } + } + } +} diff --git a/packages/subgraph-service/hardhat.config.ts b/packages/subgraph-service/hardhat.config.ts index a1158bb8b..39f10d49b 100644 --- a/packages/subgraph-service/hardhat.config.ts +++ b/packages/subgraph-service/hardhat.config.ts @@ -5,6 +5,7 @@ import 'hardhat-contract-sizer' import 'hardhat-storage-layout' import 'hardhat-secure-accounts' import 'solidity-docgen' +import 'hardhat-graph-protocol' import { HardhatUserConfig } from 'hardhat/config' @@ -35,9 +36,16 @@ const config: HardhatUserConfig = { }, }, arbitrumSepolia: { + chainId: 421614, url: 'https://sepolia-rollup.arbitrum.io/rpc', }, }, + graph: { + deployments: { + horizon: require.resolve('@graphprotocol/horizon/addresses.json'), + subgraphService: 'addresses.json', + }, + }, } export default config diff --git a/packages/subgraph-service/package.json b/packages/subgraph-service/package.json index f9094be53..c3dba042c 100644 --- a/packages/subgraph-service/package.json +++ b/packages/subgraph-service/package.json @@ -4,6 +4,12 @@ "description": "", "author": "The Graph core devs", "license": "GPL-2.0-or-later", + "types": "typechain-types/index.ts", + "files": [ + "build/contracts/**/*", + "README.md", + "addresses.json" + ], "scripts": { "lint:ts": "eslint '**/*.{js,ts}' --fix", "lint:sol": "prettier --write contracts/**/*.sol && solhint --noPrompt --fix contracts/**/*.sol --config node_modules/solhint-graph-config/index.js", @@ -38,6 +44,7 @@ "hardhat": "^2.20.1", "hardhat-contract-sizer": "^2.10.0", "hardhat-gas-reporter": "^1.0.8", + "hardhat-graph-protocol": "workspace:^0.0.1", "hardhat-secure-accounts": "^1.0.4", "hardhat-storage-layout": "^0.1.7", "lint-staged": "^15.2.2", diff --git a/packages/subgraph-service/tsconfig.json b/packages/subgraph-service/tsconfig.json index 8de96f814..06c7ed638 100644 --- a/packages/subgraph-service/tsconfig.json +++ b/packages/subgraph-service/tsconfig.json @@ -10,6 +10,7 @@ }, "include": [ "hardhat.config.ts", + "types/**/*.ts", "scripts/**/*.ts", "test/**/*.ts", "ignition/**/*.ts", diff --git a/packages/subgraph-service/types/hardhat-graph-protocol.d.ts b/packages/subgraph-service/types/hardhat-graph-protocol.d.ts new file mode 100644 index 000000000..ab3c30b4b --- /dev/null +++ b/packages/subgraph-service/types/hardhat-graph-protocol.d.ts @@ -0,0 +1,45 @@ +// TypeScript does not resolve correctly the type extensions when they are symlinked from the same monorepo. +// So we need to re-type it... this file should be a copy of hardhat-graph-protocol/src/type-extensions.ts +import 'hardhat/types/config' +import 'hardhat/types/runtime' +import type { GraphDeployments, GraphRuntimeEnvironment, GraphRuntimeEnvironmentOptions } from 'hardhat-graph-protocol/src/types' + +declare module 'hardhat/types/runtime' { + interface HardhatRuntimeEnvironment { + graph: (opts?: GraphRuntimeEnvironmentOptions) => GraphRuntimeEnvironment + } +} + +declare module 'hardhat/types/config' { + interface HardhatConfig { + graph: GraphRuntimeEnvironmentOptions + } + + interface HardhatUserConfig { + graph: GraphRuntimeEnvironmentOptions + } + + interface HardhatNetworkConfig { + deployments?: GraphDeployments + } + + interface HardhatNetworkUserConfig { + deployments?: GraphDeployments + } + + interface HttpNetworkConfig { + deployments?: GraphDeployments + } + + interface HttpNetworkUserConfig { + deployments?: GraphDeployments + } + + interface ProjectPathsConfig { + graph?: string + } + + interface ProjectPathsUserConfig { + graph?: string + } +} diff --git a/yarn.lock b/yarn.lock index ce5384ed2..8abf407bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3019,7 +3019,7 @@ __metadata: languageName: unknown linkType: soft -"@graphprotocol/subgraph-service@workspace:packages/subgraph-service": +"@graphprotocol/subgraph-service@workspace:^0.0.1, @graphprotocol/subgraph-service@workspace:packages/subgraph-service": version: 0.0.0-use.local resolution: "@graphprotocol/subgraph-service@workspace:packages/subgraph-service" dependencies: @@ -3048,6 +3048,7 @@ __metadata: hardhat: "npm:^2.20.1" hardhat-contract-sizer: "npm:^2.10.0" hardhat-gas-reporter: "npm:^1.0.8" + hardhat-graph-protocol: "workspace:^0.0.1" hardhat-secure-accounts: "npm:^1.0.4" hardhat-storage-layout: "npm:^0.1.7" lint-staged: "npm:^15.2.2" @@ -14380,6 +14381,7 @@ __metadata: dependencies: "@graphprotocol/contracts": "workspace:^7.0.0" "@graphprotocol/horizon": "workspace:^0.0.1" + "@graphprotocol/subgraph-service": "workspace:^0.0.1" "@nomicfoundation/hardhat-ethers": "npm:^3.0.8" "@types/chai": "npm:^4.0.0" "@types/debug": "npm:^4.1.12" From 1ce1a1725b02fe3337768b12f90b3b0036a8cf40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Tue, 26 Nov 2024 11:50:27 -0300 Subject: [PATCH 7/9] ci: fix circular dependency in build stage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- package.json | 2 +- packages/hardhat-graph-protocol/package.json | 1 + packages/horizon/hardhat.config.ts | 5 ++- packages/horizon/package.json | 4 +-- packages/subgraph-service/hardhat.config.ts | 5 ++- packages/subgraph-service/package.json | 4 +-- scripts/build | 32 ++++++++++++++++++++ 7 files changed, 46 insertions(+), 7 deletions(-) create mode 100755 scripts/build diff --git a/package.json b/package.json index eb94a1de7..d1e0f60d8 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "postinstall": "husky install", "clean": "yarn workspaces foreach --all --parallel --verbose run clean", "clean:all": "yarn clean && rm -rf node_modules packages/*/node_modules", - "build": "yarn workspaces foreach --all --verbose run build", + "build": "chmod +x ./scripts/build && ./scripts/build", "lint": "yarn workspaces foreach --all --parallel --verbose run lint", "test": "yarn workspaces foreach --all --parallel --verbose --interlaced run test" }, diff --git a/packages/hardhat-graph-protocol/package.json b/packages/hardhat-graph-protocol/package.json index f5752731e..b71d8620b 100644 --- a/packages/hardhat-graph-protocol/package.json +++ b/packages/hardhat-graph-protocol/package.json @@ -17,6 +17,7 @@ "types": "dist/src/index.d.ts", "scripts": { "build": "tsc", + "clean": "rm -rf dist", "lint": "eslint '**/*.{js,ts}' --fix", "test": "mocha --exit --recursive 'test/**/*.test.ts'", "prepublishOnly": "npm run build" diff --git a/packages/horizon/hardhat.config.ts b/packages/horizon/hardhat.config.ts index dca9b466a..41c92d1b9 100644 --- a/packages/horizon/hardhat.config.ts +++ b/packages/horizon/hardhat.config.ts @@ -4,10 +4,13 @@ import '@nomicfoundation/hardhat-ignition-ethers' import 'hardhat-storage-layout' import 'hardhat-contract-sizer' import 'hardhat-secure-accounts' -import 'hardhat-graph-protocol' import type { HardhatUserConfig } from 'hardhat/config' +if (process.env.BUILD_RUN !== 'true') { + require('hardhat-graph-protocol') +} + const config: HardhatUserConfig = { solidity: { version: '0.8.27', diff --git a/packages/horizon/package.json b/packages/horizon/package.json index e2363022a..dddb07b13 100644 --- a/packages/horizon/package.json +++ b/packages/horizon/package.json @@ -14,8 +14,8 @@ "lint:ts": "eslint '**/*.{js,ts}' --fix", "lint:sol": "prettier --write contracts/**/*.sol && solhint --noPrompt --fix contracts/**/*.sol --config node_modules/solhint-graph-config/index.js", "lint": "yarn lint:ts && yarn lint:sol", - "clean": "rm -rf build cache typechain-types", - "build": "forge build && hardhat compile", + "clean": "rm -rf build dist cache cache_forge typechain-types", + "build": "forge build --skip test && SKIP_LOAD=true hardhat compile", "test": "forge test && hardhat test" }, "devDependencies": { diff --git a/packages/subgraph-service/hardhat.config.ts b/packages/subgraph-service/hardhat.config.ts index 39f10d49b..4db905141 100644 --- a/packages/subgraph-service/hardhat.config.ts +++ b/packages/subgraph-service/hardhat.config.ts @@ -5,10 +5,13 @@ import 'hardhat-contract-sizer' import 'hardhat-storage-layout' import 'hardhat-secure-accounts' import 'solidity-docgen' -import 'hardhat-graph-protocol' import { HardhatUserConfig } from 'hardhat/config' +if (process.env.BUILD_RUN !== 'true') { + require('hardhat-graph-protocol') +} + const config: HardhatUserConfig = { solidity: { version: '0.8.27', diff --git a/packages/subgraph-service/package.json b/packages/subgraph-service/package.json index c3dba042c..7b3458117 100644 --- a/packages/subgraph-service/package.json +++ b/packages/subgraph-service/package.json @@ -14,8 +14,8 @@ "lint:ts": "eslint '**/*.{js,ts}' --fix", "lint:sol": "prettier --write contracts/**/*.sol && solhint --noPrompt --fix contracts/**/*.sol --config node_modules/solhint-graph-config/index.js", "lint": "yarn lint:ts && yarn lint:sol", - "clean": "rm -rf build cache typechain-types", - "build": "forge build && hardhat compile", + "clean": "rm -rf build dist cache cache_forge typechain-types", + "build": "forge build --skip test && SKIP_LOAD=true hardhat compile", "test": "forge test && hardhat test" }, "devDependencies": { diff --git a/scripts/build b/scripts/build new file mode 100755 index 000000000..c8331ab9a --- /dev/null +++ b/scripts/build @@ -0,0 +1,32 @@ +#!/bin/bash + +# List of packages to build - order matters! +packages=( + "packages/eslint-graph-config" + # "packages/solhint-graph-config" -- disabled since it doesn't have a build script + # "packages/solhint-plugin-graph" -- disabled since it doesn't have a build script + "packages/contracts" + "packages/horizon" + "packages/subgraph-service" + "packages/hardhat-graph-protocol" + "packages/data-edge" + "packages/sdk" + "packages/token-distribution" +) + +for package in "${packages[@]}"; do + echo -e "\n\n==== Building $package..." + + cd "$package" || { echo "Failed to navigate to $package"; exit 1; } + + if BUILD_RUN=true yarn build; then + echo "Successfully built $package" + else + echo "Build failed for $package" >&2 + exit 1 + fi + + cd - > /dev/null +done + +echo "All packages built successfully!" From 5026fbb7e9064d40b7fcba8707172f8922dd1541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Tue, 26 Nov 2024 11:57:22 -0300 Subject: [PATCH 8/9] fix: build scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- packages/horizon/package.json | 2 +- packages/subgraph-service/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/horizon/package.json b/packages/horizon/package.json index dddb07b13..99966ddb1 100644 --- a/packages/horizon/package.json +++ b/packages/horizon/package.json @@ -15,7 +15,7 @@ "lint:sol": "prettier --write contracts/**/*.sol && solhint --noPrompt --fix contracts/**/*.sol --config node_modules/solhint-graph-config/index.js", "lint": "yarn lint:ts && yarn lint:sol", "clean": "rm -rf build dist cache cache_forge typechain-types", - "build": "forge build --skip test && SKIP_LOAD=true hardhat compile", + "build": "forge build --skip test && BUILD_RUN=true hardhat compile", "test": "forge test && hardhat test" }, "devDependencies": { diff --git a/packages/subgraph-service/package.json b/packages/subgraph-service/package.json index 7b3458117..9fcee897d 100644 --- a/packages/subgraph-service/package.json +++ b/packages/subgraph-service/package.json @@ -15,7 +15,7 @@ "lint:sol": "prettier --write contracts/**/*.sol && solhint --noPrompt --fix contracts/**/*.sol --config node_modules/solhint-graph-config/index.js", "lint": "yarn lint:ts && yarn lint:sol", "clean": "rm -rf build dist cache cache_forge typechain-types", - "build": "forge build --skip test && SKIP_LOAD=true hardhat compile", + "build": "forge build --skip test && BUILD_RUN=true hardhat compile", "test": "forge test && hardhat test" }, "devDependencies": { From 8f3e0f1a5869f0baab15c6723cafa11e4122e199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Tue, 26 Nov 2024 12:33:07 -0300 Subject: [PATCH 9/9] fix: build steps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- .github/workflows/ci-horizon.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-horizon.yml b/.github/workflows/ci-horizon.yml index 159ca7b4d..056e692bb 100644 --- a/.github/workflows/ci-horizon.yml +++ b/.github/workflows/ci-horizon.yml @@ -24,10 +24,26 @@ jobs: submodules: recursive - name: Set up environment uses: ./.github/actions/setup - - name: Build + - name: Build contracts + run: | + pushd packages/contracts + yarn build + popd + - name: Build horizon run: | pushd packages/horizon yarn build + popd + - name: Build subgraph service + run: | + pushd packages/subgraph-service + yarn build + popd + - name: Build hardhat-graph-protocol + run: | + pushd packages/hardhat-graph-protocol + yarn build + popd - name: Run tests run: | pushd packages/horizon