Skip to content

Commit

Permalink
Update marketId assignment in README
Browse files Browse the repository at this point in the history
Revised the README example code to pre-define `marketId` as a PublicKey. This improves code readability and clarity about the variable's purpose. The changes also better align with conventional Java coding practices.
  • Loading branch information
skynetcap committed Dec 26, 2023
1 parent b2bde10 commit 3f06629
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openbook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ eventHeap.get().getOutEvents().forEach(openBookOutEvent -> {

### Crank A Market
```java
PublicKey marketId = PublicKey.valueOf("5hYMkB5nAz9aJA33GizyPVH3VkqfkG7V4S2B5ykHxsiM");
Account tradingAccount = Account.fromJson(
Resources.toString(Resources.getResource(PRIVATE_KEY_FILE), Charset.defaultCharset())
);
Optional<String> transactionId = openBookManager.consumeEvents(
tradingAccount,
PublicKey.valueOf("5hYMkB5nAz9aJA33GizyPVH3VkqfkG7V4S2B5ykHxsiM"),
marketId,
8
);

Expand Down

0 comments on commit 3f06629

Please sign in to comment.