fetch_asseto_deployment_block

Documentation for eth_defi.tokenised_fund.asseto.registry.fetch_asseto_deployment_block function.

fetch_asseto_deployment_block(web3, address, end_block)

Find the first token-code block for a newly registered product.

The public registry has no deployment block, so a binary search over an archive-capable provider supplies the start boundary for history scans.

Parameters
  • web3 (web3.main.Web3) – Archive-capable product-chain connection.

  • address (eth_typing.evm.HexAddress) – Asseto token contract address.

  • end_block (int) – Latest block at which the token must have deployed code.

Returns

Earliest block containing token runtime code.

Raises

ValueError – If the registry address has no code at end_block.

Return type

int