@@ -7,13 +7,10 @@ description: Primary interface for interacting with FTSOv2.
77import Remix from "@site/src /components/remix";
88import CodeBlock from "@theme/CodeBlock ";
99import FTSOV2FeedById from "!!raw-loader!/examples/developer-hub-solidity/FTSOV2FeedById.sol";
10- import FTSOV2FeedByIdWei from "!!raw-loader!/examples/developer-hub-solidity/FTSOV2FeedByIdWei.sol";
1110import FTSOV2FeedByIndex from "!!raw-loader!/examples/developer-hub-solidity/FTSOV2FeedByIndex.sol";
12- import FTSOV2FeedByIndexWei from "!!raw-loader!/examples/developer-hub-solidity/FTSOV2FeedByIndexWei.sol";
13- import FTSOV2FeedByIdIndex from "!!raw-loader!/examples/developer-hub-solidity/FTSOV2FeedByIdIndex.sol";
11+ import FTSOV2FeedByIdWei from "!!raw-loader!/examples/developer-hub-solidity/FTSOV2FeedByIdWei.sol";
1412import FTSOV2FeedsById from "!!raw-loader!/examples/developer-hub-solidity/FTSOV2FeedsById.sol";
1513import FTSOV2FeedsByIdWei from "!!raw-loader!/examples/developer-hub-solidity/FTSOV2FeedsByIdWei.sol";
16- import FTSOV2FeedsByIndex from "!!raw-loader!/examples/developer-hub-solidity/FTSOV2FeedsByIndex.sol";
1714import FTSOV2FeedsByIndexWei from "!!raw-loader!/examples/developer-hub-solidity/FTSOV2FeedsByIndexWei.sol";
1815import FTSOV2VerifyProof from "!!raw-loader!/examples/developer-hub-solidity/FTSOV2VerifyProof.sol";
1916
@@ -132,73 +129,6 @@ function getFeedByIndex(
132129<Remix fileName =" FTSOV2FeedByIndex.sol " >Open sample in Remix</Remix >
133130<br ></br >
134131
135- ### getFeedByIndexInWei
136-
137- Returns value in wei and timestamp of a feed.
138- A fee (calculated by the FeeCalculator contract) may need to be paid.
139-
140- ``` solidity
141- function getFeedByIndexInWei(
142- uint256 _index
143- ) external payable returns (
144- uint256 _value,
145- uint64 _timestamp
146- );
147- ```
148-
149- #### Parameters
150-
151- - ` _index ` : The index of the feed, corresponding to feed id in the FastUpdatesConfiguration contract.
152-
153- #### Returns
154-
155- - ` _value ` : The value for the requested feed in wei (i.e. with 18 decimal places).
156- - ` _timestamp ` : The timestamp of the last update.
157-
158- <details >
159- <summary >Sample contract usage</summary >
160-
161- <CodeBlock language =" solidity " title =" FTSOV2FeedByIndexWei.sol " >
162- {FTSOV2FeedByIndexWei}
163- </CodeBlock >
164-
165- </details >
166-
167- <Remix fileName =" FTSOV2FeedByIndexWei.sol " >Open sample in Remix</Remix >
168- <br ></br >
169-
170- ### getFeedId
171-
172- Returns the feed id at a given index. Removed (unused) feed index will return bytes21(0).
173-
174- ``` solidity
175- function getFeedId(
176- uint256 _index
177- ) external view returns (
178- bytes21 _feedId
179- );
180- ```
181-
182- #### Parameters
183-
184- - ` _index ` : The index.
185-
186- #### Returns
187-
188- - ` _feedId ` : The feed id.
189-
190- <details >
191- <summary >Sample contract usage</summary >
192-
193- <CodeBlock language =" solidity " title =" FTSOV2FeedByIdIndex.sol " >
194- {FTSOV2FeedByIdIndex}
195- </CodeBlock >
196-
197- </details >
198-
199- <Remix fileName =" FTSOV2FeedByIdIndex.sol " >Open sample in Remix</Remix >
200- <br ></br >
201-
202132### getFeedIndex
203133
204134Returns the index of a feed.
@@ -291,43 +221,6 @@ function getFeedsByIdInWei(
291221<Remix fileName =" FTSOV2FeedsByIdWei.sol " >Open sample in Remix</Remix >
292222<br ></br >
293223
294- ### getFeedsByIndex
295-
296- Returns stored data of each feed.
297- A fee (calculated by the FeeCalculator contract) may need to be paid.
298-
299- ``` solidity
300- function getFeedsByIndex(
301- uint256[] _indices
302- ) external payable returns (
303- uint256[] _values,
304- int8[] _decimals,
305- uint64 _timestamp
306- );
307- ```
308-
309- #### Parameters
310-
311- - ` _indices ` : Indices of the feeds, corresponding to feed ids in the FastUpdatesConfiguration contract.
312-
313- #### Returns
314-
315- - ` _values ` : The list of values for the requested feeds.
316- - ` _decimals ` : The list of decimal places for the requested feeds.
317- - ` _timestamp ` : The timestamp of the last update.
318-
319- <details >
320- <summary >Sample contract usage</summary >
321-
322- <CodeBlock language =" solidity " title =" FTSOV2FeedsByIndex.sol " >
323- {FTSOV2FeedsByIndex}
324- </CodeBlock >
325-
326- </details >
327-
328- <Remix fileName =" FTSOV2FeedsByIndex.sol " >Open sample in Remix</Remix >
329- <br ></br >
330-
331224### getFeedsByIndexInWei
332225
333226Returns value in wei of each feed and a timestamp.
@@ -417,7 +310,7 @@ Feed data with proof structure
417310
418311``` solidity
419312struct FeedDataWithProof {
420- bytes32[] proof;
421- struct FtsoV2Interface.FeedData body;
313+ bytes32[] proof;
314+ struct FtsoV2Interface.FeedData body;
422315}
423316```
0 commit comments