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
ba9595e2
Commit
ba9595e2
authored
Dec 24, 2021
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
2f116650
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
20 deletions
+22
-20
dockerRelayerTest.sh
plugin/dapp/cross2eth/cmd/build/dockerRelayerTest.sh
+16
-16
mainPubilcRelayerTest.sh
.../dapp/cross2eth/cmd/build/public/mainPubilcRelayerTest.sh
+0
-0
config.pb.go
plugin/dapp/cross2eth/ebrelayer/types/config.pb.go
+3
-2
relayer.pb.go
plugin/dapp/cross2eth/ebrelayer/types/relayer.pb.go
+3
-2
No files found.
plugin/dapp/cross2eth/cmd/build/dockerRelayerTest.sh
View file @
ba9595e2
...
...
@@ -66,7 +66,7 @@ function TestETH2Chain33Assets_proxy() {
echo
-e
"
${
IYellow
}
ethBridgeBank lock 后金额
${
NOC
}
"
result
=
$(${
CLIP
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
)
# shellcheck disable=SC2219
let
ethBridgeBankBalanceEnd
=
${
ethBridgeBankBalancebf
}
+
${
lockAmount1
}
let
ethBridgeBankBalanceEnd
=
ethBridgeBankBalancebf+lockAmount1
cli_ret
"
${
result
}
"
"balance"
".balance"
"
${
ethBridgeBankBalanceEnd
}
"
# shellcheck disable=SC2086
...
...
@@ -77,7 +77,7 @@ function TestETH2Chain33Assets_proxy() {
# shellcheck disable=SC2154
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
# shellcheck disable=SC2219
let
chain33RBalancelock
=
${
lockAmount1
}*${
le8
}
+
${
chain33RBalancebf
}
let
chain33RBalancelock
=
lockAmount1
*
le8+chain33RBalancebf
is_equal
"
${
result
}
"
"
${
chain33RBalancelock
}
"
echo
-e
"
${
IYellow
}
chain33Validatorsp chain33 代理地址 lock 后金额
${
NOC
}
"
...
...
@@ -110,13 +110,13 @@ function TestETH2Chain33Assets_proxy() {
echo
-e
"
${
IYellow
}
chain33Validatorsp chain33 代理地址 withdraw 后金额
${
NOC
}
"
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
chain33Validatorsp
}
)"
)
# shellcheck disable=SC2219
let
chain33VspBalancewithdraw
=
${
lockAmount1
}*${
le8
}
+
${
chain33VspBalancebf
}
let
chain33VspBalancewithdraw
=
lockAmount1
*
le8+chain33VspBalancebf
is_equal
"
${
result
}
"
"
${
chain33VspBalancewithdraw
}
"
echo
-e
"
${
IYellow
}
ethTestAddr2 ethereum withdraw 接收地址 withdraw 后金额
${
NOC
}
"
result
=
$(${
CLIP
}
ethereum balance
-o
"
${
ethTestAddr2
}
"
| jq
-r
".balance"
)
# shellcheck disable=SC2219
let
ethT2BalanceEnd
=
${
ethT2Balancebf
}
+
${
lockAmount1
}
-1
let
ethT2BalanceEnd
=
ethT2Balancebf+lockAmount1
-1
is_equal
"
${
result
}
"
"
${
ethT2BalanceEnd
}
"
echo
-e
"
${
IYellow
}
ethValidatorAddrp ethereum 代理地址 withdraw 后金额
${
NOC
}
"
...
...
@@ -124,7 +124,7 @@ function TestETH2Chain33Assets_proxy() {
if
[[
$(
echo
"
${
ethPBalancebf
}
-
${
lockAmount1
}
+1 <
$result
"
| bc
)
]]
;
then
echo
-e
"
${
RED
}
error
$ethPBalanceEnd
小于
$result
, 应该大于
$ethPBalanceEnd
扣了一点点手续费
${
NOC
}
"
# exit 1
# exit 1
fi
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
...
...
@@ -160,7 +160,7 @@ function TestETH2Chain33Assets_proxy_excess() {
echo
-e
"
${
IYellow
}
ethBridgeBank lock 后金额
${
NOC
}
"
result
=
$(${
CLIP
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
)
# shellcheck disable=SC2219
let
ethBridgeBankBalanceEnd
=
${
ethBridgeBankBalancebf
}
+
${
lockAmount1
}
let
ethBridgeBankBalanceEnd
=
ethBridgeBankBalancebf+lockAmount1
cli_ret
"
${
result
}
"
"balance"
".balance"
"
${
ethBridgeBankBalanceEnd
}
"
# shellcheck disable=SC2086
...
...
@@ -171,7 +171,7 @@ function TestETH2Chain33Assets_proxy_excess() {
# shellcheck disable=SC2154
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
# shellcheck disable=SC2219
let
chain33RBalancelock
=
${
lockAmount1
}*${
le8
}
+
${
chain33RBalancebf
}
let
chain33RBalancelock
=
lockAmount1
*
le8+chain33RBalancebf
is_equal
"
${
result
}
"
"
${
chain33RBalancelock
}
"
echo
-e
"
${
IYellow
}
chain33Validatorsp chain33 代理地址 lock 后金额
${
NOC
}
"
...
...
@@ -204,7 +204,7 @@ function TestETH2Chain33Assets_proxy_excess() {
echo
-e
"
${
IYellow
}
chain33Validatorsp chain33 代理地址 withdraw 后金额
${
NOC
}
"
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
chain33Validatorsp
}
)"
)
# shellcheck disable=SC2219
let
chain33VspBalancewithdraw
=
${
lockAmount1
}*${
le8
}
+
${
chain33VspBalancebf
}
let
chain33VspBalancewithdraw
=
lockAmount1
*
le8+chain33VspBalancebf
is_equal
"
${
result
}
"
"
${
chain33VspBalancewithdraw
}
"
echo
-e
"
${
IYellow
}
ethTestAddr2 ethereum withdraw 接收地址 withdraw 后金额 超额了金额跟之前一样
${
NOC
}
"
...
...
@@ -246,7 +246,7 @@ function TestETH2Chain33USDT_proxy() {
echo
-e
"
${
IYellow
}
查询 ETH 这端 ethBridgeBank lock 后金额
${
NOC
}
"
result
=
$(${
CLIP
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
-t
"
${
ethereumUSDTERC20TokenAddr
}
"
)
# shellcheck disable=SC2219
let
ethBridgeBankBalanceEnd
=
${
ethBridgeBankBalancebf
}
+
${
lockAmount1
}
let
ethBridgeBankBalanceEnd
=
ethBridgeBankBalancebf+lockAmount1
cli_ret
"
${
result
}
"
"balance"
".balance"
"
${
ethBridgeBankBalanceEnd
}
"
sleep
"
${
maturityDegree
}
"
...
...
@@ -256,7 +256,7 @@ function TestETH2Chain33USDT_proxy() {
# shellcheck disable=SC2154
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33USDTBridgeTokenAddr
}
"
-c
"
${
chain33TestAddr1
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
# shellcheck disable=SC2219
let
chain33RBalancelock
=
${
lockAmount1
}*${
le8
}
+
${
chain33RBalancebf
}
let
chain33RBalancelock
=
lockAmount1
*
le8+chain33RBalancebf
is_equal
"
${
result
}
"
"
${
chain33RBalancelock
}
"
echo
-e
"
${
IYellow
}
chain33Validatorsp chain33 代理地址 lock 后金额
${
NOC
}
"
...
...
@@ -288,19 +288,19 @@ function TestETH2Chain33USDT_proxy() {
echo
-e
"
${
IYellow
}
chain33Validatorsp chain33 代理地址 withdraw 后金额
${
NOC
}
"
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33USDTBridgeTokenAddr
}
"
-c
"
${
chain33TestAddr1
}
"
-b
"balanceOf(
${
chain33Validatorsp
}
)"
)
# shellcheck disable=SC2219
let
chain33VspBalancewithdraw
=
${
lockAmount1
}*${
le8
}
+
${
chain33VspBalancebf
}
let
chain33VspBalancewithdraw
=
lockAmount1
*
le8+chain33VspBalancebf
is_equal
"
${
result
}
"
"
${
chain33VspBalancewithdraw
}
"
echo
-e
"
${
IYellow
}
ethTestAddr2 ethereum withdraw 接收地址 withdraw 后金额
${
NOC
}
"
result
=
$(${
CLIP
}
ethereum balance
-o
"
${
ethReceiverAddr1
}
"
-t
"
${
ethereumUSDTERC20TokenAddr
}
"
| jq
-r
".balance"
)
# shellcheck disable=SC2219
let
ethT2BalanceEnd
=
${
ethT2Balancebf
}
+
${
lockAmount1
}
-1
let
ethT2BalanceEnd
=
ethT2Balancebf+lockAmount1
-1
is_equal
"
${
result
}
"
"
${
ethT2BalanceEnd
}
"
echo
-e
"
${
IYellow
}
ethValidatorAddrp ethereum 代理地址 withdraw 后金额
${
NOC
}
"
result
=
$(${
CLIP
}
ethereum balance
-o
"
${
ethValidatorAddrp
}
"
-t
"
${
ethereumUSDTERC20TokenAddr
}
"
| jq
-r
".balance"
)
# shellcheck disable=SC2219
let
ethPBalanceEnd
=
${
ethPBalancebf
}
-
${
lockAmount1
}
+1
let
ethPBalanceEnd
=
ethPBalancebf-lockAmount1
+1
is_equal
"
${
result
}
"
"
${
ethPBalanceEnd
}
"
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
...
...
@@ -334,7 +334,7 @@ function TestETH2Chain33USDT_proxy_excess() {
echo
-e
"
${
IYellow
}
查询 ETH 这端 ethBridgeBank lock 后金额
${
NOC
}
"
result
=
$(${
CLIP
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
-t
"
${
ethereumUSDTERC20TokenAddr
}
"
)
# shellcheck disable=SC2219
let
ethBridgeBankBalanceEnd
=
${
ethBridgeBankBalancebf
}
+
${
lockAmount1
}
let
ethBridgeBankBalanceEnd
=
ethBridgeBankBalancebf+lockAmount1
cli_ret
"
${
result
}
"
"balance"
".balance"
"
${
ethBridgeBankBalanceEnd
}
"
sleep
"
${
maturityDegree
}
"
...
...
@@ -344,7 +344,7 @@ function TestETH2Chain33USDT_proxy_excess() {
# shellcheck disable=SC2154
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33USDTBridgeTokenAddr
}
"
-c
"
${
chain33TestAddr1
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
# shellcheck disable=SC2219
let
chain33RBalancelock
=
${
lockAmount1
}*${
le8
}
+
${
chain33RBalancebf
}
let
chain33RBalancelock
=
lockAmount1
*
le8+chain33RBalancebf
is_equal
"
${
result
}
"
"
${
chain33RBalancelock
}
"
echo
-e
"
${
IYellow
}
chain33Validatorsp chain33 代理地址 lock 后金额
${
NOC
}
"
...
...
@@ -376,7 +376,7 @@ function TestETH2Chain33USDT_proxy_excess() {
echo
-e
"
${
IYellow
}
chain33Validatorsp chain33 代理地址 withdraw 后金额
${
NOC
}
"
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33USDTBridgeTokenAddr
}
"
-c
"
${
chain33TestAddr1
}
"
-b
"balanceOf(
${
chain33Validatorsp
}
)"
)
# shellcheck disable=SC2219
let
chain33VspBalancewithdraw
=
${
lockAmount1
}*${
le8
}
+
${
chain33VspBalancebf
}
let
chain33VspBalancewithdraw
=
lockAmount1
*
le8+chain33VspBalancebf
is_equal
"
${
result
}
"
"
${
chain33VspBalancewithdraw
}
"
echo
-e
"
${
IYellow
}
ethTestAddr2 ethereum withdraw 接收地址 withdraw 后金额 超额了金额跟之前一样
${
NOC
}
"
...
...
plugin/dapp/cross2eth/cmd/build/public/mainPubilcRelayerTest.sh
View file @
ba9595e2
plugin/dapp/cross2eth/ebrelayer/types/config.pb.go
View file @
ba9595e2
...
...
@@ -7,11 +7,12 @@
package
types
import
(
reflect
"reflect"
sync
"sync"
proto
"github.com/golang/protobuf/proto"
protoreflect
"google.golang.org/protobuf/reflect/protoreflect"
protoimpl
"google.golang.org/protobuf/runtime/protoimpl"
reflect
"reflect"
sync
"sync"
)
const
(
...
...
plugin/dapp/cross2eth/ebrelayer/types/relayer.pb.go
View file @
ba9595e2
...
...
@@ -7,11 +7,12 @@
package
types
import
(
reflect
"reflect"
sync
"sync"
proto
"github.com/golang/protobuf/proto"
protoreflect
"google.golang.org/protobuf/reflect/protoreflect"
protoimpl
"google.golang.org/protobuf/runtime/protoimpl"
reflect
"reflect"
sync
"sync"
)
const
(
...
...
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