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 ¶
func ExtractContractVersion ¶ added in v2.10.0
Types ¶
type ORM ¶
type ORM interface { GetAllowedSenders(offset, limit uint, qopts ...pg.QOpt) ([]common.Address, error) CreateAllowedSenders(allowedSenders []common.Address, qopts ...pg.QOpt) error DeleteAllowedSenders(blockedSenders []common.Address, qopts ...pg.QOpt) error PurgeAllowedSenders(qopts ...pg.QOpt) error }
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"` // 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.