Skip to content
LogoLogo

SpokeSnapshotConsumer

Git Source

Inherits: AccessManagedUpgradeable, ERC165, ISpokeSnapshotConsumer

Constants

creForwarder

Address of the Chainlink CRE forwarder.

address public immutable override creForwarder;

Returns

NameTypeDescription
<none>address

CRE_METADATA_LENGTH

uint256 private constant CRE_METADATA_LENGTH = 64;

SpokeSnapshotConsumerStorageLocation

bytes32 private constant SpokeSnapshotConsumerStorageLocation =
        0xb63b6c1855ef12c3ce1467dc59d74e167a3a4f63f2ecef0203e34e2727af1300;

Functions

_getSpokeSnapshotConsumerStorage

function _getSpokeSnapshotConsumerStorage() private pure returns (SpokeSnapshotConsumerStorage storage $);

Returns

NameTypeDescription
$SpokeSnapshotConsumerStorage

constructor

constructor(address _creForwarder);

Parameters

NameTypeDescription
_creForwarderaddress

__SpokeSnapshotConsumer_init

function __SpokeSnapshotConsumer_init(SpokeSnapshotConsumerInitParams calldata sscParams)
        internal
        onlyInitializing;

Parameters

NameTypeDescription
sscParamsSpokeSnapshotConsumerInitParams

isCreWorkflowIdAuthorized

CRE workflow ID => Whether the ID is authorized.

function isCreWorkflowIdAuthorized(bytes32 creWorkflowId) external view override returns (bool);

Parameters

NameTypeDescription
creWorkflowIdbytes32

Returns

NameTypeDescription
<none>bool

supportsInterface

Returns true if this contract implements the interface defined by interfaceId. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] to learn more about how these ids are created.

This function call must use less than 30 000 gas.

function supportsInterface(bytes4 interfaceId) public view override(ERC165, IERC165) returns (bool);

Parameters

NameTypeDescription
interfaceIdbytes4

Returns

NameTypeDescription
<none>bool

addCreWorkflowId

Authorizes a CRE workflow ID.

function addCreWorkflowId(bytes32 newCreWorkflowId) external override restricted;

Parameters

NameTypeDescription
newCreWorkflowIdbytes32The CRE workflow ID to authorize.

removeCreWorkflowId

Deauthorizes a CRE workflow ID.

function removeCreWorkflowId(bytes32 creWorkflowId) external override restricted;

Parameters

NameTypeDescription
creWorkflowIdbytes32The CRE workflow ID to deauthorize.

_addCreWorkflowId

Internal logic for adding a CRE workflow ID.

function _addCreWorkflowId(bytes32 newCreWorkflowId) internal;

Parameters

NameTypeDescription
newCreWorkflowIdbytes32

_removeCreWorkflowId

Internal logic for removing a CRE workflow ID.

function _removeCreWorkflowId(bytes32 creWorkflowId) internal;

Parameters

NameTypeDescription
creWorkflowIdbytes32

_validateMetadata

Extracts fields from a CRE report metadata and validates them against stored values if any are set.

function _validateMetadata(bytes calldata metadata) internal view;

Parameters

NameTypeDescription
metadatabytes

Structs

SpokeSnapshotConsumerStorage

Note:

  • storage-location: erc7201:makina.storage.SpokeSnapshotConsumer
struct SpokeSnapshotConsumerStorage {
        EnumerableSet.Bytes32Set _creWorkflowIds;
    }

Properties

NameTypeDescription
_creWorkflowIdsEnumerableSet.Bytes32Set