Skip to content

Fixed an invalid link and improve structure #385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pages/price-feeds/create-your-first-pyth-app/evm/part-1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ rm -r src/* test/*
### Install the Pyth SDK

Pyth provides a Solidity SDK that can be used to interact with one-chain Pyth Price Feed contracts.
It exposes multiple [methods](../api-reference/evm) to read and interact with the contracts.
It exposes multiple [methods](/price-feeds/api-reference/evm) to read and interact with the contracts.

Use `npm` to add the Pyth SDK:

Expand Down Expand Up @@ -333,9 +333,9 @@ contract MyFirstPythContract {
```

The end of this function calls the `mint` function we defined before.
Before that, however, the function calls `[updatePriceFeeds]`(https://docs.pyth.network/price-feeds/api-reference/evm/update-price-feeds) on the Pyth contract.
Before that, however, the function calls [`updatePriceFeeds`](https://docs.pyth.network/price-feeds/api-reference/evm/update-price-feeds) on the Pyth contract.
This function takes a payload of `bytes[]` that is passed into the function itself.
The Pyth contract requires a fee to perform this update; the code snippet above calculates the needed fee using `[getUpdateFee]`(https://docs.pyth.network/price-feeds/api-reference/evm/get-update-fee).
The Pyth contract requires a fee to perform this update; the code snippet above calculates the needed fee using [`getUpdateFee`](https://docs.pyth.network/price-feeds/api-reference/evm/get-update-fee).
The caller of this function can pass in a recent Pyth price update as this payload, guaranteeing that the `StalePrice` error won't occur.

We can test this function by adding the following snippet to the test file:
Expand Down Expand Up @@ -445,7 +445,7 @@ contract MyFirstPythContract {

```

And out test file should look like this:
And our test file should look like this:

```solidity copy filename="MyFirstPythContract.t.sol"
// SPDX-License-Identifier: UNLICENSED
Expand Down
Loading