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```