Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
b741a257
Commit
b741a257
authored
Nov 05, 2021
by
QM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update dockerRelayerTestEvm.sh
parent
cbbecf96
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
dockerRelayerTestEvm.sh
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerTestEvm.sh
+23
-0
No files found.
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerTestEvm.sh
View file @
b741a257
...
@@ -787,6 +787,21 @@ function DeployEvmxgo() {
...
@@ -787,6 +787,21 @@ function DeployEvmxgo() {
restart_ebrelayerA
restart_ebrelayerA
}
}
# $1 symbol $2 bridgeTokenAddr
function
updateConfig
()
{
local
symbol
=
$1
local
bridgeTokenAddr
=
$2
tx
=
$(
curl
-s
--data-binary
'{"jsonrpc":"2.0","id":2,"method":"Chain33.CreateTransaction","params":[{"execer":"manage","actionName":"Modify","payload":{"key":"evmxgo-mint-'
"
${
symbol
}
"
'","value":"{\"address\":\"'
"
${
bridgeTokenAddr
}
"
'\",\"precision\":8,\"introduction\":\"symbol:'
"
${
symbol
}
"
', bridgeTokenAddr:'
"
${
bridgeTokenAddr
}
"
'\"}","op":"add","addr":""}}]}'
-H
'content-type:text/plain;'
"http://127.0.0.1:8901"
| jq
-r
".result"
)
if
[
"
${
tx
}
"
==
""
]
;
then
echo
-e
"
${
RED
}
update config create tx 1
${
NOC
}
"
exit
1
fi
sign
=
$(${
Chain33Cli
}
wallet sign
-k
"
$chain33ReceiverAddrKey
"
-d
"
${
tx
}
"
)
hash
=
$(${
Chain33Cli
}
wallet send
-d
"
${
sign
}
"
)
check_tx
"
${
Chain33Cli
}
"
"
${
hash
}
"
}
function
TestETH2EVMToChain33
()
{
function
TestETH2EVMToChain33
()
{
# 查询 ETH 这端 bridgeBank 地址原来是 0
# 查询 ETH 这端 bridgeBank 地址原来是 0
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
)
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
)
...
@@ -810,6 +825,8 @@ function TestETH2EVMToChain33() {
...
@@ -810,6 +825,8 @@ function TestETH2EVMToChain33() {
# 结果是 11 * le8
# 结果是 11 * le8
# is_equal "${result}" "4700000000"
# is_equal "${result}" "4700000000"
updateConfig
"ETH"
"
${
chain33EthBridgeTokenAddr
}
"
${
EvmxgoBoss4xCLI
}
chain33 offline approve_erc20
-a
330000000000
-s
"
${
XgoChain33BridgeBank
}
"
-c
"
${
chain33EthBridgeTokenAddr
}
"
-k
"
${
chain33ReceiverAddrKey
}
"
-f
1
--chainID
"
${
chain33ID
}
"
${
EvmxgoBoss4xCLI
}
chain33 offline approve_erc20
-a
330000000000
-s
"
${
XgoChain33BridgeBank
}
"
-c
"
${
chain33EthBridgeTokenAddr
}
"
-k
"
${
chain33ReceiverAddrKey
}
"
-f
1
--chainID
"
${
chain33ID
}
"
chain33_offline_send_evm
"approve_erc20.txt"
chain33_offline_send_evm
"approve_erc20.txt"
...
@@ -825,6 +842,7 @@ function TestETH2EVMToChain33() {
...
@@ -825,6 +842,7 @@ function TestETH2EVMToChain33() {
function
AllRelayerMainTest
()
{
function
AllRelayerMainTest
()
{
set
+e
set
+e
docker_chain33_ip
=
$(
get_docker_addr
"
${
dockerNamePrefix
}
_chain33_1"
)
docker_chain33_ip
=
$(
get_docker_addr
"
${
dockerNamePrefix
}
_chain33_1"
)
MainCli
=
"./chain33-cli --rpc_laddr http://
${
docker_chain33_ip
}
:8801"
MainCli
=
"./chain33-cli --rpc_laddr http://
${
docker_chain33_ip
}
:8801"
Para8801Cli
=
"./chain33-cli --rpc_laddr http://
${
docker_chain33_ip
}
:8901 --paraName user.p.para."
Para8801Cli
=
"./chain33-cli --rpc_laddr http://
${
docker_chain33_ip
}
:8901 --paraName user.p.para."
...
@@ -887,6 +905,11 @@ function AllRelayerMainTest() {
...
@@ -887,6 +905,11 @@ function AllRelayerMainTest() {
DeployEvmxgo
DeployEvmxgo
TestETH2EVMToChain33
TestETH2EVMToChain33
send coins transfer
-a
1000
-n
test
-t
"1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4"
-k
"
${
chain33ReceiverAddrKey
}
"
send coins transfer
-a
1000
-n
test
-t
"1JRNjdEqp4LJ5fqycUBm9ayCKSeeskgMKR"
-k
"
${
chain33ReceiverAddrKey
}
"
send coins transfer
-a
1000
-n
test
-t
"1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k"
-k
"
${
chain33ReceiverAddrKey
}
"
send coins transfer
-a
1000
-n
test
-t
"1MCftFynyvG2F4ED5mdHYgziDxx6vDrScs"
-k
"
${
chain33ReceiverAddrKey
}
"
echo_addrs
echo_addrs
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment