Skip to content

Commit 3dae50d

Browse files
committed
add deployment script
Signed-off-by: Ihor Farion <[email protected]>
1 parent 1b15167 commit 3dae50d

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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"];

0 commit comments

Comments
 (0)