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
a0dd0a98
Commit
a0dd0a98
authored
Nov 29, 2021
by
QM
Committed by
33cn
Dec 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename
parent
f7699199
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
29 deletions
+29
-29
dockerRelayerTestEvm.sh
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerTestEvm.sh
+0
-0
offlinePublic.sh
plugin/dapp/bridgevmxgo/cmd/build/public/offlinePublic.sh
+25
-25
relayerPublic.sh
plugin/dapp/bridgevmxgo/cmd/build/public/relayerPublic.sh
+4
-4
No files found.
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerTestEvm.sh
View file @
a0dd0a98
This diff is collapsed.
Click to expand it.
plugin/dapp/bridgevmxgo/cmd/build/public/offlinePublic.sh
View file @
a0dd0a98
...
...
@@ -114,19 +114,19 @@ function offline_deploy_erc20_eth_BYC() {
ethereum_offline_sign_send
"create_add_lock_list.txt"
}
function
offline_deploy_erc20_eth_US
TD
()
{
# eth 上 铸币 US
TD
echo
-e
"
${
GRE
}
======= 在 ethereum 上创建 ERC20 US
TD
======
${
NOC
}
"
function
offline_deploy_erc20_eth_US
DT
()
{
# eth 上 铸币 US
DT
echo
-e
"
${
GRE
}
======= 在 ethereum 上创建 ERC20 US
DT
======
${
NOC
}
"
# shellcheck disable=SC2154
${
Boss4xCLI
}
ethereum offline create_erc20
-m
33000000000000000000
-s
US
TD
-o
"
${
ethTestAddr1
}
"
-d
"
${
ethDeployAddr
}
"
${
Boss4xCLI
}
ethereum offline sign
-f
"deployErc20US
TD
.txt"
-k
"
${
ethDeployKey
}
"
${
Boss4xCLI
}
ethereum offline create_erc20
-m
33000000000000000000
-s
US
DT
-o
"
${
ethTestAddr1
}
"
-d
"
${
ethDeployAddr
}
"
${
Boss4xCLI
}
ethereum offline sign
-f
"deployErc20US
DT
.txt"
-k
"
${
ethDeployKey
}
"
sleep
10
result
=
$(${
Boss4xCLI
}
ethereum offline send
-f
"deploysigntxs.txt"
)
hash
=
$(
echo
"
${
result
}
"
| jq
-r
".[0].TxHash"
)
check_eth_tx
"
${
hash
}
"
ethereumUS
TD
ERC20TokenAddr
=
$(
echo
"
${
result
}
"
| jq
-r
".[0].ContractAddr"
)
ethereumUS
DT
ERC20TokenAddr
=
$(
echo
"
${
result
}
"
| jq
-r
".[0].ContractAddr"
)
${
Boss4xCLI
}
ethereum offline create_add_lock_list
-s
US
TD
-t
"
${
ethereumUSTD
ERC20TokenAddr
}
"
-c
"
${
ethBridgeBank
}
"
-d
"
${
ethDeployAddr
}
"
${
Boss4xCLI
}
ethereum offline create_add_lock_list
-s
US
DT
-t
"
${
ethereumUSDT
ERC20TokenAddr
}
"
-c
"
${
ethBridgeBank
}
"
-d
"
${
ethDeployAddr
}
"
ethereum_offline_sign_send
"create_add_lock_list.txt"
}
...
...
@@ -147,21 +147,21 @@ function offline_create_bridge_token_chain33_BYC() {
${
CLIA
}
chain33 token
set
-t
"
${
chain33BycBridgeTokenAddr
}
"
-s
BYC
}
function
offline_create_bridge_token_chain33_US
TD
()
{
# 在chain33上创建bridgeToken US
TD
echo
-e
"
${
GRE
}
======= 在 chain33 上创建 bridgeToken US
TD
======
${
NOC
}
"
function
offline_create_bridge_token_chain33_US
DT
()
{
# 在chain33上创建bridgeToken US
DT
echo
-e
"
${
GRE
}
======= 在 chain33 上创建 bridgeToken US
DT
======
${
NOC
}
"
# shellcheck disable=SC2154
${
Boss4xCLI
}
chain33 offline create_bridge_token
-c
"
${
chain33BridgeBank
}
"
-s
US
TD
-k
"
${
chain33DeployKey
}
"
--chainID
"
${
chain33ID
}
"
${
Boss4xCLI
}
chain33 offline create_bridge_token
-c
"
${
chain33BridgeBank
}
"
-s
US
DT
-k
"
${
chain33DeployKey
}
"
--chainID
"
${
chain33ID
}
"
chain33_offline_send
"create_bridge_token.txt"
chain33US
TDBridgeTokenAddr
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33BridgeBank
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"getToken2address(USTD
)"
)
echo
"US
TD Bridge Token Addr =
${
chain33USTD
BridgeTokenAddr
}
"
cp
BridgeToken.abi
"
${
chain33US
TD
BridgeTokenAddr
}
.abi"
chain33US
DTBridgeTokenAddr
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33BridgeBank
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"getToken2address(USDT
)"
)
echo
"US
DT Bridge Token Addr =
${
chain33USDT
BridgeTokenAddr
}
"
cp
BridgeToken.abi
"
${
chain33US
DT
BridgeTokenAddr
}
.abi"
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33US
TDBridgeTokenAddr
}
"
-c
"
${
chain33USTD
BridgeTokenAddr
}
"
-b
"symbol()"
)
is_equal
"
${
result
}
"
"US
TD
"
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33US
DTBridgeTokenAddr
}
"
-c
"
${
chain33USDT
BridgeTokenAddr
}
"
-b
"symbol()"
)
is_equal
"
${
result
}
"
"US
DT
"
${
CLIA
}
chain33 token
set
-t
"
${
chain33US
TDBridgeTokenAddr
}
"
-s
USTD
${
CLIA
}
chain33 token
set
-t
"
${
chain33US
DTBridgeTokenAddr
}
"
-s
USDT
}
function
offline_deploy_erc20_chain33_YCC
()
{
...
...
@@ -340,31 +340,31 @@ function offline_transfer_multisign_EthByc() {
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
function
offline_transfer_multisign_EthUS
TD
()
{
function
offline_transfer_multisign_EthUS
DT
()
{
echo
-e
"
${
GRE
}
===========
$FUNCNAME
begin ===========
${
NOC
}
"
# transfer
${
Boss4xCLI
}
ethereum offline multisign_transfer_prepare
-a
8
-r
"
${
ethBridgeBank
}
"
-c
"
${
multisignEthAddr
}
"
-d
"
${
ethTestAddr1
}
"
-t
"
${
ethereumUS
TD
ERC20TokenAddr
}
"
${
Boss4xCLI
}
ethereum offline multisign_transfer_prepare
-a
8
-r
"
${
ethBridgeBank
}
"
-c
"
${
multisignEthAddr
}
"
-d
"
${
ethTestAddr1
}
"
-t
"
${
ethereumUS
DT
ERC20TokenAddr
}
"
${
Boss4xCLI
}
ethereum offline sign_multisign_tx
-k
"
${
ethMultisignKeyA
}
,
${
ethMultisignKeyB
}
,
${
ethMultisignKeyC
}
,
${
ethMultisignKeyD
}
"
${
Boss4xCLI
}
ethereum offline create_multisign_tx
ethereum_offline_sign_send create_multisign_tx.txt
"
${
ethTestAddrKey1
}
"
sleep
10
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
-t
"
${
ethereumUS
TD
ERC20TokenAddr
}
"
)
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
-t
"
${
ethereumUS
DT
ERC20TokenAddr
}
"
)
cli_ret
"
${
result
}
"
"balance"
".balance"
"80"
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
multisignEthAddr
}
"
-t
"
${
ethereumUS
TD
ERC20TokenAddr
}
"
)
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
multisignEthAddr
}
"
-t
"
${
ethereumUS
DT
ERC20TokenAddr
}
"
)
cli_ret
"
${
result
}
"
"balance"
".balance"
"80"
# transfer
# ${CLIA} ethereum multisign transfer -a 10 -r "${ethMultisignA}" -o "${ethValidatorAddrKeyB}" -t "${ethereumUS
TD
ERC20TokenAddr}" -k "${ethMultisignKeyA},${ethMultisignKeyB},${ethMultisignKeyC},${ethMultisignKeyD}"
${
Boss4xCLI
}
ethereum offline multisign_transfer_prepare
-a
10
-r
"
${
ethMultisignA
}
"
-c
"
${
multisignEthAddr
}
"
-d
"
${
ethTestAddr1
}
"
-t
"
${
ethereumUS
TD
ERC20TokenAddr
}
"
# ${CLIA} ethereum multisign transfer -a 10 -r "${ethMultisignA}" -o "${ethValidatorAddrKeyB}" -t "${ethereumUS
DT
ERC20TokenAddr}" -k "${ethMultisignKeyA},${ethMultisignKeyB},${ethMultisignKeyC},${ethMultisignKeyD}"
${
Boss4xCLI
}
ethereum offline multisign_transfer_prepare
-a
10
-r
"
${
ethMultisignA
}
"
-c
"
${
multisignEthAddr
}
"
-d
"
${
ethTestAddr1
}
"
-t
"
${
ethereumUS
DT
ERC20TokenAddr
}
"
${
Boss4xCLI
}
ethereum offline sign_multisign_tx
-k
"
${
ethMultisignKeyA
}
,
${
ethMultisignKeyB
}
,
${
ethMultisignKeyC
}
,
${
ethMultisignKeyD
}
"
${
Boss4xCLI
}
ethereum offline create_multisign_tx
ethereum_offline_sign_send create_multisign_tx.txt
"
${
ethTestAddrKey1
}
"
sleep
10
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethMultisignA
}
"
-t
"
${
ethereumUS
TD
ERC20TokenAddr
}
"
)
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethMultisignA
}
"
-t
"
${
ethereumUS
DT
ERC20TokenAddr
}
"
)
cli_ret
"
${
result
}
"
"balance"
".balance"
"10"
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
multisignEthAddr
}
"
-t
"
${
ethereumUS
TD
ERC20TokenAddr
}
"
)
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
multisignEthAddr
}
"
-t
"
${
ethereumUS
DT
ERC20TokenAddr
}
"
)
cli_ret
"
${
result
}
"
"balance"
".balance"
"70"
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
...
...
plugin/dapp/bridgevmxgo/cmd/build/public/relayerPublic.sh
View file @
a0dd0a98
...
...
@@ -656,10 +656,10 @@ function lock_ethereum_byc_multisign() {
fi
}
function
lock_ethereum_us
td
_multisign
()
{
function
lock_ethereum_us
dt
_multisign
()
{
local
lockAmount
=
$1
# shellcheck disable=SC2154
result
=
$(${
CLIA
}
ethereum lock
-m
"
${
lockAmount
}
"
-k
"
${
ethTestAddrKey1
}
"
-r
"
${
chain33ReceiverAddr
}
"
-t
"
${
ethereumUS
TD
ERC20TokenAddr
}
"
)
result
=
$(${
CLIA
}
ethereum lock
-m
"
${
lockAmount
}
"
-k
"
${
ethTestAddrKey1
}
"
-r
"
${
chain33ReceiverAddr
}
"
-t
"
${
ethereumUS
DT
ERC20TokenAddr
}
"
)
cli_ret
"
${
result
}
"
"lock"
if
[[
$#
-eq
3
]]
;
then
...
...
@@ -669,9 +669,9 @@ function lock_ethereum_ustd_multisign() {
# eth 等待 2 个区块
sleep
4
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
-t
"
${
ethereumUS
TD
ERC20TokenAddr
}
"
)
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
-t
"
${
ethereumUS
DT
ERC20TokenAddr
}
"
)
cli_ret
"
${
result
}
"
"balance"
".balance"
"
${
bridgeBankBalance
}
"
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
multisignEthAddr
}
"
-t
"
${
ethereumUS
TD
ERC20TokenAddr
}
"
)
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
multisignEthAddr
}
"
-t
"
${
ethereumUS
DT
ERC20TokenAddr
}
"
)
cli_ret
"
${
result
}
"
"balance"
".balance"
"
${
multisignBalance
}
"
fi
}
...
...
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