-
Notifications
You must be signed in to change notification settings - Fork 27
/
00_arb_verifier.ts
36 lines (33 loc) · 1.31 KB
/
00_arb_verifier.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { DeployFunction } from 'hardhat-deploy/types';
import { HardhatRuntimeEnvironment } from 'hardhat/types';
const GATEWAY_URLS = {
arbDevnetL1: 'http://localhost:8089/{sender}/{data}.json',
goerli: 'https://arb-gateway-worker.ens-cf.workers.dev/{sender}/{data}.json',
};
const ROLLUP_ADDRESSES = {
goerli: '0x45e5cAea8768F42B385A366D3551Ad1e0cbFAb17',
};
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts, network } = hre;
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();
let ROLLUP_ADDRESS;
console.log("NW ", network.name)
if (network.name === 'arbDevnetL1') {
//Rollup address according to sequencer config. Unfortunately, there is no endpoint to fetch it at runtime from the rollup.
//The address can be found at nitro-testnode-sequencer-1/config/deployment.json
const rollup = '0xb264babb91df9d1ca05c8c2028288dc08c4bee46';
ROLLUP_ADDRESS = rollup;
} else {
ROLLUP_ADDRESS = ROLLUP_ADDRESSES[network.name];
}
const GATEWAY_URL = GATEWAY_URLS[network.name];
console.log('ArbVerifier', [[GATEWAY_URL], ROLLUP_ADDRESS]);
await deploy('ArbVerifier', {
from: deployer,
args: [[GATEWAY_URL], ROLLUP_ADDRESS],
log: true,
});
};
export default func;
func.tags = ['ArbVerifier'];