Comments (8)
Ran into the same issue today with deposits. Started out with error "qp" for the gas per pubdata value not being right (eth provider has this set at 50000). After I overrode that I got the "mv" error and it looks like the SDK is setting the base_cost to 0. Got around that by calculating the base cost with get_base_cost and passing it as the operator tip.
gas_price = web3.eth.gas_price operator_tip = eth_provider.get_base_cost(gas_limit=eth_provider.RECOMMENDED_DEPOSIT_L2_GAS_LIMIT, gas_per_pubdata_byte=800,gas_price=gas_price) l1_tx_receipt = eth_provider.deposit(token=Token.create_eth(), amount=web3.to_wei(str(depositAmount), "ether"), gas_per_pubdata_byte=800, operator_tip=operator_tip)
from zksync2-python.
Ran into the same issue today with deposits. Started out with error "qp" for the gas per pubdata value not being right (eth provider has this set at 50000). After I overrode that I got the "mv" error and it looks like the SDK is setting the base_cost to 0. Got around that by calculating the base cost with get_base_cost and passing it as the operator tip.
gas_price = web3.eth.gas_price operator_tip = eth_provider.get_base_cost(gas_limit=eth_provider.RECOMMENDED_DEPOSIT_L2_GAS_LIMIT, gas_per_pubdata_byte=800,gas_price=gas_price) l1_tx_receipt = eth_provider.deposit(token=Token.create_eth(), amount=web3.to_wei(str(depositAmount), "ether"), gas_per_pubdata_byte=800, operator_tip=operator_tip)
this is the right solution
from zksync2-python.
I will investigate your issue as soon as possible
from zksync2-python.
Please. use this URL "https://rpc.ankr.com/eth_goerli"
as the URL_TO_ETH_NETWORK
And please have a try with the following example:
https://github.com/zksync-sdk/zksync2-python/blob/master/examples/01_deposit.py
from zksync2-python.
请。使用此 URL
"https://rpc.ankr.com/eth_goerli"
作为 URL_TO_ETH_NETWORK 请尝试以下示例: https: //github.com/zksync-sdk/zksync2-python/blob/master/examples/01_deposit.py
I got the same error after replacing the rpc
0x8a5d3c948e182e8921b8c43fba2d9d1523a5d557b443be7257466f90d74125fd
from zksync2-python.
One thing that come to mi mind that you directly setup l2_gas_limit
and this one
gas_per_pubdata_byte = None # 800
gas_limit = None # 118722
I would go step by step. Run test from example. Then if you need to calculate precise l2_gas_limit I investigate it and provide an example
from zksync2-python.
I think the key of this issue is that the value sent on the deposit doesn't add the fee will be used in L2.
here the l1_value
should be replaced with value
.
zksync2-python/zksync2/provider/eth_provider.py
Lines 182 to 196 in 69348c2
Also, I think here the gas_limit
should be l2_gas_limit
zksync2-python/zksync2/provider/eth_provider.py
Lines 179 to 181 in 69348c2
Let me know if I'm wrong😄.
from zksync2-python.
Ran into the same issue today with deposits. Started out with error "qp" for the gas per pubdata value not being right (eth provider has this set at 50000). After I overrode that I got the "mv" error and it looks like the SDK is setting the base_cost to 0. Got around that by calculating the base cost with get_base_cost and passing it as the operator tip.
gas_price = web3.eth.gas_price operator_tip = eth_provider.get_base_cost(gas_limit=eth_provider.RECOMMENDED_DEPOSIT_L2_GAS_LIMIT, gas_per_pubdata_byte=800,gas_price=gas_price) l1_tx_receipt = eth_provider.deposit(token=Token.create_eth(), amount=web3.to_wei(str(depositAmount), "ether"), gas_per_pubdata_byte=800, operator_tip=operator_tip)
I encountered the same issue today, this code can help solve it, thank you.
from zksync2-python.
Related Issues (20)
- timeout with withdraw HOT 3
- insufficient funds HOT 3
- deposit.py module errors HOT 2
- Issues when interacting with a local node HOT 1
- eth_estimate_gas: web3.exceptions.ContractLogicError: execution reverted: Failed to submit transaction: insufficient balance for transfer HOT 5
- Example deposit testnet transaction fails on chain: "Fail with error 'qp'" HOT 7
- Unable to install zksync2-python SDK on Python 3.10 on Mac HOT 3
- eth_estimate_gas always return web3.exceptions.ContractLogicError: execution reverted: Failed to submit transaction: cannot estimate gas HOT 4
- version on pypi 0.4.0 while there is 0.5.0 available HOT 1
- pip install zksync2 fail HOT 2
- INTERNAL_ERROR: insufficient funds HOT 1
- transfer eth {'code': 3, 'message': 'failed to validate the transaction. reason: Validation revert: Failed to pay for the transaction: Failed to pay the fee to the operator', 'data': '0x'}
- Unable to verify compiled and deployed contract HOT 1
- Make target fails with: 17.62 Processing pydantic_core-2.4.0.tar.gz HOT 1
- eth_estimate_gas error in testnet HOT 3
- pysha3 conflict HOT 5
- web3 version dependency has a bug HOT 4
- The automated release is failing 🚨
- Returning False when connecting to remote testnet node. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zksync2-python.