ZORA Foundry Script Snippets

Just a little playground showing how you can vibe with ZORA contracts from Foundry scripts. Starting with some really simple things and y'know, maybe we'll go off from there

Setup

  1. Install Foundry if you don't have it yet
  2. Fill out some environment variables!
RPC_URL="https://eth-mainnet.alchemyapi.io/v2/YOUR-ALCHEMY-KEY"

Scripts

Purchase an Edition

forge script \
  script/PurchaseEdition.sol:PurchaseEdition \
  --rpc-url $RPC_URL \
  --froms "0xYOUR_WALLET_ADDRESS"
  --interactives 1 \
  --sig "run(address dropAddress, uint256 quantity)" \
  "0xDROP_CONTRACT_ADDRESS" 1 \
  -vvv \
  --broadcast

btw this is kinda verbose because we're specifying a custom function signature for run(): if you hardcoded the variables (or loaded them with environment variables) it would be a little cleaner.