DataSpotter Contract Details

DataSpotter acts as a target chain contract, holding the latest CDT prices and providing methods for price management and retrieval.

Methods

#1 pushPriceBySid

Purpose: Allows pushing price updates by SID with encoded parameters.

function pushPriceBySid(bytes memory params) external

Parameters:

Name

Type

Description

params

bytes

encoded parameters (uint128 sid, uint256 price)

#2 getLpPriceBySid

Purpose: Retrieves the latest price by SID, ensuring up-to-date price information for users and applications.

function getLpPriceBySid(uint128 sid) external view returns (uint256 price)

Parameters:

Name

Type

Description

sid

uint128

CDT SID

Last updated