Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tracking] Chapters and sections #1

Open
57 of 83 tasks
zerosnacks opened this issue May 1, 2024 · 2 comments
Open
57 of 83 tasks

[Tracking] Chapters and sections #1

zerosnacks opened this issue May 1, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@zerosnacks
Copy link
Member

zerosnacks commented May 1, 2024

Setup:

  • Create layout and basic repo setup
  • Create basic Github release workflow on Github pages
  • Enable Github pages release flow
  • Make code snippets runnable and testable (blocked: playground doesn't support arbitrary dependencies)

Sections:

  • Introduction
  • Getting Started
    • Installation
    • First steps with alloy
    • [ ] Common terminology (moved to appendix)
  • Tutorials (emphasis on introducing concepts / walkthrough)
    • Best practices
    • Transferring ETH
    • Listening to the mempool
    • Using flashbots
    • Tracing a transaction
    • Fetching the gas price in USD
  • Examples (updated using a script)
  • Migrating from Ethers
    • Helper traits for conversions
    • Where are all my types? (Diagram showing the equivalence of every alloy crate for each ethers crate)
    • Going from Ethers primitive types to Alloy primitive types
    • Going from using ethers to using alloy to decode data
      • Using alloy-sol-macro for static data
      • Using alloy-dyn-abi for dynamic data
      • Parsing ABIs (alloy-json-abi)
      • When should I use each?
    • Going from Ethers Providers to Alloy Providers
      • Ethers's Middleware vs Alloy Fillers
      • A gentle introduction to Alloy's use of Tower
      • The RPC types
      • Understanding the power of Alloy Contract
      • Queries and subscriptions
      • Sending transactions
    • Going from Ethers Signers to Alloy Signers
    • Going from Ethers Genesis to Alloy Genesis
  • Building with Alloy
    • Basic building blocks
      • Using big numbers
      • Basic hash & address types
      • Common conversions
      • Creating instances
      • Comparisons and equivalence
    • Connecting to a blockchain
      • Setting up a Provider
      • Available transports
        • HTTP
        • WS
        • IPC
      • Understanding fillers
      • The Network abstraction
      • Queries
      • Transactions
        • Using the transaction builder
        • Sending a legacy TX
        • Sending an EIP-1559 TX
        • Using access lists
        • Sending an EIP-4844 TX
      • Best practices
    • Interacting with contracts
      • Initializing a contract instance
      • Encoding & decoding data
        • Best practices when using the static and dynamic encoder
      • Listening to events
      • Querying historic events
      • Watching blocks
      • Setting up multiple subscriptions
    • Using signers
      • Creating a wallet
      • Using a hardware wallet
        • Ledger
        • Trezor
      • Using a mnemonic
      • Using a keystore
      • Using a raw private key
      • Signing messages
      • Permit hashes
    • Using Anvil
      • Booting up Anvil
      • Deploying Contracts
      • Forking
  • Appendix
    • Glossary
    • FAQ
    • Help us improve Alloy
@zerosnacks
Copy link
Member Author

zerosnacks commented May 30, 2024

From feedback:

The intended api is pretty highlevel (implemented as articles in highlights)

  • sol!
  • TransactionRequest
  • ProviderBuilder
    • with_recommended_fillers
  • Provider
    • particularly &dyn Provider

tower and boxed are somewhat power-user features, and shouldn't be covered until later in the book

We can then drill down into specific guide for advanced things like:

  • "add a transport layer with tower"
  • "add a provider layer"

And guides for

  • "implement a transport"
  • "implement a network"
  • "implement a provider"
  • "implement a providerlayer"

@zerosnacks
Copy link
Member Author

As a highlight page: Transaction lifecyle

A deep dive into how a transaction is constructed, signed and send. Also touches on Filler and layering.

Touches on CustomLayer / RetryLayer (alloy-rs/alloy#717) cc @yash-atreya

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant