Documentation ¶
Overview ¶
package devnet contains constants and helper functions for the local deterministic devnet. See "Devnet addresses" in DEVELOP.md. Created by setup scripts/migrations.
Index ¶
- Variables
- func DeriveAccount(accountIndex uint) accounts.Account
- func DeterministicP2PPrivKeyByIndex(idx int64) crypto.PrivKey
- func DevnetGuardianSetVSS(n uint) *vaa.VAA
- func GetDevnetIndex() (int, error)
- func GetKeyedTransactor(ctx context.Context) *bind.TransactOpts
- func InsecureDeterministicEcdsaKeyByIndex(c elliptic.Curve, idx uint64) *ecdsa.PrivateKey
- func MustBase58ToEthAddress(address string) (res vaa.Address)
- func SubmitVAA(ctx context.Context, rpcURL string, vaa *vaa.VAA) (*types.Transaction, error)
- func Wallet() *hdwallet.Wallet
Constants ¶
This section is empty.
Variables ¶
var ( // Ganache RPC URL GanacheRPCURL = "ws://localhost:8545" // Address of the first account, which is used as the default client account. GanacheClientDefaultAccountAddress = common.HexToAddress("0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1") // Contracts (deployed by "truffle migrate" on a deterministic devnet) GanacheWormholeContractAddress = common.HexToAddress("0xC89Ce4735882C9F0f0FE26686c53074E09B0D550") )
Functions ¶
func DeriveAccount ¶
func DeterministicP2PPrivKeyByIndex ¶
DeterministicP2PPrivKeyByIndex generates a deterministic libp2p crypto.PrivateKey from a given index.
func DevnetGuardianSetVSS ¶
DevnetGuardianSetVSS returns a VAA signed by guardian-0 that adds all n validators.
func GetDevnetIndex ¶
GetDevnetIndex returns the current host's devnet index (i.e. 0 for guardian-0).
func GetKeyedTransactor ¶
func GetKeyedTransactor(ctx context.Context) *bind.TransactOpts
GetKeyedTransactor returns a transaction signer with the deterministic devnet key.
func InsecureDeterministicEcdsaKeyByIndex ¶
func InsecureDeterministicEcdsaKeyByIndex(c elliptic.Curve, idx uint64) *ecdsa.PrivateKey
InsecureDeterministicEcdsaKeyByIndex generates a deterministic ecdsa.PrivateKey from a given index.
func MustBase58ToEthAddress ¶
Base58ToEthAddress converts a Solana base58 address to a 32-byte vaa.Address. Panics if the input data is invalid - intended for use on constants.
Types ¶
This section is empty.