forked from omni/token-bridge
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeploy.js
More file actions
41 lines (36 loc) · 1.2 KB
/
Copy pathdeploy.js
File metadata and controls
41 lines (36 loc) · 1.2 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
37
38
39
40
41
const path = require('path')
const shell = require('shelljs')
const envsDir = path.join(__dirname, 'envs')
const deployContractsDir = path.join(__dirname, 'submodules/poa-bridge-contracts/deploy')
const scriptDir = path.join(__dirname, 'scripts')
// NATIVE_TO_ERC
shell.cp(path.join(envsDir, 'contracts-deploy.env'), path.join(deployContractsDir, '.env'))
shell.cd(deployContractsDir)
shell.exec('node deploy.js')
shell.cd(scriptDir)
shell.exec('node deployERC20.js')
shell.cd(deployContractsDir)
shell.rm('.env')
// ERC_TO_ERC
shell.cp(path.join(envsDir, 'erc-contracts-deploy.env'), path.join(deployContractsDir, '.env'))
shell.exec('node deploy.js')
shell.rm('.env')
// ERC_TO_NATIVE
shell.cp(
path.join(envsDir, 'erc-native-contracts-deploy.env'),
path.join(deployContractsDir, '.env')
)
shell.exec('node src/utils/deployBlockReward.js')
shell.exec('node deploy.js')
// ERC_TO_ERC_MULTIPLE
shell.cp(
path.join(envsDir, 'erc-multiple-contracts-deploy.env'),
path.join(deployContractsDir, '.env')
)
shell.exec('node deploy.js')
shell.cd(scriptDir)
shell.exec('node deployERC20.js')
shell.exec('node deployERC20.js')
shell.exec('node deployBridgesAndUpdateMapper.js')
shell.cd(deployContractsDir)
shell.rm('.env')