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
aa431262
Commit
aa431262
authored
Nov 16, 2021
by
QM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update dockerRelayerTestEvm.sh add Testethereum2EVMToChain33_byc
parent
9971935c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
2 deletions
+42
-2
dockerRelayerTestEvm.sh
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerTestEvm.sh
+42
-2
No files found.
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerTestEvm.sh
View file @
aa431262
...
@@ -818,8 +818,6 @@ function configbridgevmxgoAddr() {
...
@@ -818,8 +818,6 @@ function configbridgevmxgoAddr() {
check_tx
"
${
Chain33Cli
}
"
"
${
hash
}
"
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
}
"
)
...
@@ -859,6 +857,45 @@ function TestETH2EVMToChain33() {
...
@@ -859,6 +857,45 @@ function TestETH2EVMToChain33() {
# is_equal "${result}" "500000000"
# is_equal "${result}" "500000000"
}
}
function
Testethereum2EVMToChain33_byc
()
{
# 查询 ETH 这端 bridgeBank 地址原来是
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
-t
"
${
ethereumBycERC20TokenAddr
}
"
)
# cli_ret "${result}" "balance" ".balance" "0"
# ETH 这端 lock 7个
result
=
$(${
CLIA
}
ethereum lock
-m
7
-k
"
${
ethTestAddrKey1
}
"
-r
"
${
chain33ReceiverAddr
}
"
-t
"
${
ethereumBycERC20TokenAddr
}
"
)
cli_ret
"
${
result
}
"
"lock"
# eth 等待 2 个区块
sleep
4
# 查询 ETH 这端 bridgeBank 地址 7
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
-t
"
${
ethereumBycERC20TokenAddr
}
"
)
# cli_ret "${result}" "balance" ".balance" "7"
sleep
${
maturityDegree
}
# chain33 chain33EthBridgeTokenAddr(ETH合约中)查询 lock 金额
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33BycBridgeTokenAddr
}
"
-c
"
${
chain33TestAddr1
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
# 结果是 7 * le8
# is_equal "${result}" "700000000"
updateConfig
"BYC"
"
${
chain33BycBridgeTokenAddr
}
"
configbridgevmxgoAddr
"
${
XgoChain33BridgeBank
}
"
${
EvmxgoBoss4xCLI
}
chain33 offline approve_erc20
-a
330000000000
-s
"
${
XgoChain33BridgeBank
}
"
-c
"
${
chain33BycBridgeTokenAddr
}
"
-k
"
${
chain33ReceiverAddrKey
}
"
-f
1
--chainID
"
${
chain33ID
}
"
chain33_offline_send_evm
"approve_erc20.txt"
hash
=
$(${
Chain33Cli
}
send evm call
-f
1
-k
"
${
chain33ReceiverAddr
}
"
-e
"
${
XgoChain33BridgeBank
}
"
-p
"lock(
${
chain33TestAddr2
}
,
${
chain33BycBridgeTokenAddr
}
, 500000000)"
--chainID
"
${
chain33ID
}
"
)
check_tx
"
${
Chain33Cli
}
"
"
${
hash
}
"
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33BycBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
# is_equal "${result}" "4200000000"
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33BycBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
XgoChain33BridgeBank
}
)"
)
# is_equal "${result}" "500000000"
}
function
AllRelayerMainTest
()
{
function
AllRelayerMainTest
()
{
set
+e
set
+e
...
@@ -924,11 +961,14 @@ function AllRelayerMainTest() {
...
@@ -924,11 +961,14 @@ function AllRelayerMainTest() {
DeployEvmxgo
DeployEvmxgo
TestETH2EVMToChain33
TestETH2EVMToChain33
# 平行链共识节点增加测试币
${
MainCli
}
send coins transfer
-a
1000
-n
test
-t
"1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4"
-k
"
${
chain33ReceiverAddrKey
}
"
${
MainCli
}
send coins transfer
-a
1000
-n
test
-t
"1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4"
-k
"
${
chain33ReceiverAddrKey
}
"
${
MainCli
}
send coins transfer
-a
1000
-n
test
-t
"1JRNjdEqp4LJ5fqycUBm9ayCKSeeskgMKR"
-k
"
${
chain33ReceiverAddrKey
}
"
${
MainCli
}
send coins transfer
-a
1000
-n
test
-t
"1JRNjdEqp4LJ5fqycUBm9ayCKSeeskgMKR"
-k
"
${
chain33ReceiverAddrKey
}
"
${
MainCli
}
send coins transfer
-a
1000
-n
test
-t
"1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k"
-k
"
${
chain33ReceiverAddrKey
}
"
${
MainCli
}
send coins transfer
-a
1000
-n
test
-t
"1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k"
-k
"
${
chain33ReceiverAddrKey
}
"
${
MainCli
}
send coins transfer
-a
1000
-n
test
-t
"1MCftFynyvG2F4ED5mdHYgziDxx6vDrScs"
-k
"
${
chain33ReceiverAddrKey
}
"
${
MainCli
}
send coins transfer
-a
1000
-n
test
-t
"1MCftFynyvG2F4ED5mdHYgziDxx6vDrScs"
-k
"
${
chain33ReceiverAddrKey
}
"
echo_addrs
echo_addrs
Testethereum2EVMToChain33_byc
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