File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ import assert from "assert" ;
2
+ import { DeployFunction } from "hardhat-deploy/types" ;
3
+ import { HardhatRuntimeEnvironment } from "hardhat/types" ;
4
+
5
+ const func : DeployFunction = async function ( hre : HardhatRuntimeEnvironment ) {
6
+ const { deployer } = await hre . getNamedAccounts ( ) ;
7
+ const { deployments } = hre ;
8
+
9
+ // ! Notice. Deployer should specify their own adapter that will be used as underlying adapter to `relayTokens` to target chain
10
+ // In this current deployment we're using prod Arbitrum_Adapter (HubPool.crossChainContracts(42161).adapter) to be able to send
11
+ // tokens back to Arbitrum
12
+ const underlyingAdapter = "0x5eC9844936875E27eBF22172f4d92E107D35B57C" ;
13
+ // Make sure we're indeed using the latest version of the adapter. If the 2 conflict, need to check manually
14
+ assert ( ( await deployments . get ( "Arbitrum_Adapter" ) ) . address === underlyingAdapter ) ;
15
+
16
+ const args = [ underlyingAdapter ] ;
17
+ const instance = await hre . deployments . deploy ( "AdminRelayTokensAdapter" , {
18
+ from : deployer ,
19
+ log : true ,
20
+ skipIfAlreadyDeployed : false ,
21
+ args,
22
+ } ) ;
23
+ await hre . run ( "verify:verify" , { address : instance . address , constructorArguments : args } ) ;
24
+ } ;
25
+
26
+ module . exports = func ;
27
+ func . tags = [ "AdminRelayTokensAdapter" , "mainnet" ] ;
You can’t perform that action at this time.
0 commit comments