[Deployment] Error during deployment - works on other EVM #94
-
EnvironmentTestnet zkSolc Version^0.4.1 zksync-web3 Version^0.14.3 Hardhat.config.ts
Deployment Script (WITHOUT PRIVATE KEY)PK is a key provided by the era_test_node
Deployment command
Contract CodePlease Note: This code is not tested yet
Does this work on other EVMs? (If yes, please list at least 1 of them)Yes it works to deploy on a local hardhat node within a standard hardhat env Description of What Your Contract DoesDescriptionThe contract is a raffle contract where people can win points to evolve a NFT, as well as win the ETH that is part of the contribution (0.0025ETH per ticket). Repo Link (Optional)No response Additional DetailsAdditional Information
Error MessagesError from deployment script
Output from the node during failed deployment
Error from tests
Any help is appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
[UPDATE] Just tried using AtlasZK which has a web IDE, and I'm able to deploy it to testnet. Had to change the Sol version to |
Beta Was this translation helpful? Give feedback.
-
I think I am facing the same issue as you and unfortunately I do not have a solution yet. One thing I have noticed is that the gas limit is being hit. On your node, see:
My node states the same info on gas used. When I use the estimate gas function |
Beta Was this translation helpful? Give feedback.
Hey, I was able to deploy my contract to the
era_test_node
by increasing the gas limit. You're correct in saying that the estimate gas function does not work properly in the test environment (it seems to always return 0.02 eth or something like that). Using that value will cause an integer overflow error because I think the gas limit var is of type uint32. So I set the gas limit to be the max int for uint32 which is 4294967295. My code is below.