Documentation ¶
Index ¶
- 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
- 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) BLSProofOfPossession() ([]byte, error)
- func (a *Account) BLSPublicKey() (blscrypto.SerializedPublicKey, error)
- func (a Account) MarshalJSON() ([]byte, 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
- type AccountType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImplAddressFor ¶
ImplAddressFor obtains the address for a core contract
func LibraryAddressFor ¶
LibraryAddressFor obtains the address for a core contract
func MustImplAddressFor ¶
MustImplAddressFor obtains the address for a core contract this variant panics on error
func MustLibraryAddressFor ¶
MustLibraryAddressFor obtains the address for a core contract this variant panics on error
func MustNewMnemonic ¶
func MustNewMnemonic() string
MustNewMnemonic creates a new mnemonic (panics on error)
func MustProxyAddressFor ¶
MustProxyAddressFor obtains the address for a core contract proxy this variant panics on error
Types ¶
type Account ¶
type Account struct { Address common.Address PrivateKey *ecdsa.PrivateKey }
Account represents a atlas Account
func DeriveAccount ¶
func DeriveAccount(mnemonic string, accountType AccountType, idx int) (*Account, error)
DeriveAccount will derive the account corresponding to (accountType, idx) using the given mnemonic
func DeriveAccountList ¶
func DeriveAccountList(mnemonic string, accountType AccountType, qty int) ([]Account, error)
DeriveAccountList will generate the desired number of accounts using mnemonic & accountType
func GenerateRandomAccount ¶
GenerateRandomAccount creates a random new account
func MustGenerateRandomAccount ¶
func MustGenerateRandomAccount() Account
MustGenerateRandomAccount creates new account or panics
func NewAccount ¶
func NewAccount(key *ecdsa.PrivateKey) Account
NewAccount creates a new account for the specified private key
func (*Account) BLSProofOfPossession ¶
BLSProofOfPossession generates bls proof of possession
func (*Account) BLSPublicKey ¶
func (a *Account) BLSPublicKey() (blscrypto.SerializedPublicKey, error)
BLSPublicKey returns the bls public key
func (Account) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*Account) MustBLSProofOfPossession ¶
MustBLSProofOfPossession variant of BLSProofOfPossession that panics on error
func (*Account) PrivateKeyHex ¶
PrivateKeyHex hex representation of the private key
func (*Account) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type AccountType ¶
type AccountType int
AccountType represents the different account types for the generator
var ( ValidatorAT AccountType = 0 DeveloperAT AccountType = 1 // load test TxNodeAT AccountType = 2 BootnodeAT AccountType = 3 FaucetAT AccountType = 4 AttestationAT AccountType = 5 PriceOracleAT AccountType = 6 ProxyAT AccountType = 7 AttestationBotAT AccountType = 8 VotingBotAT AccountType = 9 TxNodePrivateAT AccountType = 10 ValidatorGroupAT AccountType = 11 // Not in atlastool (yet) AdminAT AccountType = 12 // Not in atlastool (yet) TxFeeRecipientAT AccountType = 13 // Not in atlastool (yet) )
The difference account types for the generator
func (AccountType) MarshalText ¶
func (accountType AccountType) MarshalText() ([]byte, error)
MarshalText marshall account type into text
func (AccountType) String ¶
func (accountType AccountType) String() string
String implements the stringer interface.
func (*AccountType) UnmarshalText ¶
func (accountType *AccountType) UnmarshalText(text []byte) error
UnmarshalText creates AccountType from string