matter-labs / foundry-zksync

Fork of Foundry tailored for zkSync environment
Apache License 2.0
302 stars 130 forks source link

Failing to create contract: Assertion error: factory deps non zero, data: "0x" #738

Closed DicksonWu654 closed 6 days ago

DicksonWu654 commented 1 week ago

Component

Forge

Have you ensured that all of these are up to date?

What version of Foundry are you on?

forge 0.0.2 (f75d7bf 2024-11-22T00:26:55.917059070Z)

What command(s) is the bug in?

forge create Counter --zksync --rpc-url https://sepolia.era.zksync.dev --private-key

Operating System

Linux

Describe the bug

Hi. I'm getting the following error: Error: server returned an error response: error code 3: virtual machine entered unexpected state. please contact developers and provide transaction details that caused this error. Error description: Assertion error: factory deps non zero, data: "0x"

Steps to reproduce:

  1. Install Foundry, Foundry-ZkSync
  2. forge init
  3. run: forge create Counter --zksync --rpc-url https://sepolia.era.zksync.dev --private-key <PRIVATE_KEY>
DicksonWu654 commented 1 week ago

It seems like the latest version (when installing using this command: curl -L https://raw.githubusercontent.com/matter-labs/foundry-zksync/main/install-foundry-zksync | bash) Is the source of the problem

When using an older version (I choose a random arbitrary version: https://github.com/matter-labs/foundry-zksync/releases/tag/nightly-0b24fcc33b6eeaa837c1186366d473df9b527308) it works

DicksonWu654 commented 1 week ago

Update: It also works for this version: https://github.com/matter-labs/foundry-zksync/releases/tag/nightly-420660c5243e06af1f12febb1765a9abc9c77461

But doesn't work for the latest nightly version: https://github.com/matter-labs/foundry-zksync/releases/tag/nightly-f75d7bf43d6e0da5ec04e5813676ec6e6198cced

dutterbutter commented 1 week ago

@DicksonWu654 Thanks for reporting! We are investigating the issue. In the meantime users can install previous versions as described here:

https://github.com/matter-labs/foundry-zksync/tree/main/foundryup-zksync

uF4No commented 1 week ago

Recommend foundryup-zksync --version nightly-420660c5243e06af1f12febb1765a9abc9c77461 to install just the previous nightly build 🤙

dutterbutter commented 6 days ago

@DicksonWu654 resolved in https://github.com/matter-labs/foundry-zksync/pull/740