Skip to content

Commit 0633959

Browse files
authored
Update 09_auction.md
- updated the leo/example/auction directory - updated the program by adding output of bidders Signed-off-by: Emmanuel Ekpe <[email protected]>
1 parent b3987d0 commit 0633959

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

documentation/leo/09_auction.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Follow the [Leo Installation Instructions](https://developer.aleo.org/leo/instal
3939
This auction program can be run using the following bash script. Locally, it will execute Leo program functions to conduct, bid, and close a three party auction.
4040

4141
```bash
42-
cd auction
42+
cd leo/examples/auction
4343
./run.sh
4444
```
4545

@@ -85,14 +85,23 @@ NETWORK=testnet
8585
PRIVATE_KEY=APrivateKey1zkpG9Af9z5Ha4ejVyMCqVFXRKknSm8L1ELEwcc4htk9YhVK
8686
ENDPOINT=https://localhost:3030
8787
" > .env
88-
```
88+
```
8989

9090
Call the `place_bid` program function with bidder 1 and `10u64` arguments.
9191

9292
```bash
9393
leo run place_bid aleo1yzlta2q5h8t0fqe0v6dyh9mtv4aggd53fgzr068jvplqhvqsnvzq7pj2ke 10u64
9494
```
95-
95+
Output:
96+
```bash
97+
• {
98+
owner: aleo1yzlta2q5h8t0fqe0v6dyh9mtv4aggd53fgzr068jvplqhvqsnvzq7pj2ke.private,
99+
bidder: aleo1yzlta2q5h8t0fqe0v6dyh9mtv4aggd53fgzr068jvplqhvqsnvzq7pj2ke.private,
100+
amount: 10u64.private,
101+
is_winner: false.private,
102+
_nonce: 4668394794828730542675887906815309351994017139223602571716627453741502624516group.public
103+
}
104+
```
96105
## <a id="step2"></a> Step 2: The Second Bid
97106

98107
Have the second bidder place a bid of 90.
@@ -112,7 +121,16 @@ Call the `place_bid` program function with bidder 2 and `90u64` arguments.
112121
```bash
113122
leo run place_bid aleo1esqchvevwn7n5p84e735w4dtwt2hdtu4dpguwgwy94tsxm2p7qpqmlrta4 90u64
114123
```
115-
124+
Output:
125+
```bash
126+
• {
127+
owner: aleo1esqchvevwn7n5p84e735w4dtwt2hdtu4dpguwgwy94tsxm2p7qpqmlrta4.private,
128+
bidder: aleo1esqchvevwn7n5p84e735w4dtwt2hdtu4dpguwgwy94tsxm2p7qpqmlrta4.private,
129+
amount: 90u64.private,
130+
is_winner: false.private,
131+
_nonce: 5952811863753971450641238938606857357746712138665944763541786901326522216736group.public
132+
}
133+
```
116134
## <a id="step3"></a> Step 3: Select the Winner
117135

118136
Have the auctioneer select the winning bid.

0 commit comments

Comments
 (0)