Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Commit 1ad1a7e

Browse files
committed
Update Readme: add fee
1 parent bd7e56d commit 1ad1a7e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pyth-evm-js/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ contract SomeContract {
7575
pyth = IPyth(pythContract);
7676
}
7777
78-
function doSomething(uint someArg, string memory otherArg, bytes[] memory priceUpdateData) public {
78+
function doSomething(uint someArg, string memory otherArg, bytes[] memory priceUpdateData) public payable {
7979
// Update the prices to be set to the latest values
80-
pyth.updatePriceFeeds(priceUpdateData);
80+
uint fee = pyth.getUpdateFee(priceUpdateData.length);
81+
pyth.updatePriceFeeds{value: fee}(priceUpdateData);
8182
8283
// Doing other things that uses prices
8384
bytes32 priceId = 0xf9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b;

0 commit comments

Comments
 (0)