signer

package
v0.0.0-...-08ff881 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SolanaTransactionTimeout is the timeout for waiting for an outbound to be confirmed
	// Transaction referencing a blockhash older than 150 blocks will expire and be rejected by Solana.
	SolanaTransactionTimeout = 2 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Signer

type Signer struct {
	*base.Signer
	// contains filtered or unexported fields
}

Signer deals with signing Solana transactions and implements the ChainSigner interface

func NewSigner

func NewSigner(
	chain chains.Chain,
	chainParams observertypes.ChainParams,
	solClient interfaces.SolanaRPCClient,
	tss interfaces.TSSSigner,
	relayerKey *keys.RelayerKey,
	ts *metrics.TelemetryServer,
	logger base.Logger,
) (*Signer, error)

NewSigner creates a new Solana signer

func (*Signer) GetERC20CustodyAddress

func (signer *Signer) GetERC20CustodyAddress() ethcommon.Address

func (*Signer) GetGatewayAddress

func (signer *Signer) GetGatewayAddress() string

GetGatewayAddress returns the gateway address

func (*Signer) GetZetaConnectorAddress

func (signer *Signer) GetZetaConnectorAddress() ethcommon.Address

func (*Signer) HasRelayerKey

func (signer *Signer) HasRelayerKey() bool

HasRelayerKey returns true if the signer has a relayer key

func (*Signer) SetERC20CustodyAddress

func (signer *Signer) SetERC20CustodyAddress(_ ethcommon.Address)

func (*Signer) SetGatewayAddress

func (signer *Signer) SetGatewayAddress(address string)

SetGatewayAddress sets the gateway address

func (*Signer) SetRelayerBalanceMetrics

func (signer *Signer) SetRelayerBalanceMetrics(ctx context.Context)

SetRelayerBalanceMetrics sets the relayer balance metrics

func (*Signer) SetZetaConnectorAddress

func (signer *Signer) SetZetaConnectorAddress(_ ethcommon.Address)

TODO: get rid of below four functions for Solana and Bitcoin https://github.com/zeta-chain/node/issues/2532

func (*Signer) TryProcessOutbound

func (signer *Signer) TryProcessOutbound(
	ctx context.Context,
	cctx *types.CrossChainTx,
	outboundProc *outboundprocessor.Processor,
	outboundID string,
	_ interfaces.ChainObserver,
	zetacoreClient interfaces.ZetacoreClient,
	height uint64,
)

TryProcessOutbound - signer interface implementation This function will attempt to build and sign a Solana transaction using the TSS signer. It will then broadcast the signed transaction to the Solana chain.

Jump to

Keyboard shortcuts

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