Skip to content

v0.7.3

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 25 Sep 13:58
· 81 commits to main since this release

Changelog

All notable changes to this project will be documented in this file.

[0.7.3] - 2024-09-25

🚀 Features

  • (currency) Visit only pool pairs, not any currency pair
  • (currency) Any visited pair currency must be InPoolWith<'The_Pivot'>
  • (oracle) Add a swap tree validation on oracle migration
  • (leaser) Migrate legacy leases
  • (currencies) Add WEth and Inj in the swap tree
  • (tests) Add an oracle migration negative test
  • (oracle) Validate swap tree on the sudo update message
  • (oracle) Validate the swap tree on instantiation and update

🐛 Bug Fixes

  • (currencies) Some currencies were mistakenly defined with 6 decimal digits

🚜 Refactor

  • (currency) Intro InPoolWith to specialize currency in Group-s per their pivot
  • (currency) Simplify AnyVisitorPair to work over the same group
  • (currency) Get rid of stale trait functions
  • (currency) Avoid unnecessary conversion to a currency of a super group
  • (lpp) Remove a stale check
  • (oracle) Simplify the currencies query
  • (finance) Remove a redundant function at CoinDTO

🎨 Styling

  • (tests) Cargo.toml formatting

🧪 Testing

  • Adjust the test protocol's currency hierarchy
  • (oracle) Scrap a macros
  • Introduce a new lease currency
  • Adjust the currency usage to reflect the new "InPoolWith" requirement
  • (marketprice) Adjust the test currencies to satisfy the test scenarios
  • (platform) Adjust test currencies to satisfy the pair definitions

⚙️ Miscellaneous Tasks

  • (finance) Remove an extra trait boundary
  • Bump package versions

Build

Upgrade from v0.7.2

Store the new code of the Treasury and all protocol contracts except Void

IMPORTANT! They all should have --run-as <admin contract address> and with their respective --code-hash <code hash>, where <code hash> is the binary's SHA256 hash.

Pass the Admin contract, with --instantiate-anyof-addresses nolus1gurgpv8savnfw66lckwzn4zk7fp394lpe667dhu7aw48u40lj6jsqxf8nd, when preparing the store code proposals of all contracts except the Lease, and with --instantiate-anyof-addresses <the_Leaser_addr> for the Lease one.

Migrate the contracts via the Admin contract

Prepare a proposal metadata

Open a JSON file with the structure below and fill in the details. Save.

{
 "title": "Migration to v0.7.3",
 "authors": [
  "The Nolus Team"
 ],
 "summary": "A summary of the migration",
 "details": "More details ...",
 "proposal_forum_url": "<some>",
 "vote_option_context": "???"
}

Store on IPFS

Upload the metadata JSON prepared above to IPFS and save its CID

Prepare the proposal

Open a JSON file with the structure below and fill in the details. Save.

{
    "messages": [
      {
        "@type": "/cosmwasm.wasm.v1.MsgSudoContract",
        "authority": "<proposal_sender>",
        "contract": "<the Admin address>",
        "msg": {
          "migrate_contracts": {
            "release": "tag-v0.7.3-2024-09-25T13:30+00:00",
            "migration_spec": {
              "platform": {
               "some": {
                "treasury": {
                  "code_id": "<Treasury code Id>",
                  "migrate_msg": "{}"
                 }
                }
              },
              "protocol": {
                "<name of a registered protocol>": {
                  "leaser": {
                    "code_id": "<Leaser code Id>",
                    "migrate_msg": "{}",
                    "post_migrate_execute_msg": "{\"migrate_leases\":{\"new_code_id\":\"<Lease code Id >\",\"max_leases\":1500}}"
                  },
                  "lpp": {
                    "code_id": "<Lpp code Id>",
                    "migrate_msg": "{}"
                  },
                  "oracle": {
                    "code_id": "<Oracle code Id>",
                    "migrate_msg": "{}"
                  },
                  "profit": {
                    "code_id": "<Profit code Id>",
                    "migrate_msg": "{}"
                  },
                  "reserve": {
                    "code_id": "<Reserve code Id>",
                    "migrate_msg": "{}"
                  }
                },
                "<name of another registered protocol>": {
                  ...
                }
              }
            }
          }
        }
      }
    ],
    "metadata": "ipfs://<CID of the proposal metadata>",
    "deposit": "1000000000unls",
    "title": "Migration to v0.7.3",
    "summary": "A summary of the migration"
  }

Migrate the contracts

nolusd tx gov submit-proposal <path_to_the_proposal_json> --from <signer> --gas <gas_amount> --gas-prices 0.0025unls