Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chain log with all protocol deployments #37

Closed
PaulRBerg opened this issue May 8, 2023 · 1 comment
Closed

Chain log with all protocol deployments #37

PaulRBerg opened this issue May 8, 2023 · 1 comment
Assignees

Comments

@PaulRBerg
Copy link
Member

PaulRBerg commented May 8, 2023

Problem

While working on the proxy plugin, we stumbled upon the issue described in #36.

Thinking about a solution, I have discovered another problem - that we offer zero on-chain support to integrators in terms of the ability to fetch the Sablier V2 contract addresses in another smart contract.

Solution

To address this problem, as well as fix #36, we should build something similar to Maker's ChainLog contract. The documentation for Maker's contract can be found here.

@PaulRBerg
Copy link
Member Author

PaulRBerg commented May 8, 2023

A couple of thoughts on this:

  • I ended up implementing a simple registry in feat: plugin and chain log #38, as I did not think it worthwhile to replicate the complexity of Maker's versioning system given our current needs. We may consider adding an unlist function to the registry.
  • We should ask future users if they would find it valuable to have a versioned on-chain registry.
  • To implement a versioned similar to Maker's, we would need a storage pattern similar to what Rob Hitched called "Mapped Structs with Delete-enabled Index", which he implemented in his library UnorderedKeySet. This library is not up-to-date with the latest version of Solidity, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant