Closed yohanelly95 closed 3 months ago
I was able to fix this by running brew install libusb
. A warning to install this also shows up when I run the install command
Not sure why it needs USB access though 🤔
thanks, @Chipe1, by the way were you able to run a forge script that deploys contracts/post deployment tasks using the --zksync
flag?
I tried it, but the txn never goes through. I just get caught waiting for a receipt but it is never received. @bxpana the command looks something like this
forge script script/Deployer.s.sol:Deployer --rpc-url https://zksync-sepolia.drpc.org --optimize -vvvv --ledger --sender ${DEPLOYER_ADDRESS} --hd-paths "m/44'/60'/${index}'/0/0" --broadcast --zksync --slow
I signed the first txn, but it does not get submitted to the network (zksync sepolia) and the script gets stuck waiting for a receipt indefinitely.
Hey @yohanelly95 , no sorry didn't try any deployment yet. Was only using it for running tests(using hardhat for deployments). Will let you know in case I do
I am getting the same error, although running the command:
brew install libusb
didn't solve it for me, and I am still getting the same error as the OP.
libusb
is required due to the --ledger
support. It can be verified with brew list libusb
if you have it installed.
Unfortunately, ledger isn't supported for foundry-zksync yet. It's on the roadmap but can take a while due to the existence of other critical features.
I am getting the same error, although running the command:
brew install libusb
didn't solve it for me, and I am still getting the same error as the OP.
Just replying to myself and giving an update for others that might be helpful. brew install libusb
is a solution to this issue, but for me the issue was a bit more rooted. Because I am using a Mac with Arm64 architecture, and Apple Silicon chip, the default location where homebrew
was installing packages such as libusb
was wrong. Hence why I couldn't solve this issue just by simply doing brew install libusb
. After some re-wiring and relocating of homebrew
I finally got it to install packages in a correct location and then homebrew install libusb
did actually solve the issue, like for the others.
It seems like your issue has been resolved @yohanelly95, right?
For now, we don't yet support --ledger
option so you wouldn't be able to use your script with your ledger device.
Please feel free to reopen the issue if you get other installation problems, and feel also free to open other issues if you have more!
It seems like your issue has been resolved @yohanelly95, right? For now, we don't yet support
--ledger
option so you wouldn't be able to use your script with your ledger device. Please feel free to reopen the issue if you get other installation problems, and feel also free to open other issues if you have more!
I see @Karrq, so for zksync mainnet I would like to deploy contracts using a hardware device. How do you suggest I do this? Note: there are multiple contracts and a post-deployment script that would need to be run as well to initialise them correctly for eg.
Right now there's no solution for your issue @yohanelly95, directly in foundry-zksync
, but it is planned.
Perhaps you could use foundry to generate the transactions you want to submit using the broadcast
functionality (you'd find them in json files under the broadcast/{chain_id}
folder after your script is run), and somehow then sign them using your device, before finally broadcasting them on chain (not necessarily thru cast
), but tbh I couldn't find a clear and easy way to do this
I am getting the same error, although running the command:
brew install libusb
didn't solve it for me, and I am still getting the same error as the OP.Just replying to myself and giving an update for others that might be helpful.
brew install libusb
is a solution to this issue, but for me the issue was a bit more rooted. Because I am using a Mac with Arm64 architecture, and Apple Silicon chip, the default location wherehomebrew
was installing packages such aslibusb
was wrong. Hence why I couldn't solve this issue just by simply doingbrew install libusb
. After some re-wiring and relocating ofhomebrew
I finally got it to install packages in a correct location and thenhomebrew install libusb
did actually solve the issue, like for the others.
I was having this issue and this solution worked :) Just to expand a little bit, what I've done was basicall:
1) save the names of all existing packages on a file
arch -x86_64 /usr/local/bin/brew bundle dump --global
2) re-install homebrew (which will be installed in the correct directory /opt/homebrew
)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
3) re-install all packages that were installed on the other homebrew
/opt/homebrew/bin/brew bundle install --global
4) install foundry
./install-foundry-zksync
5) remove old homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" -- --path=/usr/local
Source: https://docs.brew.sh/Common-Issues#unintentional-dual-homebrew-installations
Component
Forge, Cast, Anvil
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (af97b2c 2024-07-18T00:22:15.301937000Z)
What command(s) is the bug in?
./install-foundry-zksync
Operating System
macOS (Apple Silicon)
Describe the bug
Getting this error when I try install foundry zksync