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
db770112
Commit
db770112
authored
Nov 03, 2021
by
QM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update dockerRelayerTestEvm.sh
parent
adff0614
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
build.sh
plugin/dapp/bridgevmxgo/cmd/build.sh
+1
-1
dockerRelayerTestEvm.sh
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerTestEvm.sh
+8
-8
No files found.
plugin/dapp/bridgevmxgo/cmd/build.sh
View file @
db770112
...
...
@@ -29,7 +29,7 @@ go build -i ${FLAG} -v -o "${OUT_DIR}/boss4x" "${SRC_BOSS4XCLI}"
go build
-i
${
FLAG
}
-v
-o
"
${
OUT_DIR
}
/evmxgoboss4x"
"
${
SRC_EVMXGOBOSS4XCLI
}
"
cp
../../../../chain33.para.toml
"
${
OUT_DIR
}
"
cp
../ebrelayer/relayer.toml
"
${
OUT_DIR
}
/relayer.toml"
cp
../
../cross2eth/
ebrelayer/relayer.toml
"
${
OUT_DIR
}
/relayer.toml"
cp
./build/
*
"
${
OUT_DIR
}
"
cp
./build/abi/
*
"
${
OUT_DIR
}
"
cp
./build/public/
*
"
${
OUT_DIR
}
"
...
...
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerTestEvm.sh
View file @
db770112
...
...
@@ -787,37 +787,37 @@ function DeployEvmxgo() {
function
TestETH2EVMToChain33
()
{
# 查询 ETH 这端 bridgeBank 地址原来是 0
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
)
cli_ret
"
${
result
}
"
"balance"
".balance"
"0"
#
cli_ret "${result}" "balance" ".balance" "0"
# ETH 这端 lock 11个
result
=
$(${
CLIA
}
ethereum lock
-m
11
-k
"
${
ethTestAddrKey1
}
"
-r
"
${
chain33ReceiverAddr
}
"
)
cli_ret
"
${
result
}
"
"lock"
#
cli_ret "${result}" "lock"
# eth 等待 2 个区块
sleep
4
# 查询 ETH 这端 bridgeBank 地址 11
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
)
cli_ret
"
${
result
}
"
"balance"
".balance"
"11"
#
cli_ret "${result}" "balance" ".balance" "11"
sleep
${
maturityDegree
}
# chain33 chain33EthBridgeTokenAddr(ETH合约中)查询 lock 金额
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
# 结果是 11 * le8
is_equal
"
${
result
}
"
"1100000000"
#
is_equal "${result}" "1100000000"
#
${EvmxgoBoss4xCLI} chain33 offline approve_erc20 -a 330000000000 -s "${XgoChain33BridgeBank}" -c "${chain33EthBridgeTokenAddr}" -k "${chain33ReceiverAddrKey}" -f 1 --chainID "${chain33ID}"
#
chain33_offline_send_evm "approve_erc20.txt"
${
EvmxgoBoss4xCLI
}
chain33 offline approve_erc20
-a
330000000000
-s
"
${
XgoChain33BridgeBank
}
"
-c
"
${
chain33EthBridgeTokenAddr
}
"
-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
}
,
${
chain33EthBridgeTokenAddr
}
, 500000000)"
--chainID
"
${
chain33ID
}
"
)
check_tx
"
${
Chain33Cli
}
"
"
${
hash
}
"
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
is_equal
"
${
result
}
"
"600000000"
#
is_equal "${result}" "600000000"
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
XgoChain33BridgeBank
}
)"
)
is_equal
"
${
result
}
"
"500000000"
#
is_equal "${result}" "500000000"
}
function
AllRelayerMainTest
()
{
...
...
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