bridge

package
v0.73.0-preview.16 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ERC20AddSignerCmd

type ERC20AddSignerCmd struct {
	NewSigner string `description:"Ethereum address of the new signer"                   long:"new-signer" required:"true"`
	Submitter string `description:"Ethereum address of the submitter of the transaction" long:"submitter"  required:"true"`
	Nonce     string `description:"A nonce for this signature"                           long:"nonce"      required:"true"`
}

func (*ERC20AddSignerCmd) Execute

func (opts *ERC20AddSignerCmd) Execute(_ []string) error

type ERC20BurnNonceCmd

type ERC20BurnNonceCmd struct {
	Submitter string `description:"Ethereum address of the submitter of the transaction" long:"submitter" required:"true"`
	Nonce     string `description:"A nonce for this signature"                           long:"nonce"     required:"true"`
}

func (*ERC20BurnNonceCmd) Execute

func (opts *ERC20BurnNonceCmd) Execute(_ []string) error

type ERC20Cmd

type ERC20Cmd struct {
	config.VegaHomeFlag
	config.PassphraseFlag
	Config     nodewallets.Config
	PrivateKey string `description:"A ethereum private key to be use to sign the messages" long:"private-key" required:"false"`

	AddSigner              ERC20AddSignerCmd              `command:"add_signer"                description:"Create signature to add a new signer to the erc20 bridge"`
	RemoveSigner           ERC20RemoveSignerCmd           `command:"remove_signer"             description:"Create signature to remove a signer from the erc20 bridge"`
	SetThreshold           ERC20SetThresholdCmd           `` /* 143-byte string literal not displayed */
	BurnNonce              ERC20BurnNonceCmd              `` /* 141-byte string literal not displayed */
	ListAsset              ERC20ListAssetCmd              `command:"list_asset"                description:"Add a new erc20 asset to the erc20 bridge"`
	VerifyListAsset        ERC20VerifyListAssetCmd        `command:"verify_list_asset"         description:"Verify signatures to add a new erc20 asset to the erc20 bridge"`
	RemoveAsset            ERC20RemoveAssetCmd            `command:"remove_asset"              description:"Remove an erc20 asset from the erc20 bridge"`
	WithdrawAsset          ERC20WithdrawAssetCmd          `command:"withdraw_asset"            description:"Withdraw ERC20 from the bridge"`
	VerifyWithdrawAsset    ERC20VerifyWithdrawAssetCmd    `command:"verify_withdraw_asset"     description:"Verify withdraw ERC20 from the bridge"`
	SetBridgeAddress       ERC20SetBridgeAddressCmd       `command:"set_bridge_address"        description:"Update the bridge address use by the asset pool"`
	SetMultisigControl     ERC20SetMultisigControlCmd     `command:"set_multisig_control"      description:"Update the bridge address use by the asset pool"`
	VerifyGlobalResume     ERC20VerifyGlobalResumeCmd     `command:"verify_global_resume"      description:"Verify the signature to resume usage of the bridge"`
	GlobalResume           ERC20GlobalResumeCmd           `command:"global_resume"             description:"Build the signature to resume usage of the bridge"`
	GlobalStop             ERC20GlobalStopCmd             `command:"global_stop"               description:"Build the signature to stop the bridge"`
	SetWithdrawDelay       ERC20SetWithdrawDelayCmd       `command:"set_withdraw_delay"        description:"Update the withdraw delay for all asset"`
	VerifySetWithdrawDelay ERC20VerifySetWithdrawDelayCmd `command:"verify_set_withdraw_delay" description:"Verify signatures to update the withdraw delay for all asset"`
	SetAssetLimits         ERC20SetAssetLimitsCmd         `command:"set_asset_limits"          description:"Update the limits for an asset"`
	VerifySetAssetLimits   ERC20VerifySetAssetLimitsCmd   `command:"verify_set_asset_limits"   description:"Verify signatures to update the limits for an asset"`
}

func ERC20

func ERC20() *ERC20Cmd

func (*ERC20Cmd) GetSigner

func (e *ERC20Cmd) GetSigner() (bridges.Signer, error)

type ERC20GlobalResumeCmd

type ERC20GlobalResumeCmd struct {
	Nonce         string `description:"A nonce for this signature"                                           long:"nonce"          required:"true"`
	BridgeAddress string `description:"The address of the vega bridge this transaction will be submitted to" long:"bridge-address" required:"true"`
}

func (*ERC20GlobalResumeCmd) Execute

func (opts *ERC20GlobalResumeCmd) Execute(_ []string) error

type ERC20GlobalStopCmd

type ERC20GlobalStopCmd struct {
	Nonce         string `description:"A nonce for this signature"                                           long:"nonce"          required:"true"`
	BridgeAddress string `description:"The address of the vega bridge this transaction will be submitted to" long:"bridge-address" required:"true"`
}

func (*ERC20GlobalStopCmd) Execute

func (opts *ERC20GlobalStopCmd) Execute(_ []string) error

type ERC20ListAssetCmd

type ERC20ListAssetCmd struct {
	TokenAddress      string `description:"The Ethereum address of the new token"                                long:"token-address"      required:"true"`
	VegaAssetID       string `description:"The vega ID for this new token"                                       long:"vega-asset-id"      required:"true"`
	BridgeAddress     string `description:"The address of the vega bridge this transaction will be submitted to" long:"bridge-address"     required:"true"`
	Nonce             string `description:"A nonce for this signature"                                           long:"nonce"              required:"true"`
	LifetimeLimit     string `description:"The lifetime deposit limit for the asset"                             long:"lifetime-limit"     required:"true"`
	WithdrawThreshold string `description:"The withdrawal threshold for this asset"                              long:"withdraw-threshold" required:"true"`
}

func (*ERC20ListAssetCmd) Execute

func (opts *ERC20ListAssetCmd) Execute(_ []string) error

type ERC20RemoveAssetCmd

type ERC20RemoveAssetCmd struct {
	TokenAddress  string `description:"The Ethereum address of the new token"                                long:"token-address"  required:"true"`
	BridgeAddress string `description:"The address of the vega bridge this transaction will be submitted to" long:"bridge-address" required:"true"`
	Nonce         string `description:"A nonce for this signature"                                           long:"nonce"          required:"true"`
}

func (*ERC20RemoveAssetCmd) Execute

func (opts *ERC20RemoveAssetCmd) Execute(_ []string) error

type ERC20RemoveSignerCmd

type ERC20RemoveSignerCmd struct {
	OldSigner string `description:"Ethereum address of signer to remove"                 long:"old-signer" required:"true"`
	Submitter string `description:"Ethereum address of the submitter of the transaction" long:"submitter"  required:"true"`
	Nonce     string `description:"A nonce for this signature"                           long:"nonce"      required:"true"`
}

func (*ERC20RemoveSignerCmd) Execute

func (opts *ERC20RemoveSignerCmd) Execute(_ []string) error

type ERC20SetAssetLimitsCmd

type ERC20SetAssetLimitsCmd struct {
	WithdrawThreshold      string `` /* 130-byte string literal not displayed */
	DepositLifetimeMaximum string `` /* 130-byte string literal not displayed */
	Nonce                  string `` /* 130-byte string literal not displayed */
	BridgeAddress          string `` /* 130-byte string literal not displayed */
	TokenAddress           string `` /* 130-byte string literal not displayed */
}

func (*ERC20SetAssetLimitsCmd) Execute

func (opts *ERC20SetAssetLimitsCmd) Execute(_ []string) error

type ERC20SetBridgeAddressCmd

type ERC20SetBridgeAddressCmd struct {
	NewAddress       string `` /* 128-byte string literal not displayed */
	AssetPoolAddress string `` /* 128-byte string literal not displayed */
	Nonce            string `` /* 128-byte string literal not displayed */
}

func (*ERC20SetBridgeAddressCmd) Execute

func (opts *ERC20SetBridgeAddressCmd) Execute(_ []string) error

type ERC20SetMultisigControlCmd

type ERC20SetMultisigControlCmd struct {
	NewAddress       string `` /* 128-byte string literal not displayed */
	AssetPoolAddress string `` /* 128-byte string literal not displayed */
	Nonce            string `` /* 128-byte string literal not displayed */
}

func (*ERC20SetMultisigControlCmd) Execute

func (opts *ERC20SetMultisigControlCmd) Execute(_ []string) error

type ERC20SetThresholdCmd

type ERC20SetThresholdCmd struct {
	NewThreshold uint16 `description:"The new threshold to be used on the bridge"           long:"new-threshold" required:"true"`
	Submitter    string `description:"Ethereum address of the submitter of the transaction" long:"submitter"     required:"true"`
	Nonce        string `description:"A nonce for this signature"                           long:"nonce"         required:"true"`
}

func (*ERC20SetThresholdCmd) Execute

func (opts *ERC20SetThresholdCmd) Execute(_ []string) error

type ERC20SetWithdrawDelayCmd

type ERC20SetWithdrawDelayCmd struct {
	Delay         time.Duration `description:"The delay to be applied to all withdrawals"                           long:"delay"          required:"true"`
	Nonce         string        `description:"A nonce for this signature"                                           long:"nonce"          required:"true"`
	BridgeAddress string        `description:"The address of the vega bridge this transaction will be submitted to" long:"bridge-address" required:"true"`
}

func (*ERC20SetWithdrawDelayCmd) Execute

func (opts *ERC20SetWithdrawDelayCmd) Execute(_ []string) error

type ERC20VerifyGlobalResumeCmd added in v0.72.0

type ERC20VerifyGlobalResumeCmd struct {
	Nonce         string `description:"A nonce for this signature"                                           long:"nonce"          required:"true"`
	BridgeAddress string `description:"The address of the vega bridge this transaction will be submitted to" long:"bridge-address" required:"true"`
	Signatures    string `description:"The list of signatures from the validators"                           long:"signatures"     required:"true"`
}

func (*ERC20VerifyGlobalResumeCmd) Execute added in v0.72.0

func (opts *ERC20VerifyGlobalResumeCmd) Execute(_ []string) error

type ERC20VerifyListAssetCmd added in v0.72.0

type ERC20VerifyListAssetCmd struct {
	TokenAddress      string `description:"The Ethereum address of the new token"                                long:"token-address"      required:"true"`
	VegaAssetID       string `description:"The vega ID for this new token"                                       long:"vega-asset-id"      required:"true"`
	BridgeAddress     string `description:"The address of the vega bridge this transaction will be submitted to" long:"bridge-address"     required:"true"`
	Nonce             string `description:"A nonce for this signature"                                           long:"nonce"              required:"true"`
	LifetimeLimit     string `description:"The lifetime deposit limit for the asset"                             long:"lifetime-limit"     required:"true"`
	WithdrawThreshold string `description:"The withdrawal threshold for this asset"                              long:"withdraw-threshold" required:"true"`
	Signatures        string `description:"The signature bundle to verify"                                       long:"signatures"         required:"true"`
}

func (*ERC20VerifyListAssetCmd) Execute added in v0.72.0

func (opts *ERC20VerifyListAssetCmd) Execute(_ []string) error

type ERC20VerifySetAssetLimitsCmd added in v0.72.0

type ERC20VerifySetAssetLimitsCmd struct {
	WithdrawThreshold      string `` /* 130-byte string literal not displayed */
	DepositLifetimeMaximum string `` /* 130-byte string literal not displayed */
	Nonce                  string `` /* 130-byte string literal not displayed */
	BridgeAddress          string `` /* 130-byte string literal not displayed */
	TokenAddress           string `` /* 130-byte string literal not displayed */
	Signatures             string `` /* 130-byte string literal not displayed */
}

func (*ERC20VerifySetAssetLimitsCmd) Execute added in v0.72.0

func (opts *ERC20VerifySetAssetLimitsCmd) Execute(_ []string) error

type ERC20VerifySetWithdrawDelayCmd added in v0.72.0

type ERC20VerifySetWithdrawDelayCmd struct {
	Delay         time.Duration `description:"The delay to be applied to all withdrawals"                           long:"delay"          required:"true"`
	Nonce         string        `description:"A nonce for this signature"                                           long:"nonce"          required:"true"`
	BridgeAddress string        `description:"The address of the vega bridge this transaction will be submitted to" long:"bridge-address" required:"true"`
	Signatures    string        `description:"The signature bundle to verify"                                       long:"signatures"     required:"true"`
}

func (*ERC20VerifySetWithdrawDelayCmd) Execute added in v0.72.0

func (opts *ERC20VerifySetWithdrawDelayCmd) Execute(_ []string) error

type ERC20VerifyWithdrawAssetCmd added in v0.72.0

type ERC20VerifyWithdrawAssetCmd struct {
	TokenAddress    string `description:"The Ethereum address of the new token"                                long:"token-address"    required:"true"`
	Amount          string `description:"The amount to be withdrawn"                                           long:"amount"           required:"true"`
	ReceiverAddress string `description:"The ethereum address of the wallet which is to receive the funds"     long:"receiver-address" required:"true"`
	BridgeAddress   string `description:"The address of the vega bridge this transaction will be submitted to" long:"bridge-address"   required:"true"`
	Nonce           string `description:"A nonce for this signature"                                           long:"nonce"            required:"true"`
	Creation        int64  `description:"creation time of the withdrawal (timestamp)"                          long:"creation"         required:"true"`
	Signatures      string `description:"signatures of the withdrawal"                                         long:"signatures"       required:"true"`
}

func (*ERC20VerifyWithdrawAssetCmd) Execute added in v0.72.0

func (opts *ERC20VerifyWithdrawAssetCmd) Execute(_ []string) error

type ERC20WithdrawAssetCmd

type ERC20WithdrawAssetCmd struct {
	TokenAddress    string `description:"The Ethereum address of the new token"                                long:"token-address"    required:"true"`
	Amount          string `description:"The amount to be withdrawn"                                           long:"amount"           required:"true"`
	ReceiverAddress string `description:"The ethereum address of the wallet which is to receive the funds"     long:"receiver-address" required:"true"`
	BridgeAddress   string `description:"The address of the vega bridge this transaction will be submitted to" long:"bridge-address"   required:"true"`
	Nonce           string `description:"A nonce for this signature"                                           long:"nonce"            required:"true"`
	Creation        int64  `description:"creation time of the withdrawal (timestamp)"                          long:"creation"         required:"true"`
}

func (*ERC20WithdrawAssetCmd) Execute

func (opts *ERC20WithdrawAssetCmd) Execute(_ []string) error

type PrivKeySigner

type PrivKeySigner struct {
	// contains filtered or unexported fields
}

func NewPrivKeySigner

func NewPrivKeySigner(hexPrivKey string) (*PrivKeySigner, error)

func (*PrivKeySigner) Algo

func (p *PrivKeySigner) Algo() string

func (*PrivKeySigner) Sign

func (p *PrivKeySigner) Sign(hash []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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