Skip to content

Instantly share code, notes, and snippets.

@Aviksaikat
Created August 16, 2023 20:29
Show Gist options
  • Save Aviksaikat/d30151a7cdc04ac60032a2ace5275a0e to your computer and use it in GitHub Desktop.
Save Aviksaikat/d30151a7cdc04ac60032a2ace5275a0e to your computer and use it in GitHub Desktop.
Load a contract using interface in ape
# create a interfaces folder inside the contracts folder & put the interfaces inside them
from ape import project
contract = project.contractName.at(contract_address)
# ex
uniswap_v2_router = project.ISwapV2Router02.at(Uniswap_V2_Router_address)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment