Skip to content

Commit

Permalink
Update resource_bounds params description
Browse files Browse the repository at this point in the history
  • Loading branch information
franciszekjob committed Jan 24, 2025
1 parent 98165e5 commit 6590944
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
18 changes: 6 additions & 12 deletions starknet_py/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,7 @@ async def deploy_v3(
:param unique: Determines if the contract should be salted with the account address.
:param constructor_args: a ``list`` or ``dict`` of arguments for the constructor.
:param nonce: Nonce of the transaction with call to deployer.
:param resource_bounds: Max amount and max price per unit of L1 and L2 gas (in Fri) used when executing
this transaction.
:param resource_bounds: Resource limits (L1 and L2) used when executing this transaction.
:param auto_estimate: Use automatic fee estimation (not recommended, as it may lead to high costs).
:return: DeployResult instance.
"""
Expand Down Expand Up @@ -488,8 +487,7 @@ async def invoke(
"""
Send an Invoke transaction version 3 for the prepared data.
:param resource_bounds: Max amount and max price per unit of L1 and L2 gas (in Fri) used when executing
this transaction.
:param resource_bounds: Resource limits (L1 and L2) used when executing this transaction.
:param auto_estimate: Use automatic fee estimation (not recommended, as it may lead to high costs).
:param nonce: Nonce of the transaction.
:return: InvokeResult.
Expand Down Expand Up @@ -683,8 +681,7 @@ def prepare_invoke_v3(
Creates a ``PreparedFunctionInvokeV3`` instance which exposes calldata for every argument
and adds more arguments when calling methods.
:param resource_bounds: Max amount and max price per unit of L1 and L2 gas (in Fri) used when executing
this transaction.
:param resource_bounds: Resource limits (L1 and L2) used when executing this transaction.
:return: PreparedFunctionInvokeV3.
"""

Expand Down Expand Up @@ -712,8 +709,7 @@ async def invoke_v3(
Invoke contract's function. ``*args`` and ``**kwargs`` are translated into Cairo calldata.
Equivalent of ``.prepare_invoke_v3(*args, **kwargs).invoke()``.
:param resource_bounds: Max amount and max price per unit of L1 and L2 gas (in Fri) used when executing
this transaction.
:param resource_bounds: Resource limits (L1 and L2) used when executing this transaction.
:param auto_estimate: Use automatic fee estimation (not recommended, as it may lead to high costs).
:param nonce: Nonce of the transaction.
:return: InvokeResult.
Expand Down Expand Up @@ -939,8 +935,7 @@ async def declare_v3(
:param compiled_contract_casm: String containing the content of the starknet-sierra-compile (.casm file).
:param compiled_class_hash: Hash of the compiled_contract_casm.
:param nonce: Nonce of the transaction.
:param resource_bounds: Max amount and max price per unit of L1 and L2 gas (in Fri) used when executing
this transaction.
:param resource_bounds: Resource limits (L1 and L2) used when executing this transaction.
:param auto_estimate: Use automatic fee estimation (not recommended, as it may lead to high costs).
:return: DeclareResult instance.
"""
Expand Down Expand Up @@ -1058,8 +1053,7 @@ async def deploy_contract_v3(
:param cairo_version: Version of the Cairo in which contract is written.
By default, it is set to 1.
:param nonce: Nonce of the transaction.
:param resource_bounds: Max amount and max price per unit of L1 and L2 gas (in Fri) used when executing
this transaction.
:param resource_bounds: Resource limits (L1 and L2) used when executing this transaction.
:param auto_estimate: Use automatic fee estimation (not recommended, as it may lead to high costs).
:param salt: Optional salt. Random value is selected if it is not provided.
:param unique: Determines if the contract should be salted with the account address.
Expand Down
5 changes: 2 additions & 3 deletions starknet_py/net/account/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ async def _prepare_invoke_v3(
Takes calls and creates InvokeV3 from them.
:param calls: Single call or a list of calls.
:param l1_resource_bounds: Max amount and max price per unit of L1 gas used in this transaction.
:param resource_bounds: Resource limits (L1 and L2) that can be used in this transaction.
:param auto_estimate: Use automatic fee estimation; not recommended as it may lead to high costs.
:return: InvokeV3 created from the calls (without the signature).
"""
Expand Down Expand Up @@ -870,8 +870,7 @@ async def deploy_account_v3(
:param constructor_calldata: Optional calldata to account contract constructor. If ``None`` is passed,
``[key_pair.public_key]`` will be used as calldata.
:param nonce: Nonce of the transaction.
:param resource_bounds: Max amount and max price per unit of L1 and L2 gas (in Fri) used when executing
this transaction.
:param resource_bounds: Resource limits (L1 and L2) used when executing this transaction.
:param auto_estimate: Use automatic fee estimation, not recommend as it may lead to high costs.
"""
calldata = (
Expand Down
8 changes: 4 additions & 4 deletions starknet_py/net/account/base_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ async def sign_invoke_v3(
:param calls: Single call or list of calls.
:param nonce: Nonce of the transaction.
:param resource_bounds: Max amount and max price per unit of L1 gas used in this transaction.
:param resource_bounds: Resource limits (L1 and L2) that can be used in this transaction.
:param auto_estimate: Use automatic fee estimation, not recommend as it may lead to high costs.
:return: Invoke created from the calls.
"""
Expand Down Expand Up @@ -274,7 +274,7 @@ async def sign_declare_v3(
:param compiled_class_hash: a class hash of the sierra compiled contract used in the declare transaction.
Computed from casm compiled contract.
:param nonce: Nonce of the transaction.
:param resource_bounds: Max amount and max price per unit of L1 gas used in this transaction.
:param resource_bounds: Resource limits (L1 and L2) that can be used in this transaction.
:param auto_estimate: Use automatic fee estimation, not recommend as it may lead to high costs.
:return: Signed DeclareV3 transaction.
"""
Expand Down Expand Up @@ -329,7 +329,7 @@ async def sign_deploy_account_v3(
:param constructor_calldata: Calldata to be ed to contract constructor
and used to calculate deployed contract address.
:param nonce: Nonce of the transaction.
:param resource_bounds: Max amount and max price per unit of L1 gas used in this transaction.
:param resource_bounds: Resource limits (L1 and L2) that can be used in this transaction.
Enough tokens must be prefunded before sending the transaction for it to succeed.
:param auto_estimate: Use automatic fee estimation, not recommend as it may lead to high costs.
:return: Signed DeployAccountV3 transaction.
Expand Down Expand Up @@ -367,7 +367,7 @@ async def execute_v3(
Takes calls and executes transaction.
:param calls: Single call or list of calls.
:param resource_bounds: Max amount and max price per unit of L1 gas used in this transaction.
:param resource_bounds: Resource limits (L1 and L2) that can be used in this transaction.
:param nonce: Nonce of the transaction.
:param auto_estimate: Use automatic fee estimation, not recommend as it may lead to high costs.
:return: SentTransactionResponse.
Expand Down

0 comments on commit 6590944

Please sign in to comment.