Skip to content

v0.7.6

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 20 Dec 08:25
· 47 commits to main since this release

Changelog

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

[0.7.6] - 2024-12-19

🚀 Features

  • (protocol/currencies) Generate currencies based on provided network topology and protocol definition.
  • (protocol/currencies/build) Move-in swap pairs definitions.
  • (scripts) Allow running lint.sh without arguments.
  • (scripts) Allow individual package selection and passing of additional arguments to linter script.
  • (lease) Expose the change close policy as an API endpoint
  • (lease) Intro the close policy into the query state
  • (dex) Prepare the IBC timeout to accommodate the forthcoming IBC channel migration
  • (lease) Migrate lazily from v0.7.5
  • (lease) Export the lease currency in the Opening state

🐛 Bug Fixes

  • (marketprice) Reorder the oldest observation

🚜 Refactor

  • (lease) Remove redundancy
  • (lease) Cleanup a stale abstraction
  • (protocol/swap) Revamp Astroport implementation to be non-instantiatable and not define constant as generic parameter dependent.
  • (protocol/dex) #[expect] lint when not using debug_assertions.
  • (protocol/dex) Use functional style.
  • (protocol/dex) Remove unnecessary serde bounds by specifying them explicitly.
  • (protocol/swap) Remove {S|Des}erialization derives.
  • (protocol/swap) Move-out validate_a_response.
  • (protocol/swap) Convert osmosis::Impl struct to an empty tagged union.
  • (protocol/swap) Use functional style.
  • (protocol/swap) Unify public API to prevent changes of breakage.
  • (protocol/dex) Refactor transfer_out module to not panic and use the Result type instead.
  • (protocol/currencies/build) Use set directly.
  • (protocol/currencies/build) Use only described currencies for payment-only group.
  • (protocol/currencies/build) Refactor snake_case_to_upper_camel_case to use Iterator::collect.
  • (protocol/currencies) Make impl_mod modules private and reexport definitions in containing module.
  • (protocol/currencies) Import types as aliases instead of using qualified syntax.
  • (protocol/currencies/build) Reuse resolved_currency module utilities.
  • (protocol/currencies) Reexport currencies in a separate testing module.
  • (protocol/currencies/build) Use anyhow::Error::msg directly instead of anyhow! to enable reuse.
  • (protocol/currencies) Revert to importing schemers instead.
  • (protocol/currencies+build) Split definitions into a separate module to filter out imports better.
  • (protocol/currencies/build) Remove the unnecessary lifetime.
  • (protocol/currencies) Revert #[inline] attributes and #[cold] & unimplemented! change.
  • (tools/topology) [breaking] Introduce HostCurrency newtype.
  • (protocol/currencies/build) Refactor build script to address comments.
  • (protocol/currencies/build) Move output_directory down to a narrower scope.
  • (protocol/currencies/build) Refactor to use HostCurrency::ticker delegate method.
  • (tools/topology) [breaking] Remove unnecessary DEX data.
  • (platform) Elide unnecessary lifetimes.
  • (protocol) Elide unnecessary lifetimes.
  • (protocol/currencies/build) Define type alias for Result.
  • (protocol/oracle) Use precise-capture syntax.
  • (protocol/marketplace) Define type alias for Result.
  • (tests) Elide unnecessary lifetimes.
  • (protocol/marketplace) Remove default generic argument on Result type alias.
  • (lease) Move position-related error variants out of the lease ones
  • (lease) Take skel-related errors out of the contract errors
  • (lease) Unification of function/method and module names
  • (lease) Move CloseTratege from lease::error to lease
  • (lease) Move position spec DTO into own dir
  • (lease) Split a module into sub-modules
  • (tests) Extract fn block_time
  • (versioning) Get rid of a macto definition
  • (versioning) Rename ReleaseLabet to Release
  • (versioning) Improve the cohesion of Release
  • (versioning) Inline one-time referenced functions
  • (versioning) Extract a common function
  • (marketprice) Better validation of observations

🎨 Styling

  • (protocol/swap) Use module::function style.
  • (protocol/dex) Add blank lines.
  • (protocol/swap) Import as CosmosAny for coherence.
  • (protocol/swap) Remove unnecessary path qualifications.
  • (protocol/currencies/build) Opt-out of fully-qualified paths.
  • (protocol/currencies/build) Reorder in order of use.
  • (tools/topology) Formatting.
  • (protocol) Formatting.
  • (platform) Formatting.
  • (protocol/lease) Merge imports.
  • (lease) Fix a lint
  • (scripts) Wrap non-flag arguments in double quotes.

Upgrade from v0.7.5

Store the new code of the Lease smart contract

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.6",
 "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": {
          "execute_contracts": {
              "platform": null,
              "protocol": {
                "<name of a registered protocol>": {
                  "some": {
                          "leaser": "{\"migrate_leases\":{\"new_code_id\":\"<Lease code Id >\",\"max_leases\":4000}}",
                          "lpp": null,
                          "oracle": null,
                          "profit": null,
                          "reserve": null
                  }
                },
                "<name of another registered protocol>": {
                  ...
                }
              }
            }
          }
        }
      }
    ],
    "metadata": "ipfs://<CID of the proposal metadata>",
    "deposit": "1000000000unls",
    "title": "Migration to v0.7.6",
    "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