Skip to content

Commit c21e43f

Browse files
committed
fix: merge fixes
Signed-off-by: Tomás Migone <[email protected]>
1 parent 297b08d commit c21e43f

File tree

5 files changed

+1487
-113
lines changed

5 files changed

+1487
-113
lines changed

packages/horizon/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
Graph Horizon is the next evolution of the Graph Protocol.
44

5+
## Configuration
6+
7+
The following environment variables might be required:
8+
9+
- `ETHERSCAN_API_KEY`: Etherscan API key
10+
11+
You can set them using Hardhat:
12+
13+
```bash
14+
npx hardhat vars set ETHERSCAN_API_KEY
15+
```
16+
517
## Deployment
618

719
We use Hardhat Ignition to deploy the contracts. To build and deploy Graph Horizon run the following commands:

packages/horizon/hardhat.config.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1+
import { vars } from 'hardhat/config'
2+
import type { HardhatUserConfig } from 'hardhat/config'
3+
4+
// Hardhat plugins
15
import '@nomicfoundation/hardhat-foundry'
26
import '@nomicfoundation/hardhat-toolbox'
37
import '@nomicfoundation/hardhat-ignition-ethers'
48
import '@tenderly/hardhat-tenderly'
59
import 'hardhat-storage-layout'
610
import 'hardhat-contract-sizer'
711
import 'hardhat-secure-accounts'
8-
import * as dotenv from 'dotenv'
9-
10-
import type { HardhatUserConfig } from 'hardhat/config'
1112

12-
dotenv.config()
13+
// Environment variables
14+
const ETHERSCAN_API_KEY = vars.get('ETHERSCAN_API_KEY', '')
15+
const ARBITRUM_VIRTUAL_TESTNET_URL = vars.get('ARBITRUM_VIRTUAL_TESTNET_URL', '')
1316

1417
const getNetworkAccounts = () => {
1518
const accounts: string[] = []
@@ -57,7 +60,7 @@ const config: HardhatUserConfig = {
5760
enabled: false,
5861
},
5962
chainId: 421615,
60-
url: process.env.ARBITRUM_VIRTUAL_TESTNET_URL || '',
63+
url: ARBITRUM_VIRTUAL_TESTNET_URL,
6164
accounts: getNetworkAccounts(),
6265
},
6366
},
@@ -74,7 +77,7 @@ const config: HardhatUserConfig = {
7477
},
7578
etherscan: {
7679
apiKey: {
77-
arbitrumSepolia: process.env.ETHERSCAN_API_KEY ?? '',
80+
arbitrumSepolia: ETHERSCAN_API_KEY,
7881
},
7982
customChains: [
8083
{

packages/horizon/ignition/modules/core/HorizonProxies.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ export default buildModule('HorizonProxies', (m) => {
1818
const isMigrate = m.getParameter('isMigrate', false)
1919

2020
// Deploy HorizonStaking proxy without an implementation
21-
let HorizonStakingProxy, setProxyHorizonStaking
21+
let HorizonStakingProxy
2222
if (isMigrate) {
2323
const horizonStakingProxyAddress = m.getParameter('horizonStakingProxyAddress')
2424
HorizonStakingProxy = m.contractAt('GraphProxy', GraphProxyArtifact, horizonStakingProxyAddress, { id: 'GraphProxy_HorizonStaking' })
25-
setProxyHorizonStaking = HorizonStakingProxy
2625
} else {
2726
HorizonStakingProxy = m.contract('GraphProxy', GraphProxyArtifact, [ZERO_ADDRESS, GraphProxyAdmin], { id: 'GraphProxy_HorizonStaking' })
28-
setProxyHorizonStaking = m.call(Controller, 'setContractProxy', [ethers.keccak256(ethers.toUtf8Bytes('Staking')), HorizonStakingProxy], { id: 'setContractProxy_HorizonStaking' })
27+
m.call(Controller, 'setContractProxy', [ethers.keccak256(ethers.toUtf8Bytes('Staking')), HorizonStakingProxy], { id: 'setContractProxy_HorizonStaking' })
2928
}
3029

3130
// Deploy proxies for payments contracts using OZ TransparentUpgradeableProxy

packages/horizon/package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
"@nomicfoundation/ignition-core": "^0.15.9",
3232
"@openzeppelin/contracts": "^5.0.2",
3333
"@openzeppelin/contracts-upgradeable": "^5.0.2",
34+
"@tenderly/api-client": "^1.1.0",
35+
"@tenderly/hardhat-tenderly": "^2.5.2",
3436
"@typechain/ethers-v6": "^0.5.0",
3537
"@typechain/hardhat": "^9.0.0",
3638
"@types/chai": "^4.2.0",
@@ -70,10 +72,5 @@
7072
"**/*.json": [
7173
"yarn lint:ts"
7274
]
73-
},
74-
"dependencies": {
75-
"@tenderly/api-client": "^1.1.0",
76-
"@tenderly/hardhat-tenderly": "^2.5.1",
77-
"dotenv": "^16.4.7"
7875
}
7976
}

0 commit comments

Comments
 (0)