Replies: 1 comment
-
Hi, in order to estimate async def estimate_fee():
client = FullNodeClient(node_url="your_node_url")
account = Account(
address="your_account_address",
client=client,
key_pair=KeyPair.from_private_key("your_private_key"),
chain=StarknetChainId.NETWORK_YOU_ARE_USING,
)
call = Call(
to_addr=your_contract_address,
selector=get_selector_from_name("your_method_name"),
calldata=[your_calldata],
)
invoke = await full_node_account.sign_invoke_transaction(calls=call, max_fee=int(1e16))
estimated_fee = await full_node_account.client.estimate_fee(tx=invoke) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Maybe I'm wrong - but there is no way to estimate fee for a call now. If I'm wrong - give me an example please. Sorry again, but I lerned documentation and examples.
Beta Was this translation helpful? Give feedback.
All reactions