-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy path001_bridge.ts
More file actions
36 lines (31 loc) · 1.11 KB
/
001_bridge.ts
File metadata and controls
36 lines (31 loc) · 1.11 KB
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 * as dotenv from 'dotenv';
import { ethers } from 'hardhat';
import { DeployFunction } from 'hardhat-deploy/types';
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { calcEthereumTransactionParams } from '@acala-network/eth-providers';
dotenv.config();
const deployFunc: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { deployments, getNamedAccounts } = hre;
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();
const blockNumber = await ethers.provider.getBlockNumber();
const storageByteDeposit = '100000000000000';
const txFeePerGas = '199999946752';
console.log(storageByteDeposit, txFeePerGas)
const ethParams = calcEthereumTransactionParams({
gasLimit: '31000000',
validUntil: (blockNumber + 100).toString(),
storageLimit: '64001',
txFeePerGas,
storageByteDeposit,
});
await deploy('Bridge', {
from: deployer,
log: true,
gasLimit: ethParams.txGasLimit, // Mandala
gasPrice: ethParams.txGasPrice, // Mandala
});
};
deployFunc.tags = ['Bridge'];
deployFunc.dependencies = [];
export default deployFunc;