GithubHelp home page GithubHelp logo

Comments (3)

ddoktorski avatar ddoktorski commented on June 10, 2024

Both L1_GAS and L2_GAS in the resource_bounds are specified in FRI, hence we can simply call STRK contract to check a balance. We need to decide whether we should perform this check on the starknet.py side at all, since RPC will throw an error if balance is not sufficient anyway. The current error doesn't include token name, it only provides the information Account balance is smaller than the transaction's max_fee..

from starknet.py.

github-actions avatar github-actions commented on June 10, 2024

This issue is stale because it has not received any activity in the last 30 days. Remove stale label or add a comment, otherwise it will be closed in 5 days.

from starknet.py.

tkumor3 avatar tkumor3 commented on June 10, 2024

Current RPC response in the case of having insufficient balance is:

Client failed with code 55. Message: Account validation failed. Data: perform_validations call failed; failure reason: TransactionFailureReason(code='native_blockifier.PyTransactionExecutionError', error_message='TransactionPreValidationError(TransactionFeeError(L1GasBoundsExceedBalance { max_amount: 1109, max_price: 48000000000000, balance_low: StarkFelt("0x0000000000000000000000000000000000000000000000000000000001ad7180"), balance_high: StarkFelt("0x0000000000000000000000000000000000000000000000000000000000000000") }))').

from starknet.py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.