-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathenv.sh
146 lines (113 loc) · 4.9 KB
/
env.sh
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/usr/bin/env bash
# chain name can be "eos" or "bos", consensus can be "pipeline" or "batch", ibc_plugin_version can be 1 or 2
# eos_pipeline or bos_batch
chain_a=bos_batch
chain_b=bos_batch
chain_c=bos_batch
chain_d=bos_batch
# config
src_base_dir=~/Code/github.com
nodeos_file=build/programs/nodeos/nodeos
eosio_nodeos=${src_base_dir}/bins/eos_v2.0.6
boscore_nodeos=${src_base_dir}/bins/bos_v3.0.8
eosio_ibc_plugin_nodeos=${src_base_dir}/bins/ibc_plugin_eos_v4.0.2
# boscore_ibc_plugin_nodeos=${src_base_dir}/bins/ibc_plugin_bos_v4.2.4
# eosio_ibc_plugin_nodeos=${src_base_dir}/boscore/ibc_plugin_eos/${nodeos_file}
boscore_ibc_plugin_nodeos=${src_base_dir}/boscore/ibc_plugin_bos/${nodeos_file}
#eosio_sys_contracts_dir=${src_base_dir}/EOSIO/eosio.contracts/build/contracts
#bos_sys_contracts_dir=${src_base_dir}/boscore/bos.contracts/build/contracts
ibc_contracts_dir=${src_base_dir}/boscore/ibc_contracts/build
#ibc_token_hub_dir=${src_base_dir}/boscore/ibc_contracts/build/hub
eosio_sys_contracts_dir=${src_base_dir}/bins/eosio.contracts/current
bos_sys_contracts_dir=${src_base_dir}/bins/bos.contracts/current
# ibc_contracts_dir=${src_base_dir}/bins/ibc_contracts/current
ibc_token_hub_dir=${src_base_dir}/bins/ibc_contracts/current
eosio_launcher=${src_base_dir}/boscore/bos/build/programs/eosio-launcher/eosio-launcher
cleos=${src_base_dir}/boscore/bos/build/programs/cleos/cleos
get_chain_type(){ echo $1 | cut -c -3; }
get_chain_consensus(){ echo $1 | cut -c 5-; }
if [ `get_chain_type $chain_a` == "eos" ];then
chain_a_nodeos=$eosio_nodeos
chain_a_sys_contracts_dir=$eosio_sys_contracts_dir
chain_a_relay=$eosio_ibc_plugin_nodeos
elif [ `get_chain_type $chain_a` == "bos" ];then
chain_a_nodeos=$boscore_nodeos
chain_a_sys_contracts_dir=$bos_sys_contracts_dir
chain_a_relay=$boscore_ibc_plugin_nodeos
else echo "chain name error!" && return ;fi
if [ `get_chain_type $chain_b` == "eos" ];then
chain_b_nodeos=$eosio_nodeos
chain_b_sys_contracts_dir=$eosio_sys_contracts_dir
chain_b_relay=$eosio_ibc_plugin_nodeos
elif [ `get_chain_type $chain_b` == "bos" ];then
chain_b_nodeos=$boscore_nodeos
chain_b_sys_contracts_dir=$bos_sys_contracts_dir
chain_b_relay=$boscore_ibc_plugin_nodeos
else echo "chain name error!" && return ;fi
if [ `get_chain_type $chain_c` == "eos" ];then
chain_c_nodeos=$eosio_nodeos
chain_c_sys_contracts_dir=$eosio_sys_contracts_dir
chain_c_relay=$eosio_ibc_plugin_nodeos
elif [ `get_chain_type $chain_c` == "bos" ];then
chain_c_nodeos=$boscore_nodeos
chain_c_sys_contracts_dir=$bos_sys_contracts_dir
chain_c_relay=$boscore_ibc_plugin_nodeos
else echo "chain name error!" && return ;fi
if [ `get_chain_type $chain_d` == "eos" ];then
chain_d_nodeos=$eosio_nodeos
chain_d_sys_contracts_dir=$eosio_sys_contracts_dir
chain_d_relay=$eosio_ibc_plugin_nodeos
elif [ `get_chain_type $chain_d` == "bos" ];then
chain_d_nodeos=$boscore_nodeos
chain_d_sys_contracts_dir=$bos_sys_contracts_dir
chain_d_relay=$boscore_ibc_plugin_nodeos
else echo "chain name error!" && return ;fi
check_configs(){
echo "chain_a_nodeos: " $chain_a_nodeos
echo "chain_a_relay: " $chain_a_relay
echo "chain_a_sys_contracts_dir: " $chain_a_sys_contracts_dir
echo "chain_b_nodeos: " $chain_b_nodeos
echo "chain_b_relay: " $chain_b_relay
echo "chain_b_sys_contracts_dir: " $chain_b_sys_contracts_dir
echo "chain_c_nodeos: " $chain_c_nodeos
echo "chain_c_relay: " $chain_c_relay
echo "chain_c_sys_contracts_dir: " $chain_c_sys_contracts_dir
echo "chain_d_nodeos: " $chain_d_nodeos
echo "chain_d_relay: " $chain_d_relay
echo "chain_d_sys_contracts_dir: " $chain_d_sys_contracts_dir
}
# check_configs
chain_a_token_sym=TOA
chain_b_token_sym=TOB
chain_c_token_sym=TOC
chain_d_token_sym=TOD
chain_a_name=cha
chain_b_name=chb
chain_c_name=chc
chain_d_name=chd
# three accounts
contract_chain=ibc2chain555
contract_token=ibc2token555
relay_account=ibc2relay555
#
contract_chain_b=ibc2chain22b
contract_chain_c=ibc2chain22c
contract_chain_d=ibc2chain22d
#
hub_account=ibc2hub55555
admin_account=ibc2admin555
proxy_account=ibc2prxoy555
user_contract=usercontract #prosy_test
# ibc.token contract account's public key and private key
token_c_pubkey=EOS6Sc4BuA7dEGRU6u4VSuEKusESFe61qD8LmguGEMULrghKDSPaU
token_c_prikey=5K79wAY8rgPwWQSRmyQa2BR8vPicieJdLCXL3cM5Db77QnsJess
proxy_c_pubkey=EOS6PotnTNFUBTk6mZKp99rVGtCMMhRQWbfEdtLmbMT4g2NEQCeJx
proxy_c_prikey=5Jvzx5Unv4TvfoRwKWkAwDFj6God7TYMeuZAeqcotoT7jGcmEWM
userc_c_pubkey=EOS75icHCpd7u7wLPxELAfqkyGD36wGVu6cAkVztAgsLwqvByt6jV
userc_c_prikey=5K47wKaVeZVXkE9fr81dm74oMwJBvxxgJw9qyBFFpCXyt1CKTfB
receiver=receiver1111
WALLET_DIR=~/tmp/eosio/eosio-wallet
cleos_a='cleos -u http://127.0.0.1:4002'
cleos_b='cleos -u http://127.0.0.1:5002'
cleos_c='cleos -u http://127.0.0.1:6002'
cleos_d='cleos -u http://127.0.0.1:7002'