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)
- Replaced missed entries with typedef #105 (Kiril Mihaylov)
- lease: get rid of a LoanDTO field (Gancho Manev)
- lpp: Get rid of an extra Result<_> (Gancho Manev)
- lpp: Stub: TryInto (Gancho Manev)
- lease: unify prev and curr period (Gancho Manev)
- lease: unify prev and curr period (Gancho Manev)
- lease: unify prev and curr period (Gancho Manev)
- lease: unify prev and curr period (Gancho Manev)
- lease: unify prev and curr period (Gancho Manev)
- lease: unify prev and curr period (Gancho Manev)
- lpp: expose loan repay shares (Gancho Manev)
- finance: intro 'Period' (Gancho Manev)
- lease: use Period where applicable (Gancho Manev)
- Moved liquidation items into finance #109 (Katerina Maneva)
- finance: rename (Gancho Manev)
- currency: Refactored macro to allow arbitrary network count #110 (Kiril Mihaylov)
Tests
- oracle: Added tests for price alarm rescheduling #98 (Kiril Mihaylov)
- marketprice: Added tests for new
marketprice
APIs #98 (Kiril Mihaylov) - oracle: Refactored tests to not use global state #98 (Kiril Mihaylov)
- marketprice: Fixed broken tests #98 (Kiril Mihaylov)
- oracle: Fixed broken tests #98 (Kiril Mihaylov)
Continuous Integration
- Updated CI to build binaries for all three networks #110 (Kiril Mihaylov)
Chores
- oracle: Updated
oracle
contract's version #104 (Kiril Mihaylov) - dispatcher: Updated
dispatcher
contract's version #101 (Kiril Mihaylov) - timealarms: Updated
timealarms
contract's version #102 (Kiril Mihaylov) - use correct swap tree for oracle_init_msg #106 (Lockwarr)
- bump versions (Gancho Manev)
- lease: keep migration code under 'cfg' (Gancho Manev)
- currency: bump the version (Gancho Manev)
Commits
- currency: switch to osmo-test-5 (Gancho Manev)
- 087bdce: chore(lease) fix fmt (Gancho Manev)
- 4e6ddce: Renamed function (Katerina Maneva) #109
- d362a50: Returned previous function name (Katerina Maneva) #109
- currency: enable WBTC and WETH back (Gancho Manev)
- currency: introduce stATOM and stOSMO (Gancho Manev)
- lease: intro min amount on overdue (Gancho Manev)
- currency: NLS at Rila, Pirin and Vitocha (Gancho Manev)
Upgrade from v0.2.25
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, Lpp, Oracle, Rewards Dispatcher, and Time Alarms 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.26-2023-06-05T12:23+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":"{}"},"timealarms":{"code_id":<TimeAlarms code id>,"migrate_msg":"{}"}},"post_migration_execute":{"leaser":"{\"migrate_leases\":{\"new_code_id\":\"<Lease code id>\",\"max_leases\":1000}}"}}}' --title "Migrate contracts (v0.2.26)" --description "Migrate contracts to their version at release v0.2.26" --from <signer> --gas <gas_amount> --gas-prices 0.0025unls --deposit 10000000unls```