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

feat: deploy to Linea #18

Open
wants to merge 7 commits into
base: feat/membership
Choose a base branch
from
Open

feat: deploy to Linea #18

wants to merge 7 commits into from

Conversation

richard-ramos
Copy link
Member

@richard-ramos richard-ramos commented Oct 1, 2024

  • Splits deployment script in separate deployments per contract (since we might want in the future to deploy different PriceCalculators or WakuRLNV2 contracts).
  • Adds https://github.com/Cyfrin/foundry-devops to retrieve the latest address deployed. (Useful when using multiple scripts)
  • Adds separate package.json scripts to control the deployment of each individual contract
  • Setups the deployment for Linea Sepolia


function run() public broadcast returns (address) {
address priceCalcAddr = DevOpsTools.get_most_recent_deployment("LinearPriceCalculator", block.chainid);
address wakuRlnV2ImplAddr = DevOpsTools.get_most_recent_deployment("WakuRlnV2", block.chainid);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cool, but what happens when you don't have a broadcast directory with a previous deployment on your machine?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, good point.
I'll change the script to allow the usage of environment variables and/or indicate you want to use the broadcast directory.

Copy link
Member Author

@richard-ramos richard-ramos Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change implemented in a5acb1d
Now it will by default use the broadcast dir, unless env variables are used for contracts that were already deployed.

s-tikhomirov and others added 2 commits October 7, 2024 16:02
* refactor, minor fixes

* do not reset ongoing grace period on extension (cf. spec change)

* minor renaming, comments

* refactor, group functions by funcitonality

* extract membership expiration calculation to internal function

* save active duration per membership (must carry over after extension)

* optional lazy erasure from membership set

* minor fixes in tests

* fix: off-by-one: end index can't be equal to next free index

* minor refactoring, comments

* define period boundaries: start inclusive, end exclusive

* separate eraseMembership functions to user-focused (lazy) and admin-focused (tree cleanup)

* minor fix to maintain line lengths

* unify membership-related events

* add test for  zero grace period

* fix typo in comment

Co-authored-by: richΛrd <[email protected]>

---------

Co-authored-by: richΛrd <[email protected]>
@richard-ramos richard-ramos force-pushed the feat/membership-notrack branch 4 times, most recently from 2b1600a to 6db38e3 Compare October 7, 2024 20:02
Base automatically changed from feat/membership-notrack to feat/membership October 8, 2024 12:58
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

Successfully merging this pull request may close these issues.

3 participants