starkware-libs / cairo-lang

Apache License 2.0
1.35k stars 266 forks source link

Feat: [Minor] Outdated StarknetContract docstring #76 #175

Open Cevedale opened 1 year ago

Cevedale commented 1 year ago

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)