You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I compile the contracts with foundry without zkSync flag, my forge still compiles with zkSync and produce zkout.
I meet the error with below log:
yarn forge:simulate scripts/deploy/deploy-fiat-token.s.sol --rpc-url testnet
yarn run v1.22.19
warning ../../../package.json: No license field
$ forge script -vv --gas-estimate-multiplier $(dotenv -p GAS_MULTIPLIER) scripts/deploy/deploy-fiat-token.s.sol --rpc-url testnet
[⠢] Compiling...
[⠔] Compiling 10 files with 0.6.12
[⠒] Solc 0.6.12 finished in 3.41s
Compiler run successful with warnings:
Warning (3628): This contract has a payable fallback function, but no receive ether function. Consider adding a receive ether function.
contracts/upgradeability/AdminUpgradeabilityProxy.sol:31:1: Warning: This contract has a payable fallback function, but no receive ether function. Consider adding a receive ether function.
contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
^ (Relevant source part starts here and spans across multiple lines).
contracts/upgradeability/Proxy.sol:35:5: The payable fallback function is defined here.
fallback() external payable {
^ (Relevant source part starts here and spans across multiple lines).
Warning (3628): This contract has a payable fallback function, but no receive ether function. Consider adding a receive ether function.
contracts/v1/FiatTokenProxy.sol:29:1: Warning: This contract has a payable fallback function, but no receive ether function. Consider adding a receive ether function.
contract FiatTokenProxy is AdminUpgradeabilityProxy {
^ (Relevant source part starts here and spans across multiple lines).
contracts/upgradeability/Proxy.sol:35:5: The payable fallback function is defined here.
fallback() external payable {
^ (Relevant source part starts here and spans across multiple lines).
Warning (2018): Function state mutability can be restricted to pure
contracts/v2/FiatTokenV2_2.sol:195:5: Warning: Function state mutability can be restricted to pure
function _chainId() internal virtual view returns (uint256) {
^ (Relevant source part starts here and spans across multiple lines).
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Warning: It looks like you are using 'ecrecover' to validate a signature of a user account. │
│ zkSync Era comes with native account abstraction support, therefore it is highly recommended NOT │
│ to rely on the fact that the account has an ECDSA private key attached to it since accounts might│
│ implement other signature schemes. │
│ Read more about Account Abstraction at https://v2-docs.zksync.io/dev/developer-guides/aa.html │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
--> contracts/util/ECRecover.sol
Error:
Failed to compile with zksolc: Compilation failed with "Contract `contracts/test/MockFiatTokenWithEditableBalanceAndBlacklistStates.sol:MockFiatTokenWithEditableBalanceAndBlacklistStates` compiling error: The contract `contracts/test/MockFiatTokenWithEditableBalanceAndBlacklistStates.sol:MockFiatTokenWithEditableBalanceAndBlacklistStates` LLVM IR generator definition pass error: Library `contracts/util/SignatureChecker.sol:SignatureChecker` not found in the projectThe contract `contracts/test/MockFiatTokenWithEditableBalanceAndBlacklistStates.sol:MockFiatTokenWithEditableBalanceAndBlacklistStates` LLVM IR generator definition pass error: Library `contracts/util/SignatureChecker.sol:SignatureChecker` not found in the project\n\n\nStack backtrace:\n 0: __ZN4llvm15SmallVectorBaseIyE8grow_podEPvmm\n 1: __ZN4llvm15SmallVectorBaseIyE8grow_podEPvmm\n 2: __mh_execute_header\n 3: __mh_execute_header\n 4: __mh_execute_header\n 5: __mh_execute_header\n 6: __mh_execute_header\n 7: __mh_execute_header\n 8: __mh_execute_header\n 9: __mh_execute_header\n 10: __mh_execute_header\n 11: __mh_execute_header\n 12: __mh_execute_header\n 13: __mh_execute_header\n 14: __mh_execute_header\n 15: __mh_execute_header\n 16: __mh_execute_header\n 17: __mh_execute_header\n 18: __mh_execute_header\n 19: __ZN4llvm15SmallVectorBaseIyE8grow_podEPvmm\n 20: __mh_execute_header\n 21: __mh_execute_header\n 22: __mh_execute_header\n 23: __ZN4llvm15SmallVectorBaseIyE8grow_podEPvmm\n 24: __pthread_deallocate\n". Using compiler: "/Users/chihaolu/.zksync/zksolc-macosx-arm64-v1.4.0", with args "/Users/chihaolu/Desktop/imToken/chargeable-and-refundable-stablecoin/contracts/test/MockFiatTokenWithEditableBalanceAndBlacklistStates.sol" ["--standard-json", "--solc", "/Users/chihaolu/.svm/0.6.12/solc-0.6.12"]
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I know it is the zkSync foundry's compiler error for some contracts, but I cannot compile this contract without the zkSync foundry even I don't give the --zkSync flag.
BTW, the testnet is pointed to sepolia.
How can I uninstall the foundry-zkSync or compile without foundry-zkSync?
The text was updated successfully, but these errors were encountered:
Thanks @ChiHaoLu for the issue. This is definitely something we should fix, as currently it does compiles both solc and zksolc which should be optional without the --zksync flag.
@dutterbutter Is there any update on this issue? It significantly degrades the UX of Foundry to the point where I've been uninstalling and re-installing the zkSync fork every time I need to run tests for zkSync. Specifically, the zksolc compilation process can be very slow compared to solc, which makes it difficult to work on aspects of my project that don't involve zkSync. I think this issue can be fixed by only using zksolc when the --zksync flag is specified. Thanks :)
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (c47f5db 2024-04-12T10:12:34.747563000Z)
What command(s) is the bug in?
yarn forge:simulate scripts/deploy/deploy-fiat-token.s.sol --rpc-url testnet
Operating System
macOS (Apple Silicon)
Describe the bug
When I compile the contracts with foundry without zkSync flag, my forge still compiles with zkSync and produce
zkout
.I meet the error with below log:
I know it is the zkSync foundry's compiler error for some contracts, but I cannot compile this contract without the zkSync foundry even I don't give the
--zkSync
flag.How can I uninstall the foundry-zkSync or compile without foundry-zkSync?
The text was updated successfully, but these errors were encountered: