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

Migrate Hydro & Tribute contracts to v2.0.1 #170

Merged
merged 5 commits into from
Nov 19, 2024

Conversation

dusan-maksimovic
Copy link
Contributor

@dusan-maksimovic dusan-maksimovic commented Nov 12, 2024

Description

This PR adds migration for Hydro and Tribute smart contracts from V1.1 to V2.0.1. The following states of the SCs are migrated, per PRs:

  • Fractional voting support (Fractional voting support #157)

    • Hydro SC:
      • VOTE_MAP key includes lock ID
        • migrate existing votes by iterating over users that voted and their lockups
      • Vote struct is modified- doesn't contain HashMap anymore, but only one validator->shares
  • Custom bids duration (Custom bids duration #165)

    • Hydro SC:
      • "max_bid_duration" added to Constants
        • set through MigrateMsg
      • "bid_duration" added to Proposal
        • set to 1 in round 0 proposals
  • Add a minimum export floor (Add a minimum export floor #162)

    • Hydro SC:
      • "minimum_atom_liquidity_request" added to Proposal
        • set to 0 for round 0 proposals
    • Tribute SC:
      • "top_n_props_count" and "min_prop_percent_for_claimable_tributes" removed from Config
  • Allow tributes for proposals in past rounds (Allow tributes for proposals in past rounds #147)

    • Tribute SC:
      • "creation_time" and "creation_round" added to Tributes
        • will be set to the timestamp of the beginning of that round and the round in which tribute was created

Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • Targeted the correct branch
  • Included the necessary unit tests
  • Added/adjusted the necessary interchain tests
  • Added a changelog entry in .changelog
  • Compiled the contracts by using make compile and included content of the artifacts directory into the PR
  • Regenerated front-end schema by using make schema and included generated files into the PR
  • Updated the relevant documentation or specification
  • Reviewed "Files changed" and left comments if necessary
  • Confirmed all CI checks have passed

- added tribute migration
- added unit tests
- fixed tribute build issue
@dusan-maksimovic dusan-maksimovic marked this pull request as ready for review November 18, 2024 09:53
@dusan-maksimovic dusan-maksimovic requested a review from a team as a code owner November 18, 2024 09:53
Copy link
Contributor

@stana-miric stana-miric left a comment

Choose a reason for hiding this comment

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

LGTM!

@dusan-maksimovic dusan-maksimovic changed the title Migrate Hydro & Tribute contracts to v2.0.0 Migrate Hydro & Tribute contracts to v2.0.1 Nov 18, 2024
@dusan-maksimovic dusan-maksimovic merged commit babefa9 into main Nov 19, 2024
5 checks passed
@dusan-maksimovic dusan-maksimovic deleted the dusan/v1.1-to-v2.0-migration branch November 19, 2024 11:43
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.

2 participants