-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Clean up the examples and dev-dependencies (#83)
* refactor: Clean up the examples and dev-dependencies * Mark code-snippets in the docs to be ignored (they miss the dependency)
- Loading branch information
Showing
11 changed files
with
77 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# NEAR Lake Framework Examples | ||
|
||
This directory contains several example scripts showcasing the usage of the NEAR Lake Framework. Each example demonstrates different aspects and features of the framework. Below is a brief description of each example: | ||
|
||
## simple.rs | ||
|
||
A simple example of how to use the Lake Framework. This indexer will listen to the NEAR blockchain and print the block height of each block. | ||
|
||
```bash | ||
$ cd lake-framework | ||
$ cargo run --example simple | ||
``` | ||
|
||
## actions.rs | ||
|
||
This example shows how to filter actions in a block. It is a more real-life example than the simple example. It is going to follow the NEAR Social contract and print all function calls to it. | ||
|
||
```bash | ||
$ cd lake-framework | ||
$ cargo run --example actions | ||
``` | ||
|
||
## nft_indexer.rs | ||
|
||
This is a more complex real-life example of how to use the NEAR Lake Framework. | ||
|
||
It is going to follow the network and watch for the Events according to the [Events Format][1]. It will monitor for nft_mint events from the known marketplaces, such as Mintbase and Paras, and index them to print in the terminal. | ||
|
||
[1]: https://nomicon.io/Standards/EventsFormat | ||
|
||
```bash | ||
$ cd lake-framework | ||
$ cargo run --example nft_indexer | ||
``` | ||
|
||
## with_context.rs | ||
|
||
This example show how to use a context with Lake Framework. It is going to follow the NEAR Social contract and the block height along with a number of calls to the contract. | ||
|
||
```bash | ||
$ cd lake-framework | ||
$ cargo run --example with_context | ||
``` | ||
|
||
## with_context_parent_tx_cache.rs | ||
|
||
This example show how to use a context `ParentTransactionCache` with the Lake Framework. It is going to follow the NEAR Social contract and cache the parent Transaction for the Receipts. Thus we would be able to capture the Transaction where the change to the contract state has started. | ||
|
||
```bash | ||
$ cd lake-parent-transaction-cache | ||
$ cargo run --example with_context_parent_tx_cache | ||
``` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters