Coder Social home page Coder Social logo

Comments (3)

PatrickAlphaC avatar PatrickAlphaC commented on July 30, 2024

Actually... digging into this more. Seems like the issue goes a bit deeper than I thought. The way this repo compiles the contracts is... a bit odd.

Why?

We have javascript magic like this:

uint160 constant SYSTEM_CONTRACTS_OFFSET = {{SYSTEM_CONTRACTS_OFFSET}}; // 2^15

Which it looks like is fixed when we compile with the precompiles, but it prevents our foundry friends from having a good time, and sort of vendor locks people into Hardhat.

The preprocess-system-contracts.ts seems to do some clever stuff, which is "fine" but it might not be acceptable to use as a package that users use. It might make sense to have a separate repo where users can import the systems contract library so they can mock interacting with the system contracts.

Or, you could have foundry-zksync deal with processing these contracts.

So... we have a few options:

  1. Increase the scope of foundry-zksync to handle this
  2. Split out this repo so there is a repo that mirrors this one but "packagifies" everything so that users can mock interacting with system contracts in their local environments
  3. Reduce the javascript magic

I'm leaning towards number 2, but not sure how others feel

from era-contracts.

StanislavBreadless avatar StanislavBreadless commented on July 30, 2024

We actually used to have this repo as a mirror of the contracts that can be easily imported. While it is somewhat outdated, we generally ensure backward compatibility, so if the functionality provided by that repo is enough for you, you can use it temporarily. We will soon update it though

from era-contracts.

alexhooketh avatar alexhooketh commented on July 30, 2024

Still not fixed.

@StanislavBreadless is it still safe to use the repo you mentioned?

from era-contracts.

Related Issues (14)

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.