zksync-sdk / zksync2-java Goto Github PK
View Code? Open in Web Editor NEWzksync2 is a web3j library adapted to work with the ZKsync Era.
License: Apache License 2.0
zksync2 is a web3j library adapted to work with the ZKsync Era.
License: Apache License 2.0
Code location is [JsonRpc2_0ZkSync.java::293] (https://github.com/zksync-sdk/zksync2-java/blob/master/src/main/java/io/zksync/protocol/JsonRpc2_0ZkSync.java)
The method id of getProof is incorrect when construct the Request entitiy. Should be "zks_getProof" rather than "zks_L1BatchNumber".
Transaction estimate = Transaction.createFunctionCallTransaction(
"MY SOURCE ADDR",
"TARGET ADDR",
BigInteger.ZERO,
BigInteger.ZERO,
amountInWei,
"0x"
);
Fee fee = zksync.zksEstimateFee(estimate).send().getResult();
Request Log:
{"jsonrpc":"2.0","method":"zks_estimateFee","params":[{"from":"SOURCE ADDR","to":"RECIPIENT ADDR","gas":"0x0","gasPrice":"0x0","value":"0x33ba3e2bee000","data":"0x","transactionType":"0x71","eip712Meta":{"gasPerPubdata":"0x27100"}}],"id":1}
Response Log :
{"jsonrpc":"2.0","error":{"code":3,"message":"Failed to submit transaction: virtual machine entered unexpected state. please contact developers and provide transaction details that caused this error. Error description: Assertion error: EIP1559 params wrong","data":{"code":104,"message":"virtual machine entered unexpected state. please contact developers and provide transaction details that caused this error. Error description: Assertion error: EIP1559 params wrong"}},"id":1}
master
branch failed. π¨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iβm sure you can fix this πͺ.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those donβt help, or if this issue is reporting something you think isnβt right, you can always ask the humans behind semantic-release.
package.json
file.A package.json file at the root of your project is required to release on npm.
Please follow the npm guideline to create a valid package.json
file.
Good luck with your project β¨
Your semantic-release bot π¦π
Expand the protocol for interaction with the wallet. To be able to handle errors
Now, if you send invalid data, the SDK crashes
At the moment it is difficult to understand why the error occurred. For example, if I make a transaction for an amount greater than the balance, I receive the following error:
Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
at java.base/java.util.Objects.checkIndex(Objects.java:372)
at java.base/java.util.ArrayList.get(ArrayList.java:459)
at org.web3j.abi.datatypes.DynamicArray.getTypeAsString(DynamicArray.java:69)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at org.web3j.abi.FunctionEncoder.buildMethodSignature(FunctionEncoder.java:83)
at io.zksync.abi.ZkFunctionEncoder.encodeFunction(ZkFunctionEncoder.java:33)
at org.web3j.abi.FunctionEncoder.encode(FunctionEncoder.java:46)
at org.web3j.tx.Contract.executeTransaction(Contract.java:344)
at org.web3j.tx.Contract.lambda$executeRemoteCallTransaction$4(Contract.java:415)
at org.web3j.protocol.core.RemoteCall.send(RemoteCall.java:42)
at org.web3j.utils.Async.lambda$run$1(Async.java:38)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Could you add an example how to bridge native tokens and erc20 tokens from Goerli network to ZkSync network.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.