Versions in this module Expand all Collapse all v1 v1.2.2 Apr 7, 2024 Changes in this version + func ImplAddressFor(name string) (common.Address, error) + func Libraries() []string + func LibraryAddressFor(name string) (common.Address, error) + func MustImplAddressFor(name string) common.Address + func MustLibraryAddressFor(name string) common.Address + func MustNewMnemonic() string + func MustProxyAddressFor(name string) common.Address + func NewMnemonic() (string, error) + func ProxyAddressFor(name string) (common.Address, error) + type Account struct + Address common.Address + PrivateKey *ecdsa.PrivateKey + func DeriveAccount(mnemonic string, accountType AccountType, idx int) (*Account, error) + func DeriveAccountList(mnemonic string, accountType AccountType, qty int) ([]Account, error) + func GenerateRandomAccount() (Account, error) + func MustGenerateRandomAccount() Account + func NewAccount(key *ecdsa.PrivateKey) Account + func (a *Account) BLSG1PublicKey() (blscrypto.SerializedG1PublicKey, error) + func (a *Account) BLSProofOfPossession() ([]byte, error) + func (a *Account) BLSPublicKey() (blscrypto.SerializedPublicKey, error) + func (a *Account) MustBLSProofOfPossession() []byte + func (a *Account) PrivateKeyHex() string + func (a *Account) PublicKey() []byte + func (a *Account) String() string + func (a *Account) UnmarshalJSON(b []byte) error + func (a Account) MarshalJSON() ([]byte, error) + type AccountType int + var AdminAT AccountType = 12 + var AttestationAT AccountType = 5 + var AttestationBotAT AccountType = 8 + var BootnodeAT AccountType = 3 + var DeveloperAT AccountType = 1 + var FaucetAT AccountType = 4 + var PriceOracleAT AccountType = 6 + var ProxyAT AccountType = 7 + var TxFeeRecipientAT AccountType = 13 + var TxNodeAT AccountType = 2 + var TxNodePrivateAT AccountType = 10 + var ValidatorAT AccountType = 0 + var ValidatorGroupAT AccountType = 11 + var VotingBotAT AccountType = 9 + func (accountType *AccountType) UnmarshalText(text []byte) error + func (accountType AccountType) MarshalText() ([]byte, error) + func (accountType AccountType) String() string + type AccountsConfig struct + Mnemonic string + NumDeveloperAccounts int + NumValidators int + UseValidatorAsAdmin bool + func (ac *AccountsConfig) Account(accType AccountType, idx int) (*Account, error) + func (ac *AccountsConfig) AdminAccount() *Account + func (ac *AccountsConfig) DeveloperAccounts() []Account + func (ac *AccountsConfig) TxFeeRecipientAccounts() []Account + func (ac *AccountsConfig) ValidatorAccounts() []Account + type Config struct + Accounts AccountsConfig + ChainID *big.Int + type Environment struct + Config Config + func Load(envpath string) (*Environment, error) + func New(envpath string, cfg *Config) (*Environment, error) + func (env *Environment) Accounts() *AccountsConfig + func (env *Environment) GenesisPath() string + func (env *Environment) IPC() string + func (env *Environment) Save() error + func (env *Environment) SaveGenesis(genesis *chain.Genesis) error + func (env *Environment) ValidatorDatadir(idx int) string + func (env *Environment) ValidatorIPC(idx int) string