Code Monkey home page Code Monkey logo

Comments (7)

dayout1024 avatar dayout1024 commented on July 28, 2024 2

I'am getting this error too, can anyone help with this?

from zksync2-python.

sparck69 avatar sparck69 commented on July 28, 2024

I'am getting this error too, can anyone help with this?

I think its just broken rn

from zksync2-python.

danijelTxFusion avatar danijelTxFusion commented on July 28, 2024

The 0.5.0 version of SDK has been released and should fix this issue. Here is the example how to deposit assets to zksync.

from zksync2-python.

dayout1024 avatar dayout1024 commented on July 28, 2024

The 0.5.0 version of SDK has been released and should fix this issue. Here is the example how to deposit assets to zksync.

still same error, Fail with error 'mv'

from zksync2-python.

danijelTxFusion avatar danijelTxFusion commented on July 28, 2024

The 0.5.0 version of SDK has been released and should fix this issue. Here is the example how to deposit assets to zksync.

still same error, Fail with error 'mv'

I successfully ran the deposit example on the Goerli testnet and ZkSync Era testnet without any issues.

L1 transaction: 0x24c3932a7c5aacbe5896007ea0c2ed3e609b43264c4c00e0af42bfb8b6518025
L2 transaction: 0x9b2a1c76786f50383d66e155ff1321968ef734ad25d87dfb818ded31b9a0d247

The mv error code in smart contract indicates that specified transaction value is lower than deposit transaction fee (tx value < base cost + l2Value). The deposit function in sdk follows the same logic, so transaction value is calculated correctly.

The possible issue here is that the base cost might have increased due to the high traffic on the Goerli testnet, which has been ongoing for some time.

I also noticed in the posted example that a custom RPC endpoint is used to submit the deposit transaction. There might be a possibility that, due to high traffic, the custom RPC node experiences latency and is temporarily out of sync. This situation could result in the calculation of an outdated base cost for the transaction.

from zksync2-python.

lusharenck avatar lusharenck commented on July 28, 2024

The 0.5.0 version of SDK has been released and should fix this issue. Here is the example how to deposit assets to zksync.

still same error, Fail with error 'mv'

I successfully ran the deposit example on the Goerli testnet and ZkSync Era testnet without any issues.

L1 transaction: 0x24c3932a7c5aacbe5896007ea0c2ed3e609b43264c4c00e0af42bfb8b6518025 L2 transaction: 0x9b2a1c76786f50383d66e155ff1321968ef734ad25d87dfb818ded31b9a0d247

The mv error code in smart contract indicates that specified transaction value is lower than deposit transaction fee (tx value < base cost + l2Value). The deposit function in sdk follows the same logic, so transaction value is calculated correctly.

The possible issue here is that the base cost might have increased due to the high traffic on the Goerli testnet, which has been ongoing for some time.

I also noticed in the posted example that a custom RPC endpoint is used to submit the deposit transaction. There might be a possibility that, due to high traffic, the custom RPC node experiences latency and is temporarily out of sync. This situation could result in the calculation of an outdated base cost for the transaction.

This is the correct solution

This is the solution your team found, but the solution was not updated to the latest code package. I lost hundreds of dollars using the 0.5.0 version of the package because of this

The solution is in this github link: #10 (comment)

from zksync2-python.

petarTxFusion avatar petarTxFusion commented on July 28, 2024

This is fixed in the next release. This is how we are calculating value now.

gas_price_for_estimation: int
        if transaction.max_priority_fee_per_gas is not None:
            gas_price_for_estimation = transaction.max_fee_per_gas
        else:
            gas_price_for_estimation = transaction.gas_price

        base_cost = self.get_base_cost(transaction.l2_gas_limit, transaction.gas_per_pubdata_byte, gas_price_for_estimation)

        if transaction.token.is_eth():
            transaction.value = base_cost + transaction.operator_tip + transaction.amount
        else:
            transaction.value = base_cost + transaction.operator_tip

        check_base_cost(base_cost, transaction.value)

from zksync2-python.

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.