Giter Club home page Giter Club logo

zksolc-bin's Introduction

zksolc-bin

This repository contains current and historical builds of the zkEVM Solidity Compiler.

Compiler changelog

Troubleshooting

  • The binary may need to have its executable bit set:

chmod a+x <path to file>

  • On macOS, the binary may need to have its quarantine attribute cleared:

xattr -d com.apple.quarantine <path to file>

zksolc-bin's People

Contributors

antond3 avatar flashsheridan avatar hedgar2017 avatar idea404 avatar mexicanace avatar otani88 avatar zksync-dev-robot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zksolc-bin's Issues

Error compiling 0.8.25 solidity version

When trying to compile 0.8.25 contracts, I'm getting this error:

Compiling contracts for zkSync Era with zksolc v1.4.0 and solc v0.8.25
Compiling 78 Solidity files
Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)

IMHO it should alert if 0.8.25 is not supported, if it is the case.

deploy zbin compiled by zksolc-bin without hardhat plugin

Hi Team,

I'm trying to deploy my smart contract on zksync era, after compile solidity smart contract with zksolc,

    zksolc-macosx-amd64-v1.4.0 -o ./build --overwrite smartcontract.sol --bin

the output is a .zbin file.

My question is , how can I deploy the .zbin file, just as deploy bytecode with create2 as the normal EVM deploy ?

        await wallet.sendTransaction(
            {
                to : ethers.constants.AddressZero,
                data : compiledContract.bytecode,
                gasLimit : 5000000
            }
       )

Since I am not familiar with hardhat,and it's a heavy burden for me to learn it from start, so the below link is not a good guide for me.
https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-deploy.html.

add support for linux ARM64

hardhat-zksync-solc plugin is unable to compile contracts or be used at all when using ubuntu 22.04 on ARM. I am personally using ubuntu on apple M1 but I believe even more common setups of linux/ubuntu on ARM64 metal will run into the same issue I did.

Took me a while to locate this repo as the origin of the issue: the zksolc binaries that are pulled via the @matterlabs/hardhat-zksync-toolbox suite of hardhat plugins don't support linux ARM and so an 'unusable' error is thrown (shown in the screenshot below) by the plugin when attempting to compile contracts in hardhat.

In the meantime, it may be worth including a snippet noting that compiling/deploying contracts to zksync using zksolc on linux ARM is not currently possible, to save developers the debugging time/headache. If you agree, I can add that as a blurb to the contract deployment tutorial and quickstart guides.

I am using:

yarn version 1.22.19
nodejs v18.13.0
solidity ^0.8.0
ethers 5.7.2

image

The zksolc binary at path zksolc is corrupted. Please delete it and try again.

yarn run v1.22.19
warning package.json: No license field
$ /root/dev/chainpray/node_modules/.bin/hardhat compile
Error in plugin @matterlabs/hardhat-zksync-solc: The zksolc binary at path zksolc is corrupted. Please delete it and try again.

ZkSyncSolcPluginError: The zksolc binary at path zksolc is corrupted. Please delete it and try again.
at ZksolcCompilerDownloader._verifyCompiler (/root/dev/chainpray/node_modules/@matterlabs/hardhat-zksync-solc/src/compile/downloader.ts:202:19)
at ZksolcCompilerDownloader.isCompilerDownloaded (/root/dev/chainpray/node_modules/@matterlabs/hardhat-zksync-solc/src/compile/downloader.ts:100:24)
at /root/dev/chainpray/node_modules/@matterlabs/hardhat-zksync-solc/src/index.ts:83:59
at async OverriddenTaskDefinition._action (/root/dev/chainpray/node_modules/@matterlabs/hardhat-zksync-solc/src/index.ts:76:5)
at async Environment._runTaskDefinition (/root/dev/chainpray/node_modules/hardhat/src/internal/core/runtime-environment.ts:333:14)
at async Environment.run (/root/dev/chainpray/node_modules/hardhat/src/internal/core/runtime-environment.ts:166:14)
at async SimpleTaskDefinition.action (/root/dev/chainpray/node_modules/hardhat/src/builtin-tasks/compile.ts:1329:9)
at async Environment._runTaskDefinition (/root/dev/chainpray/node_modules/hardhat/src/internal/core/runtime-environment.ts:333:14)
at async Environment.run (/root/dev/chainpray/node_modules/hardhat/src/internal/core/runtime-environment.ts:166:14)
at async SimpleTaskDefinition.action (/root/dev/chainpray/node_modules/hardhat/src/builtin-tasks/compile.ts:1432:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

can not gen ABIs by zksolc

this is my dir tree:

--v1-core
    --contracts
        --libs
            --<some file>
       --interfaces
            --<some interfaces def>
        positionManager.sol
        orderbook.sol
        <......>

there some openzeppelin libs, which imported like
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
I can compile and deploy by vscode, by
import "@matterlabs/hardhat-zksync-deploy" import "@matterlabs/hardhat-zksync-solc"

but I can not gen abis while I am trying to generate golang files.
tried:

  1. zksolc --combined-json abi,bin contracts/PositionManager.sol --include-path node_modules --base-path .
    error:
    Source code for path @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol not found

  2. make a dir and copied all openzeppelin files and rename the path, wont work, same issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.