Skip to content

ScannerRegistryMetadata

ScannerMetadata

struct ScannerMetadata {
  uint256 chainId;
  string metadata;
}

_scannerMetadata

mapping(uint256 => struct ScannerRegistryMetadata.ScannerMetadata) _scannerMetadata

getScanner

function getScanner(uint256 scannerId) public view returns (bool registered, address owner, uint256 chainId, string metadata)

Gets all scanner properties.

Name Type Description
scannerId uint256 ERC1155 token id of the scanner.
Name Type Description
registered bool true if scanner exists.
owner address address.
chainId uint256 the scanner is monitoring.
metadata string IPFS pointer for the scanner's JSON metadata.

getScannerChainId

function getScannerChainId(uint256 scannerId) public view returns (uint256)

Gets scanner chain Ids.

Name Type Description
scannerId uint256 ERC1155 token id of the scanner.
Name Type Description
[0] uint256 chainId the scanner is monitoring.

_getStakeThreshold

function _getStakeThreshold(uint256 subject) internal view virtual returns (struct IStakeSubject.StakeThreshold)

checks the StakeThreshold for the chainId the scanner with id `subject` was registered to monitor.

Name Type Description
subject uint256 ERC1155 token id of the scanner.
Name Type Description
[0] struct IStakeSubject.StakeThreshold StakeThreshold registered for `chainId`, or StakeThreshold(0,0,false) if `chainId` not found.

_scannerUpdate

function _scannerUpdate(uint256 scannerId, uint256 chainId, string metadata) internal virtual

internal logic for scanner update.

adds metadata and chainId for that scanner

Name Type Description
scannerId uint256 ERC1155 token id of the scanner.
chainId uint256 the scanner scans.
metadata string IPFS pointer for the scanner's JSON metadata.

__gap

uint256[49] __gap