Skip to content

Commit 17471d8

Browse files
authored
Merge pull request #85 from mars-protocol/public/latest-master
Move latest public master changes
2 parents 3656af7 + 87a652f commit 17471d8

File tree

114 files changed

+822
-2494
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+822
-2494
lines changed

Cargo.lock

Lines changed: 75 additions & 77 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ members = [
3838
]
3939

4040
[workspace.package]
41-
version = "2.0.0"
41+
version = "2.1.0"
4242
authors = [
43-
"Gabe R. <[email protected]>",
44-
"Larry Engineer <[email protected]>",
45-
"Piotr B. <[email protected]>",
43+
"Piotr B. <[email protected]>",
4644
"Bob v.d. H. <[email protected]>",
4745
"Mark Watney <[email protected]>",
46+
"Gabe R. <[email protected]>",
47+
"Larry Engineer <[email protected]>",
4848
"Spike Spiegel <[email protected]>",
4949
"Brianna M. <[email protected]>",
5050
"Ahmad Kaouk",
@@ -64,8 +64,8 @@ apollo-utils = "0.1.2"
6464
astroport = "2.8.0"
6565
astroport-v5 = { package = "astroport", version = "5.2.0" }
6666
bech32 = "0.11.0"
67-
cosmwasm-schema = "1.5.5"
68-
cosmwasm-std = "1.5.5"
67+
cosmwasm-schema = "1.5.7"
68+
cosmwasm-std = "1.5.7"
6969
cw2 = "1.1.2"
7070
cw721 = { git = "https://github.com/CosmWasm/cw-nfts/", branch = "main" }
7171
cw721-base = { git = "https://github.com/CosmWasm/cw-nfts/", branch = "main", features = ["library"] }

Makefile.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ default_to_workspace = false
1010
# Directory with wasm files used by integration tests (another directory can be used instead, for example 'artifacts' from rust-optimizer)
1111
ARTIFACTS_DIR_PATH = "target/wasm32-unknown-unknown/release"
1212
# If you bump this version, verify RUST_VERSION correctness
13-
RUST_OPTIMIZER_VERSION = "0.15.1"
14-
# Use rust version from rust-optimizer Dockerfile (see https://github.com/CosmWasm/optimizer/blob/v0.15.1/Dockerfile#L1)
13+
RUST_OPTIMIZER_VERSION = "0.16.0"
14+
# Use rust version from rust-optimizer Dockerfile (see https://github.com/CosmWasm/optimizer/blob/v0.16.0/Dockerfile#L1)
1515
# to be sure that we compile / test against the same version
16-
RUST_VERSION = "1.75.0"
16+
RUST_VERSION = "1.78.0"
1717

1818
[tasks.install-stable]
1919
script = '''

README.md

Lines changed: 17 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -174,43 +174,21 @@ cargo make test
174174
| mars-swapper | [`osmo1wee0z8c7tcawyl647eapqs4a88q8jpa7ddy6nn2nrs7t47p2zhxswetwla`][20] | [`v2.0.7`][50] |
175175
| mars-zapper | [`osmo17qwvc70pzc9mudr8t02t3pl74hhqsgwnskl734p4hug3s8mkerdqzduf7c`][21] | [`v2.0.0`][43] |
176176

177-
### devnet (Osmosis)
178-
179-
| Contract | Address |
180-
| ---------------------- | ----------------------------------------------------------------------- |
181-
| mars-address-provider | [`osmo1g677w7mfvn78eeudzwylxzlyz69fsgumqrscj6tekhdvs8fye3asufmvxr`][11] |
182-
| mars-account-nft | [`osmo1450hrg6dv2l58c0rvdwx8ec2a0r6dd50hn4frk370tpvqjhy8khqw7sw09`][12] |
183-
| mars-credit-manager | [`osmo1f2m24wktq0sw3c0lexlg7fv4kngwyttvzws3a3r3al9ld2s2pvds87jqvf`][13] |
184-
| mars-health | [`osmo1kqzkuyh23chjwemve7p9t7sl63v0sxtjh84e95w4fdz3htg8gmgspua7q4`][22] |
185-
| mars-incentives | [`osmo1nkahswfr8shg8rlxqwup0vgahp0dk4x8w6tkv3rra8rratnut36sk22vrm`][15] |
186-
| mars-oracle | [`osmo1mhznfr60vjdp2gejhyv2gax9nvyyzhd3z0qcwseyetkfustjauzqycsy2g`][16] |
187-
| mars-params | [`osmo1aye5qcer5n52crrkaf35jprsad2807q6kg3eeeu7k79h4slxfausfqhc9y`][23] |
188-
| mars-red-bank | [`osmo1c3ljch9dfw5kf52nfwpxd2zmj2ese7agnx0p9tenkrryasrle5sqf3ftpg`][18] |
189-
| mars-rewards-collector | [`osmo1urvqe5mw00ws25yqdd4c4hlh8kdyf567mpcml7cdve9w08z0ydcqvsrgdy`][19] |
190-
| mars-swapper | [`osmo1wee0z8c7tcawyl647eapqs4a88q8jpa7ddy6nn2nrs7t47p2zhxswetwla`][20] |
191-
| mars-zapper | [`osmo17qwvc70pzc9mudr8t02t3pl74hhqsgwnskl734p4hug3s8mkerdqzduf7c`][21] |
192-
193177
### neutron-1
194178

195179
| Contract | Address | Tag
196180
| ------------------------- | -------------------------------------------------------------------------- | --------------
197-
| mars-address-provider | [`neutron17yehp4x7n79zq9dlw4g7xmnrvwdjjj2yecq26844sg8yu74knlxqfx5vqv`][24] | [`v1.2.0`][44] |
198-
| mars-incentives | [`neutron1aszpdh35zsaz0yj80mz7f5dtl9zq5jfl8hgm094y0j0vsychfekqxhzd39`][25] | [`v1.2.0`][44] |
199-
| mars-oracle | [`neutron1dwp6m7pdrz6rnhdyrx5ha0acsduydqcpzkylvfgspsz60pj2agxqaqrr7g`][26] | [`v1.3.0`][51] |
200-
| mars-red-bank | [`neutron1n97wnm7q6d2hrcna3rqlnyqw2we6k0l8uqvmyqq6gsml92epdu7quugyph`][27] | [`v1.2.2`][48] |
201-
| mars-rewards-collector | [`neutron1h4l6rvylzcuxwdw3gzkkdzfjdxf4mv2ypfdgvnvag0dtz6x07gps6fl2vm`][28] | [`v1.2.0`][44] |
202-
| mars-swapper | [`neutron1udr9fc3kd743dezrj38v2ac74pxxr6qsx4xt4nfpcfczgw52rvyqyjp5au`][29] | [`v1.2.0`][44] |
203-
204-
### pion-1 (Neutron)
205-
206-
| Contract | Address |
207-
| ------------------------- | -------------------------------------------------------------------------- |
208-
| mars-address-provider | [`neutron187fjlesys2c0z7xzhu43we4rx7tc4twnr5m6r2u7u5hpm03wvjqs0gk2lp`][30] |
209-
| mars-incentives | [`neutron187hw8pqfhmxt4tk9star7tkjhu438k566jtgjskz4889pndp2vysh73ezh`][31] |
210-
| mars-oracle | [`neutron1g4samkydfdyjec424ccucvjcuuls0ql8mfp2glf739mg0uqr74yqhdx9kn`][32] |
211-
| mars-red-bank | [`neutron15dn9w9vcdkpp2kfjuz4suqh2w8ajyqsgujlykm9x58hsjss5ff7qpmhlln`][33] |
212-
| mars-rewards-collector | [`neutron1re4v85k6kr8r7f3j4s4vrk3dvlyefc3xeg7jetv2jlpskahs5xrs8d6vw5`][34] |
213-
| mars-swapper | [`neutron16xdh5w4dynfjrvnfuhv9h2znks94fyt4gp448jhtmjs3xd6smjvqumh9x2`][35] |
181+
| mars-address-provider | [`neutron17yehp4x7n79zq9dlw4g7xmnrvwdjjj2yecq26844sg8yu74knlxqfx5vqv`][24] | [`v2.1.0`][57] |
182+
| mars-account-nft | [`neutron184kvu96rqtetmunkkmhu5hru8yaqg7qfhd8ldu5avjnamdqu69squrh3f5`][52] | [`v2.1.0`][57] |
183+
| mars-credit-manager | [`neutron1qdzn3l4kn7gsjna2tfpg3g3mwd6kunx4p50lfya59k02846xas6qslgs3r`][53] | [`v2.1.0`][57] |
184+
| mars-health | [`neutron17ktfwsr7ghlxzzma0gw0hke3j3rnssd58q87jv2wzfrk6uhawa3sv8xxtm`][54] | [`v2.1.0`][57] |
185+
| mars-incentives | [`neutron1aszpdh35zsaz0yj80mz7f5dtl9zq5jfl8hgm094y0j0vsychfekqxhzd39`][25] | [`v2.1.0`][57] |
186+
| mars-oracle | [`neutron1dwp6m7pdrz6rnhdyrx5ha0acsduydqcpzkylvfgspsz60pj2agxqaqrr7g`][26] | [`v2.1.0`][57] |
187+
| mars-params | [`neutron1x4rgd7ry23v2n49y7xdzje0743c5tgrnqrqsvwyya2h6m48tz4jqqex06x`][55] | [`v2.1.0`][57] |
188+
| mars-red-bank | [`neutron1n97wnm7q6d2hrcna3rqlnyqw2we6k0l8uqvmyqq6gsml92epdu7quugyph`][27] | [`v2.1.0`][57] |
189+
| mars-rewards-collector | [`neutron1h4l6rvylzcuxwdw3gzkkdzfjdxf4mv2ypfdgvnvag0dtz6x07gps6fl2vm`][28] | [`v2.1.0`][57] |
190+
| mars-swapper | [`neutron1udr9fc3kd743dezrj38v2ac74pxxr6qsx4xt4nfpcfczgw52rvyqyjp5au`][29] | [`v2.1.0`][57] |
191+
| mars-zapper | [`neutron1dr0ckm3u2ztjuscmgqjr85lwyduphxkgl3tc02ac8zp54r05t5dqp5tgyq`][56] | [`v2.1.0`][57] |
214192

215193
### mars-1
216194

@@ -252,12 +230,6 @@ Contents of this repository are open source under [GNU General Public License v3
252230
[27]: https://neutron.celat.one/neutron-1/contracts/neutron1n97wnm7q6d2hrcna3rqlnyqw2we6k0l8uqvmyqq6gsml92epdu7quugyph
253231
[28]: https://neutron.celat.one/neutron-1/contracts/neutron1h4l6rvylzcuxwdw3gzkkdzfjdxf4mv2ypfdgvnvag0dtz6x07gps6fl2vm
254232
[29]: https://neutron.celat.one/neutron-1/contracts/neutron1udr9fc3kd743dezrj38v2ac74pxxr6qsx4xt4nfpcfczgw52rvyqyjp5au
255-
[30]: https://neutron.celat.one/pion-1/contracts/neutron187fjlesys2c0z7xzhu43we4rx7tc4twnr5m6r2u7u5hpm03wvjqs0gk2lp
256-
[31]: https://neutron.celat.one/pion-1/contracts/neutron187hw8pqfhmxt4tk9star7tkjhu438k566jtgjskz4889pndp2vysh73ezh
257-
[32]: https://neutron.celat.one/pion-1/contracts/neutron1g4samkydfdyjec424ccucvjcuuls0ql8mfp2glf739mg0uqr74yqhdx9kn
258-
[33]: https://neutron.celat.one/pion-1/contracts/neutron15dn9w9vcdkpp2kfjuz4suqh2w8ajyqsgujlykm9x58hsjss5ff7qpmhlln
259-
[34]: https://neutron.celat.one/pion-1/contracts/neutron1re4v85k6kr8r7f3j4s4vrk3dvlyefc3xeg7jetv2jlpskahs5xrs8d6vw5
260-
[35]: https://neutron.celat.one/pion-1/contracts/neutron16xdh5w4dynfjrvnfuhv9h2znks94fyt4gp448jhtmjs3xd6smjvqumh9x2
261233
[36]: https://www.mintscan.io/mars-protocol/accounts/mars17xpfvakm2amg962yls6f84z3kell8c5ldy6e7x
262234
[37]: https://www.mintscan.io/mars-protocol/accounts/mars1s4hgh56can3e33e0zqpnjxh0t5wdf7u3pze575
263235
[38]: https://go.dev/
@@ -274,3 +246,9 @@ Contents of this repository are open source under [GNU General Public License v3
274246
[49]: https://github.com/mars-protocol/contracts/releases/tag/v2.0.5
275247
[50]: https://github.com/mars-protocol/contracts/releases/tag/v2.0.7
276248
[51]: https://github.com/mars-protocol/contracts/releases/tag/v1.3.0
249+
[52]: https://neutron.celat.one/neutron-1/contracts/neutron184kvu96rqtetmunkkmhu5hru8yaqg7qfhd8ldu5avjnamdqu69squrh3f5
250+
[53]: https://neutron.celat.one/neutron-1/contracts/neutron1qdzn3l4kn7gsjna2tfpg3g3mwd6kunx4p50lfya59k02846xas6qslgs3r
251+
[54]: https://neutron.celat.one/neutron-1/contracts/neutron17ktfwsr7ghlxzzma0gw0hke3j3rnssd58q87jv2wzfrk6uhawa3sv8xxtm
252+
[55]: https://neutron.celat.one/neutron-1/contracts/neutron1x4rgd7ry23v2n49y7xdzje0743c5tgrnqrqsvwyya2h6m48tz4jqqex06x
253+
[56]: https://neutron.celat.one/neutron-1/contracts/neutron1dr0ckm3u2ztjuscmgqjr85lwyduphxkgl3tc02ac8zp54r05t5dqp5tgyq
254+
[57]: https://github.com/mars-protocol/contracts/releases/tag/v2.1.0

contracts/account-nft/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,4 @@ cw-multi-test = { workspace = true }
3636
mars-mock-credit-manager = { workspace = true }
3737
mars-mock-rover-health = { workspace = true }
3838
mars-owner = { workspace = true }
39-
proptest = { workspace = true }
4039
serde_json = { workspace = true }

contracts/account-nft/src/contract.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ use cosmwasm_std::{
55
};
66
use cw2::set_contract_version;
77
use cw721_base::Cw721Contract;
8-
use mars_types::account_nft::{ExecuteMsg, InstantiateMsg, MigrateV1ToV2, NftConfig, QueryMsg};
8+
use mars_types::account_nft::{ExecuteMsg, InstantiateMsg, NftConfig, QueryMsg};
99

1010
use crate::{
1111
error::ContractError,
1212
execute::{burn, mint, update_config},
13-
migrations::{self},
1413
query::{query_config, query_next_id},
1514
state::{CONFIG, NEXT_ID},
1615
};
@@ -61,19 +60,13 @@ pub fn execute(
6160
match msg {
6261
ExecuteMsg::Mint {
6362
user,
64-
token_id,
65-
} => mint(deps, info, &user, token_id),
63+
} => mint(deps, info, &user),
6664
ExecuteMsg::UpdateConfig {
6765
updates,
6866
} => update_config(deps, info, updates),
6967
ExecuteMsg::Burn {
7068
token_id,
7169
} => burn(deps, env, info, token_id),
72-
ExecuteMsg::Migrate(msg) => match msg {
73-
MigrateV1ToV2::BurnEmptyAccounts {
74-
limit,
75-
} => migrations::v2_0_0::burn_empty_accounts(deps, limit),
76-
},
7770
_ => Parent::default().execute(deps, env, info, msg.try_into()?).map_err(Into::into),
7871
}
7972
}
@@ -86,8 +79,3 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult<Binary> {
8679
_ => Parent::default().query(deps, env, msg.try_into()?),
8780
}
8881
}
89-
90-
#[cfg_attr(not(feature = "library"), entry_point)]
91-
pub fn migrate(deps: DepsMut, _env: Env, _msg: Empty) -> Result<Response, ContractError> {
92-
migrations::v2_0_0::migrate(deps)
93-
}

contracts/account-nft/src/error.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,4 @@ pub enum ContractError {
2626

2727
#[error("{0}")]
2828
Version(#[from] cw2::VersionError),
29-
30-
#[error("Invalid token_id: {reason}")]
31-
InvalidTokenId {
32-
reason: String,
33-
},
3429
}

contracts/account-nft/src/execute.rs

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,14 @@ use crate::{
1818
error::ContractError::{
1919
self, BaseError, BurnNotAllowed, CreditManagerContractNotSet, HealthContractNotSet,
2020
},
21-
helpers::validate_token_id,
2221
state::{CONFIG, NEXT_ID},
2322
};
2423

25-
pub fn mint(
26-
deps: DepsMut,
27-
info: MessageInfo,
28-
user: &str,
29-
token_id: Option<String>,
30-
) -> Result<Response, ContractError> {
31-
let next_id = if let Some(ti) = token_id {
32-
validate_token_id(&ti)?;
33-
ti
34-
} else {
35-
let next_id = NEXT_ID.load(deps.storage)?;
36-
NEXT_ID.save(deps.storage, &(next_id + 1))?;
37-
next_id.to_string()
38-
};
24+
pub fn mint(deps: DepsMut, info: MessageInfo, user: &str) -> Result<Response, ContractError> {
25+
let next_id = NEXT_ID.load(deps.storage)?;
26+
NEXT_ID.save(deps.storage, &(next_id + 1))?;
3927
Parent::default()
40-
.mint(deps, info, next_id, user.to_string(), None, Empty {})
28+
.mint(deps, info, next_id.to_string(), user.to_string(), None, Empty {})
4129
.map_err(Into::into)
4230
}
4331

contracts/account-nft/src/helpers.rs

Lines changed: 0 additions & 37 deletions
This file was deleted.

contracts/account-nft/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
pub mod contract;
22
pub mod error;
33
pub mod execute;
4-
mod helpers;
5-
pub mod migrations;
64
pub mod query;
75
pub mod state;

0 commit comments

Comments
 (0)