Releases: nolus-protocol/nolus-money-market
v0.7.6
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 usingdebug_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 theResult
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 useIterator::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 ofanyhow!
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
v0.7.5
Changelog
All notable changes to this project will be documented in this file.
[0.7.5] - 2024-10-31
🚀 Features
- (marketprice) Store observations more efficiently
- (oracle) Migrattion v2 -> v3
- (currencies) Remove StTia from osmosis-osmosis-usdc_axelar
- (currencies) Remove Strd from osmosis-osmosis-usdc_axelar
- (currencies) Remove Pica from osmosis-osmosis-usdc_noble
- (currencies) Remove Juno from osmosis-osmosis-usdc_noble
- (currencies) Remove Cudos from osmosis-osmosis-usdc_noble
- (currencies) Remove Stars from osmosis-osmosis-usdc_noble
- (currencies) Remove Stride from osmosis-osmosis-usdc_noble
- (currencies) Remove QAtom from osmosis-osmosis-usdc_noble
- (currencies) Remove Dym from osmosis-osmosis-usdc_noble
🚜 Refactor
⚙️ Miscellaneous Tasks
- Bump contract versions
- Cargo update
Upgrade from v0.7.4
Store the new code of 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.5",
"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.5-2024-10-31T11:11+00:00",
"migration_spec": {
"platform": null,
"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.5",
"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
v0.7.4
Changelog
All notable changes to this project will be documented in this file.
[0.7.4] - 2024-10-14
🚀 Features
- Jump to CW 2.x
- (test) Jump to CW 2.x
- (finance) CoinDTO's amount as String
- (swap/astroport) Use of CW 1.x Decimal
🐛 Bug Fixes
- (scripts) Profit init msg - cadence hours
🚜 Refactor
- (protocol/profit) Revamp
TryFind
implementation - (protocol/leaser) Use
Result::inspect
instead - (protocol/profit) Remove unnecessary type annotations
- (tree) Retire the tree_json macro
- Depend only to the most significant version
- Get rid of the explicit dependency to Prost
- (swap) [astroport] define a copy of Astroport API subset
- Workaround cw-multi-test issue #206
🎨 Styling
- (ci) Use one-liner style to allow IDE highlighting on IntelliJ products.
- (ci) Use YAML raw string syntax, as used for commands, to signify usage of GitHub Actions' substitution mechanism.
- (ci) Surround value in quotes to indicate a string.
- (protocol/reserve) Use
cosmwasm_std
throughsdk
instead.
🧪 Testing
- Use bech32 addresses
- Use valid bech32 addressess
⚙️ Miscellaneous Tasks
- (platform) Remove redundant
rewards_dispather
workspace dependency - (platform) Set
authors
,edition
andlicense
to be inherited by the workspace. - (protocol) Set
authors
,edition
andlicense
to be inherited by the workspace. - (platform) Bump astroport to the latest version
- (scripts) Update configs
- Cleanup unnecessary dependencies
- Remove extra platform dependency
Typo
- (rustfmt) Use
Unix
instead ofunix
which is accepted for compatibility
Upgrade from v0.7.3
Store the new code of all platform and 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.4",
"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.MsgMigrateContract",
"sender": "<proposal_sender>",
"contract": "<the Admin address>",
"code_id": "<new_Admin_code_id>",
"msg": {
"migrate_contracts": {
"release": "tag-v0.7.4-2024-10-14T13:35+00:00",
"migration_spec": {
"platform": {
"some": {
"timealarms": {
"code_id": "<Timealarms code Id>",
"migrate_msg": "{}"
},
"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.4",
"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
v0.7.3
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
v0.7.2
What's Changed
🚀 Features
- a new protocol OSMOSIS-OSMOSIS-stATOM, the first "short" one
- cease the support of EVMOS, MARS, QSR, and SAGA on both OSMOSIS-OSMOSIS-* protocols
- a new currency, dATOM, on NEUTRON-ASTROPORT-USDC_NOBLE
heal
operation on leases in closed and liquidated stateheal
operation on leases in swap_* states- (scripts) Deploy platform to live network
🐛 Bug Fixes
- (lease) Missed check on close amount currency
🚜 Refactor
- Parameterize BasePrice by QuoteG and add custom serialization
- (finance) Removed duplicate checks in BasePrice::invariant_held() by converting to Price and modify some trait bounds
- (oracle) Use BasePrice in Alarms
- (oracle) Price alarms invariant
- (leaser) Optimize quote algo
- (oracle) Setup the LegCmd stack at the init time by the ctor
- (scripts) Rename script
- (currency) Remove an obsolete trait bound
- (oracle) Use BasePrice as result of queries
- (protocol) apply CurrencyDef
- (currencies) Secret -> Scrt
- (finance) Use currency definitions in Price conversions
- (lease) Reuse heal impl that drain a lease
- (lpp) Validate the lpn_ticker on instantiation with the type abstraction CurrencyDTO
- (currencies) Use MemberOf
- (currencies) Take the protocol specific definitions out
- (currencies) Intro Currency::Group
- (currency) Intro visit with a parent group visitor
- (currency) Define currency::Definition
- (leaser) Translate SymbolOwned at the API to CurrencyDTO
- (finance) BasePrice::with_price does unchecked price conversion
- (tools/topology) Add a
topology
package for parsing structure and deriving currencies. - (currency) Visit on currenies from groups that are members of the VisitedG
- (platform) Cease passing CurrencyDef instance
- (currency) Treat Definition as Entity not Value
- (currency) Resurrect ticker at the currency definition
- (finance) Intro PriceDTO -> BasePrice with a dto instance
📚 Documentation
- (readme) Update of the local commands to build, inspect and optimize
⚙️ Miscellaneous Tasks
- (lint) 2024-compatibility and deny refining-impl-trait
- Overwrite
currencies
's sources depending on network-protocol combinations - (currencies) Cease depending on protocol and net currencies features
- (oracle) Reduce the use of currency types
Build
- Adjust workspace members pattern
Typo
breath
->breadth
Upgrade from v0.7.1
Store the new code of all platform and 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 the Leaser, and with --instantiate-anyof-addresses <the_Leaser_addr>
for the Lease ones.
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.2",
"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.MsgMigrateContract",
"sender": "<proposal_sender>",
"contract": "<the Admin address>",
"code_id": "<new_Admin_code_id>",
"msg": {
"migrate_contracts": {
"release": "tag-v0.7.2-2024-08-20T06:20+00:00",
"migration_spec": {
"platform": {
"timealarms": {
"code_id": "<Timealarms code Id>",
"migrate_msg": "{}"
},
"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.2",
"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
v0.7.1
What's Changed
🚀 Features
- Intro void
- feat(leaser): close protocol
- feat(admin): Add protocol deregistration
- fix(admin): Remove protocol from storage on deregistration
- feat(admin)!: Remove rewards dispatcher contract
- refactor(admin): Remove
serde
aliases - (versioning) Introduce void-contract release label
- (scripts) Leaser init msg - add protocols_registry
- (admin) Add expected void-contract release label
- (void) Return the expected data on migration
- (admin) Use the new API version of versioning
🚜 Refactor
- (versioning) Use factory member fn-s
⚙️ Miscellaneous Tasks
- (versioning) Reduce a method visibility
NOTES on building this release
- The release was mainly built with CI with two exceptions:
-- manually built a neutron-astroport-usdc_axelar for net-dev on channel-3/channel-1035
-- manually replaced the oracle.wasm of osmosis-osmosis-usdc_noble for net-dev with one built outside a Docker container. The CI built did not pass cosmwasm-check
Upgrade from v0.7.0
Store the new code of all platform and protocol contracts
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 the Leaser, and with --instantiate-anyof-addresses <the_Leaser_addr>
for the Lease ones.
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.1",
"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.MsgMigrateContract",
"sender": "<proposal_sender>",
"contract": "nolus1gurgpv8savnfw66lckwzn4zk7fp394lpe667dhu7aw48u40lj6jsqxf8nd",
"msg": {
"migrate_contracts": {
"release": "tag-v0.7.1-2024-06-21T12:38+00:00",
"migration_spec": {
"platform": {
"timealarms": {
"code_id": "<Timealarms code Id>",
"migrate_msg": "{}"
},
"treasury": {
"code_id": "<Treasury code Id>",
"migrate_msg": "{}"
}
},
"protocol": {
"<name of a registered protocol>": {
"leaser": {
"code_id": "<Leaser code Id>",
"migrate_msg": "{\"protocols_registry\":\"<Admin contract addr>\"}"
},
"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.1",
"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
v0.7.0
Changelog
All notable changes to this project will be documented in this file.
[0.7.0] - 2024-06-06
🚀 Features
- (reserve) Emit events on cover-loss
- (dex) Adjust the timeout to withstand slow infra
- (oracle) Intro
QueryMsg::BaseCurrency
- (oracle-platform) Introduce StablePrice API
- (admin) Add DEX-describing fields
- (currencies) Introduce Saga@Osmosis-osmosis-usdc_noble
- (dex) Get rid of Pre- and Post- IcaRecovery states
- (dex) No delay on ICA recovery
- (oracle) Add a query stable_price
- (admin) Add granularity options to migration & arbitrary contract execution capabilities
- (oracle) Introduce stable price
- (currencies) Introduction of a protocol-stable currency
- (rewards-dispatcher) Wipe out the storage on migration
- (treasury) Add dispatching setup storage migration
- (dex) Add heal operation on swap_in
- Introduce neutron-astroport-usdc_noble protocol
🐛 Bug Fixes
- (currencies) Fix the ATOM symbol at Vitosha-5
- (currencies) DEX-side IBC denominators
- (scripts) Oracle init msg update
- (currencies) Remove the support of stkATOM on osmosis-osmosis-usdc_noble to vacant a seat for Saga
- (scripts) Admin contract - code id type
- (swap) Missing feature group
- (lpp) Refactor total::repay() to handle overflow on subtraction
🚜 Refactor
- (dispatcher) Get rid of -> treasury
- (treasury) Get rid of the treasury address
- (treasury) Get rid of the total rewards calculation
- (marketprice) Merge
validate_tickers
intocheck_tree
- (oracle) Simplify contract instantiation
- (dispatcher) Get rid of unused queries
- (admin) Make schema reflect changes
- (oracle) [breaking] Rename
Price
query toPriceToBase
to reflect it's true nature - Relax trait bounds
- (oracle) Move oracle stub to the protocol source tree
- (oracle) Parameterize OracleRef by the Oracle base
- (script) [breaking] Improvements & added new parameter required by the admin contract
- (admin) [breaking] Make platform and protocols migrations atomic units
- (lease) Get rid of old migrations - LoanForm and LoanDTO
- Log errors with the Rust stabilized Result::inspect_err
- Pass WithCoin cmd by value
- Consolidate from/to conversion functions
- Reuse the same Oracle ref and stub from the platform in the protocol
- Get rid of an unused Error type
- Get rid of allow(clippy::unwrap_in_result) and allow(clippy::unwrap_used)
- (currencies) The test LPN currency is renamed from StableC to LpnC
🧪 Testing
- (oracle) Refactored current tests to use testing currencies
- (oracle) Add negative test for stable currency field
- (oracle) Correct tests and don't rely on
should_panic
- (admin) Add de-/serialization test for
ContractsExecute
- Add a test on heal at swap
⚙️ Miscellaneous Tasks
- (ci) Updated used stable and nightly Rust versions
- (config) [breaking] Add extra CI profile & prefix existing one
- Use
cargo-nextest
as test runner - (dispatcher) Move the functionality into the treasury
- (dispatcher) Cleanup dependencies and errors
- (treasury) Intro contract feature
- (dispatcher) Remove unused dependencies
- Update rust to 1.78
- (lease) Drop the support for min_sell_asset
- Bump the version of neutron-sdk
- Bump osmosis-std version
- (lpp) Get rid of old migration
- (leaser) Get rid of an old migration
- (tests) Address linter issuer
- (lease) Get rid of an old migration
Upgrade from v0.6.3
Store the new code of all platform and protocol contracts
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 the Leaser, and with --instantiate-anyof-addresses <the_Leaser_addr>
for the Lease ones.
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.0",
"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.MsgMigrateContract",
"sender": "<proposal_sender>",
"contract": "nolus1gurgpv8savnfw66lckwzn4zk7fp394lpe667dhu7aw48u40lj6jsqxf8nd",
"msg": {
"dexes": {
"OSMOSIS-OSMOSIS-USDC_AXELAR": "Osmosis",
"OSMOSIS-OSMOSIS-USDC_NOBLE": "Osmosis",
"NEUTRON-ASTROPORT-USDC_AXELAR": {
"Astroport": { "router_address": "<The Astroport router address>" }
}
},
"migrate_contracts": {
"release": "tag-v0.7.0-2024-06-06T06:12+00:00",
"migration_spec": {
"platform": {
"dispatcher": {
"code_id": "<Dispatcher code Id>",
"migrate_msg": "{}"
},
"timealarms": {
"code_id": "<Timealarms code Id>",
"migrate_msg": "{}"
},
"treasury": {
"code_id": "<Treasury code Id>",
"migrate_msg": "{\"cadence_hours\": 12, \"protocols_registry\":\"<Admin contract addr>\",\"timealarms\":\"<Timealarms contract addr>\",\"tvl_to_apr\":{\"bars\":[{\"tvl\":0,\"apr\":150},{\"tvl\":500,\"apr\":140},{\"tvl\":1000,\"apr\":130},{\"tvl\":2000,\"apr\":120},{\"tvl\":3000,\"apr\":110},{\"tvl\":4000,\"apr\":100},{\"tvl\":5000,\"apr\":90},{\"tvl\":7500,\"apr\":80},{\"tvl\":10000,\"apr\":70},{\"tvl\":15000,\"apr\":60},{\"tvl\":20000,\"apr\":50},{\"tvl\":25000,\"apr\":40},{\"tvl\":30000,\"apr\":30},{\"tvl\":40000,\"apr\":20}]}}"
}
},
"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\":<max_len_first_batch>}}"
},
"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.0",
"summary": "A summary of the migration"
}
where
'The Astroport router address' is
- "neutron1rwj6mfxzzrwskur73v326xwuff52vygqk73lr7azkehnfzz5f5wskwekf4" on the Neutron main network, and
- "neutron12jm24l9lr9cupufqjuxpdjnnweana4h66tsx5cl800mke26td26sq7m05p" on the Neutron test network
Migrate the contracts
nolusd tx gov submit-proposal <path_to_the_proposal_json> --from <signer> --gas <gas_amount> --gas-prices 0.0025unls
v0.6.3
Changelog
[0.6.3] - 2024-04-13
🚜 Refactor
- (lease) Enable software-only migration
- (leaser) Enable software-only migration
⚙️ Miscellaneous Tasks
- (dex) Increate the IBC transaction timeout to 3h
- (tests) Cargo update
Upgrade from v0.6.2
Store the new code of the Lease and Leaser
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 the Leaser, and with --instantiate-anyof-addresses <the_Leaser_addr>
for the Lease ones.
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.6.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": "nolus1gurgpv8savnfw66lckwzn4zk7fp394lpe667dhu7aw48u40lj6jsqxf8nd",
"msg": {
"migrate_contracts": {
"release": "tag-v0.6.3-2024-04-13T07:37+00:00",
"migration_spec": {
"platform": {},
"protocol": {
"leaser": {
"<name of a registered protocol>": {
"code_id": <Leaser code Id>,
"migrate_msg": "{}"
},
"<name of another registered protocol>": {
"code_id": <Leaser code Id>,
"migrate_msg": "{}"
}
},
"lpp": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
},
"oracle": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
},
"profit": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
},
"reserve": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
}
}
},
"post_migration_execute": {
"platform": {},
"protocol": {
"leaser": {
"<name of a registered protocol>": "{\"migrate_leases\":{\"new_code_id\":\"<Lease code id>\",\"max_leases\":<max_len_first_batch>}}",
"<name of another registered protocol>": "{\"migrate_leases\":{\"new_code_id\":\"<Lease code id>\",\"max_leases\":<max_len_first_batch>}}"
},
"lpp": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
},
"oracle": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
},
"profit": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
},
"reserve": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
}
}
}
}
}
}
],
"metadata": "ipfs://<CID of the proposal metadata>",
"deposit": "1000000000unls",
"title": "Migration to v0.6.3",
"summary": "A summary of the migration"
}
(opt.) Prepare a proposal for continuation
{
"messages": [
{
"@type": "/cosmwasm.wasm.v1.MsgSudoContract",
"authority": "<proposal_sender>",
"contract": "nolus1gurgpv8savnfw66lckwzn4zk7fp394lpe667dhu7aw48u40lj6jsqxf8nd",
"msg": {
"migrate_contracts": {
"release": "tag-v0.6.0-2024-04-01T09:36+00:00",
"migration_spec": {
"platform": {},
"protocol": {
"leaser": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
},
"lpp": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
},
"oracle": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
},
"profit": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
},
"reserve": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
}
}
},
"post_migration_execute": {
"platform": {},
"protocol": {
"leaser": {
"<name of a registered protocol>": "{\"migrate_leases_cont\":{\"key\":\"<continuation_key>\",\"max_leases\":<max_len_next_batch>}}",
"<name of another registered protocol>": null
},
"lpp": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
},
"oracle": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
},
"profit": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
},
"reserve": {
"<name of a registered protocol>": null,
"<name of another registered protocol>": null
}
}
}
}
}
}
],
"deposit": "1000000000unls",
"title": "Continue Migration for release 2024-04-13",
"summary": "MigrationV2"
}
Migrate the contracts
nolusd tx gov submit-proposal <path_to_the_proposal_json> --from <signer> --gas <gas_amount> --gas-prices 0.0025unls
v0.6.2
Changelog
All notable changes to this project will be documented in this file.
[0.6.2] - 2024-04-04
⚙️ Miscellaneous Tasks
- (platform) Bump package versions
- Cargo update
tag-v0.6.2-2024-04-04T14:45+00:00
v0.6.1
Changelog
All notable changes to this project will be documented in this file.
[0.6.1] - 2024-04-03
⚙️ Miscellaneous Tasks
- (oracle) Bump the package version
- Cargo update