PriceFeed

Write Methods

function fetchPrice(address _token) public returns (uint256)

Fetches the latest price for a token, updating storage if needed.

Parameter
Type
Description

_token

address

Token address to get price for

Returns:

Value
Type
Description

price

uint256

Latest valid price for token

View Methods

function loadPrice(address _token) public view returns (uint256)

View-only function to fetch the current oracle price without updating storage.

Parameter
Type
Description

_token

address

Token address to query

Returns:

Value
Type
Description

rate

uint256

Raw price from oracle

Note: View function, doesn't update storage

Structs

Events

Last updated