build_guard_forge_libraries

Documentation for eth_defi.deploy.build_guard_forge_libraries function.

build_guard_forge_libraries(library_addresses=None, project='guard')

Build forge_libraries mapping for eth_defi.foundry.forge.deploy_contract_with_forge().

Returns a dict of "source_path:LibraryName" -> address suitable for the --libraries flag of forge create.

Parameters
  • library_addresses (dict[str, str] | None) – Overrides for specific libraries. Keys are library names (e.g. "CowSwapLib"), values are deployed addresses. Libraries not listed default to ZERO_ADDRESS.

  • project (str) – "guard" or "safe-integration", determines source paths.

Return type

dict[str, str]