Git Product home page Git Product logo

foundry-zksync-era's Introduction

Owen's GitHub stats-Dark Owen's GitHub stats-Light

foundry-zksync-era's People

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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

foundry-zksync-era's Issues

Add deployment from L2

Overview

Deploying directly from L2 requires some additional problem solving including sending custom eth_sendTransaction calls which could require some changes to foundry or some messy ffi calls. Some more research has to be done here to figure out the proper solution.

Requirements

  • Format tx data to this spec
  • Sign data using vm.sign()
  • Broadcast EIP-712 data (will most likely require changes to forge)

Documentation addresses wrong way

address DIAMOND_PROXY_MAINNET = 0x1908e2BF4a88F91E4eF0DC72f02b8Ea36BEa2319; address DIAMOND_PROXY_GOERLI = 0x32400084C286CF3E17e7B677ea9583e60a000324;

Needs flipping

Explore verification

Overview

It would be good to also have a way to verify contracts properly. This will probably not be possible with foundry atm due to compiler differences however it should be possible through the block explorer interface.

The solc version should be set to whatever solc --version evaluates to on your machine and the zksolc version should match the version specified in your Deployer() constructor. Have tried this with optimized selected and without but does not seem to work correctly for me.

Detect User's OS & Architecture

Overview

Currently we require users to add their operating system & architecture to their env variables (to use for downloading the correct compiler binary) however it would be much easier to run a script that can determine this automatically.

Details

This is done in zksync-hardhat-solc but it is not as trivial using solidity/foundry.

The solution would most likely require some bash scripting.

Remove unnecessary broadcast checks

Overview

The broadcast param in deployFromL1 is used to toggle vm.broadcast calls but this is unnecessary since broadcasts are not actually broadcast to the chain unless the --broadcast flag is used. This means there is really no need to have this extra parameter.

Does not work on macOS x86_64, or Linux x86_64 due to bug in FFI

When using this on non Apple Silicon macOS or on x64 Linux, foundry-zksync-era will download the macOS ARM binary & therefore not function as intended.

This is due to a bug in the way FFI has been implemented to detect system info. It just gets back $(uname -m) verbatim from the ffi call, without evaluating the intended command, hence the ternary statements default to arch and os to macOS / arm64 respectively, which leads to the wrong binary being downloaded & executed.

Estimate Gas inputs

Overview

Currently we hard-code the gas values for requestL2Transaction to be the max values so that it never fails. What we should do instead is estimate the correct values that it is expected to cost.

Details

It is somewhat unclear how to get these values, but the relative docs can be found here

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.