cairo-contracts icon indicating copy to clipboard operation
cairo-contracts copied to clipboard

Allow query calls in Account

Open ericnordelo opened this issue 3 years ago • 3 comments

Fixes #471

Allow transactions with version equal to the current Starknet QUERY_VERSION.

  • [x] Tests
  • [x] Tried the feature on a public network

ericnordelo avatar Oct 05 '22 11:10 ericnordelo

This version of the Account.cairo preset allows estimating fees or simulating transactions from starknet cli (or nile wrapping the latter), by accepting the transaction version for queries (2**128 + TRANSACTION_VERSION).

ericnordelo avatar Oct 05 '22 16:10 ericnordelo

Looking good, @ericnordelo! I left a couple questions and one tiny suggestion. Also, do you think we should document the tx query feature in the Accounts docs?

I don't think we need to document that because that's a feature for the protocol itself, not for the end user.

This will be used transparently from starknet commands like fee estimation and transaction simulation, which should come with the corresponding documentation.

ericnordelo avatar Oct 05 '22 19:10 ericnordelo

Looking good, @ericnordelo! I left a couple questions and one tiny suggestion. Also, do you think we should document the tx query feature in the Accounts docs?

I don't think we need to document that because that's a feature for the protocol itself, not for the end user.

This will be used transparently from starknet commands like fee estimation and transaction simulation, which should come with the corresponding documentation.

Yeahhhh I was leaning that way also. Sounds good, sir!

andrew-fleming avatar Oct 05 '22 19:10 andrew-fleming