简体   繁体   中英

ChainLink: where does the data from when I call GetRoundData?

I am currently learning how to start developing on ChainLink, and I saw that there is a GetRoundData() method that is used to return data from a specific timestamp.

When I dig into the code and I found that there the method came from the interface AggregatorV3Interface. Also, I didn't find the implementation of the function inside any of.sol files, but I find it in a.go file.

My question is, how is the aggregator store data on the blockchain? as I see the data come from nowhere when I call getRoundData. If data comes from the module written by Go lang, does that means the data source is off-chain? Thank you.

Code snippet captures: aggregator_v2v3_interface.go AggregatorV3Interface.sol

A contract implementing this interface is deployed on an address specified in the _AggregatorV2V3Interface Golang variable.

So your offchain script is connected to a node of some EVM.network (Ethereum, BSC, Polygon, ...) and queries the node to perform a read-only, gas-free, call on that specific contract address. The actual data is stored onchain.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM