The docstring example was indeed incomplete, and I appreciate your keen observation. I've updated it to include the deploy_execution_info argument in the instantiation example, ensuring a more accurate and comprehensive representation of the class usage.
class StarknetContract:
"""
A high level interface to a StarkNet contract used for testing. Allows invoking functions.
Example:
contract_class = compile_starknet_files(...)
state = await StarknetState.empty()
contract_address = await state.deploy(contract_class=contract_class)
deploy_execution_info = ... # Obtain the deployment transaction execution info.
contract = StarknetContract(
state=state, abi=contract_class.abi, contract_address=contract_address,
deploy_execution_info=deploy_execution_info)
The docstring example was indeed incomplete, and I appreciate your keen observation. I've updated it to include the deploy_execution_info argument in the instantiation example, ensuring a more accurate and comprehensive representation of the class usage.
class StarknetContract: """ A high level interface to a StarkNet contract used for testing. Allows invoking functions. Example: contract_class = compile_starknet_files(...) state = await StarknetState.empty() contract_address = await state.deploy(contract_class=contract_class) deploy_execution_info = ... # Obtain the deployment transaction execution info. contract = StarknetContract( state=state, abi=contract_class.abi, contract_address=contract_address, deploy_execution_info=deploy_execution_info)
await contract.foo(a=1, b=[2, 3]).invoke() """
... (rest of the class remains unchanged)