Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Cevedale opened this issue Nov 15, 2023 · 0 comments
Open

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

Cevedale opened this issue Nov 15, 2023 · 0 comments

Comments

@Cevedale
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant