Skip to content

Commit

Permalink
Re-release v2.2.x (#93)
Browse files Browse the repository at this point in the history
* new mirror_admin_manager contract

* integrate admin_manager with governance, multiple poll types with different parameters

* add the hability to change the mir-ust pair on collector

* add collector migration logic

* feat: ability to deprecate a staking token

* add migration loogic for staking pool_infos

* feat: integrate collateral_oracle with new tefi_oracle

* fix test and typos, closes #77

* feat: integrate mint contract with new oracle and preIPO mech

* feat: update mAsset whitelisting process to use new oracle and preIPO mech

* chore: update admin_manager schema

* chore: fmt and clippy

* chore: fmt, clippy and generate schemas

* fix(col_oracle): change is_revoked migration to consider rewly revoked assets

* fix(col_oracle): add missing migrate_config funtion to migration entry point

* fix(gov): minor fixes

* make gov update_config an admin action

* chore: fmt & clippy fixes

* fix typos

* gov: add poll_gas_limit parameter to prevent ghost failed polls

* gov: add unit tests for new poll configs

* migrate MIR-UST pair on contract migration (collector, staking) + add friendlier staking error for deprecated token

* fix: modify bond migration check to have new addresses marked as migrated

* remove unnecessary optional storage parameter + minor optimization

* add admin_action to PollResponse

* prevent converting address 2 times

* update versions to v2.2.0

* update tefi_oracle to latest version, improved whitelisting process

* col_oracle: migrate anchor oracle source to mirror tefi oracle

* remove previous staking migration logic

* change oracle address on factory/mint contracts migration

* fix pagination on descending positions query

* import tefi-oracle package from crates.io

* update CHANGELOG and optimizer version
  • Loading branch information
csanti authored Apr 1, 2022
1 parent 70253e2 commit 4d0b026
Show file tree
Hide file tree
Showing 67 changed files with 1,466 additions and 1,511 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/workspace-optimizer:0.11.5
cosmwasm/workspace-optimizer:0.12.5
tar -zcvf cosmwasm-artifacts.tar.gz artifacts
- name: Create Release
uses: softprops/action-gh-release@v1
Expand Down
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 2.1.4
# 2.2.0 - Re-release

* Auction discount fix for mint contract #92
* Restore the updates for v2.2.0 that were postponed (#93)
* First round of preparations for Astroport migration (#80)
* Allow governance voters to execute migrations with a new admin_manager contract (#81)
* Integrate with the new oracle contracts (#81)
4 changes: 2 additions & 2 deletions contracts/mirror_admin_manager/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mirror-admin-manager"
version = "2.1.1"
version = "2.2.0"
authors = ["Terraform Labs, PTE."]
edition = "2018"
description = "Admin manager contract for Mirror Protocol - holds and manages admin privileges for Mirror contracts"
Expand Down Expand Up @@ -37,7 +37,7 @@ backtraces = ["cosmwasm-std/backtraces"]
cw20 = { version = "0.8.0" }
cosmwasm-std = { version = "0.16.0", features = ["iterator"] }
cosmwasm-storage = { version = "0.16.0", features = ["iterator"] }
mirror-protocol = { version = "2.1.1", path = "../../packages/mirror_protocol" }
mirror-protocol = { version = "2.2.0", path = "../../packages/mirror_protocol" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
cw-storage-plus = { version = "0.8.0", features = ["iterator"]}
Expand Down
5 changes: 3 additions & 2 deletions contracts/mirror_collateral_oracle/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mirror-collateral-oracle"
version = "2.1.2"
version = "2.2.0"
authors = ["Terraform Labs, PTE."]
edition = "2018"
description = "A proxy oracle for collaterals in Mirror Protocol"
Expand Down Expand Up @@ -36,7 +36,8 @@ backtraces = ["cosmwasm-std/backtraces"]
[dependencies]
cosmwasm-std = { version = "0.16.0", features = ["iterator"] }
cosmwasm-storage = { version = "0.16.0", features = ["iterator"] }
mirror-protocol = { version = "2.1.1", path = "../../packages/mirror_protocol" }
mirror-protocol = { version = "2.2.0", path = "../../packages/mirror_protocol" }
tefi-oracle = "0.2.0"
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
terraswap = "2.4.0"
Expand Down
12 changes: 0 additions & 12 deletions contracts/mirror_collateral_oracle/schema/config_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,17 @@
"title": "ConfigResponse",
"type": "object",
"required": [
"anchor_oracle",
"band_oracle",
"base_denom",
"mint_contract",
"mirror_oracle",
"owner"
],
"properties": {
"anchor_oracle": {
"type": "string"
},
"band_oracle": {
"type": "string"
},
"base_denom": {
"type": "string"
},
"mint_contract": {
"type": "string"
},
"mirror_oracle": {
"type": "string"
},
"owner": {
"type": "string"
}
Expand Down
90 changes: 38 additions & 52 deletions contracts/mirror_collateral_oracle/schema/execute_msg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExecuteMsg",
"anyOf": [
"oneOf": [
{
"type": "object",
"required": [
Expand All @@ -11,18 +11,6 @@
"update_config": {
"type": "object",
"properties": {
"anchor_oracle": {
"type": [
"string",
"null"
]
},
"band_oracle": {
"type": [
"string",
"null"
]
},
"base_denom": {
"type": [
"string",
Expand All @@ -35,12 +23,6 @@
"null"
]
},
"mirror_oracle": {
"type": [
"string",
"null"
]
},
"owner": {
"type": [
"string",
Expand Down Expand Up @@ -152,7 +134,7 @@
"definitions": {
"AssetInfo": {
"description": "AssetInfo contract_addr is usually passed from the cw20 hook so we can trust the contract_addr is properly validated.",
"anyOf": [
"oneOf": [
{
"type": "object",
"required": [
Expand Down Expand Up @@ -200,39 +182,23 @@
"type": "string"
},
"SourceType": {
"anyOf": [
{
"type": "object",
"required": [
"mirror_oracle"
],
"properties": {
"mirror_oracle": {
"type": "object"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"anchor_oracle"
],
"properties": {
"anchor_oracle": {
"type": "object"
}
},
"additionalProperties": false
},
"oneOf": [
{
"type": "object",
"required": [
"band_oracle"
"tefi_oracle"
],
"properties": {
"band_oracle": {
"type": "object"
"tefi_oracle": {
"type": "object",
"required": [
"oracle_addr"
],
"properties": {
"oracle_addr": {
"type": "string"
}
}
}
},
"additionalProperties": false
Expand Down Expand Up @@ -260,13 +226,13 @@
{
"type": "object",
"required": [
"terraswap"
"amm_pair"
],
"properties": {
"terraswap": {
"amm_pair": {
"type": "object",
"required": [
"terraswap_pair_addr"
"pair_addr"
],
"properties": {
"intermediate_denom": {
Expand All @@ -275,7 +241,7 @@
"null"
]
},
"terraswap_pair_addr": {
"pair_addr": {
"type": "string"
}
}
Expand Down Expand Up @@ -322,6 +288,26 @@
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"lunax"
],
"properties": {
"lunax": {
"type": "object",
"required": [
"staking_contract_addr"
],
"properties": {
"staking_contract_addr": {
"type": "string"
}
}
}
},
"additionalProperties": false
}
]
}
Expand Down
12 changes: 0 additions & 12 deletions contracts/mirror_collateral_oracle/schema/instantiate_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,17 @@
"title": "InstantiateMsg",
"type": "object",
"required": [
"anchor_oracle",
"band_oracle",
"base_denom",
"mint_contract",
"mirror_oracle",
"owner"
],
"properties": {
"anchor_oracle": {
"type": "string"
},
"band_oracle": {
"type": "string"
},
"base_denom": {
"type": "string"
},
"mint_contract": {
"type": "string"
},
"mirror_oracle": {
"type": "string"
},
"owner": {
"type": "string"
}
Expand Down
15 changes: 13 additions & 2 deletions contracts/mirror_collateral_oracle/schema/migrate_msg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MigrateMsg",
"description": "We currently take no arguments for migrations",
"type": "object"
"type": "object",
"required": [
"anchor_tefi_oracle_addr",
"mirror_tefi_oracle_addr"
],
"properties": {
"anchor_tefi_oracle_addr": {
"type": "string"
},
"mirror_tefi_oracle_addr": {
"type": "string"
}
}
}
4 changes: 2 additions & 2 deletions contracts/mirror_collateral_oracle/schema/query_msg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "QueryMsg",
"anyOf": [
"oneOf": [
{
"type": "object",
"required": [
Expand Down Expand Up @@ -29,7 +29,7 @@
"asset": {
"type": "string"
},
"block_height": {
"timeframe": {
"type": [
"integer",
"null"
Expand Down
Loading

0 comments on commit 4d0b026

Please sign in to comment.