Documentation ¶
Index ¶
Constants ¶
View Source
const (
LeafTypeMessage = uint8(1)
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClaimTxManager ¶
type ClaimTxManager struct {
// contains filtered or unexported fields
}
ClaimTxManager is the claim transaction manager for L2.
func NewClaimTxManager ¶
func NewClaimTxManager(cfg Config, chExitRootEvent chan *etherman.GlobalExitRoot, chSynced chan uint, l2NodeURL string, l2NetworkID uint, l2BridgeAddr common.Address, bridgeService bridgeServiceInterface, storage interface{}) (*ClaimTxManager, error)
NewClaimTxManager creates a new claim transaction manager.
func (*ClaimTxManager) ReviewMonitoredTx ¶
func (tm *ClaimTxManager) ReviewMonitoredTx(ctx context.Context, mTx *ctmtypes.MonitoredTx, reviewNonce bool) error
ReviewMonitoredTx checks if tx needs to be updated accordingly to the current information stored and the current state of the blockchain
func (*ClaimTxManager) Start ¶
func (tm *ClaimTxManager) Start()
Start will start the tx management, reading txs from storage, send then to the blockchain and keep monitoring them until they get mined
type Config ¶
type Config struct { //Enabled whether to enable this module Enabled bool `mapstructure:"Enabled"` // FrequencyToMonitorTxs frequency of the resending failed txs FrequencyToMonitorTxs types.Duration `mapstructure:"FrequencyToMonitorTxs"` // PrivateKey defines the key store file that is going // to be read in order to provide the private key to sign the claim txs PrivateKey types.KeystoreFileConfig `mapstructure:"PrivateKey"` // RetryInterval is time between each retry RetryInterval types.Duration `mapstructure:"RetryInterval"` // RetryNumber is the number of retries before giving up RetryNumber int `mapstructure:"RetryNumber"` // AuthorizedClaimMessageAddresses are the allowed address to bridge message with autoClaim AuthorizedClaimMessageAddresses []common.Address `mapstructure:"AuthorizedClaimMessageAddresses"` }
Config is configuration for L2 claim transaction manager
Click to show internal directories.
Click to hide internal directories.