Skip to content

Commit 6b4ff77

Browse files
committed
chore(entropy) Update Guide V2
1 parent f2eae01 commit 6b4ff77

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

pages/entropy/create-your-first-entropy-app.mdx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,26 @@ Before we start, please make sure you have the following tools installed:
1313
## Getting Started
1414

1515
Create a directory named `coin-flip{:bash}` in your filesystem.
16-
Open a terminal with `coin-flip` as the working directory and run `forge init contracts` to create a new Solidity project.
17-
You will see a new directory in `coin-flip` named `contracts`. `contracts/src` is where all your contract code will be.
16+
We will use this directory as the working directory for the rest of the tutorial.
17+
Let's initialize a new project in `coin-flip{:bash}` by running `forge init contracts{:bash}`.
18+
19+
This will create a new directory in `coin-flip{:bash}` named `contracts/src`, which will contain the smart contract code.
1820

1921
```bash copy
2022
mkdir coin-flip
2123
cd coin-flip
2224
forge init contracts
2325
```
2426

25-
Run `cd contracts` to make it your terminal's working directory — the following commands will need to be run from here.
26-
Next, install the Pyth Entropy SDK by running the following commands.
27+
Now we will install the Pyth Entropy SDK in the `contracts` directory.
2728

2829
```bash copy
2930
cd contracts
3031
npm init -y
3132
npm install @pythnetwork/entropy-sdk-solidity
3233
```
3334

34-
Add a `remappings.txt` file to `contracts` directory with the following content.
35+
Add a `remappings.txt` file to `contracts` directory with the following content to tell Foundry where to find the Pyth Entropy SDK.
3536

3637
```text copy
3738
@pythnetwork/entropy-sdk-solidity/=node_modules/@pythnetwork/entropy-sdk-solidity
@@ -97,8 +98,8 @@ contract CoinFlip {
9798

9899
Users will invoke the `request` method to initiate a coin flip, paying a fee in the process.
99100
The method first retrieves the fee required to request a random number from Entropy.
100-
It then includes the fee in the `requestV2` method call to Entropy.
101-
Finally, the method emits a `FlipRequested` event with a `sequenceNumber`. This event is also defined in the code snippet above.
101+
It then includes the fee in the `requestV2{:bash}` method call to Entropy.
102+
Finally, the method emits a `FlipRequested{:bash}` event with a `sequenceNumber`. This event is also defined in the code snippet above.
102103

103104
### Handle the callback
104105

@@ -187,7 +188,7 @@ Deployed to: 0x8676ba0Dd492AB9813BC21D5Dce318427d1d73ae
187188
Transaction hash: 0x2178aa6d402c94166a93e81822248d00dd003827675ebd49b3c542970f5a0189
188189
```
189190

190-
Lets export the coin flip contract address as environment variable for later use:
191+
Let's export the coin flip contract address as environment variable for later use:
191192

192193
```bash copy
193194
export COINFLIP_ADDRESS=<Deployed to address from above>

0 commit comments

Comments
 (0)