You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/lazer/integrate-as-consumer/evm.mdx
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,31 +6,31 @@ This guide is intended to serve users who wants to consume prices from the Pyth
6
6
7
7
Integrating with Pyth Lazer in smart contracts as a consumer is a three-step process:
8
8
9
-
1.**Use** Pyth Lazer SDK into EVM smart contracts to parse the price updates.
9
+
1.**Use** Pyth Lazer SDK in EVM smart contracts to parse the price updates.
10
10
2.**Subscribe** to Pyth Lazer websocket to receive price updates on backend or frontend.
11
11
3.**Include** the price updates into the smart contract transactions.
12
12
13
13
<Steps>
14
14
15
-
### Use Pyth Lazer SDK into smart contracts
15
+
### Use Pyth Lazer SDK in smart contracts
16
16
17
-
Pyth Lazer provides a [solidity SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/lazer/contracts/evm), which allows consumers to parse the price updates.
17
+
Pyth Lazer provides a [Solidity SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/lazer/contracts/evm), which allows consumers to parse the price updates.
18
18
19
19
```bash copy
20
-
forge install pythnet/pyth-crosschain
20
+
forge install pyth-network/pyth-crosschain
21
21
```
22
22
23
23
Add the following to `requirements.txt{:js}` file:
Once the SDK is installed, one can import the sdk into smart contracts:
30
30
31
31
```solidity copy
32
-
import { PythLazer } from "pyth-lazer/PythLazer.sol";
33
-
import { PythLazerLib } from "pyth-lazer/PythLazerLib.sol";
32
+
import { PythLazer } from "pyth-lazer-sdk/PythLazer.sol";
33
+
import { PythLazerLib } from "pyth-lazer-sdk/PythLazerLib.sol";
34
34
35
35
```
36
36
@@ -127,7 +127,7 @@ for (uint8 i = 0; i < feedsLen; i++) {
127
127
128
128
### Subscribe to Pyth Lazer to receive Price Updates
129
129
130
-
Pyth Lazer provides a websocket endpoint to receive price updates. Moreover, Pyth Lazer also provides a [typescript SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/lazer/sdk/js) to subscribe to the websocket endpoint.
130
+
Pyth Lazer provides a websocket endpoint to receive price updates. Moreover, Pyth Lazer also provides a [Typescript SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/lazer/sdk/js) to subscribe to the websocket endpoint.
131
131
132
132
Consult [How to fetch price updates from Pyth Lazer](../fetch-price-updates.mdx) for a complete step-by-step guide.
0 commit comments