bridge

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Bridge helper command

This is a helper command, which allows sending deposits from root to child chain and make withdrawals from child chain to root chain.

Deposit ERC20

This is a helper command which deposits ERC20 tokens from the root chain to the child chain

$ go-plgchain bridge deposit-erc20 \
    --sender-key <hex_encoded_depositor_private_key> \
    --receivers <receivers_addresses> \
    --amounts <amounts> \
    --root-token <root_erc20_token_address> \
    --root-predicate <root_erc20_predicate_address> \
    --json-rpc <root_chain_json_rpc_endpoint>

Note: for using test account provided by Geth dev instance, use --test flag. In that case --sender-key flag can be omitted and test account is used as a depositor.

Withdraw ERC20

This is a helper command which withdraws ERC20 tokens from the child chain to the root chain

$ go-plgchain bridge withdraw-erc20 \
    --sender-key <hex_encoded_txn_sender_private_key> \
    --receivers <receivers_addresses> \
    --amounts <amounts> \
    --child-predicate <rchild_erc20_predicate_address> \
    [--child-token <child_erc20_token_address>] \
    --json-rpc <child_chain_json_rpc_endpoint>

Exit

This is a helper command which qeuries child chain for exit event proof and sends an exit transaction to ExitHelper smart contract.

$ go-plgchain bridge exit \
    --sender-key <hex_encoded_txn_sender_private_key> \
    --exit-helper <exit_helper_address> \
    --exit-id <exit_event_id> \
    --root-json-rpc <root_chain_json_rpc_endpoint> \
    --child-json-rpc <child_chain_json_rpc_endpoint>

Note: for using test account provided by Geth dev instance, use --test flag. In that case --sender-key flag can be omitted and test account is used as an exit transaction sender.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommand

func GetCommand() *cobra.Command

GetCommand creates "bridge" helper command

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL