Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidParameters = errors.New("invalid parameters provided to create a functions contract cache ORM")
)
Functions ¶
This section is empty.
Types ¶
type ORM ¶
type OnchainAllowlist ¶
type OnchainAllowlist interface { job.ServiceCtx Allow(common.Address) bool UpdateFromContract(ctx context.Context) error }
OnchainAllowlist maintains an allowlist of addresses fetched from the blockchain (EVM-only). Use UpdateFromContract() for a one-time update or set OnchainAllowlistConfig.UpdateFrequencySec for repeated updates. All methods are thread-safe.
func NewOnchainAllowlist ¶
func NewOnchainAllowlist(client evmclient.Client, config OnchainAllowlistConfig, orm ORM, lggr logger.Logger) (OnchainAllowlist, error)
type OnchainAllowlistConfig ¶
type OnchainAllowlistConfig struct { // ContractAddress is required ContractAddress common.Address `json:"contractAddress"` ContractVersion uint32 `json:"contractVersion"` BlockConfirmations uint `json:"blockConfirmations"` // UpdateFrequencySec can be zero to disable periodic updates UpdateFrequencySec uint `json:"updateFrequencySec"` UpdateTimeoutSec uint `json:"updateTimeoutSec"` StoredAllowlistBatchSize uint `json:"storedAllowlistBatchSize"` OnchainAllowlistBatchSize uint `json:"onchainAllowlistBatchSize"` // StoreAllowedSendersEnabled is a feature flag that enables storing in db a copy of the allowlist. StoreAllowedSendersEnabled bool `json:"storeAllowedSendersEnabled"` // FetchingDelayInRangeSec prevents RPC client being rate limited when fetching the allowlist in ranges. FetchingDelayInRangeSec uint `json:"fetchingDelayInRangeSec"` }
Click to show internal directories.
Click to hide internal directories.