GithubHelp home page GithubHelp logo

fredcoen / proxy_implementations_with_forge Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 2.0 1.75 MB

The purpose of this repo is to showcase deploying and testing various proxy patterns with forge

Makefile 0.06% Nix 0.01% Solidity 47.44% JavaScript 49.61% Shell 0.69% Ruby 2.05% Handlebars 0.15%

proxy_implementations_with_forge's People

Contributors

beskay avatar fredcoen avatar

Stargazers

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

Watchers

 avatar

proxy_implementations_with_forge's Issues

initialize call during proxy creation (UUPS)

Hey guys,
Lemme begin with how much I like your work. I pretty much use Foundry all the time and the lack up upgradable proxy support was a bummer. I found this repo while i was checking foundry-rs for proxy support. Thanks a bunch for your awesome work, I truly appreciate it .
So, when I was poking around i realized that the "initialize" is being called after the proxy creation (UUPS). This is a minor thing but I think its better if its directly called during the contract creation such as
proxy = new UUPSProxy(address(implV1), abi.encodeWithSignature("initialize()"));
instead of leaving the second parameter blank and calling it later. This way the contract will never be uninitialized.
I have a couple of other suggestions such as using the address of the proxy casted to an implementation interface IImplementation(proxyAddress).functionName() rather using low level call.(abi.encodeWithSignature("functionName()")) directly from the proxy. I had a a well tested project and this was the quickest way to test the proxy implementation. There is more to it actually, since if the implementation reverts (without a custom error), forge tests do not detect it since they dont bubble up to the proxy but it but thats another topic for another day.
I tried to create a branch and push it but dont have the permissions. If you could gimme access, i would love to contribute and open some pr's.

Cheers and thanks again for the awesome work.

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.