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
a1d6d356
Commit
a1d6d356
authored
Dec 09, 2021
by
QM
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bridgevmxgo_bsc_1201' of github.com:YingQm/plugin into bridgevmxgo_bsc_1201
parents
756e7aed
8137e316
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
126 additions
and
99 deletions
+126
-99
dockerRelayerBsc.sh
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerBsc.sh
+51
-52
dockerRelayerHt.sh
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerHt.sh
+3
-3
offlinePublic.sh
plugin/dapp/bridgevmxgo/cmd/build/public/offlinePublic.sh
+4
-4
ConfigplatformTokenSymbol.go
...2eth/boss4x/ethereum/offline/ConfigplatformTokenSymbol.go
+2
-1
Makefile
plugin/dapp/cross2eth/contracts/Makefile
+5
-0
ERC20.sol
plugin/dapp/cross2eth/contracts/erc20/ERC20.sol
+0
-0
erc20.go
plugin/dapp/cross2eth/contracts/erc20/generated/erc20.go
+0
-0
ethereumRelayerCmd.go
plugin/dapp/cross2eth/ebcli/ethereumRelayerCmd.go
+13
-4
relayer.proto
plugin/dapp/cross2eth/ebrelayer/proto/relayer.proto
+1
-0
ethereum.go
plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethereum.go
+2
-2
deploy.go
...app/cross2eth/ebrelayer/relayer/ethereum/ethtxs/deploy.go
+2
-2
manager.go
plugin/dapp/cross2eth/ebrelayer/relayer/manager.go
+1
-1
config.pb.go
plugin/dapp/cross2eth/ebrelayer/types/config.pb.go
+3
-2
relayer.pb.go
plugin/dapp/cross2eth/ebrelayer/types/relayer.pb.go
+39
-28
No files found.
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerBsc.sh
View file @
a1d6d356
...
...
@@ -243,7 +243,7 @@ function TestETH2Chain33Assets() {
# chain33 chain33EthBridgeTokenAddr(ETH合约中)查询 lock 金额
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
# is_equal "${result}" "2000000000000000"
# is_equal "${result}" "2000000000000000"
# 原来的数额
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethTestAddr2
}
"
)
...
...
@@ -256,7 +256,7 @@ function TestETH2Chain33Assets() {
echo
"check the balance on chain33"
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
# is_equal "${result}" "1700000000000000"
# is_equal "${result}" "1700000000000000"
# 查询 ETH 这端 bridgeBank 地址 0
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
)
...
...
@@ -441,11 +441,11 @@ function TestETH2Chain33BUSD() {
# chain33 chain33EthBridgeTokenAddr(ETH合约中)查询 lock 金额
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33BUSDBridgeTokenAddr
}
"
-c
"
${
chain33TestAddr1
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
# 结果是 12 * le8
# is_equal "${result}" "3000000000000000000"
# is_equal "${result}" "3000000000000000000"
# 原来的数额 0
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethReceiverAddr1
}
"
-t
"
${
ethereumBUSDERC20TokenAddr
}
"
)
# cli_ret "${result}" "balance" ".balance" "0"
# cli_ret "${result}" "balance" ".balance" "0"
echo
'#5.burn YCC from Chain33 YCC(Chain33)-----> Ethereum'
result
=
$(${
CLIA
}
chain33 burn
-m
1
-k
"
${
chain33ReceiverAddrKey
}
"
-r
"
${
ethReceiverAddr1
}
"
-t
"
${
chain33BUSDBridgeTokenAddr
}
"
)
...
...
@@ -456,7 +456,7 @@ function TestETH2Chain33BUSD() {
echo
"check the balance on chain33"
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33BUSDBridgeTokenAddr
}
"
-c
"
${
chain33TestAddr1
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
# 结果是 12-5 * le8
# is_equal "${result}" "2000000000000000000"
# is_equal "${result}" "2000000000000000000"
# 查询 ETH 这端 bridgeBank 地址 7
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
-t
"
${
ethereumBUSDERC20TokenAddr
}
"
)
...
...
@@ -742,13 +742,13 @@ function up_relayer_toml() {
# 在第 line 行后面 新增合约地址
sed
-i
''
"
${
line
}
"
' a ChainName="user.p.para."'
"./relayer.toml"
# # shellcheck disable=SC2155
# local line=$(delete_line_show "./relayer.toml" "maturityDegree=10")
# sed -i ''"${line}"' a maturityDegree=1' "./relayer.toml"
#
# # shellcheck disable=SC2155
# local line=$(delete_line_show "./relayer.toml" "EthMaturityDegree=10")
# sed -i ''"${line}"' a EthMaturityDegree=1' "./relayer.toml"
# # shellcheck disable=SC2155
# local line=$(delete_line_show "./relayer.toml" "maturityDegree=10")
# sed -i ''"${line}"' a maturityDegree=1' "./relayer.toml"
#
# # shellcheck disable=SC2155
# local line=$(delete_line_show "./relayer.toml" "EthMaturityDegree=10")
# sed -i ''"${line}"' a EthMaturityDegree=1' "./relayer.toml"
}
function
StartDockerRelayerDeploy
()
{
...
...
@@ -792,17 +792,17 @@ function StartDockerRelayerDeploy() {
updata_toml_start_bcd
# 设置 token 地址
# offline_create_bridge_token_eth_BTY
# offline_deploy_erc20_eth_BYC
# offline_deploy_erc20_eth_USDT
# offline_create_bridge_token_eth_YCC
# offline_create_bridge_token_eth_ZBC
#
# offline_create_bridge_token_chain33_ETH "BNB"
# offline_create_bridge_token_chain33_BYC
# offline_deploy_erc20_chain33_YCC
# offline_deploy_erc20_chain33_ZBC
# offline_create_bridge_token_chain33_USDT
# offline_create_bridge_token_eth_BTY
# offline_deploy_erc20_eth_BYC
# offline_deploy_erc20_eth_USDT
# offline_create_bridge_token_eth_YCC
# offline_create_bridge_token_eth_ZBC
#
# offline_create_bridge_token_chain33_ETH "BNB"
# offline_create_bridge_token_chain33_BYC
# offline_deploy_erc20_chain33_YCC
# offline_deploy_erc20_chain33_ZBC
# offline_create_bridge_token_chain33_USDT
offline_create_bridge_token_chain33_BUSD
...
...
@@ -811,12 +811,12 @@ function StartDockerRelayerDeploy() {
# shellcheck disable=SC2086
{
# docker cp "${chain33EthBridgeTokenAddr}.abi" "${dockerNamePrefix}_ebrelayera_1":/root/${chain33EthBridgeTokenAddr}.abi
# docker cp "${chain33BycBridgeTokenAddr}.abi" "${dockerNamePrefix}_ebrelayera_1":/root/${chain33BycBridgeTokenAddr}.abi
# docker cp "${chain33USDTBridgeTokenAddr}.abi" "${dockerNamePrefix}_ebrelayera_1":/root/${chain33USDTBridgeTokenAddr}.abi
# docker cp "${chain33EthBridgeTokenAddr}.abi" "${dockerNamePrefix}_ebrelayera_1":/root/${chain33EthBridgeTokenAddr}.abi
# docker cp "${chain33BycBridgeTokenAddr}.abi" "${dockerNamePrefix}_ebrelayera_1":/root/${chain33BycBridgeTokenAddr}.abi
# docker cp "${chain33USDTBridgeTokenAddr}.abi" "${dockerNamePrefix}_ebrelayera_1":/root/${chain33USDTBridgeTokenAddr}.abi
docker
cp
"
${
chain33BUSDBridgeTokenAddr
}
.abi"
"
${
dockerNamePrefix
}
_ebrelayera_1"
:/root/
${
chain33BUSDBridgeTokenAddr
}
.abi
# docker cp "${chain33YccERC20TokenAddr}.abi" "${dockerNamePrefix}_ebrelayera_1":/root/${chain33YccERC20TokenAddr}.abi
# docker cp "${ethereumYccBridgeTokenAddr}.abi" "${dockerNamePrefix}_ebrelayera_1":/root/${ethereumYccBridgeTokenAddr}.abi
# docker cp "${chain33YccERC20TokenAddr}.abi" "${dockerNamePrefix}_ebrelayera_1":/root/${chain33YccERC20TokenAddr}.abi
# docker cp "${ethereumYccBridgeTokenAddr}.abi" "${dockerNamePrefix}_ebrelayera_1":/root/${ethereumYccBridgeTokenAddr}.abi
}
# 重启,因为relayerA的验证人地址和部署人的地址是一样的,所以需要重新启动relayer,更新nonce
...
...
@@ -1059,30 +1059,30 @@ function Testethereum2EVMToChain33_usdt() {
}
function
test_all
()
{
# TestETH2Chain33Assets
# TestChain33ToEthAssets
# TestChain33ToEthZBCAssets
# TestETH2Chain33Byc
# TestETH2Chain33USDT
# TestETH2Chain33Assets
# TestChain33ToEthAssets
# TestChain33ToEthZBCAssets
# TestETH2Chain33Byc
# TestETH2Chain33USDT
TestETH2Chain33BUSD
# lockBty
# lockChain33Ycc
# lockEth
# lockEthByc
# lockEthUSDT
#
# # 离线多签地址转入阈值设大
# 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_EthByc 100000000000000 10
# offline_set_offline_token_EthUSDT 100000000000000 10
# DeployEvmxgo
# TestETH2EVMToChain33
# Testethereum2EVMToChain33_byc
# Testethereum2EVMToChain33_usdt
# lockBty
# lockChain33Ycc
# lockEth
# lockEthByc
# lockEthUSDT
#
# # 离线多签地址转入阈值设大
# 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_EthByc 100000000000000 10
# offline_set_offline_token_EthUSDT 100000000000000 10
# DeployEvmxgo
# TestETH2EVMToChain33
# Testethereum2EVMToChain33_byc
# Testethereum2EVMToChain33_usdt
}
function
get_cli
()
{
...
...
@@ -1098,7 +1098,7 @@ function get_cli() {
CLIC
=
"docker exec
${
dockerNamePrefix
}
_ebrelayerc_1 /root/ebcli_A"
CLID
=
"docker exec
${
dockerNamePrefix
}
_ebrelayerd_1 /root/ebcli_A"
# docker_ganachetest_ip=$(get_docker_addr "${dockerNamePrefix}_ganachetest_1")
# docker_ganachetest_ip=$(get_docker_addr "${dockerNamePrefix}_ganachetest_1")
Boss4xCLI
=
"docker exec
${
dockerNamePrefix
}
_ebrelayera_1 /root/boss4x --rpc_laddr http://
${
docker_chain33_ip
}
:8901 --rpc_laddr_ethereum
${
BscProviderUrl
}
--paraName user.p.para. --chainEthId 56"
echo
"
${
Boss4xCLI
}
"
...
...
@@ -1142,4 +1142,3 @@ function AllRelayerMainTest() {
echo_addrs
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerHt.sh
View file @
a1d6d356
...
...
@@ -288,7 +288,7 @@ function TestETH2Chain33Assets() {
# chain33 chain33EthBridgeTokenAddr(ETH合约中)查询 lock 金额
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
# is_equal "${result}" "2000000000000000"
# is_equal "${result}" "2000000000000000"
# 原来的数额
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethTestAddr2
}
"
)
...
...
@@ -301,7 +301,7 @@ function TestETH2Chain33Assets() {
echo
"check the balance on chain33"
result
=
$(${
Chain33Cli
}
evm query
-a
"
${
chain33EthBridgeTokenAddr
}
"
-c
"
${
chain33DeployAddr
}
"
-b
"balanceOf(
${
chain33ReceiverAddr
}
)"
)
# is_equal "${result}" "1700000000000000"
# is_equal "${result}" "1700000000000000"
# 查询 ETH 这端 bridgeBank 地址 0
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
)
...
...
@@ -1075,7 +1075,7 @@ function AllRelayerMainTest() {
CLIC
=
"docker exec
${
dockerNamePrefix
}
_ebrelayerc_1 /root/ebcli_A"
CLID
=
"docker exec
${
dockerNamePrefix
}
_ebrelayerd_1 /root/ebcli_A"
# docker_ganachetest_ip=$(get_docker_addr "${dockerNamePrefix}_ganachetest_1")
# docker_ganachetest_ip=$(get_docker_addr "${dockerNamePrefix}_ganachetest_1")
Boss4xCLI
=
"docker exec
${
dockerNamePrefix
}
_ebrelayera_1 /root/boss4x --rpc_laddr http://
${
docker_chain33_ip
}
:8901 --rpc_laddr_ethereum
${
BscProviderUrl
}
--paraName user.p.para. --chainEthId 256"
echo
"
${
Boss4xCLI
}
"
...
...
plugin/dapp/bridgevmxgo/cmd/build/public/offlinePublic.sh
View file @
a1d6d356
...
...
@@ -308,9 +308,9 @@ function offline_transfer_multisign_Eth_test() {
sleep
10
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethBridgeBank
}
"
)
# cli_ret "${result}" "balance" ".balance" "16"
# cli_ret "${result}" "balance" ".balance" "16"
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
multisignEthAddr
}
"
)
# cli_ret "${result}" "balance" ".balance" "20"
# cli_ret "${result}" "balance" ".balance" "20"
# transfer
# shellcheck disable=SC2154
...
...
@@ -322,9 +322,9 @@ function offline_transfer_multisign_Eth_test() {
sleep
10
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
ethMultisignA
}
"
)
# cli_ret "${result}" "balance" ".balance" "1005"
# cli_ret "${result}" "balance" ".balance" "1005"
result
=
$(${
CLIA
}
ethereum balance
-o
"
${
multisignEthAddr
}
"
)
# cli_ret "${result}" "balance" ".balance" "15"
# cli_ret "${result}" "balance" ".balance" "15"
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
...
...
plugin/dapp/cross2eth/boss4x/ethereum/offline/ConfigplatformTokenSymbol.go
View file @
a1d6d356
...
...
@@ -2,9 +2,10 @@ package offline
import
(
"fmt"
"github.com/ethereum/go-ethereum/accounts/abi"
"strings"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/33cn/plugin/plugin/dapp/cross2eth/contracts/contracts4eth/generated"
"github.com/spf13/cobra"
)
...
...
plugin/dapp/cross2eth/contracts/Makefile
View file @
a1d6d356
...
...
@@ -2,6 +2,7 @@
##编译solidity,并产生bin文件,abi文件,和相应的go文件
SRC_BEP
:=
bep20
SRC_ERC20
:=
erc20
SRC_CONTRACT0
:=
contracts4chain33
SRC_CONTRACT1
:=
contracts4eth
SRC_MULTISIGN
:=
gnosis/safe-contracts/contracts
...
...
@@ -10,6 +11,7 @@ GO_OUT0 := ${SRC_CONTRACT0}/generated
GO_OUT1
:=
${
SRC_CONTRACT1
}
/generated
GO_OUT_MULTISIGN
:=
gnosis/generated
GO_OUT_BEP20
:=
bep20/generated
GO_OUT_ERC20
:=
erc20/generated
PACKAGE
:=
generated
proj
:=
"build"
...
...
@@ -30,6 +32,9 @@ multisign:
bep20Bin
:
@
abigen
--sol
$(SRC_BEP)
/BEP20.sol
--pkg
$(PACKAGE)
--out
$(GO_OUT_BEP20)
/bep20.go
erc20Bin
:
@
abigen
--sol
$(SRC_ERC20)
/ERC20.sol
--pkg
$(PACKAGE)
--out
$(GO_OUT_ERC20)
/erc20.go
clean
:
@
rm
-fr
$(GO_OUT)
/
*
...
...
plugin/dapp/cross2eth/contracts/erc20/ERC20.sol
View file @
a1d6d356
This diff is collapsed.
Click to expand it.
plugin/dapp/cross2eth/contracts/erc20/generated/
ERC
20.go
→
plugin/dapp/cross2eth/contracts/erc20/generated/
erc
20.go
View file @
a1d6d356
This diff is collapsed.
Click to expand it.
plugin/dapp/cross2eth/ebcli/ethereumRelayerCmd.go
View file @
a1d6d356
...
...
@@ -312,6 +312,8 @@ func DeployERC20Flags(cmd *cobra.Command) {
_
=
cmd
.
MarkFlagRequired
(
"symbol"
)
cmd
.
Flags
()
.
StringP
(
"amount"
,
"m"
,
"0"
,
"amount"
)
_
=
cmd
.
MarkFlagRequired
(
"amount"
)
cmd
.
Flags
()
.
Uint8P
(
"decimals"
,
"d"
,
8
,
"default set to 8, and can't be greater than 18"
)
}
func
DeployERC20
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
...
...
@@ -320,12 +322,19 @@ func DeployERC20(cmd *cobra.Command, args []string) {
name
,
_
:=
cmd
.
Flags
()
.
GetString
(
"name"
)
symbol
,
_
:=
cmd
.
Flags
()
.
GetString
(
"symbol"
)
amount
,
_
:=
cmd
.
Flags
()
.
GetString
(
"amount"
)
decimals
,
_
:=
cmd
.
Flags
()
.
GetUint8
(
"decimals"
)
if
decimals
>
18
{
fmt
.
Println
(
"decimals can't be greater than 18"
)
return
}
para
:=
ebTypes
.
ERC20Token
{
Owner
:
owner
,
Name
:
name
,
Symbol
:
symbol
,
Amount
:
amount
,
Owner
:
owner
,
Name
:
name
,
Symbol
:
symbol
,
Amount
:
amount
,
Decimals
:
int32
(
decimals
),
}
var
res
rpctypes
.
Reply
ctx
:=
jsonclient
.
NewRPCCtx
(
rpcLaddr
,
"Manager.DeployERC20"
,
para
,
&
res
)
...
...
plugin/dapp/cross2eth/ebrelayer/proto/relayer.proto
View file @
a1d6d356
...
...
@@ -222,6 +222,7 @@ message ERC20Token {
string
name
=
2
;
string
symbol
=
3
;
string
amount
=
4
;
int32
decimals
=
5
;
}
message
ETHTokenLockAddress
{
...
...
plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethereum.go
View file @
a1d6d356
...
...
@@ -332,12 +332,12 @@ func (ethRelayer *Relayer4Ethereum) AddToken2LockList(symbol, token string) (str
}
//DeployERC20 ...
func
(
ethRelayer
*
Relayer4Ethereum
)
DeployERC20
(
ownerAddr
,
name
,
symbol
,
amount
string
)
(
string
,
error
)
{
func
(
ethRelayer
*
Relayer4Ethereum
)
DeployERC20
(
ownerAddr
,
name
,
symbol
,
amount
string
,
decimals
uint8
)
(
string
,
error
)
{
bn
:=
big
.
NewInt
(
1
)
bn
,
_
=
bn
.
SetString
(
utils
.
TrimZeroAndDot
(
amount
),
10
)
ethRelayer
.
rwLock
.
RLock
()
defer
ethRelayer
.
rwLock
.
RUnlock
()
return
ethtxs
.
DeployERC20
(
ownerAddr
,
name
,
symbol
,
bn
,
ethRelayer
.
clientSpec
,
ethRelayer
.
operatorInfo
)
return
ethtxs
.
DeployERC20
(
ownerAddr
,
name
,
symbol
,
bn
,
decimals
,
ethRelayer
.
clientSpec
,
ethRelayer
.
operatorInfo
)
}
//ApproveAllowance ...
...
...
plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethtxs/deploy.go
View file @
a1d6d356
...
...
@@ -499,7 +499,7 @@ finished:
return
x2EthContracts
,
deployInfo
,
nil
}
func
DeployERC20
(
ownerAddr
,
name
,
symbol
string
,
amount
*
big
.
Int
,
client
ethinterface
.
EthClientSpec
,
para
*
OperatorInfo
)
(
string
,
error
)
{
func
DeployERC20
(
ownerAddr
,
name
,
symbol
string
,
amount
*
big
.
Int
,
decimals
uint8
,
client
ethinterface
.
EthClientSpec
,
para
*
OperatorInfo
)
(
string
,
error
)
{
if
nil
==
para
{
return
""
,
errors
.
New
(
"no operator private key configured"
)
}
...
...
@@ -523,7 +523,7 @@ func DeployERC20(ownerAddr, name, symbol string, amount *big.Int, client ethinte
txslog
.
Info
(
"DeployERC20"
,
"ownerAddr"
,
ownerAddr
,
"name"
,
name
,
"symbol"
,
symbol
,
"amount"
,
amount
,
"client"
,
client
)
Erc20OwnerAddr
:=
common
.
HexToAddress
(
ownerAddr
)
Erc20Addr
,
deployTx
,
_
,
err
:=
erc20
.
DeployERC20
(
operatorAuth
,
client
,
name
,
symbol
,
amount
,
Erc20OwnerAddr
)
Erc20Addr
,
deployTx
,
_
,
err
:=
erc20
.
DeployERC20
(
operatorAuth
,
client
,
name
,
symbol
,
amount
,
Erc20OwnerAddr
,
decimals
)
if
nil
!=
err
{
txslog
.
Error
(
"DeployERC20"
,
"Failed to DeployErc20 with err:"
,
err
.
Error
())
return
""
,
err
...
...
plugin/dapp/cross2eth/ebrelayer/relayer/manager.go
View file @
a1d6d356
...
...
@@ -485,7 +485,7 @@ func (manager *Manager) DeployERC20(Erc20Token relayerTypes.ERC20Token, result *
return
err
}
Erc20Addr
,
err
:=
manager
.
ethRelayer
.
DeployERC20
(
Erc20Token
.
Owner
,
Erc20Token
.
Name
,
Erc20Token
.
Symbol
,
Erc20Token
.
Amount
)
Erc20Addr
,
err
:=
manager
.
ethRelayer
.
DeployERC20
(
Erc20Token
.
Owner
,
Erc20Token
.
Name
,
Erc20Token
.
Symbol
,
Erc20Token
.
Amount
,
uint8
(
Erc20Token
.
Decimals
)
)
if
nil
!=
err
{
return
err
}
...
...
plugin/dapp/cross2eth/ebrelayer/types/config.pb.go
View file @
a1d6d356
...
...
@@ -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 @
a1d6d356
...
...
@@ -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
(
...
...
@@ -2129,10 +2130,11 @@ type ERC20Token struct {
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Owner
string
`protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
Name
string
`protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Symbol
string
`protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"`
Amount
string
`protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`
Owner
string
`protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
Name
string
`protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Symbol
string
`protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"`
Amount
string
`protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`
Decimals
int32
`protobuf:"varint,5,opt,name=decimals,proto3" json:"decimals,omitempty"`
}
func
(
x
*
ERC20Token
)
Reset
()
{
...
...
@@ -2195,6 +2197,13 @@ func (x *ERC20Token) GetAmount() string {
return
""
}
func
(
x
*
ERC20Token
)
GetDecimals
()
int32
{
if
x
!=
nil
{
return
x
.
Decimals
}
return
0
}
type
ETHTokenLockAddress
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
...
...
@@ -2568,28 +2577,30 @@ var file_relayer_proto_rawDesc = []byte{
0x72
,
0x69
,
0x76
,
0x61
,
0x74
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x12
,
0x2a
,
0x0a
,
0x10
,
0x6f
,
0x77
,
0x6e
,
0x65
,
0x72
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x74
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x73
,
0x18
,
0x05
,
0x20
,
0x03
,
0x28
,
0x09
,
0x52
,
0x10
,
0x6f
,
0x77
,
0x6e
,
0x65
,
0x72
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x74
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x73
,
0x22
,
0x66
,
0x0a
,
0x0a
,
0x45
,
0x52
,
0x43
,
0x32
,
0x30
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x12
,
0x14
,
0x0a
,
0x05
,
0x6f
,
0x77
,
0x6e
,
0x65
,
0x72
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x05
,
0x6f
,
0x77
,
0x6e
,
0x65
,
0x72
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x61
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x61
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x22
,
0x47
,
0x0a
,
0x13
,
0x45
,
0x54
,
0x48
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x4c
,
0x6f
,
0x63
,
0x6b
,
0x41
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x12
,
0x18
,
0x0a
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x22
,
0x89
,
0x01
,
0x0a
,
0x1b
,
0x45
,
0x54
,
0x48
,
0x43
,
0x6f
,
0x6e
,
0x66
,
0x69
,
0x67
,
0x4c
,
0x6f
,
0x63
,
0x6b
,
0x65
,
0x64
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x4f
,
0x66
,
0x66
,
0x6c
,
0x69
,
0x6e
,
0x65
,
0x12
,
0x18
,
0x0a
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x74
,
0x68
,
0x72
,
0x65
,
0x73
,
0x68
,
0x6f
,
0x6c
,
0x64
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x09
,
0x74
,
0x68
,
0x72
,
0x65
,
0x73
,
0x68
,
0x6f
,
0x6c
,
0x64
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x70
,
0x65
,
0x72
,
0x63
,
0x65
,
0x6e
,
0x74
,
0x73
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x0d
,
0x52
,
0x08
,
0x70
,
0x65
,
0x72
,
0x63
,
0x65
,
0x6e
,
0x74
,
0x73
,
0x42
,
0x0a
,
0x5a
,
0x08
,
0x2e
,
0x2e
,
0x2f
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x73
,
0x22
,
0x82
,
0x01
,
0x0a
,
0x0a
,
0x45
,
0x52
,
0x43
,
0x32
,
0x30
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x12
,
0x14
,
0x0a
,
0x05
,
0x6f
,
0x77
,
0x6e
,
0x65
,
0x72
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x05
,
0x6f
,
0x77
,
0x6e
,
0x65
,
0x72
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x61
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x61
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x64
,
0x65
,
0x63
,
0x69
,
0x6d
,
0x61
,
0x6c
,
0x73
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x05
,
0x52
,
0x08
,
0x64
,
0x65
,
0x63
,
0x69
,
0x6d
,
0x61
,
0x6c
,
0x73
,
0x22
,
0x47
,
0x0a
,
0x13
,
0x45
,
0x54
,
0x48
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x4c
,
0x6f
,
0x63
,
0x6b
,
0x41
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x12
,
0x18
,
0x0a
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x22
,
0x89
,
0x01
,
0x0a
,
0x1b
,
0x45
,
0x54
,
0x48
,
0x43
,
0x6f
,
0x6e
,
0x66
,
0x69
,
0x67
,
0x4c
,
0x6f
,
0x63
,
0x6b
,
0x65
,
0x64
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x4f
,
0x66
,
0x66
,
0x6c
,
0x69
,
0x6e
,
0x65
,
0x12
,
0x18
,
0x0a
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x07
,
0x61
,
0x64
,
0x64
,
0x72
,
0x65
,
0x73
,
0x73
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x73
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x74
,
0x68
,
0x72
,
0x65
,
0x73
,
0x68
,
0x6f
,
0x6c
,
0x64
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x09
,
0x74
,
0x68
,
0x72
,
0x65
,
0x73
,
0x68
,
0x6f
,
0x6c
,
0x64
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x70
,
0x65
,
0x72
,
0x63
,
0x65
,
0x6e
,
0x74
,
0x73
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x0d
,
0x52
,
0x08
,
0x70
,
0x65
,
0x72
,
0x63
,
0x65
,
0x6e
,
0x74
,
0x73
,
0x42
,
0x0a
,
0x5a
,
0x08
,
0x2e
,
0x2e
,
0x2f
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
}
var
(
...
...
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