This repository was archived by the owner on Apr 3, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -36,17 +36,17 @@ const priceIds = [
36
36
];
37
37
38
38
// In order to use Pyth prices in your protocol you need to submit the price update data to Pyth contract in your target
39
- // chain. `getPriceUpdateData ` creates the update data which can be submitted to your contract. Then your contract should
39
+ // chain. `getPriceFeedsUpdateData ` creates the update data which can be submitted to your contract. Then your contract should
40
40
// call the Pyth Contract with this data.
41
- const priceUpdateData = await connection .getPriceUpdateData (priceIds );
41
+ const priceUpdateData = await connection .getPriceFeedsUpdateData (priceIds );
42
42
43
43
// If the user is paying the price update fee, you need to fetch it from the Pyth contract.
44
44
// Please refer to https://docs.pyth.network/consume-data/on-demand#fees for more information.
45
45
//
46
46
// `pythContract` below is a web3.js contract; if you wish to use ethers, you need to change it accordingly.
47
47
// You can find the Pyth interface ABI in @pythnetwork/pyth-sdk-solidity npm package.
48
48
const updateFee = await pythContract .methods
49
- .getUpdateFee (priceFeedUpdateData )
49
+ .getUpdateFee (priceUpdateData )
50
50
.call ();
51
51
// Calling someContract method
52
52
// `someContract` below is a web3.js contract; if you wish to use ethers, you need to change it accordingly.
You can’t perform that action at this time.
0 commit comments