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
4178a770
Commit
4178a770
authored
Dec 21, 2021
by
QM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add SetWithdrawProxyCmd
parent
132f4c9a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
0 deletions
+40
-0
createERC20.go
plugin/dapp/cross2eth/boss4x/chain33/offline/createERC20.go
+34
-0
offline.go
plugin/dapp/cross2eth/boss4x/chain33/offline/offline.go
+1
-0
Chain33BridgeBank.abi
plugin/dapp/cross2eth/cmd/build/abi/Chain33BridgeBank.abi
+0
-0
docker-compose-cross2eth.yml
plugin/dapp/cross2eth/cmd/build/docker-compose-cross2eth.yml
+5
-0
No files found.
plugin/dapp/cross2eth/boss4x/chain33/offline/createERC20.go
View file @
4178a770
...
@@ -210,3 +210,37 @@ func CreateNewBridgeToken(cmd *cobra.Command, _ []string) {
...
@@ -210,3 +210,37 @@ func CreateNewBridgeToken(cmd *cobra.Command, _ []string) {
}
}
callContractAndSignWrite
(
cmd
,
packData
,
contract
,
"create_bridge_token"
)
callContractAndSignWrite
(
cmd
,
packData
,
contract
,
"create_bridge_token"
)
}
}
func
SetWithdrawProxyCmd
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"set_withdraw_proxy"
,
Short
:
"set withdraw proxy on chain33, and it's should be done by operator"
,
Run
:
SetWithdrawProxy
,
}
addSetWithdrawProxyFlags
(
cmd
)
return
cmd
}
func
addSetWithdrawProxyFlags
(
cmd
*
cobra
.
Command
)
{
cmd
.
Flags
()
.
StringP
(
"address"
,
"a"
,
""
,
"withdraw address"
)
_
=
cmd
.
MarkFlagRequired
(
"address"
)
cmd
.
Flags
()
.
StringP
(
"contract"
,
"c"
,
""
,
"bridgebank contract address"
)
_
=
cmd
.
MarkFlagRequired
(
"contract"
)
cmd
.
Flags
()
.
StringP
(
"key"
,
"k"
,
""
,
"the deployer private key"
)
_
=
cmd
.
MarkFlagRequired
(
"key"
)
cmd
.
Flags
()
.
StringP
(
"note"
,
"n"
,
""
,
"transaction note info (optional)"
)
cmd
.
Flags
()
.
Float64P
(
"fee"
,
"f"
,
0
,
"contract gas fee (optional)"
)
}
func
SetWithdrawProxy
(
cmd
*
cobra
.
Command
,
_
[]
string
)
{
contract
,
_
:=
cmd
.
Flags
()
.
GetString
(
"contract"
)
withdrawAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"address"
)
parameter
:=
fmt
.
Sprintf
(
"setWithdrawProxy(%s)"
,
withdrawAddr
)
_
,
packData
,
err
:=
evmAbi
.
Pack
(
parameter
,
generated
.
BridgeBankABI
,
false
)
if
nil
!=
err
{
fmt
.
Println
(
"configOfflineSaveAccount"
,
"Failed to do abi.Pack due to:"
,
err
.
Error
())
return
}
callContractAndSignWrite
(
cmd
,
packData
,
contract
,
"create_bridge_token"
)
}
plugin/dapp/cross2eth/boss4x/chain33/offline/offline.go
View file @
4178a770
...
@@ -35,6 +35,7 @@ func Boss4xOfflineCmd() *cobra.Command {
...
@@ -35,6 +35,7 @@ func Boss4xOfflineCmd() *cobra.Command {
ConfigLockedTokenOfflineSaveCmd
(),
ConfigLockedTokenOfflineSaveCmd
(),
CreateMultisignTransferCmd
(),
CreateMultisignTransferCmd
(),
MultisignTransferCmd
(),
MultisignTransferCmd
(),
SetWithdrawProxyCmd
(),
)
)
return
cmd
return
cmd
}
}
...
...
plugin/dapp/cross2eth/cmd/build/abi/Chain33BridgeBank.abi
View file @
4178a770
This diff is collapsed.
Click to expand it.
plugin/dapp/cross2eth/cmd/build/docker-compose-cross2eth.yml
View file @
4178a770
...
@@ -5,6 +5,11 @@ services:
...
@@ -5,6 +5,11 @@ services:
entrypoint
:
[
"
node"
,
"
/app/ganache-core.docker.cli.js"
,
"
-a"
,
"
20"
,
"
-b"
,
"
2"
,
"
--debug"
,
"
-m"
,
"
coast
bar
giraffe
art
venue
decide
symbol
law
visual
crater
vital
fold"
,
"
-e"
,
"
1000"
]
entrypoint
:
[
"
node"
,
"
/app/ganache-core.docker.cli.js"
,
"
-a"
,
"
20"
,
"
-b"
,
"
2"
,
"
--debug"
,
"
-m"
,
"
coast
bar
giraffe
art
venue
decide
symbol
law
visual
crater
vital
fold"
,
"
-e"
,
"
1000"
]
image
:
trufflesuite/ganache-cli:latest
image
:
trufflesuite/ganache-cli:latest
ebrelayerProxy
:
build
:
context
:
.
dockerfile
:
Dockerfile-cross2eth
ebrelayera
:
ebrelayera
:
build
:
build
:
context
:
.
context
:
.
...
...
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