common

package
v0.0.0-...-42eb422 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReadinessEthSyncing    readiness.Component = "ethSyncing"
	ReadinessSolanaSyncing readiness.Component = "solanaSyncing"
	ReadinessTerraSyncing  readiness.Component = "terraSyncing"
)
View Source
const MaxGuardianCount = 19

Matching constants:

  • MAX_LEN_GUARDIAN_KEYS in Solana contract (limited by transaction size - 19 is the maximum amount possible)

The Eth and Terra contracts do not specify a maximum number and support more than that, but presumably, chain-specific transaction size limits will apply at some point (untested).

Variables

This section is empty.

Functions

This section is empty.

Types

type BridgeWatcher

type BridgeWatcher interface {
	WatchLockups(events chan *ChainLock) error
}

type ChainLock

type ChainLock struct {
	TxHash    common.Hash // TODO: rename to identifier? on Solana, this isn't actually the tx hash
	Timestamp time.Time

	Nonce uint32

	SourceAddress vaa.Address
	TargetAddress vaa.Address

	SourceChain vaa.ChainID
	TargetChain vaa.ChainID

	TokenChain    vaa.ChainID
	TokenAddress  vaa.Address
	TokenDecimals uint8

	Amount *big.Int
}

type GuardianSet

type GuardianSet struct {
	// Guardian's public key hashes truncated by the ETH standard hashing mechanism (20 bytes).
	Keys []common.Address
	// On-chain set index
	Index uint32
}

func (*GuardianSet) KeyIndex

func (g *GuardianSet) KeyIndex(addr common.Address) (int, bool)

Get a given address index from the guardian set. Returns (-1, false) if the address wasn't found and (addr, true) otherwise.

func (*GuardianSet) KeysAsHexStrings

func (g *GuardianSet) KeysAsHexStrings() []string

Jump to

Keyboard shortcuts

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