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
61ca50d4
Commit
61ca50d4
authored
Dec 06, 2021
by
QM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix set_symbol
parent
cd5cb0e4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
4 deletions
+54
-4
dockerRelayerBsc.sh
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerBsc.sh
+2
-2
ConfigplatformTokenSymbol.go
...2eth/boss4x/ethereum/offline/ConfigplatformTokenSymbol.go
+49
-0
offline.go
plugin/dapp/cross2eth/boss4x/ethereum/offline/offline.go
+1
-0
ethereumRelayerCmd.go
plugin/dapp/cross2eth/ebcli/ethereumRelayerCmd.go
+2
-2
No files found.
plugin/dapp/bridgevmxgo/cmd/build/dockerRelayerBsc.sh
View file @
61ca50d4
...
...
@@ -777,8 +777,8 @@ function StartDockerRelayerDeploy() {
# 部署合约 设置 bridgeRegistry 地址
InitAndOfflineDeploy
result
=
$(${
CLIA
}
ethereum multisign set_symbol
-s
"HT"
)
cli_ret
"
${
result
}
"
"set_symbol
"
${
Boss4xCLI
}
ethereum offline set_symbol
-s
"HT"
-c
"
${
ethBridgeBank
}
"
-d
"
${
ethDeployAddr
}
"
ethereum_offline_sign_send
"set_symbol.txt
"
# 设置离线多签数据
Chain33Cli
=
${
MainCli
}
...
...
plugin/dapp/cross2eth/boss4x/ethereum/offline/ConfigplatformTokenSymbol.go
0 → 100644
View file @
61ca50d4
package
offline
import
(
"fmt"
"github.com/ethereum/go-ethereum/accounts/abi"
"strings"
"github.com/33cn/plugin/plugin/dapp/cross2eth/contracts/contracts4eth/generated"
"github.com/spf13/cobra"
)
func
ConfigplatformTokenSymbolCmd
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"set_symbol"
,
Short
:
"save config symbol"
,
Run
:
ConfigplatformTokenSymbol
,
}
addConfigplatformTokenSymbolFlags
(
cmd
)
return
cmd
}
func
addConfigplatformTokenSymbolFlags
(
cmd
*
cobra
.
Command
)
{
cmd
.
Flags
()
.
StringP
(
"symbol"
,
"s"
,
"ETH"
,
"symbol"
)
_
=
cmd
.
MarkFlagRequired
(
"symbol"
)
cmd
.
Flags
()
.
StringP
(
"deployAddr"
,
"d"
,
""
,
"deploy contract addr"
)
_
=
cmd
.
MarkFlagRequired
(
"deployAddr"
)
cmd
.
Flags
()
.
StringP
(
"contract"
,
"c"
,
""
,
"bridgebank contract address"
)
_
=
cmd
.
MarkFlagRequired
(
"contract"
)
}
func
ConfigplatformTokenSymbol
(
cmd
*
cobra
.
Command
,
_
[]
string
)
{
url
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr_ethereum"
)
symbol
,
_
:=
cmd
.
Flags
()
.
GetString
(
"symbol"
)
deployAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"deployAddr"
)
contract
,
_
:=
cmd
.
Flags
()
.
GetString
(
"contract"
)
bridgeAbi
,
err
:=
abi
.
JSON
(
strings
.
NewReader
(
generated
.
BridgeBankABI
))
if
err
!=
nil
{
fmt
.
Println
(
"JSON NewReader Err:"
,
err
)
return
}
abiData
,
err
:=
bridgeAbi
.
Pack
(
"configplatformTokenSymbol"
,
symbol
)
if
err
!=
nil
{
panic
(
err
)
}
CreateTxInfoAndWrite
(
abiData
,
deployAddr
,
contract
,
"set_symbol"
,
url
)
}
plugin/dapp/cross2eth/boss4x/ethereum/offline/offline.go
View file @
61ca50d4
...
...
@@ -44,6 +44,7 @@ func DeployOfflineContractsCmd() *cobra.Command {
CreateMultisignTransferTxCmd
(),
// 创建多签转帐交易
SignCmd
(),
// 签名交易 sign deploy contract tx
SendTxsCmd
(),
// 发送交易 send all kinds of tx
ConfigplatformTokenSymbolCmd
(),
)
return
cmd
...
...
plugin/dapp/cross2eth/ebcli/ethereumRelayerCmd.go
View file @
61ca50d4
...
...
@@ -992,10 +992,10 @@ func ConfigplatformTokenSymbolFlags(cmd *cobra.Command) {
//ConfigplatformTokenSymbol ...
func
ConfigplatformTokenSymbol
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
addr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"address
"
)
symbol
,
_
:=
cmd
.
Flags
()
.
GetString
(
"symbol
"
)
var
res
rpctypes
.
Reply
ctx
:=
jsonclient
.
NewRPCCtx
(
rpcLaddr
,
"Manager.ConfigplatformTokenSymbol"
,
addr
,
&
res
)
ctx
:=
jsonclient
.
NewRPCCtx
(
rpcLaddr
,
"Manager.ConfigplatformTokenSymbol"
,
symbol
,
&
res
)
ctx
.
Run
()
}
...
...
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