Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultMnemonicConfig = &MnemonicConfig{
Mnemonic: "test test test test test test test test test test test junk",
Proposer: "m/44'/60'/0'/0/1",
Batcher: "m/44'/60'/0'/0/2",
Deployer: "m/44'/60'/0'/0/3",
Alice: "m/44'/60'/0'/0/4",
SequencerP2P: "m/44'/60'/0'/0/5",
Bob: "m/44'/60'/0'/0/7",
Mallory: "m/44'/60'/0'/0/8",
SysCfgOwner: "m/44'/60'/0'/0/9",
}
DefaultMnemonicConfig is the default mnemonic used in testing. We prefer a mnemonic rather than direct private keys to make it easier to export all testing keys in external tooling for use during debugging. If these values are changed, it is subject to breaking tests. They must be in sync with the values in the DeployConfig used to create the system.
Functions ¶
This section is empty.
Types ¶
type Addresses ¶
type Addresses struct {
Deployer common.Address
SysCfgOwner common.Address
// rollup actors
Proposer common.Address
Batcher common.Address
SequencerP2P common.Address
// prefunded L1/L2 accounts for testing
Alice common.Address
Bob common.Address
Mallory common.Address
}
Addresses bundles the addresses for all common rollup addresses for testing purposes.
type MnemonicConfig ¶
type MnemonicConfig struct {
Mnemonic string
Deployer string
SysCfgOwner string
// rollup actors
Proposer string
Batcher string
SequencerP2P string
// prefunded L1/L2 accounts for testing
Alice string
Bob string
Mallory string
}
MnemonicConfig configures the private keys for the hive testnet. It's json-serializable, so we can ship it to e.g. the hardhat script client.
func (*MnemonicConfig) Secrets ¶
func (m *MnemonicConfig) Secrets() (*Secrets, error)
Secrets computes the private keys for all mnemonic paths, which can then be kept around for fast precomputed private key access.
type Secrets ¶
type Secrets struct {
Deployer *ecdsa.PrivateKey
SysCfgOwner *ecdsa.PrivateKey
// rollup actors
Proposer *ecdsa.PrivateKey
Batcher *ecdsa.PrivateKey
SequencerP2P *ecdsa.PrivateKey
// prefunded L1/L2 accounts for testing
Alice *ecdsa.PrivateKey
Bob *ecdsa.PrivateKey
Mallory *ecdsa.PrivateKey
// Share the wallet to be able to generate more accounts
Wallet *hdwallet.Wallet
}
Secrets bundles secp256k1 private keys for all common rollup actors for testing purposes.
var DefaultSecrets *Secrets
DefaultSecrets is the precomputed secrets for the default mnemonic.
func (*Secrets) AccountAtIdx ¶
func (s *Secrets) AccountAtIdx(idx int) *ecdsa.PrivateKey