Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Allowance ¶
Allowance represents the allowances that were set in the legacy ERC20 representation of ether
func NewAllowances ¶
NewAllowances will read the ovm-allowances.json from the file system.
type LegacyReceipt ¶
type LegacyReceipt struct { // Consensus fields: These fields are defined by the Yellow Paper PostState []byte `json:"root"` Status uint64 `json:"status"` CumulativeGasUsed uint64 `json:"cumulativeGasUsed" gencodec:"required"` Bloom types.Bloom `json:"logsBloom" gencodec:"required"` Logs []*types.Log `json:"logs" gencodec:"required"` // Implementation fields: These fields are added by geth when processing a transaction. // They are stored in the chain database. TxHash common.Hash `json:"transactionHash" gencodec:"required"` ContractAddress common.Address `json:"contractAddress"` GasUsed uint64 `json:"gasUsed" gencodec:"required"` // Inclusion information: These fields provide information about the inclusion of the // transaction corresponding to this receipt. BlockHash common.Hash `json:"blockHash,omitempty"` BlockNumber *big.Int `json:"blockNumber,omitempty"` TransactionIndex uint `json:"transactionIndex"` // UsingOVM L1GasPrice *big.Int `json:"l1GasPrice" gencodec:"required"` L1GasUsed *big.Int `json:"l1GasUsed" gencodec:"required"` L1Fee *big.Int `json:"l1Fee" gencodec:"required"` FeeScalar *big.Float `json:"l1FeeScalar" gencodec:"required"` }
func ReadLegacyReceipts ¶
type MigrationData ¶
type MigrationData struct { // OvmAddresses represents the set of addresses that interacted with the // LegacyERC20ETH contract before the evm equivalence upgrade OvmAddresses OVMETHAddresses // EvmAddresses represents the set of addresses that interacted with the // LegacyERC20ETH contract after the evm equivalence upgrade EvmAddresses OVMETHAddresses // OvmAllowances represents the set of allowances in the LegacyERC20ETH from // before the evm equivalence upgrade OvmAllowances []*Allowance // OvmMessages represents the set of withdrawals through the // L2CrossDomainMessenger from before the evm equivalence upgrade OvmMessages []*SentMessage // OvmMessages represents the set of withdrawals through the // L2CrossDomainMessenger from after the evm equivalence upgrade EvmMessages []*SentMessage }
MigrationData represents all of the data required to do a migration
func (*MigrationData) Addresses ¶
func (m *MigrationData) Addresses() []common.Address
func (*MigrationData) ToWithdrawals ¶
func (m *MigrationData) ToWithdrawals() ([]*crossdomain.LegacyWithdrawal, error)
type OVMETHAddresses ¶
OVMETHAddresses represents a list of addresses that interacted with the ERC20 representation of ether in the pre-bedrock system.
func NewAddresses ¶
func NewAddresses(path string) (OVMETHAddresses, error)
NewAddresses will read an addresses.json file from the filesystem.
type Params ¶ added in v0.10.5
type Params struct { // ExpectedSupplyDelta is the expected delta between the total supply of OVM ETH, // and ETH we were able to migrate. This is used to account for supply bugs in //previous regenesis events. ExpectedSupplyDelta *big.Int }
Params contains the configuration parameters used for verifying the integrity of the migration.
type SentMessage ¶
SentMessageJSON represents an entry in the JSON file that is created by the `migration-data` package. Each entry represents a call to the `LegacyMessagePasser`. The `who` should always be the `L2CrossDomainMessenger` and the `msg` should be an abi encoded `relayMessage(address,address,bytes,uint256)`
func NewSentMessage ¶
func NewSentMessage(path string) ([]*SentMessage, error)
NewSentMessageJSON will read a JSON file from disk given a path to the JSON file. The JSON file this function reads from disk is an output from the `migration-data` package.
func (*SentMessage) ToLegacyWithdrawal ¶
func (s *SentMessage) ToLegacyWithdrawal() (*crossdomain.LegacyWithdrawal, error)
ToLegacyWithdrawal will convert a SentMessageJSON to a LegacyWithdrawal struct. This is useful because the LegacyWithdrawal struct has helper functions on it that can compute the withdrawal hash and the storage slot.