Releases: nolus-protocol/nolus-money-market
v0.3.3
Features
- lpp: Added minimal utilization rate parameter and a query for the current deposit limit
- lease: Finalize leases on close after paid, on full liquidation, and on full position close
- lease: Set start lease to opening time
- lease: Implement full and partial position close
- swap: Replace use of
gamm
module withpoolmanager
- API: Deny unknown fields & rename fields
Bug Fixes
- profit Reset time alarm on configuration update
- marketprice: address HAL-09 duplicated read
- finance: add CoinDTO deserialization valiation
Styles
- Use Pascal case for type parameter
- Import ordering & grouping
&mut *
->.deref_mut()
Code Refactoring
- profit: Rework
ConfigManagement
trait - Use functional approach for methods
- Use
BoundPercent
for config - lpp: simplify LiquidityPool API
- leaser: simplify caching
- leaser: make function results consistent
- currency: intro Matcher
- marketprice: Make invalid state unrepresentable
- currency: abstract symbol matching
- lease: intro GroupVisit trait
- currency: better error messages
- currency: rename to Symbols
- lease: abstract Lease repay and close_partial
- lease: align full-vs-partial liquidate API
- lease: intro contract::Lease::execute
- lease: abstract payment Emitter-s
- lease: move event emiting into the commands
- profit: as_stub -> into_stub
- lease: intro CloseAlgo and RepayAlgo
- lease: restructure close to accomodate customer close
- lease: higher cohesion of Closable
- lease: Add invariant_held on deserialization
- lease: task-to-repayable abstraction
- dex: more coherent type parameters
- lease: simplify position close/liquidate query impl
- lease: simplify paid 'in-close' lease query impl
- lease: simplify 'in-repay' lease query impl
- lease: minimize LeaseDTO::close()
- lease: increased cohesion on paid::Close
Continuous Integration
- Separated code coverage action
- Fixed job dependency tree
- Restored file size checking & added report
- Reusable workflows
- Split off
check_features
into a workflow - Normalized YAML files
Upgrade from v0.3.2
A list of smart contract migrations has to be applied on a chain with the help of gov proposals. The ones in the same section may be run together. The fees are left empty letting the operator fine-tune.
Store the new code of all 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 any contract except the Lease one, and the Leaser contract, with --instantiate-anyof-addresses nolus1wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8s5gg42f
, in the case of the Lease contract.
Update the contracts via the Admin contract
nolusd tx gov submit-proposal sudo-contract <admin contract addr> '{"migrate_contracts":{"release":"v0.3.3-2023-10-05T12:47+00:00","admin_contract":{"code_id":<Admin code id>,"migrate_msg":"{}"},"migration_spec":{"dispatcher":{"code_id":<Rewards Dispatcher code id>,"migrate_msg":"{}"},"leaser":{"code_id":<Leaser code id>,"migrate_msg":"{\"min_asset\":{\"amount\":\"15000000\",\"ticker\":\"USDC\"},\"min_sell_asset\":{\"amount\":\"10000\",\"ticker\":\"USDC\"}}"},"lpp":{"code_id":<Lpp code id>,"migrate_msg":"{\"min_utilization\":500}"},"oracle":{"code_id":<Oracle code id>,"migrate_msg":"{}"},"profit":{"code_id":<Profit code id>,"migrate_msg":"{}"},"timealarms":{"code_id":<TimeAlarms code id>,"migrate_msg":"{}"},"treasury":{"code_id":<Treasury code id>,"migrate_msg":"{}"}},"post_migration_execute":{"leaser":"{\"migrate_leases\":{\"new_code_id\":\"<Lease code id>\",\"max_leases\":<max_len_first_batch>}}"}}}' --title "Migrate contracts (v0.3.3)" --description "Migrate contracts to their version at release v0.3.3" --from <signer> --gas <gas_amount> --gas-prices 0.0025unls --deposit 10000000unls```
v0.3.2
Features
- currencies: introduce AKT, AXL, Q_ATOM, STK_ATOM, STRD, INJ, SCRT, CRO, JUNO, EVMOS, STARS, MARS
- profit: Add Nls reserve for IBC fee
- dex: guaranteed delivery of responses
- dex: more and better error messages
- dex: move ICA open into the Dex state machine
- lease: intro 'heal' at open state
- lease: intro 'heal' at transfer_in_finish state
Bug Fixes
- profit: BuyBack
on_coins
logic correction - lease: send profit on liquidation
- lease: send the surplus to profit on full liquidation
- oracle:
alarms_below
->alarms_above_or_equal
Code Refactoring
- lease: decouple state::Handler from api::ExecuteMsg
- integration_tests: Refactored to put a layer of abstraction
- integration_tests: Refactored
test_case
module and integration tests - lpp/test: Refactored tests to not build unnecessary vectors
- Use type-state for contract addesses
- tests: Refactor
TestCase
and related - tests: Removed
#[inline]
attribute - Elide implicit lifetimes
- Consume result
- lease: intro ContractApi
- sdk:
Custom
/Wrapped
->InterChain
- profit/tests: Use new names from
sdk
- tests: Refactored testing module interfaces
- tests: Adjusted integration tests accordingly
- tests: Moved trait from
sdk
to int. tests - tests: Split
test_case.rs
into submodules - Removed too long explicit type annotations
- tests:
open_ica
->send_open_ica_response
- tests: Separate ICA opening into functions
- tests:Split off
do_swap
from ICA opening - Removed unnecessary
&
s - tests: Rename APIs to use
response
instead - tests: Split
init_profit
into static methods - access-control: simplify the impl
- tests: Added
max_ltd
toquery_quote
- tests/lease: Send manually on IBC msg
- tests: Pass value for
max_ltd
- tests/leaser: Start with reserve
- tests/profit: Unnecessary annotations
- tests/profit: Send funds on IBC messages
- tests/lease: Start with custom reserve
- tests/lease: Simplify function signature
- tests/lease: Separate
repay
functions - tests/lease: Separate
close
functions - tests/lease: Precalculate
DownP==Lease
- tests: Better reflect responsibilities
- Implemented Display instead of
AsRef<str>
- lease: start using the access-control lib
- dex: update the start local_remote state
- marketprice: Remove generic
Std
errors - Minify API requirements in
versioning
- oracle: Remove generic
Std
errors - lease: Use blocks instead of variables
- Added tree base as a parameter to macro
- Error message:
Context
->Cause
- Removed
ContractError::Std
variant - Removed added getters &
into_amount
- Add
StdError -> ContractError
argument
Continuous Integration
- Check
release
profile binaries instead - Temporarily disable size check
Chores
- lease: migrate v4->v5
Upgrade from v0.3.1
A list of smart contract migrations has to be applied on a chain with the help of gov proposals. The ones in the same section may be run together. The fees are left empty letting the operator fine-tune.
Store the new code of Lease, Leaser, Oracle, and Profit 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 any contract except the Lease one, and the Leaser contract, with --instantiate-anyof-addresses nolus1wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8s5gg42f
, in the case of the Lease contract.
Update the contracts via the Admin contract
nolusd tx gov submit-proposal sudo-contract <admin contract addr> '{"migrate_contracts":{"release":"v0.3.2-2023-08-03T21:05+00:00","migration_spec":{"leaser":{"code_id":<Leaser code id>,"migrate_msg":"{}"},"oracle":{"code_id":<Oracle code id>,"migrate_msg":"{}"},"profit":{"code_id":<Profit code id>,"migrate_msg":"{}"}},"post_migration_execute":{"leaser":"{\"migrate_leases\":{\"new_code_id\":\"<Lease code id>\",\"max_leases\":1000}}"}}}' --title "Migrate contracts (v0.3.2)" --description "Migrate contracts to their version at release v0.3.2" --from <signer> --gas <gas_amount> --gas-prices 0.0025unls --deposit 10000000unls```
v0.3.1
Bug Fixes
- price alarms: go over alarms for all prices
- price alarms: Above price not removed [#118]
Code Refactoring
- lpp: get rid of unnecessary error return
- currency: take it out from finance
- sdk: Unused
git
key onneutron-sdk
[#120] - Remove address from alarm response [#121]
- timealarm: get rid of 'as_stub'
Tests
- Added assertions to new test #118
Chores
- Bumped up contract version [#118]
- Updated package versions [#118]
- Bumped up used Rust version locally [#120]
- Updated
workspace-optimizer
's version [#120] - Updated dependencies [#120]
- Updated contract versions [#121]
- satisfy the stricter liner v1.69
Upgrade from v0.3.0
A list of smart contract migrations has to be applied on a chain with the help of gov proposals. The ones in the same section may be run together. The fees are left empty letting the operator fine-tune.
Store the new code of Lease, Oracle, Profit, and Rewards Dispatcher 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 any contract except the Lease one, and the Leaser contract, with --instantiate-anyof-addresses nolus1wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8s5gg42f
, in the case of the Lease contract.
Update the contracts via the Admin contract
nolusd tx gov submit-proposal sudo-contract <admin contract addr> '{"migrate_contracts":{"release":"v0.3.1-2023-06-29T11:59+00:00","migration_spec":{"dispatcher":{"code_id":<Rewards Dispatcher code id>,"migrate_msg":"{}"},"oracle":{"code_id":<Oracle code id>,"migrate_msg":"{}"},"profit":{"code_id":<Profit code id>,"migrate_msg":"{}"}},"post_migration_execute":{"leaser":"{\"migrate_leases\":{\"new_code_id\":\"<Lease code id>\",\"max_leases\":1000}}"}}}' --title "Migrate contracts (v0.3.1)" --description "Migrate contracts to their version at release v0.3.1" --from <signer> --gas <gas_amount> --gas-prices 0.0025unls --deposit 10000000unls```
v0.3.0
Chores
- 161f125: Revert "feature(currency): new ticker for USDC"
- bump versions to bring the new Usdc ticker
Upgrade from v0.2.29
A list of smart contract migrations has to be applied on a chain with the help of gov proposals. The ones in the same section may be run together. The fees are left empty letting the operator fine-tune.
Store the new code of Lease, Leaser, Lpp, Oracle, Profit, and Rewards Dispatcher 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 any contract except the Lease one, and the Leaser contract, with --instantiate-anyof-addresses nolus1wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8s5gg42f
, in the case of the Lease contract.
Update the contracts via the Admin contract
nolusd tx gov submit-proposal sudo-contract <admin contract addr> '{"migrate_contracts":{"release":"v0.3.0-2023-06-13T10:13+00:00","migration_spec":{"dispatcher":{"code_id":<Rewards Dispatcher code id>,"migrate_msg":"{}"},"lpp":{"code_id":<Lpp code id>,"migrate_msg":"{}"},"oracle":{"code_id":<Oracle code id>,"migrate_msg":"{}"},"leaser":{"code_id":<Leaser code id>,"migrate_msg":"{}"},"profit":{"code_id":<Profit code id>,"migrate_msg":"{}"}},"post_migration_execute":{"leaser":"{\"migrate_leases\":{\"new_code_id\":\"<Lease code id>\",\"max_leases\":1000}}"}}}' --title "Migrate contracts (v0.3.0)" --description "Migrate contracts to their version at release v0.3.0" --from <signer> --gas <gas_amount> --gas-prices 0.0025unls --deposit 10000000unls```
v0.2.29
Features
- lease: skip liquidations on less than a minimum amount [#111]
- currency: new ticker of Usdc
Bug Fixes
- profit: remove the obsolete migration
Upgrade from v0.2.27
A list of smart contract migrations has to be applied on a chain with the help of gov proposals. The ones in the same section may be run together. The fees are left empty letting the operator fine-tune.
Store the new code of Lease, Leaser, Lpp, Oracle, Profit, and Rewards Dispatcher 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 any contract except the Lease one and the Leaser contracts --instantiate-anyof-addresses nolus1wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8s5gg42f
in the case of the Lease contract.
Update the contracts via the Admin contract
nolusd tx gov submit-proposal sudo-contract <admin contract addr> '{"migrate_contracts":{"release":"v0.2.29-2023-06-12T15:26+00:00","migration_spec":{"dispatcher":{"code_id":<Rewards Dispatcher code id>,"migrate_msg":"{}"},"lpp":{"code_id":<Lpp code id>,"migrate_msg":"{}"},"oracle":{"code_id":<Oracle code id>,"migrate_msg":"{}"},"leaser":{"code_id":<Leaser code id>,"migrate_msg":"{}"},"profit":{"code_id":<Profit code id>,"migrate_msg":"{}"}},"post_migration_execute":{"leaser":"{\"migrate_leases\":{\"new_code_id\":\"<Lease code id>\",\"max_leases\":1000}}"}}}' --title "Migrate contracts (v0.2.29)" --description "Migrate contracts to their version at release v0.2.29" --from <signer> --gas <gas_amount> --gas-prices 0.0025unls --deposit 10000000unls```
v0.2.28
Bug Fixes
- profit: Filter out NLS from buy-back #112 (Kiril Mihaylov)
- profit: Error variant had broken formatting string #112 (Kiril Mihaylov)
- currency: get rid of NonNativePaymentGroup (Gancho Manev)
Styles
- finance: Formatting #112 (Kiril Mihaylov)
- profit: Formatting #112 (Kiril Mihaylov)
Code Refactoring
- profit: Simplified idle and buyback states' logic #112 (Kiril Mihaylov)
- profit: Refactored Idle and BuyBack states #112 (Kiril Mihaylov)
- profit: Reordered parameters #112 (Kiril Mihaylov)
- profit: Local variable:
state
->next_state
#112 (Kiril Mihaylov) - profit: Better represent invariants #112 (Kiril Mihaylov)
- profit: Renamed parameters #112 (Kiril Mihaylov)
- finance: Removed
contains
method ofGroup
trait #112 (Kiril Mihaylov) - currency: Removed
contains
method ofGroup
trait from implementations #112 (Kiril Mihaylov) - profit: Refactored to simplify implementation #112 (Kiril Mihaylov)
- profit: Removed unused errors #112 (Kiril Mihaylov)
- profit: Simplified debug assertion #112 (Kiril Mihaylov)
Chores
- currency: bump up the version (Gancho Manev)
Commits
- Merged main into branch and resolved conflicts #112 (Kiril Mihaylov)
- Added a TODO for generalization for native currencies #112 (Kiril Mihaylov)
- c920f87: Merge branch 'main' into fix_buy_back_on_nls (Kiril Mihaylov) #112
Upgrade from v0.2.27
A list of smart contract migrations has to be applied on a chain with the help of gov proposals. The ones in the same section may be run together. The fees are left empty letting the operator fine-tune.
Store the new code of Profit 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 Leaser contract --instantiate-anyof-addresses nolus1wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8s5gg42f
when storing the Lease contract and --instantiate-anyof-addresses nolus1gurgpv8savnfw66lckwzn4zk7fp394lpe667dhu7aw48u40lj6jsqxf8nd
otherwise.
Update the contracts via the Admin contract
nolusd tx gov submit-proposal sudo-contract <admin contract addr> '{"migrate_contracts":{"release":"v0.2.28-2023-06-09T11:09+00:00","migration_spec":{"profit":{"code_id":<Profit code id>,"migrate_msg":"{}"}},"post_migration_execute":{}}}' --title "Migrate contracts (v0.2.28)" --description "Migrate contracts to their version at release v0.2.28" --from <signer> --gas <gas_amount> --gas-prices 0.0025unls --deposit 10000000unls
v0.2.27
Features
- currency: intro Nls as a means for payments (Gancho Manev)
Bug Fixes
- rewards_dispatcher: rewards scale config (Gancho Manev)
- rewards_dispatcher: rewards cadence hours (Gancho Manev)
- oracle: test (Gancho Manev)
- lease: not set timealarm in the past (Gancho Manev)
Chores
- oracle: remove unused imports (Gancho Manev)
- catch up with the versions (Gancho Manev)
Upgrade from v0.2.26
A list of smart contract migrations has to be applied on a chain with the help of gov proposals. The ones in the same section may be run together. The fees are left empty letting the operator fine-tune.
Store the new code of Lease, Rewards Dispatcher and Oracle 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 Leaser contract --instantiate-anyof-addresses nolus1wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8s5gg42f
when storing the Lease contract and --instantiate-anyof-addresses nolus1gurgpv8savnfw66lckwzn4zk7fp394lpe667dhu7aw48u40lj6jsqxf8nd
otherwise.
Update the contracts via the Admin contract
nolusd tx gov submit-proposal sudo-contract <admin contract addr> '{"migrate_contracts":{"release":"v0.2.27-2023-06-08T12:44+00:00","migration_spec":{"oracle":{"code_id":<Oracle code id>,"migrate_msg":"{}"}, "dispatcher":{"code_id":<Rewards Dispatcher code Id>, "migrate_msg":"{}"}},"post_migration_execute":{"leaser":"{\"migrate_leases\":{\"new_code_id\":\"<Lease code id>\",\"max_leases\":1000}}"}}}' --title "Migrate contracts (v0.2.27)" --description "Migrate contracts to their version at release v0.2.27" --from <signer> --gas <gas_amount> --gas-prices 0.0025unls --deposit 10000000unls
Upgrade from v0.2.25
Follow the instructions for the upgrade to v0.2.26 using the build artifacts and "release" from this release.
v0.2.26
Features
- oracle: Added
const
modifier to methods #98 (Kiril Mihaylov) - dispatcher: Added
sudo
message for changing "TVL to APR" #101 (Kiril Mihaylov) - lpp: stub merges all payments into one (Gancho Manev)
- lease: repay multiple previous periods (Gancho Manev)
- lease: pay the prev periods profit once (Gancho Manev)
Bug Fixes
- test: Minor issues/leftovers #98 (Kiril Mihaylov)
- lint: Fixed linting issues #98 (Kiril Mihaylov)
- lease: float operator detected (Gancho Manev)
- lease: test (Gancho Manev)
- lease: min liquidation in stable (Gancho Manev)
Documentation
- Updated README.md to reflect NET_NAME env. var. #110 (Kiril Mihaylov)
- Updated README.md to reflect latest
cosmwasm/workspace-optimizer
#110 (Kiril Mihaylov)
Styles
&{mut }*self.storage
->self.storage.deref{_mut}()
#98 (Kiril Mihaylov)- Formatting #98 (Kiril Mihaylov)
- Formatting #98 (Kiril Mihaylov)
- Formatting #98 (Kiril Mihaylov)
- Formatting #98 (Kiril Mihaylov)
- Formatting #98 (Kiril Mihaylov)
- Formatting #101 (Kiril Mihaylov)
- Formatting #105 (Kiril Mihaylov)
- Formatting #105 (Kiril Mihaylov)
Code Refactoring
- Renamed all schema examples to have different names #100 (Kiril Mihaylov)
- Refactored
oracle
contract to allow proper rescheduling #98 (Kiril Mihaylov) - test: Refactored tests to leave up to the caller whether to clone address #98 (Kiril Mihaylov)
- marketprice: Replaced imperative style with functional one #98 (Kiril Mihaylov)
- marketprice: Changed order of parameters in an internal API #98 (Kiril Mihaylov)
- marketprice:
ok_or
->ok_or_else
#98 (Kiril Mihaylov) - timealarms:
ok_or
->ok_or_else
#98 (Kiril Mihaylov) - marketprice:
AlarmStore
->NormalizedPrice
#98 (Kiril Mihaylov) - marketprice: Renamed parameter
addr
->subscriber
#98 (Kiril Mihaylov) - marketprice: Added another layer of indirection in internal API #98 (Kiril Mihaylov)
- marketprice: Used added layer of indirection in
last_failed
method #98 (Kiril Mihaylov) - oracle: Refactored iterator implementation to be more concise #98 (Kiril Mihaylov)
- oracle: Removed unnecessary
sudo
command #98 (Kiril Mihaylov) - oracle: Erased types from member methods #98 (Kiril Mihaylov)
- oracle: Removed turned off with conditional compilation unnecessary API #98 (Kiril Mihaylov)
- oracle: Refactored iterator #98 (Kiril Mihaylov)
- oracle: Combined into if-else chain #98 (Kiril Mihaylov)
- dispatcher: Restricted visibility of internal structures #101 (Kiril Mihaylov)
- Added dedicated typedef for CadenceHours #101 (Kiril Mihaylov)
- timealarms: Refactored
timealarms
contract to avoid dual definition depending on mutability #102 (Kiril Mihaylov) - time-oracle: Moved migration module under feature flag #102 (Kiril Mihaylov)
- Added dedicated typedef for CadenceHours #105 (Kiril Mihaylov)
- Moved typedef into dedicated module #105 ([Kiril Mihaylov](https://github.com/nolus-...
v0.2.25
Bug Fixes
- leaser: validate the continuation key (Gancho Manev)
Tests
- lpp: add a test on interest rate calculation (Gancho Manev)
Chores
- lease: take storage migration off (Gancho Manev)
Commits
- lease: LeaseCurrenies=[ATOM,OSMO] (Gancho Manev)
v0.2.24
Features
- Added API for asserting that there are no alarms in delivery #94 (Kiril Mihaylov)
- leaser: migrate leases in batches #99 (Gancho Manev)
Bug Fixes
- lint: Fixed linting issues #94 (Kiril Mihaylov)
- Fixed missing
in_delivery
namespace inmigrate_v1
module #94 (Kiril Mihaylov) - profit: Added storage migration #96 (Kiril Mihaylov)
- profit: Missing owner assignment in migration #96 (Kiril Mihaylov)
- lease: no alarms on full repayment (Gancho Manev)
- leaser: mixed customer and lease addresses #99 (Gancho Manev)
Styles
- Formatting #94 (Kiril Mihaylov)
- Formatting #94 (Kiril Mihaylov)
Code Refactoring
- timealarms: Refactored delivery mechanism to ensure proper delivery and rescheduling #94 (Kiril Mihaylov)
- Moved
InDelivery
fromtimealarms
totime-oracle
package #94 (Kiril Mihaylov) - Moved logic behind
time-oracle
package'sAlarms
API #94 (Kiril Mihaylov) - Added
dyn Storage
as part ofAlarms
(Mut
) and removed it from API callings #94 (Kiril Mihaylov) - Split-off
alarms_selection
into a trait and refactored to return only subscriber's address #94 (Kiril Mihaylov) - Removed one lifetime with the assumption all namespaces will be
&'static str
#94 (Kiril Mihaylov) - Removed API for forceful removal of time alarms #94 (Kiril Mihaylov)
- Used the API for ensuring there are no alarms in delivery #94 (Kiril Mihaylov)
- Made namespace for alarms queue to be configurable #94 (Kiril Mihaylov)
- Respond with error when alarm queue is empty on success too #94 (Kiril Mihaylov)
- Refactored error messages to have dynamic context #94 (Kiril Mihaylov)
Tests
- Added tests to ensure the correctness of delivery order #94 (Kiril Mihaylov)
- Refactored tests in accordance to 4cf53be #94 (Kiril Mihaylov)
- leaser: fix a test #99 (Gancho Manev)
Chores
- Updated
timealarms
contract's version #97 (Kiril Mihaylov) - leaser: addressed review comments #99 (Gancho Manev)
- leaser: address comments from PR -2 #99 (Gancho Manev)
Commits
Store the new code of all 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 --instantiate-anyof-addresses <admin contract address>
when preparing the store code proposals of any contract except the Lease one and --instantiate-anyof-addresses nolus1wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8s5gg42f
in the case of the Lease contract.
Update the contracts via the Admin contract
nolusd tx gov submit-proposal sudo-contract <admin contract addr> '{"migrate_contracts":{"release":"v0.2.24-2023-05-19T11:09+00:00","admin_contract":{"code_id":<Admin code id>,"migrate_msg":"{}"},"migration_spec":{"dispatcher":{"code_id":<Rewards Dispatcher code id>,"migrate_msg":"{}"},"leaser":{"code_id":<Leaser code id>,"migrate_msg":"{}"},"lpp":{"code_id":<Lpp code id>,"migrate_msg":"{}"},"oracle":{"code_id":<Oracle code id>,"migrate_msg":"{}"},"profit":{"code_id":<Profit code id>,"migrate_msg":"{\"owner\":\"<admin_contract_addr>\", \"oracle\":\"nolus1436kxs0w2es6xlqpp9rd35e3d0cjnw4sv8j3a7483sgks29jqwgsv3wzl4\", \"timealarms\":\"nolus1zwv6feuzhy6a9wekh96cd57lsarmqlwxdypdsplw6zhfncqw6ftqmx7chl\"}"},"timealarms":{"code_id":<TimeAlarms code id>,"migrate_msg":"{}"},"treasury":{"code_id":<Treasury code id>,"migrate_msg":"{}"}},"post_migration_execute":{"leaser":"{\"migrate_leases\":{\"new_code_id\":\"<Lease code id>\",\"max_leases\":<max_len_first_batch>}}"}}}' --title "Migrate contracts (v0.2.24)" --description "Migrate contracts to their version at release v0.2.24" --from <signer> --gas <gas_amount> --gas-prices 0.0025unls --deposit 10000000unls
Migrate the Leases left after the initial migration
Check the event wasm-migrate-leases
for key contunuation-key
. If it is present it contains the key that should be provided with the next proposal. Otherwise, the key is status
with a value done
. That indicates that there are no more leases for migration.
nolusd tx gov submit-proposal sudo-contract <admin contract addr> '{"migrate_contracts":{"release":"v0.2.24-2023-05-19T11:09+00:00","admin_contract":{},"migration_spec":{},"post_migration_execute":{"leaser":"{\"migrate_leases_cont\":{\"key\":\"<continuation_key>\",\"max_leases\":<max_len_next_batch>}}"}}}' --title "Migrate <X> Lease contracts (v0.2.24)" --description "Migrate a next batch of Lease contracts to their version at release v0.2.24" --from <signer> --gas <gas_amount> --gas-prices 0.0025unls --deposit 10000000unls