Skip to content

Adjust Simple Auction Example to Use Anvil Fork of Arbitrum Sepolia w/ Decrypter Pre-Deployed #3

@hashedtitan

Description

@hashedtitan

Scope

Setup the Simple Auction Example, and maybe others, to use an anvil fork of arbitrum sepolia testnet so we can simulate multiple bidders and have the 'students' come in and clone the repo and use a brand new wallet with no sepolia eth. The key here is that they don't need to get a bunch of sepETH to be able to run the tutorials.

TODOs:

Below are rough implementation steps to take where edits could be made to the bash test file, and additions made to the appropriate README.

  • Forking Arbitrum Sepolia with Anvil (anvil --fork-url https://sepolia-rollup.arbitrum.io/rpc)
  • Testing with Forked State in a Bash Script: Update the bash test script file RPC_URL var
# Define the Anvil RPC URL pointing to the Arbitrum Sepolia fork
RPC_URL="http://127.0.0.1:8545"
  • Testing Account Balance Management with Forked Anvil - essentially manipulate test environment balances of wallets using cast
# Adjust account balances to match your testing needs
cast rpc anvil_setBalance <account_address> 0xDE0B6B3A7640000 --rpc-url $RPC_URL  # Set to 1 ETH (in wei) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions