diff --git a/Cargo.lock b/Cargo.lock
index 575b1eab..60bf4c03 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -19,37 +19,154 @@ version = "1.0.75"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
+[[package]]
+name = "astroport"
+version = "2.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d102b618016b3c1f1ebb5750617a73dbd294a3c941e54b12deabc931d771bc6e"
+dependencies = [
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "cw-storage-plus 0.15.1",
+ "cw-utils 0.15.1",
+ "cw20",
+ "itertools",
+ "uint",
+]
+
+[[package]]
+name = "astroport"
+version = "2.9.5"
+source = "git+https://github.com/astroport-fi/astroport-core.git?tag=v2.9.5#700f66d677a173686cb15cb9cb8c7a4d20c84ad8"
+dependencies = [
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "cw-storage-plus 0.15.1",
+ "cw-utils 0.15.1",
+ "cw20",
+ "itertools",
+ "uint",
+]
+
+[[package]]
+name = "astroport-factory"
+version = "1.5.1"
+source = "git+https://github.com/astroport-fi/astroport-core.git?tag=v2.9.5#700f66d677a173686cb15cb9cb8c7a4d20c84ad8"
+dependencies = [
+ "astroport 2.9.5 (git+https://github.com/astroport-fi/astroport-core.git?tag=v2.9.5)",
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "cw-storage-plus 0.15.1",
+ "cw2 0.15.1",
+ "itertools",
+ "protobuf",
+ "thiserror",
+]
+
+[[package]]
+name = "astroport-native-coin-registry"
+version = "1.0.1"
+source = "git+https://github.com/astroport-fi/astroport-core.git?tag=v2.9.5#700f66d677a173686cb15cb9cb8c7a4d20c84ad8"
+dependencies = [
+ "astroport 2.9.5 (git+https://github.com/astroport-fi/astroport-core.git?tag=v2.9.5)",
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "cosmwasm-storage",
+ "cw-storage-plus 0.15.1",
+ "cw2 0.15.1",
+ "thiserror",
+]
+
+[[package]]
+name = "astroport-pair"
+version = "1.3.3"
+source = "git+https://github.com/astroport-fi/astroport-core.git?tag=v2.9.5#700f66d677a173686cb15cb9cb8c7a4d20c84ad8"
+dependencies = [
+ "astroport 2.9.5 (git+https://github.com/astroport-fi/astroport-core.git?tag=v2.9.5)",
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "cw-storage-plus 0.15.1",
+ "cw2 0.15.1",
+ "cw20",
+ "integer-sqrt",
+ "protobuf",
+ "thiserror",
+]
+
+[[package]]
+name = "astroport-pair-stable"
+version = "2.1.4"
+source = "git+https://github.com/astroport-fi/astroport-core.git?tag=v2.9.5#700f66d677a173686cb15cb9cb8c7a4d20c84ad8"
+dependencies = [
+ "astroport 2.9.5 (git+https://github.com/astroport-fi/astroport-core.git?tag=v2.9.5)",
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "cw-storage-plus 0.15.1",
+ "cw-utils 1.0.3",
+ "cw2 0.15.1",
+ "cw20",
+ "itertools",
+ "thiserror",
+]
+
+[[package]]
+name = "astroport-token"
+version = "1.1.1"
+source = "git+https://github.com/astroport-fi/astroport-core.git?tag=v2.9.5#700f66d677a173686cb15cb9cb8c7a4d20c84ad8"
+dependencies = [
+ "astroport 2.9.5 (git+https://github.com/astroport-fi/astroport-core.git?tag=v2.9.5)",
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "cw2 0.15.1",
+ "cw20",
+ "cw20-base",
+ "snafu",
+]
+
+[[package]]
+name = "astroport-whitelist"
+version = "1.0.1"
+source = "git+https://github.com/astroport-fi/astroport-core.git?tag=v2.9.5#700f66d677a173686cb15cb9cb8c7a4d20c84ad8"
+dependencies = [
+ "astroport 2.9.5 (git+https://github.com/astroport-fi/astroport-core.git?tag=v2.9.5)",
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "cw1-whitelist",
+ "cw2 0.15.1",
+ "thiserror",
+]
+
[[package]]
name = "auction"
-version = "0.1.0"
+version = "1.2.0"
dependencies = [
"anyhow",
"auction-package",
"cosmwasm-schema",
"cosmwasm-std",
"cw-multi-test",
- "cw-storage-plus",
- "cw-utils",
- "cw2",
+ "cw-storage-plus 1.2.0",
+ "cw-utils 1.0.3",
+ "cw2 1.1.2",
"serde",
"thiserror",
]
[[package]]
name = "auction-package"
-version = "0.1.0"
+version = "1.2.0"
dependencies = [
"cosmwasm-schema",
"cosmwasm-std",
- "cw-storage-plus",
- "cw-utils",
+ "cw-storage-plus 1.2.0",
+ "cw-utils 1.0.3",
"serde",
"thiserror",
]
[[package]]
name = "auctions-manager"
-version = "0.1.0"
+version = "1.2.0"
dependencies = [
"anyhow",
"auction",
@@ -57,14 +174,20 @@ dependencies = [
"cosmwasm-schema",
"cosmwasm-std",
"cw-multi-test",
- "cw-storage-plus",
- "cw-utils",
- "cw2",
+ "cw-storage-plus 1.2.0",
+ "cw-utils 1.0.3",
+ "cw2 1.1.2",
"price-oracle",
"serde",
"thiserror",
]
+[[package]]
+name = "autocfg"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80"
+
[[package]]
name = "base16ct"
version = "0.1.1"
@@ -235,6 +358,16 @@ dependencies = [
"thiserror",
]
+[[package]]
+name = "cosmwasm-storage"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd2b4ae72a03e8f56c85df59d172d51d2d7dc9cec6e2bc811e3fb60c588032a4"
+dependencies = [
+ "cosmwasm-std",
+ "serde",
+]
+
[[package]]
name = "cpufeatures"
version = "0.2.9"
@@ -244,6 +377,12 @@ dependencies = [
"libc",
]
+[[package]]
+name = "crunchy"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
+
[[package]]
name = "crypto-bigint"
version = "0.4.9"
@@ -299,8 +438,8 @@ checksum = "127c7bb95853b8e828bdab97065c81cb5ddc20f7339180b61b2300565aaa99d1"
dependencies = [
"anyhow",
"cosmwasm-std",
- "cw-storage-plus",
- "cw-utils",
+ "cw-storage-plus 1.2.0",
+ "cw-utils 1.0.3",
"derivative",
"itertools",
"k256 0.11.6",
@@ -310,6 +449,17 @@ dependencies = [
"thiserror",
]
+[[package]]
+name = "cw-storage-plus"
+version = "0.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc6cf70ef7686e2da9ad7b067c5942cd3e88dd9453f7af42f54557f8af300fb0"
+dependencies = [
+ "cosmwasm-std",
+ "schemars",
+ "serde",
+]
+
[[package]]
name = "cw-storage-plus"
version = "1.2.0"
@@ -321,6 +471,21 @@ dependencies = [
"serde",
]
+[[package]]
+name = "cw-utils"
+version = "0.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ae0b69fa7679de78825b4edeeec045066aa2b2c4b6e063d80042e565bb4da5c"
+dependencies = [
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "cw2 0.15.1",
+ "schemars",
+ "semver",
+ "serde",
+ "thiserror",
+]
+
[[package]]
name = "cw-utils"
version = "1.0.3"
@@ -329,13 +494,55 @@ checksum = "1c4a657e5caacc3a0d00ee96ca8618745d050b8f757c709babafb81208d4239c"
dependencies = [
"cosmwasm-schema",
"cosmwasm-std",
- "cw2",
+ "cw2 1.1.2",
"schemars",
"semver",
"serde",
"thiserror",
]
+[[package]]
+name = "cw1"
+version = "0.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dbe0783ec4210ba4e0cdfed9874802f469c6db0880f742ad427cb950e940b21c"
+dependencies = [
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "schemars",
+ "serde",
+]
+
+[[package]]
+name = "cw1-whitelist"
+version = "0.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "233dd13f61495f1336da57c8bdca0536fa9f8dd59c12d2bbfc59928ea580e478"
+dependencies = [
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "cw-storage-plus 0.15.1",
+ "cw-utils 0.15.1",
+ "cw1",
+ "cw2 0.15.1",
+ "schemars",
+ "serde",
+ "thiserror",
+]
+
+[[package]]
+name = "cw2"
+version = "0.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5abb8ecea72e09afff830252963cb60faf945ce6cef2c20a43814516082653da"
+dependencies = [
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "cw-storage-plus 0.15.1",
+ "schemars",
+ "serde",
+]
+
[[package]]
name = "cw2"
version = "1.1.2"
@@ -344,7 +551,38 @@ checksum = "c6c120b24fbbf5c3bedebb97f2cc85fbfa1c3287e09223428e7e597b5293c1fa"
dependencies = [
"cosmwasm-schema",
"cosmwasm-std",
- "cw-storage-plus",
+ "cw-storage-plus 1.2.0",
+ "schemars",
+ "semver",
+ "serde",
+ "thiserror",
+]
+
+[[package]]
+name = "cw20"
+version = "0.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6025276fb6e603e974c21f3e4606982cdc646080e8fba3198816605505e1d9a"
+dependencies = [
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "cw-utils 0.15.1",
+ "schemars",
+ "serde",
+]
+
+[[package]]
+name = "cw20-base"
+version = "0.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0909c56d0c14601fbdc69382189799482799dcad87587926aec1f3aa321abc41"
+dependencies = [
+ "cosmwasm-schema",
+ "cosmwasm-std",
+ "cw-storage-plus 0.15.1",
+ "cw-utils 0.15.1",
+ "cw2 0.15.1",
+ "cw20",
"schemars",
"semver",
"serde",
@@ -403,6 +641,12 @@ dependencies = [
"subtle",
]
+[[package]]
+name = "doc-comment"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
+
[[package]]
name = "drawille"
version = "0.3.0"
@@ -621,6 +865,15 @@ dependencies = [
"digest 0.10.7",
]
+[[package]]
+name = "integer-sqrt"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770"
+dependencies = [
+ "num-traits",
+]
+
[[package]]
name = "is-terminal"
version = "0.4.9"
@@ -691,6 +944,15 @@ version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f"
+[[package]]
+name = "num-traits"
+version = "0.2.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a"
+dependencies = [
+ "autocfg",
+]
+
[[package]]
name = "once_cell"
version = "1.18.0"
@@ -723,18 +985,25 @@ dependencies = [
"spki 0.7.2",
]
+[[package]]
+name = "ppv-lite86"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+
[[package]]
name = "price-oracle"
-version = "0.1.0"
+version = "1.2.0"
dependencies = [
"anyhow",
+ "astroport 2.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"auction-package",
"cosmwasm-schema",
"cosmwasm-std",
"cw-multi-test",
- "cw-storage-plus",
- "cw-utils",
- "cw2",
+ "cw-storage-plus 1.2.0",
+ "cw-utils 1.0.3",
+ "cw2 1.1.2",
"serde",
"thiserror",
]
@@ -771,6 +1040,15 @@ dependencies = [
"syn 1.0.109",
]
+[[package]]
+name = "protobuf"
+version = "2.28.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94"
+dependencies = [
+ "bytes",
+]
+
[[package]]
name = "quote"
version = "1.0.33"
@@ -780,6 +1058,27 @@ dependencies = [
"proc-macro2",
]
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.6.4",
+]
+
[[package]]
name = "rand_core"
version = "0.5.1"
@@ -797,7 +1096,7 @@ dependencies = [
[[package]]
name = "rebalancer"
-version = "0.1.0"
+version = "1.2.0"
dependencies = [
"anyhow",
"auction-package",
@@ -805,8 +1104,9 @@ dependencies = [
"cosmwasm-schema",
"cosmwasm-std",
"cw-multi-test",
- "cw-storage-plus",
- "cw2",
+ "cw-storage-plus 1.2.0",
+ "cw-utils 1.0.3",
+ "cw2 1.1.2",
"serde",
"thiserror",
"valence-macros",
@@ -973,14 +1273,14 @@ dependencies = [
[[package]]
name = "services-manager"
-version = "0.1.0"
+version = "1.2.0"
dependencies = [
"anyhow",
"cosmwasm-schema",
"cosmwasm-std",
"cw-multi-test",
- "cw-storage-plus",
- "cw2",
+ "cw-storage-plus 1.2.0",
+ "cw2 1.1.2",
"rebalancer",
"serde",
"thiserror",
@@ -1032,6 +1332,27 @@ dependencies = [
"rand_core 0.6.4",
]
+[[package]]
+name = "snafu"
+version = "0.6.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eab12d3c261b2308b0d80c26fffb58d17eba81a4be97890101f416b478c79ca7"
+dependencies = [
+ "doc-comment",
+ "snafu-derive",
+]
+
+[[package]]
+name = "snafu-derive"
+version = "0.6.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1508efa03c362e23817f96cde18abed596a25219a8b2c66e8db33c03543d315b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
[[package]]
name = "spki"
version = "0.6.0"
@@ -1122,6 +1443,18 @@ version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
+[[package]]
+name = "uint"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52"
+dependencies = [
+ "byteorder",
+ "crunchy",
+ "hex",
+ "static_assertions",
+]
+
[[package]]
name = "unicode-ident"
version = "1.0.12"
@@ -1130,14 +1463,14 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "valence-account"
-version = "0.1.0"
+version = "1.2.0"
dependencies = [
"anyhow",
"cosmwasm-schema",
"cosmwasm-std",
"cw-multi-test",
- "cw-storage-plus",
- "cw2",
+ "cw-storage-plus 1.2.0",
+ "cw2 1.1.2",
"serde",
"thiserror",
"valence-macros",
@@ -1146,7 +1479,7 @@ dependencies = [
[[package]]
name = "valence-macros"
-version = "0.1.0"
+version = "1.2.0"
dependencies = [
"cosmwasm-schema",
"cosmwasm-std",
@@ -1157,13 +1490,13 @@ dependencies = [
[[package]]
name = "valence-package"
-version = "0.1.0"
+version = "1.2.0"
dependencies = [
"auction-package",
"cosmwasm-schema",
"cosmwasm-std",
- "cw-storage-plus",
- "cw-utils",
+ "cw-storage-plus 1.2.0",
+ "cw-utils 1.0.3",
"serde",
"thiserror",
"valence-macros",
@@ -1174,6 +1507,13 @@ name = "valence-tests"
version = "0.0.1"
dependencies = [
"anyhow",
+ "astroport 2.9.5 (git+https://github.com/astroport-fi/astroport-core.git?tag=v2.9.5)",
+ "astroport-factory",
+ "astroport-native-coin-registry",
+ "astroport-pair",
+ "astroport-pair-stable",
+ "astroport-token",
+ "astroport-whitelist",
"auction",
"auction-package",
"auctions-manager",
@@ -1181,9 +1521,10 @@ dependencies = [
"cosmwasm-schema",
"cosmwasm-std",
"cw-multi-test",
- "cw-storage-plus",
- "cw-utils",
+ "cw-storage-plus 1.2.0",
+ "cw-utils 1.0.3",
"price-oracle",
+ "rand",
"rebalancer",
"rgb",
"services-manager",
diff --git a/Cargo.toml b/Cargo.toml
index babbd793..8c8be6d0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,4 +1,5 @@
[workspace]
+resolver = "2"
members = [
"packages/*",
"contracts/services/*",
@@ -11,7 +12,7 @@ members = [
[workspace.package]
edition = "2021"
license = "BSL"
-version = "0.1.0"
+version = "1.2.0"
repository = "https://github.com/timewave-computer/valence-services"
rust-version = "1.66"
@@ -43,14 +44,14 @@ valence-macros = { path = "packages/valence-macros" }
valence-package = { path = "packages/valence-package" }
auction-package = { path = "packages/auction-package" }
-cosmwasm-schema = "1.5.0"
-cosmwasm-std = { version = "1.5.0", features = ["ibc3"] }
-cw-storage-plus = "1.2.0"
-cw-utils = "1.0.3"
-cw2 = "1.1.2"
-serde = { version = "1.0.183", default-features = false, features = ["derive"] }
-thiserror = "1.0.31"
-schemars = "0.8.10"
+cosmwasm-schema = "1.5.0"
+cosmwasm-std = { version = "1.5.0", features = ["ibc3"] }
+cw-storage-plus = "1.2.0"
+cw-utils = "1.0.3"
+cw2 = "1.1.2"
+serde = { version = "1.0.183", default-features = false, features = ["derive"] }
+thiserror = "1.0.31"
+schemars = "0.8.10"
# dev-dependencies
cw-multi-test = "0.16.5"
diff --git a/README.md b/README.md
index 53439b93..5e7b57eb 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,44 @@
-# Neutron Contracts
+# Neutron MAINNET Contracts
[![Check Set-Up & Build](https://github.com/timewave-computer/valence-services/actions/workflows/check.yml/badge.svg)](https://github.com/timewave-computer/valence-services/actions/workflows/check.yml)
## Code ids
-- auctions manager = `1762`
-- auction = `1763`
-- price oracle = `1764`
-- rebalancer = `1765`
-- services manager = `1766`
-- account = `1767`
+- auctions manager = `874`
+- auction = `869`
+- oracle = `883`
+- rebalancer = `898`
+- services manager = `872`
+- account = `867`
+
+## Owner / Admin
+
+`neutron1phx0sz708k3t6xdnyc98hgkyhra4tp44et5s68`
+
+## Addresses
+
+- Services manager - `neutron1gantvpnat0la8kkkzrnj48d5d8wxdjllh5r2w4r2hcrpwy00s69quypupa`
+- Auctions manager - `neutron13exc5wdc7y5qpqazc34djnu934lqvfw2dru30j52ahhjep6jzx8ssjxcyz`
+- Rebalancer - `neutron1qs6mzpmcw3dvg5l8nyywetcj326scszdj7v4pfk55xwshd4prqnqfwc0z2`
+- Account - `neutron1pkk88zqjd478x3maws3mv7qugylhsu0sjkejj3k2w02wwhp6fqgsl7m0js`
+- Oracle - `neutron1s8uqyh0mmh8g66s2dectf56c08y6fvusp39undp8kf4v678ededsy6tstf`
+
+### Auctions
+
+- [uatom, untrn] - `neutron1l9zmckc8j7zhutx088g6ppd9dfs45jet6dyq3pypc0gt5h9ncsvs5m4tsz`
+- [untrn, uatom] - `neutron13jppm4n77u8ud5wma9xe0dqnaz85ne9jem3r0scc009uemvh49qqxuuggf`
+
+- [uusdc, uatom] - `neutron1ku4zrr40u7w2265xustm3rj2ld5022p5u95e5q6sckekyrs59r8q9q0zdn`
+- [uusdc, untrn] - `neutron18svf2f9eltzr4dm2p8q4jnxyu2sjejpggxhcvaspeq8vaj4gdtuqdg2z2f`
+- [uatom, uusdc] - `neutron1uf23w2ejztrz0sz92x26tnavdatyxwq4axt96zqaxc7sshalx4nqxj89sd`
+- [untrn, uusdc] - `neutron1r7ytd0m9j5t668wg7e9u287f9kzfxqulwuslexjeqjvwas0qzxjs67kzq6`
+
+- [newt, uatom] - `neutron1dz6kyp6sh5myulmmna6wt62kc65xkccrp7f5sqfqyv4vdkte885s00zm3p`
+- [newt, untrn] - `neutron1dajsjk985c29tv5v985gvd55vzllx97aaw0ekurty62xwf3l53usrhcf3t`
+- [newt, uusdc] - `neutron1qdp2qhtt2jyefn0dqxsl7ffah9xmm8jxg3z462u42rp424eecrms2rshxg`
+- [uatom, newt] - `neutron1fyk77ttx2j3wxjj26g3d8csjzp005cxdacstfxcrdexpn8nsz79qhjhpsd`
+- [untrn, newt] - `neutron1zvw9l8c82hnvwsntpuy89p86ztfmmudd9usfmnpa2tnqws74zsxq56sczm`
+- [uusdc, newt] - `neutron1vu04szc78ae0nplwpuxjr6j592hn2d60zqtuts7w3ah6kajtxd2q2vfv59`
# Juno Contracts
@@ -57,14 +86,3 @@ junod keys add valence-owner --recover
- (ujunox, vuusdcx) - ``
- (vuusdcx, ujunox) - ``
-
-# FIGMA - flow
-
-1. init a services manager
-2. init a auctions manager
-3. init services (rebalancer)
-4. add service to manager
-5. init account
-6. init auctions
-7. init price oracle
-8. set initial prices for auctions
diff --git a/contracts/account/schema/valence-account.json b/contracts/account/schema/valence-account.json
index b580ff1b..ef6ec3b9 100644
--- a/contracts/account/schema/valence-account.json
+++ b/contracts/account/schema/valence-account.json
@@ -1,6 +1,6 @@
{
"contract_name": "valence-account",
- "contract_version": "0.1.0",
+ "contract_version": "1.2.0",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
@@ -22,13 +22,6 @@
"title": "ExecuteMsg",
"description": "This is base account execute msgs, it implements messages to be called on the service manager as well as messages to be called by services (valence_account_execute)",
"oneOf": [
- {
- "type": "string",
- "enum": [
- "cancel_admin_change",
- "approve_admin_change"
- ]
- },
{
"description": "Register account to a service.",
"type": "object",
@@ -122,6 +115,12 @@
"service_name"
],
"properties": {
+ "reason": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
"service_name": {
"$ref": "#/definitions/ValenceServices"
}
@@ -260,6 +259,32 @@
}
},
"additionalProperties": false
+ },
+ {
+ "type": "object",
+ "required": [
+ "cancel_admin_change"
+ ],
+ "properties": {
+ "cancel_admin_change": {
+ "type": "object",
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "required": [
+ "approve_admin_change"
+ ],
+ "properties": {
+ "approve_admin_change": {
+ "type": "object",
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
}
],
"definitions": {
@@ -365,30 +390,6 @@
},
"additionalProperties": false
},
- {
- "type": "object",
- "required": [
- "staking"
- ],
- "properties": {
- "staking": {
- "$ref": "#/definitions/StakingMsg"
- }
- },
- "additionalProperties": false
- },
- {
- "type": "object",
- "required": [
- "distribution"
- ],
- "properties": {
- "distribution": {
- "$ref": "#/definitions/DistributionMsg"
- }
- },
- "additionalProperties": false
- },
{
"description": "A Stargate message encoded the same way as a protobuf [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)",
"type": "object",
@@ -452,55 +453,6 @@
}
]
},
- "DistributionMsg": {
- "description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto",
- "oneOf": [
- {
- "description": "This is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.",
- "type": "object",
- "required": [
- "set_withdraw_address"
- ],
- "properties": {
- "set_withdraw_address": {
- "type": "object",
- "required": [
- "address"
- ],
- "properties": {
- "address": {
- "description": "The `withdraw_address`",
- "type": "string"
- }
- }
- }
- },
- "additionalProperties": false
- },
- {
- "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.",
- "type": "object",
- "required": [
- "withdraw_delegator_reward"
- ],
- "properties": {
- "withdraw_delegator_reward": {
- "type": "object",
- "required": [
- "validator"
- ],
- "properties": {
- "validator": {
- "description": "The `validator_address`",
- "type": "string"
- }
- }
- }
- },
- "additionalProperties": false
- }
- ]
- },
"Empty": {
"description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)",
"type": "object"
@@ -742,90 +694,6 @@
}
}
},
- "StakingMsg": {
- "description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto",
- "oneOf": [
- {
- "description": "This is translated to a [MsgDelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90). `delegator_address` is automatically filled with the current contract's address.",
- "type": "object",
- "required": [
- "delegate"
- ],
- "properties": {
- "delegate": {
- "type": "object",
- "required": [
- "amount",
- "validator"
- ],
- "properties": {
- "amount": {
- "$ref": "#/definitions/Coin"
- },
- "validator": {
- "type": "string"
- }
- }
- }
- },
- "additionalProperties": false
- },
- {
- "description": "This is translated to a [MsgUndelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121). `delegator_address` is automatically filled with the current contract's address.",
- "type": "object",
- "required": [
- "undelegate"
- ],
- "properties": {
- "undelegate": {
- "type": "object",
- "required": [
- "amount",
- "validator"
- ],
- "properties": {
- "amount": {
- "$ref": "#/definitions/Coin"
- },
- "validator": {
- "type": "string"
- }
- }
- }
- },
- "additionalProperties": false
- },
- {
- "description": "This is translated to a [MsgBeginRedelegate](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105). `delegator_address` is automatically filled with the current contract's address.",
- "type": "object",
- "required": [
- "redelegate"
- ],
- "properties": {
- "redelegate": {
- "type": "object",
- "required": [
- "amount",
- "dst_validator",
- "src_validator"
- ],
- "properties": {
- "amount": {
- "$ref": "#/definitions/Coin"
- },
- "dst_validator": {
- "type": "string"
- },
- "src_validator": {
- "type": "string"
- }
- }
- }
- },
- "additionalProperties": false
- }
- ]
- },
"Timestamp": {
"description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```",
"allOf": [
diff --git a/contracts/account/src/contract.rs b/contracts/account/src/contract.rs
index a823d7ab..4b7035ca 100644
--- a/contracts/account/src/contract.rs
+++ b/contracts/account/src/contract.rs
@@ -1,19 +1,20 @@
#[cfg(not(feature = "library"))]
use cosmwasm_std::entry_point;
use cosmwasm_std::{
- to_json_binary, BankMsg, Binary, CosmosMsg, Deps, DepsMut, Env, IbcMsg, MessageInfo, Reply,
- Response, StdResult, SubMsg, WasmMsg,
+ to_json_binary, BankMsg, Binary, Coin, CosmosMsg, Deps, DepsMut, Env, IbcMsg, MessageInfo,
+ Reply, Response, StdResult, SubMsg, WasmMsg,
};
use cw2::set_contract_version;
use valence_package::helpers::{
- approve_admin_change, cancel_admin_change, forward_to_services_manager, sender_is_a_service,
- start_admin_change, verify_admin,
+ approve_admin_change, cancel_admin_change, forward_to_services_manager,
+ forward_to_services_manager_with_funds, sender_is_a_service, start_admin_change, verify_admin,
};
use valence_package::msgs::core_execute::{AccountBaseExecuteMsg, ServicesManagerExecuteMsg};
+use valence_package::msgs::core_query::ServicesManagerQueryMsg;
use valence_package::states::{ADMIN, SERVICES_MANAGER};
use crate::error::ContractError;
-use crate::msg::{InstantiateMsg, QueryMsg};
+use crate::msg::{InstantiateMsg, MigrateMsg, QueryMsg};
const CONTRACT_NAME: &str = "crates.io:valence-account";
const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");
@@ -52,10 +53,27 @@ pub fn execute(
AccountBaseExecuteMsg::RegisterToService { service_name, data } => {
verify_admin(deps.as_ref(), &info)?;
let services_manager_addr = SERVICES_MANAGER.load(deps.storage)?;
- Ok(forward_to_services_manager(
- services_manager_addr.to_string(),
- ServicesManagerExecuteMsg::RegisterToService { service_name, data },
- )?)
+ // Query service fee
+ Ok(
+ match deps.querier.query_wasm_smart::