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
9862d454
Commit
9862d454
authored
Sep 10, 2021
by
QM
Committed by
vipwzw
Sep 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cross2eth set_offline_token“
parent
1c653de9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
35 deletions
+80
-35
dockerRelayerTest.sh
plugin/dapp/cross2eth/cmd/build/dockerRelayerTest.sh
+80
-9
offlinePublic.sh
plugin/dapp/cross2eth/cmd/build/public/offlinePublic.sh
+0
-26
No files found.
plugin/dapp/cross2eth/cmd/build/dockerRelayerTest.sh
View file @
9862d454
...
...
@@ -397,16 +397,74 @@ function TestETH2Chain33Ycc() {
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
# shellcheck disable=SC2120
function
offline_set_offline_token_Bty
()
{
echo
-e
"
${
GRE
}
===========
$FUNCNAME
begin ===========
${
NOC
}
"
echo
-e
"
${
GRE
}
===== chain33 端 configLockedTokenOfflineSave BTY ======
${
NOC
}
"
# echo '2:#配置自动转离线钱包(bty, 100, 50%)'
${
Boss4xCLI
}
chain33 offline set_offline_token
-c
"
${
chain33BridgeBank
}
"
-s
BTY
-m
10000000000
-p
50
-k
"
${
chain33DeployKey
}
"
--chainID
"
${
chain33ID
}
"
local
threshold
=
10000000000
local
percents
=
50
if
[[
$#
-eq
2
]]
;
then
threshold
=
$1
percents
=
$2
fi
# shellcheck disable=SC2086
${
Boss4xCLI
}
chain33 offline set_offline_token
-c
"
${
chain33BridgeBank
}
"
-s
BTY
-m
${
threshold
}
-p
${
percents
}
-k
"
${
chain33DeployKey
}
"
--chainID
"
${
chain33ID
}
"
chain33_offline_send
"chain33_set_offline_token.txt"
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
# shellcheck disable=SC2120
function
offline_set_offline_token_Chain33Ycc
()
{
echo
-e
"
${
GRE
}
===========
$FUNCNAME
begin ===========
${
NOC
}
"
echo
-e
"
${
GRE
}
===== chain33 端 configLockedTokenOfflineSave ERC20 YCC ======
${
NOC
}
"
# echo '2:#配置自动转离线钱包(YCC, 100, 60%)'
local
threshold
=
10000000000
local
percents
=
60
if
[[
$#
-eq
2
]]
;
then
threshold
=
$1
percents
=
$2
fi
# shellcheck disable=SC2086
${
Boss4xCLI
}
chain33 offline set_offline_token
-c
"
${
chain33BridgeBank
}
"
-t
"
${
chain33YccErc20Addr
}
"
-s
YCC
-m
${
threshold
}
-p
${
percents
}
-k
"
${
chain33DeployKey
}
"
--chainID
"
${
chain33ID
}
"
chain33_offline_send
"chain33_set_offline_token.txt"
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
# shellcheck disable=SC2120
function
offline_set_offline_token_Eth
()
{
echo
-e
"
${
GRE
}
===========
$FUNCNAME
begin ===========
${
NOC
}
"
# echo '2:#配置自动转离线钱包(eth, 20, 50%)'
local
threshold
=
20
local
percents
=
50
if
[[
$#
-eq
2
]]
;
then
threshold
=
$1
percents
=
$2
fi
# shellcheck disable=SC2086
${
Boss4xCLI
}
ethereum offline set_offline_token
-s
ETH
-m
${
threshold
}
-p
${
percents
}
-c
"
${
ethBridgeBank
}
"
-d
"
${
ethDeployAddr
}
"
ethereum_offline_sign_send
"set_offline_token.txt"
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
# shellcheck disable=SC2120
function
offline_set_offline_token_EthYcc
()
{
echo
-e
"
${
GRE
}
===========
$FUNCNAME
begin ===========
${
NOC
}
"
local
threshold
=
100
local
percents
=
40
if
[[
$#
-eq
2
]]
;
then
threshold
=
$1
percents
=
$2
fi
# shellcheck disable=SC2086
${
Boss4xCLI
}
ethereum offline set_offline_token
-s
YCC
-m
${
threshold
}
-p
${
percents
}
-t
"
${
ethereumYccTokenAddr
}
"
-c
"
${
ethBridgeBank
}
"
-d
"
${
ethDeployAddr
}
"
ethereum_offline_sign_send
"set_offline_token.txt"
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
function
offline_transfer_multisign_Bty_test
()
{
echo
-e
"
${
GRE
}
===========
$FUNCNAME
begin ===========
${
NOC
}
"
# transfer test
...
...
@@ -614,10 +672,14 @@ function StartDockerRelayerDeploy() {
transferChain33MultisignFee
Chain33Cli
=
${
Para8901Cli
}
docker
cp
"
${
BridgeRegistryOnChain33
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
BridgeRegistryOnChain33
}
.abi
docker
cp
"
${
chain33BridgeBank
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
chain33BridgeBank
}
.abi
docker
cp
"
${
BridgeRegistryOnEth
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
BridgeRegistryOnEth
}
.abi
docker
cp
"
${
ethBridgeBank
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
ethBridgeBank
}
.abi
# shellcheck disable=SC2086
{
docker
cp
"
${
BridgeRegistryOnChain33
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
BridgeRegistryOnChain33
}
.abi
docker
cp
"
${
chain33BridgeBank
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
chain33BridgeBank
}
.abi
docker
cp
"
${
BridgeRegistryOnEth
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
BridgeRegistryOnEth
}
.abi
docker
cp
"
${
ethBridgeBank
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
ethBridgeBank
}
.abi
}
# 重启
restart_ebrelayerA
...
...
@@ -636,10 +698,13 @@ function StartDockerRelayerDeploy() {
offline_deploy_erc20_chain33_ZBC
offline_create_bridge_token_eth_ZBC
docker
cp
"
${
chain33EthTokenAddr
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
chain33EthTokenAddr
}
.abi
docker
cp
"
${
chain33YccTokenAddr
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
chain33YccTokenAddr
}
.abi
docker
cp
"
${
chain33YccErc20Addr
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
chain33YccErc20Addr
}
.abi
docker
cp
"
${
ethBridgeToeknYccAddr
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
ethBridgeToeknYccAddr
}
.abi
# shellcheck disable=SC2086
{
docker
cp
"
${
chain33EthTokenAddr
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
chain33EthTokenAddr
}
.abi
docker
cp
"
${
chain33YccTokenAddr
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
chain33YccTokenAddr
}
.abi
docker
cp
"
${
chain33YccErc20Addr
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
chain33YccErc20Addr
}
.abi
docker
cp
"
${
ethBridgeToeknYccAddr
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
ethBridgeToeknYccAddr
}
.abi
}
# 重启,因为relayerA的验证人地址和部署人的地址是一样的,所以需要重新启动relayer,更新nonce
restart_ebrelayerA
...
...
@@ -738,6 +803,12 @@ function AllRelayerMainTest() {
lockEth
lockEthYcc
# 离线多签地址转入阈值设大
offline_set_offline_token_Bty 100000000000000 10
offline_set_offline_token_Chain33Ycc 100000000000000 10
offline_set_offline_token_Eth 100000000000000 10
offline_set_offline_token_EthYcc 100000000000000 10
echo_addrs
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
plugin/dapp/cross2eth/cmd/build/public/offlinePublic.sh
View file @
9862d454
...
...
@@ -243,22 +243,6 @@ function offline_setupEthMultisign() {
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
function
offline_set_offline_token_Eth
()
{
echo
-e
"
${
GRE
}
===========
$FUNCNAME
begin ===========
${
NOC
}
"
# echo '2:#配置自动转离线钱包(eth, 20, 50%)'
${
Boss4xCLI
}
ethereum offline set_offline_token
-s
ETH
-m
20
-c
"
${
ethBridgeBank
}
"
-d
"
${
ethDeployAddr
}
"
ethereum_offline_sign_send
"set_offline_token.txt"
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
function
offline_set_offline_token_EthYcc
()
{
echo
-e
"
${
GRE
}
===========
$FUNCNAME
begin ===========
${
NOC
}
"
${
Boss4xCLI
}
ethereum offline set_offline_token
-s
YCC
-m
100
-p
40
-t
"
${
ethereumYccTokenAddr
}
"
-c
"
${
ethBridgeBank
}
"
-d
"
${
ethDeployAddr
}
"
ethereum_offline_sign_send
"set_offline_token.txt"
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
function
offline_transfer_multisign_Eth_test
()
{
echo
-e
"
${
GRE
}
===========
$FUNCNAME
begin ===========
${
NOC
}
"
# transfer
...
...
@@ -323,16 +307,6 @@ function offline_transfer_multisign_EthYcc() {
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
function
offline_set_offline_token_Chain33Ycc
()
{
echo
-e
"
${
GRE
}
===========
$FUNCNAME
begin ===========
${
NOC
}
"
echo
-e
"
${
GRE
}
===== chain33 端 configLockedTokenOfflineSave ERC20 YCC ======
${
NOC
}
"
# echo '2:#配置自动转离线钱包(YCC, 100, 60%)'
${
Boss4xCLI
}
chain33 offline set_offline_token
-c
"
${
chain33BridgeBank
}
"
-t
"
${
chain33YccErc20Addr
}
"
-s
YCC
-m
10000000000
-p
60
-k
"
${
chain33DeployKey
}
"
--chainID
"
${
chain33ID
}
"
chain33_offline_send
"chain33_set_offline_token.txt"
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
function
offline_transfer_multisign_Chain33Ycc_test
()
{
echo
-e
"
${
GRE
}
===========
$FUNCNAME
begin ===========
${
NOC
}
"
# transfer test
...
...
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