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
cbbecf96
Commit
cbbecf96
authored
Nov 04, 2021
by
hezhengjun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'exchange_order_0929' of github.com:zhengjunhe/plugin into exchange_order_0929
parents
db646ccd
a1810aaa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
docker-compose-bridgevmxgo.yml
...dapp/bridgevmxgo/cmd/build/docker-compose-bridgevmxgo.yml
+7
-0
dockerRelayerTestEvm.sh
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerTestEvm.sh
+8
-5
No files found.
plugin/dapp/bridgevmxgo/cmd/build/docker-compose-bridgevmxgo.yml
View file @
cbbecf96
...
@@ -4,11 +4,15 @@ services:
...
@@ -4,11 +4,15 @@ services:
ganachetest
:
ganachetest
:
entrypoint
:
[
"
node"
,
"
/app/ganache-core.docker.cli.js"
,
"
-a"
,
"
20"
,
"
-b"
,
"
2"
,
"
--debug"
,
"
-m"
,
"
coast
bar
giraffe
art
venue
decide
symbol
law
visual
crater
vital
fold"
,
"
-e"
,
"
1000"
]
entrypoint
:
[
"
node"
,
"
/app/ganache-core.docker.cli.js"
,
"
-a"
,
"
20"
,
"
-b"
,
"
2"
,
"
--debug"
,
"
-m"
,
"
coast
bar
giraffe
art
venue
decide
symbol
law
visual
crater
vital
fold"
,
"
-e"
,
"
1000"
]
image
:
trufflesuite/ganache-cli:latest
image
:
trufflesuite/ganache-cli:latest
ports
:
-
"
8545:8545"
ebrelayera
:
ebrelayera
:
build
:
build
:
context
:
.
context
:
.
dockerfile
:
Dockerfile-bridgevmxgo
dockerfile
:
Dockerfile-bridgevmxgo
ports
:
-
"
9901:9901"
ebrelayerb
:
ebrelayerb
:
build
:
build
:
...
@@ -31,6 +35,9 @@ services:
...
@@ -31,6 +35,9 @@ services:
PARAFILE
:
"
/root/chain33.para33.toml"
PARAFILE
:
"
/root/chain33.para33.toml"
expose
:
expose
:
-
"
8802"
-
"
8802"
ports
:
-
"
8801:8801"
-
"
8901:8901"
chain32
:
chain32
:
entrypoint
:
/root/entrypoint.sh
entrypoint
:
/root/entrypoint.sh
...
...
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerTestEvm.sh
View file @
cbbecf96
...
@@ -782,12 +782,15 @@ function DeployEvmxgo() {
...
@@ -782,12 +782,15 @@ function DeployEvmxgo() {
${
EvmxgoBoss4xCLI
}
chain33 offline create_add_lock_list
-s
ETH
-t
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
XgoChain33BridgeBank
}
"
-k
"
${
chain33DeployKey
}
"
-f
1
--chainID
"
${
chain33ID
}
"
${
EvmxgoBoss4xCLI
}
chain33 offline create_add_lock_list
-s
ETH
-t
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
XgoChain33BridgeBank
}
"
-k
"
${
chain33DeployKey
}
"
-f
1
--chainID
"
${
chain33ID
}
"
chain33_offline_send_evm
"create_add_lock_list.txt"
chain33_offline_send_evm
"create_add_lock_list.txt"
# 重启,需要重新启动relayer,更新nonce
restart_ebrelayerA
}
}
function
TestETH2EVMToChain33
()
{
function
TestETH2EVMToChain33
()
{
# 查询 ETH 这端 bridgeBank 地址原来是 0
# 查询 ETH 这端 bridgeBank 地址原来是 0
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
)
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
)
# cli_ret "${result}" "balance" ".balance" "
0
"
# cli_ret "${result}" "balance" ".balance" "
16
"
# ETH 这端 lock 11个
# ETH 这端 lock 11个
result
=
$(${
CLIA
}
ethereum lock
-m
11
-k
"
${
ethTestAddrKey1
}
"
-r
"
${
chain33ReceiverAddr
}
"
)
result
=
$(${
CLIA
}
ethereum lock
-m
11
-k
"
${
ethTestAddrKey1
}
"
-r
"
${
chain33ReceiverAddr
}
"
)
...
@@ -796,16 +799,16 @@ function TestETH2EVMToChain33() {
...
@@ -796,16 +799,16 @@ function TestETH2EVMToChain33() {
# eth 等待 2 个区块
# eth 等待 2 个区块
sleep
4
sleep
4
# 查询 ETH 这端 bridgeBank 地址 11
# 查询 ETH 这端 bridgeBank 地址 11
原来16
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
)
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
)
# cli_ret "${result}" "balance" ".balance" "
11
"
# cli_ret "${result}" "balance" ".balance" "
27
"
sleep
${
maturityDegree
}
sleep
${
maturityDegree
}
# chain33 chain33EthBridgeTokenAddr(ETH合约中)查询 lock 金额
# chain33 chain33EthBridgeTokenAddr(ETH合约中)查询 lock 金额
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
# 结果是 11 * le8
# 结果是 11 * le8
# is_equal "${result}" "
11
00000000"
# is_equal "${result}" "
47
00000000"
${
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"
...
@@ -814,7 +817,7 @@ function TestETH2EVMToChain33() {
...
@@ -814,7 +817,7 @@ function TestETH2EVMToChain33() {
check_tx
"
${
Chain33Cli
}
"
"
${
hash
}
"
check_tx
"
${
Chain33Cli
}
"
"
${
hash
}
"
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
# is_equal "${result}" "
6
00000000"
# is_equal "${result}" "
42
00000000"
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
XgoChain33BridgeBank
}
)"
)
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
XgoChain33BridgeBank
}
)"
)
# is_equal "${result}" "500000000"
# is_equal "${result}" "500000000"
...
...
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