diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index ad03416c..e1b2947d 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -5,6 +5,7 @@ on: paths: - 'book/**' - 'book.toml' + pull_request: branches: [master] paths: @@ -23,6 +24,8 @@ jobs: run: | mkdir mdbook curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.21/mdbook-v0.4.21-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook + curl -sSL https://github.com/tommilligan/mdbook-admonish/releases/download/v1.8.0/mdbook-admonish-v1.8.0-x86_64-unknown-linux-gnu.tar.gz| tar -xz --directory=./mdbook + curl -sSL https://github.com/badboy/mdbook-mermaid/releases/download/v0.12.6/mdbook-mermaid-v0.12.6-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook echo `pwd`/mdbook >> $GITHUB_PATH - name: Install mdbook-template @@ -32,7 +35,10 @@ jobs: echo `pwd`/mdbook-template >> $GITHUB_PATH - name: Build - run: mdbook build + run: | + mdbook-admonish install + mdbook-mermaid install + mdbook build - name: Save pages artifact uses: actions/upload-pages-artifact@v1 diff --git a/book/getting-started/intro.md b/book/getting-started/intro.md index 1345ffb8..245df94a 100644 --- a/book/getting-started/intro.md +++ b/book/getting-started/intro.md @@ -3,6 +3,36 @@ Welcome to the hands-on guide for the ethers-rs library! This documentation contains a collection of examples demonstrating how to use the library to build Ethereum-based applications in Rust. The examples cover a range of topics, from basic smart contract interactions to more advanced usage of ethers-rs. +```admonish info +You can find the official ethers-rs documentation on docs.rs - [here](https://docs.rs/ethers/0.5.0/ethers/). +``` + Each example includes a detailed description of the functionality being demonstrated, as well as complete code snippets that you can use as a starting point for your own projects. -We hope that these docs will help you get started with ethers-rs and give you a better understanding of how to use the library to build your own web3 applications in Rust. If you have any questions or need further assistance, please don't hesitate to reach out to the ethers-rs community. \ No newline at end of file +We hope that these docs will help you get started with ethers-rs and give you a better understanding of how to use the library to build your own web3 applications in Rust. If you have any questions or need further assistance, please don't hesitate to reach out to the ethers-rs community. + +The following is a brief overview diagram of the topis covered in this guide. + +```mermaid +graph LR + %% The code below is for styling the graph + %%------------------------------------------------- + %%{init: {'theme':'dark', 'themeVariables':{'textColor':' #ffffff ', 'nodeBorder':'#ff2d00', 'edgeLabelBackground':'#000000' ,'lineColor':'#87ff00', 'fontSize':'14px', 'curve':'linear'}}}%% + + %%------------------------------------------------- + %% Actual Diagram code is below + + A[Ethers-rs
Manual] --> A1[Providers] + A --> A2[Middleware] + A --> A3[Contracts] + A --> A4[Events] + A --> A5[Subscriptions] + A --> A6[Queries] + A --> A7[Transactions] + A --> A8[Wallets] + A --> A9[Big numbers] + A --> A10[Anvil] +``` +```admonish bug +This diagram is incomplete and will undergo continuous changes. +```