diff --git a/.github/workflows/check_artifacts.yml b/.github/workflows/check_artifacts.yml index 3a53b5e..40fdabe 100644 --- a/.github/workflows/check_artifacts.yml +++ b/.github/workflows/check_artifacts.yml @@ -66,7 +66,7 @@ jobs: fail-on-cache-miss: true - name: Install cosmwasm-check # Uses --debug for compilation speed - run: cargo install --debug --version 1.4.0 cosmwasm-check + run: cargo install --debug --version 1.5.8 cosmwasm-check - name: Cosmwasm check run: | - cosmwasm-check $GITHUB_WORKSPACE/artifacts/*.wasm --available-capabilities staking,iterator,stargate,cosmwasm_1_1,neutron + cosmwasm-check $GITHUB_WORKSPACE/artifacts/*.wasm --available-capabilities staking,iterator,stargate diff --git a/Cargo.lock b/Cargo.lock index b17969b..0b0d6d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,93 +19,20 @@ version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" -[[package]] -name = "astro-assembly" -version = "3.0.0" -dependencies = [ - "anyhow", - "astroport 4.0.3", - "astroport-governance 4.2.1", - "astroport-staking", - "astroport-tokenfactory-tracker", - "astroport-voting-escrow", - "builder-unlock 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cosmwasm-schema", - "cosmwasm-std", - "cw-multi-test 0.20.0", - "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "cw2 1.1.2", - "ibc-controller-package", - "osmosis-std 0.25.0", - "test-case", - "thiserror", -] - -[[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 0.15.1", - "itertools 0.10.5", - "uint", -] - -[[package]] -name = "astroport" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5ec8dd4298b362361b0e118107a060e5e58501a68273b3257059c96b723b57c" -dependencies = [ - "astroport-circular-buffer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cosmwasm-schema", - "cosmwasm-std", - "cw-asset", - "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "cw20 1.1.2", - "itertools 0.12.1", - "uint", -] - [[package]] name = "astroport" -version = "5.3.0" +version = "5.7.0-cw1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b3b225e86694e2fd1adbf230581bce1690a871585aec9edd64b022a313a8493" -dependencies = [ - "astroport-circular-buffer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cosmos-sdk-proto 0.19.0", - "cosmwasm-schema", - "cosmwasm-std", - "cw-asset", - "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "cw20 1.1.2", - "itertools 0.12.1", - "prost 0.11.9", - "uint", -] - -[[package]] -name = "astroport" -version = "5.3.0" -source = "git+https://github.com/astroport-fi/astroport-core#2bb41b80cfb0c6038c754461b1da143e2065002e" +checksum = "79c5e85aa198b21b94e4cac6454192701f7373460aa6a953de14279cf9ce3f92" dependencies = [ - "astroport-circular-buffer 0.2.0 (git+https://github.com/astroport-fi/astroport-core)", - "cosmos-sdk-proto 0.19.0", + "astroport-circular-buffer", + "cosmos-sdk-proto", "cosmwasm-schema", "cosmwasm-std", "cw-asset", "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "cw20 1.1.2", + "cw-utils", + "cw20", "itertools 0.12.1", "prost 0.11.9", "uint", @@ -123,212 +50,49 @@ dependencies = [ "thiserror", ] -[[package]] -name = "astroport-circular-buffer" -version = "0.2.0" -source = "git+https://github.com/astroport-fi/astroport-core#2bb41b80cfb0c6038c754461b1da143e2065002e" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 1.2.0", - "thiserror", -] - -[[package]] -name = "astroport-emissions-controller" -version = "1.1.1" -dependencies = [ - "anyhow", - "astro-assembly", - "astroport 5.3.0 (git+https://github.com/astroport-fi/astroport-core)", - "astroport-factory", - "astroport-governance 4.2.1", - "astroport-incentives", - "astroport-pair", - "astroport-staking", - "astroport-tokenfactory-tracker", - "astroport-voting-escrow", - "builder-unlock 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cosmwasm-schema", - "cosmwasm-std", - "cw-multi-test 1.0.0", - "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "cw2 1.1.2", - "cw20-base", - "derivative", - "itertools 0.12.1", - "neutron-sdk", - "osmosis-std 0.25.0", - "serde_json", - "thiserror", -] - [[package]] name = "astroport-emissions-controller-outpost" version = "1.1.0" dependencies = [ - "anyhow", - "astroport 5.3.0 (git+https://github.com/astroport-fi/astroport-core)", - "astroport-factory", - "astroport-governance 4.2.1", - "astroport-incentives", - "astroport-pair", - "astroport-voting-escrow", + "astroport", + "astroport-governance", "cosmwasm-schema", "cosmwasm-std", - "cw-multi-test 1.2.0", "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "cw2 1.1.2", - "cw20-base", - "derivative", + "cw-utils", + "cw2", "itertools 0.12.1", - "osmosis-std 0.25.0", "serde_json", "thiserror", ] -[[package]] -name = "astroport-factory" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17a33d197100837156dd58ec572ccc4659edd98177ceb34c078486ef9ae3629c" -dependencies = [ - "astroport 5.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "cw2 1.1.2", - "itertools 0.12.1", - "thiserror", -] - [[package]] name = "astroport-governance" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72806ace350e81c4e1cab7e275ef91f05bad830275d697d67ad1bd4acc6f016d" +version = "4.2.1-cw1.0" dependencies = [ - "astroport 2.9.5", - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 0.15.1", - "cw20 0.15.1", -] - -[[package]] -name = "astroport-governance" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f16e7f7084051683f1012666b082895c4a5345f2fc38961ce4a67de46730c6bf" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 1.2.0", - "cw20 1.1.2", - "thiserror", -] - -[[package]] -name = "astroport-governance" -version = "4.2.1" -dependencies = [ - "astroport 5.3.0 (git+https://github.com/astroport-fi/astroport-core)", + "astroport", "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.2.0", - "cw20 1.1.2", + "cw20", "itertools 0.12.1", "sha2 0.10.8", "thiserror", ] -[[package]] -name = "astroport-ibc" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93c0ce66970f190873b30f862b0cd39fb0d8499678a1860446aa60d9618671f4" -dependencies = [ - "cosmwasm-schema", -] - -[[package]] -name = "astroport-incentives" -version = "1.2.0" -source = "git+https://github.com/astroport-fi/astroport-core#2bb41b80cfb0c6038c754461b1da143e2065002e" -dependencies = [ - "astroport 5.3.0 (git+https://github.com/astroport-fi/astroport-core)", - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "cw2 1.1.2", - "cw20 1.1.2", - "itertools 0.12.1", - "thiserror", -] - -[[package]] -name = "astroport-pair" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a5e6cd4508d45d89f9f44b607eb482aa614fa54274c46746d6f251bf10b27ae" -dependencies = [ - "astroport 5.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "cw2 1.1.2", - "cw20 1.1.2", - "integer-sqrt", - "thiserror", -] - -[[package]] -name = "astroport-staking" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "315e43350f20d04f8d65bbb4d29ae423eea2fb12e292f0185b983a210d1c6d1a" -dependencies = [ - "astroport 4.0.3", - "cosmwasm-std", - "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "cw2 1.1.2", - "osmosis-std 0.21.0", - "thiserror", -] - -[[package]] -name = "astroport-tokenfactory-tracker" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0586ec0e015b5d9da5c94a5c9d7bd8a6fabdb38fb66905d61caad796a98b0650" -dependencies = [ - "astroport 4.0.3", - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 1.2.0", - "cw2 1.1.2", - "thiserror", -] - [[package]] name = "astroport-voting-escrow" version = "1.1.0" dependencies = [ - "astroport 5.3.0 (git+https://github.com/astroport-fi/astroport-core)", - "astroport-governance 4.2.1", + "astroport", + "astroport-governance", "cosmwasm-schema", "cosmwasm-std", - "cw-multi-test 1.2.0", + "cw-multi-test", "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "cw2 1.1.2", - "cw20 1.1.2", + "cw-utils", + "cw2", + "cw20", "cw20-base", "thiserror", ] @@ -393,37 +157,6 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56953345e39537a3e18bdaeba4cb0c58a78c1f61f361dc0fa7c5c7340ae87c5f" -[[package]] -name = "builder-unlock" -version = "3.0.0" -dependencies = [ - "astroport 5.3.0 (git+https://github.com/astroport-fi/astroport-core)", - "astroport-governance 3.0.0", - "cosmwasm-schema", - "cosmwasm-std", - "cw-multi-test 0.20.1", - "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "cw2 1.1.2", - "thiserror", -] - -[[package]] -name = "builder-unlock" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3519354b74cda2f39528f852bfb9c1683ba141b387a4e09f8b581d6a09b0490b" -dependencies = [ - "astroport 5.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "astroport-governance 3.0.0", - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "cw2 1.1.2", - "thiserror", -] - [[package]] name = "byteorder" version = "1.5.0" @@ -445,15 +178,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "num-traits", -] - [[package]] name = "const-oid" version = "0.9.6" @@ -467,26 +191,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73c9d2043a9e617b0d602fbc0a0ecd621568edbf3a9774890a6d562389bd8e1c" dependencies = [ "prost 0.11.9", - "prost-types 0.11.9", - "tendermint-proto 0.32.2", -] - -[[package]] -name = "cosmos-sdk-proto" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32560304ab4c365791fd307282f76637213d8083c1a98490c35159cd67852237" -dependencies = [ - "prost 0.12.6", - "prost-types 0.12.6", - "tendermint-proto 0.34.1", + "prost-types", + "tendermint-proto", ] [[package]] name = "cosmwasm-crypto" -version = "1.5.7" +version = "1.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f862b355f7e47711e0acfe6af92cb3fd8fd5936b66a9eaa338b51edabd1e77d" +checksum = "58535cbcd599b3c193e3967c8292fe1dbbb5de7c2a2d87380661091dd4744044" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -497,9 +210,9 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.5.7" +version = "1.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd85de6467cd1073688c86b39833679ae6db18cf4771471edd9809f15f1679f1" +checksum = "a8e07de16c800ac82fd188d055ecdb923ead0cf33960d3350089260bb982c09f" dependencies = [ "syn 1.0.109", ] @@ -530,9 +243,9 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.5.7" +version = "1.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2685c2182624b2e9e17f7596192de49a3f86b7a0c9a5f6b25c1df5e24592e836" +checksum = "c21fde95ccd20044a23c0ac6fd8c941f3e8c158169dc94b5aa6491a2d9551a8d" dependencies = [ "base64", "bech32 0.9.1", @@ -544,7 +257,7 @@ dependencies = [ "hex", "schemars", "serde", - "serde-json-wasm 0.5.2", + "serde-json-wasm", "sha2 0.10.8", "static_assertions", "thiserror", @@ -619,65 +332,7 @@ dependencies = [ "cosmwasm-std", "cw-address-like", "cw-storage-plus 1.2.0", - "cw20 1.1.2", - "thiserror", -] - -[[package]] -name = "cw-multi-test" -version = "0.20.0" -source = "git+https://github.com/astroport-fi/cw-multi-test?branch=feat/bank_with_send_hooks#3220f4cd126b5a8da2ce8b00152afef046a9b391" -dependencies = [ - "anyhow", - "bech32 0.9.1", - "cosmwasm-std", - "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "derivative", - "itertools 0.12.1", - "prost 0.12.6", - "schemars", - "serde", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "cw-multi-test" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc392a5cb7e778e3f90adbf7faa43c4db7f35b6623224b08886d796718edb875" -dependencies = [ - "anyhow", - "bech32 0.9.1", - "cosmwasm-std", - "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "derivative", - "itertools 0.12.1", - "prost 0.12.6", - "schemars", - "serde", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "cw-multi-test" -version = "1.0.0" -source = "git+https://github.com/astroport-fi/cw-multi-test?branch=feat/bank_with_send_hooks_1_0#b4ba6101dfd67b73aff3b75a8759915bd215ae85" -dependencies = [ - "anyhow", - "bech32 0.11.0", - "cosmwasm-std", - "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "derivative", - "itertools 0.12.1", - "prost 0.12.6", - "schemars", - "serde", - "sha2 0.10.8", + "cw20", "thiserror", ] @@ -691,7 +346,7 @@ dependencies = [ "bech32 0.11.0", "cosmwasm-std", "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", + "cw-utils", "derivative", "itertools 0.13.0", "prost 0.12.6", @@ -723,21 +378,6 @@ 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" @@ -746,26 +386,13 @@ checksum = "1c4a657e5caacc3a0d00ee96ca8618745d050b8f757c709babafb81208d4239c" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw2 1.1.2", + "cw2", "schemars", "semver", "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" @@ -781,19 +408,6 @@ dependencies = [ "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" version = "1.1.2" @@ -802,7 +416,7 @@ checksum = "526e39bb20534e25a1cd0386727f0038f4da294e5e535729ba3ef54055246abd" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-utils 1.0.3", + "cw-utils", "schemars", "serde", ] @@ -816,8 +430,8 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.2.0", - "cw2 1.1.2", - "cw20 1.1.2", + "cw2", + "cw20", "schemars", "semver", "serde", @@ -1002,12 +616,6 @@ dependencies = [ "ahash", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "hex" version = "0.4.3" @@ -1023,27 +631,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "ibc-controller-package" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfcf94f5691716bfecb45e6bb6a82a5c11a392d501c2a695589c5087671f7c33" -dependencies = [ - "astroport-governance 1.2.0", - "astroport-ibc", - "cosmwasm-schema", - "cosmwasm-std", -] - -[[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 = "itertools" version = "0.10.5" @@ -1097,28 +684,6 @@ version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" -[[package]] -name = "neutron-sdk" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fb513aae0c82b3185228e96664d8312e79c3aa763f6ebdc70cf4b8d513d533" -dependencies = [ - "bech32 0.9.1", - "cosmos-sdk-proto 0.20.0", - "cosmwasm-schema", - "cosmwasm-std", - "prost 0.12.6", - "prost-types 0.12.6", - "protobuf", - "schemars", - "serde", - "serde-json-wasm 1.0.1", - "serde_json", - "speedate", - "tendermint-proto 0.34.1", - "thiserror", -] - [[package]] name = "num-conv" version = "0.1.0" @@ -1157,51 +722,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" -[[package]] -name = "osmosis-std" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e87adf61f03306474ce79ab322d52dfff6b0bcf3aed1e12d8864ac0400dec1bf" -dependencies = [ - "chrono", - "cosmwasm-std", - "osmosis-std-derive", - "prost 0.12.6", - "prost-types 0.12.6", - "schemars", - "serde", - "serde-cw-value", -] - -[[package]] -name = "osmosis-std" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca66dca7e8c9b11b995cd41a44c038134ccca4469894d663d8a9452d6e716241" -dependencies = [ - "chrono", - "cosmwasm-std", - "osmosis-std-derive", - "prost 0.12.6", - "prost-types 0.12.6", - "schemars", - "serde", - "serde-cw-value", -] - -[[package]] -name = "osmosis-std-derive" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5ebdfd1bc8ed04db596e110c6baa9b174b04f6ed1ec22c666ddc5cb3fa91bd7" -dependencies = [ - "itertools 0.10.5", - "proc-macro2", - "prost-types 0.11.9", - "quote", - "syn 1.0.109", -] - [[package]] name = "paste" version = "1.0.15" @@ -1288,35 +808,6 @@ dependencies = [ "prost 0.11.9", ] -[[package]] -name = "prost-types" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" -dependencies = [ - "prost 0.12.6", -] - -[[package]] -name = "protobuf" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58678a64de2fced2bdec6bca052a6716a0efe692d6e3f53d1bda6a1def64cfc0" -dependencies = [ - "once_cell", - "protobuf-support", - "thiserror", -] - -[[package]] -name = "protobuf-support" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1ed294a835b0f30810e13616b1cd34943c6d1e84a8f3b0dcfe466d256c3e7e7" -dependencies = [ - "thiserror", -] - [[package]] name = "quote" version = "1.0.36" @@ -1351,12 +842,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "rustversion" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" - [[package]] name = "ryu" version = "1.0.18" @@ -1416,15 +901,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-cw-value" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75d32da6b8ed758b7d850b6c3c08f1d7df51a4df3cb201296e63e34a78e99d4" -dependencies = [ - "serde", -] - [[package]] name = "serde-json-wasm" version = "0.5.2" @@ -1434,15 +910,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde-json-wasm" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f05da0d153dd4595bdffd5099dc0e9ce425b205ee648eb93437ff7302af8c9a5" -dependencies = [ - "serde", -] - [[package]] name = "serde_bytes" version = "0.11.15" @@ -1519,16 +986,6 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "speedate" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "242f76c50fd18cbf098607090ade73a08d39cfd84ea835f3796a2c855223b19b" -dependencies = [ - "strum", - "strum_macros", -] - [[package]] name = "spki" version = "0.7.3" @@ -1545,28 +1002,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strum" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.68", -] - [[package]] name = "subtle" version = "2.6.1" @@ -1615,64 +1050,13 @@ dependencies = [ "num-derive", "num-traits", "prost 0.11.9", - "prost-types 0.11.9", + "prost-types", "serde", "serde_bytes", "subtle-encoding", "time", ] -[[package]] -name = "tendermint-proto" -version = "0.34.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b797dd3d2beaaee91d2f065e7bdf239dc8d80bba4a183a288bc1279dd5a69a1e" -dependencies = [ - "bytes", - "flex-error", - "num-derive", - "num-traits", - "prost 0.12.6", - "prost-types 0.12.6", - "serde", - "serde_bytes", - "subtle-encoding", - "time", -] - -[[package]] -name = "test-case" -version = "3.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb2550dd13afcd286853192af8601920d959b14c401fcece38071d53bf0768a8" -dependencies = [ - "test-case-macros", -] - -[[package]] -name = "test-case-core" -version = "3.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcb7fd841cd518e279be3d5a3eb0636409487998a4aff22f3de87b81e88384f" -dependencies = [ - "cfg-if", - "proc-macro2", - "quote", - "syn 2.0.68", -] - -[[package]] -name = "test-case-macros" -version = "3.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.68", - "test-case-core", -] - [[package]] name = "thiserror" version = "1.0.61" diff --git a/Cargo.toml b/Cargo.toml index b172c37..9181a52 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,8 @@ resolver = "2" members = [ "packages/*", - "contracts/*" + "contracts/emissions_controller_outpost", + "contracts/voting_escrow", ] [workspace.dependencies] @@ -13,7 +14,7 @@ thiserror = "1.0" itertools = "0.12" cosmwasm-schema = "1.5" cw-utils = "1" -astroport = { git = "https://github.com/astroport-fi/astroport-core", version = "5.3.0" } +astroport = "5.7.0-cw1.0" [profile.release] opt-level = "z" diff --git a/contracts/emissions_controller_outpost/Cargo.toml b/contracts/emissions_controller_outpost/Cargo.toml index 13109a7..e53b415 100644 --- a/contracts/emissions_controller_outpost/Cargo.toml +++ b/contracts/emissions_controller_outpost/Cargo.toml @@ -23,17 +23,6 @@ cw-storage-plus.workspace = true cosmwasm-schema.workspace = true thiserror.workspace = true itertools.workspace = true -astroport-governance = { path = "../../packages/astroport-governance", version = "4.2" } +astroport-governance = { path = "../../packages/astroport-governance", version = "4.2.1-cw1.0" } astroport.workspace = true serde_json = "1" - -[dev-dependencies] -cw-multi-test = "1" -astroport-voting-escrow = { path = "../voting_escrow", version = "1.0.0", features = ["library"] } -astroport-factory = { version = "1.8", features = ["library"] } -astroport-pair = { version = "2.0.1", features = ["library"] } -cw20-base = { version = "1", features = ["library"] } -astroport-incentives = { git = "https://github.com/astroport-fi/astroport-core", version = "1.2.0" } -derivative = "2.2" -osmosis-std = "0.25.0" -anyhow = "1" diff --git a/contracts/emissions_controller_outpost/tests/common/contracts.rs b/contracts/emissions_controller_outpost/tests/common/contracts.rs deleted file mode 100644 index af719ea..0000000 --- a/contracts/emissions_controller_outpost/tests/common/contracts.rs +++ /dev/null @@ -1,92 +0,0 @@ -use cosmwasm_schema::cw_serde; -use cosmwasm_std::{ - DepsMut, Empty, Env, IbcBasicResponse, IbcPacketAckMsg, IbcPacketReceiveMsg, - IbcPacketTimeoutMsg, Response, StdResult, -}; -use cw_multi_test::{Contract, ContractWrapper}; - -use astroport_emissions_controller_outpost::ibc::{ - do_packet_receive, ibc_packet_ack, ibc_packet_timeout, -}; - -pub fn token_contract() -> Box> { - Box::new(ContractWrapper::new_with_empty( - cw20_base::contract::execute, - cw20_base::contract::instantiate, - cw20_base::contract::query, - )) -} - -pub fn pair_contract() -> Box> { - Box::new( - ContractWrapper::new_with_empty( - astroport_pair::contract::execute, - astroport_pair::contract::instantiate, - astroport_pair::contract::query, - ) - .with_reply_empty(astroport_pair::contract::reply), - ) -} - -pub fn vxastro_contract() -> Box> { - Box::new(ContractWrapper::new_with_empty( - astroport_voting_escrow::contract::execute, - astroport_voting_escrow::contract::instantiate, - astroport_voting_escrow::contract::query, - )) -} - -pub fn incentives_contract() -> Box> { - Box::new(ContractWrapper::new_with_empty( - astroport_incentives::execute::execute, - astroport_incentives::instantiate::instantiate, - astroport_incentives::query::query, - )) -} - -pub fn factory_contract() -> Box> { - Box::new( - ContractWrapper::new_with_empty( - astroport_factory::contract::execute, - astroport_factory::contract::instantiate, - astroport_factory::contract::query, - ) - .with_reply_empty(astroport_factory::contract::reply), - ) -} - -#[cw_serde] -pub enum TestSudoMsg { - Ack(IbcPacketAckMsg), - Timeout(IbcPacketTimeoutMsg), - IbcRecv(IbcPacketReceiveMsg), -} - -fn sudo(deps: DepsMut, env: Env, msg: TestSudoMsg) -> StdResult { - match msg { - TestSudoMsg::Ack(packet) => ibc_packet_ack(deps, env, packet), - TestSudoMsg::Timeout(packet) => ibc_packet_timeout(deps, env, packet), - TestSudoMsg::IbcRecv(packet) => do_packet_receive(deps, env, packet).map(|ibc_response| { - IbcBasicResponse::default() - .add_attributes(ibc_response.attributes) - .add_submessages(ibc_response.messages) - }), - } - .map(|ibc_response| { - Response::default() - .add_attributes(ibc_response.attributes) - .add_submessages(ibc_response.messages) - }) -} - -pub fn emissions_controller() -> Box> { - Box::new( - ContractWrapper::new( - astroport_emissions_controller_outpost::execute::execute, - astroport_emissions_controller_outpost::instantiate::instantiate, - astroport_emissions_controller_outpost::query::query, - ) - .with_reply_empty(astroport_emissions_controller_outpost::instantiate::reply) - .with_sudo_empty(sudo), - ) -} diff --git a/contracts/emissions_controller_outpost/tests/common/helper.rs b/contracts/emissions_controller_outpost/tests/common/helper.rs deleted file mode 100644 index b66d7b4..0000000 --- a/contracts/emissions_controller_outpost/tests/common/helper.rs +++ /dev/null @@ -1,521 +0,0 @@ -use astroport::asset::{AssetInfo, PairInfo}; -use astroport::factory::{PairConfig, PairType}; -use astroport::incentives::{InputSchedule, RewardInfo}; -use astroport::token::Logo; -use astroport::{factory, incentives}; -use cosmwasm_std::{ - coin, coins, to_json_binary, Addr, BlockInfo, Coin, Decimal, Empty, IbcAcknowledgement, - IbcEndpoint, IbcPacket, IbcPacketAckMsg, IbcPacketReceiveMsg, IbcPacketTimeoutMsg, - MemoryStorage, StdResult, Timestamp, Uint128, -}; -use cw_multi_test::error::AnyResult; -use cw_multi_test::{ - no_init, App, AppBuilder, AppResponse, BankKeeper, BankSudo, DistributionKeeper, Executor, - FailingModule, GovFailingModule, MockAddressGenerator, MockApiBech32, StakeKeeper, WasmKeeper, -}; -use derivative::Derivative; - -use astroport_governance::assembly::ProposalVoteOption; -use astroport_governance::emissions_controller::consts::{EPOCHS_START, EPOCH_LENGTH}; -use astroport_governance::emissions_controller::msg::{ExecuteMsg, IbcAckResult, VxAstroIbcMsg}; -use astroport_governance::emissions_controller::outpost::{ - OutpostInstantiateMsg, OutpostMsg, RegisteredProposal, -}; -use astroport_governance::voting_escrow::{LockInfoResponse, UpdateMarketingInfo}; -use astroport_governance::{emissions_controller, voting_escrow}; - -use crate::common::contracts::*; -use crate::common::ibc_module::IbcMockModule; -use crate::common::stargate::StargateModule; - -pub type OutpostApp = App< - BankKeeper, - MockApiBech32, - MemoryStorage, - FailingModule, - WasmKeeper, - StakeKeeper, - DistributionKeeper, - IbcMockModule, - GovFailingModule, - StargateModule, ->; - -fn mock_app() -> OutpostApp { - AppBuilder::new() - .with_ibc(IbcMockModule) - .with_api(MockApiBech32::new("osmo")) - .with_wasm(WasmKeeper::new().with_address_generator(MockAddressGenerator)) - .with_stargate(StargateModule) - .with_block(BlockInfo { - height: 1, - time: Timestamp::from_seconds(EPOCHS_START), - chain_id: "cw-multitest-1".to_string(), - }) - .build(no_init) -} - -/// Normalize current timestamp to the beginning of the current epoch (Monday). -pub fn get_epoch_start(timestamp: u64) -> u64 { - let rem = timestamp % EPOCHS_START; - if rem % EPOCH_LENGTH == 0 { - // Hit at the beginning of the current epoch - timestamp - } else { - // Hit somewhere in the middle - EPOCHS_START + rem / EPOCH_LENGTH * EPOCH_LENGTH - } -} - -#[derive(Derivative)] -#[derivative(Debug)] -pub struct ControllerHelper { - #[derivative(Debug = "ignore")] - pub app: OutpostApp, - pub owner: Addr, - pub astro: String, - pub xastro: String, - pub factory: Addr, - pub vxastro: Addr, - pub emission_controller: Addr, - pub incentives: Addr, -} - -impl ControllerHelper { - pub fn new() -> Self { - let mut app = mock_app(); - let owner = app.api().addr_make("owner"); - let astro_denom = "astro"; - let xastro_denom = "xastro"; - - let vxastro_code_id = app.store_code(vxastro_contract()); - let emissions_controller_code_id = app.store_code(emissions_controller()); - let token_code_id = app.store_code(token_contract()); - let xyk_code_id = app.store_code(pair_contract()); - let factory_code_id = app.store_code(factory_contract()); - let incentives_code_id = app.store_code(incentives_contract()); - - let factory = app - .instantiate_contract( - factory_code_id, - owner.clone(), - &factory::InstantiateMsg { - pair_configs: vec![PairConfig { - code_id: xyk_code_id, - pair_type: PairType::Xyk {}, - total_fee_bps: 0, - maker_fee_bps: 0, - is_disabled: false, - is_generator_disabled: false, - permissioned: false, - }], - token_code_id, - fee_address: None, - generator_address: None, - owner: owner.to_string(), - whitelist_code_id: 0, - coin_registry_address: app.api().addr_make("coin_registry").to_string(), - tracker_config: None, - }, - &[], - "label", - None, - ) - .unwrap(); - - let incentives = app - .instantiate_contract( - incentives_code_id, - owner.clone(), - &incentives::InstantiateMsg { - owner: owner.to_string(), - factory: factory.to_string(), - astro_token: AssetInfo::native(astro_denom), - vesting_contract: app.api().addr_make("vesting").to_string(), - incentivization_fee_info: Some(incentives::IncentivizationFeeInfo { - fee_receiver: app.api().addr_make("maker"), - fee: coin(250_000000, astro_denom), - }), - guardian: None, - }, - &[], - "label", - None, - ) - .unwrap(); - - app.execute_contract( - owner.clone(), - factory.clone(), - &factory::ExecuteMsg::UpdateConfig { - token_code_id: None, - fee_address: None, - generator_address: Some(incentives.to_string()), - whitelist_code_id: None, - coin_registry_address: None, - }, - &[], - ) - .unwrap(); - - let emission_controller = app - .instantiate_contract( - emissions_controller_code_id, - owner.clone(), - &OutpostInstantiateMsg { - owner: owner.to_string(), - astro_denom: astro_denom.to_string(), - vxastro_code_id, - vxastro_marketing_info: UpdateMarketingInfo { - project: None, - description: None, - marketing: None, - logo: Logo::Url("".to_string()), - }, - xastro_denom: xastro_denom.to_string(), - factory: factory.to_string(), - hub_emissions_controller: "emissions_controller".to_string(), - ics20_channel: "channel-2".to_string(), - }, - &[], - "label", - None, - ) - .unwrap(); - - let vxastro = app - .wrap() - .query_wasm_smart::( - &emission_controller, - &emissions_controller::outpost::QueryMsg::Config {}, - ) - .unwrap() - .vxastro; - - Self { - app, - owner, - xastro: xastro_denom.to_string(), - astro: astro_denom.to_string(), - factory, - vxastro, - emission_controller, - incentives, - } - } - - pub fn mint_tokens(&mut self, user: &Addr, coins: &[Coin]) -> AnyResult { - self.app.sudo( - BankSudo::Mint { - to_address: user.to_string(), - amount: coins.to_vec(), - } - .into(), - ) - } - - pub fn lock(&mut self, user: &Addr, amount: u128) -> AnyResult { - let funds = coins(amount, &self.xastro); - self.mint_tokens(user, &funds).unwrap(); - self.app.execute_contract( - user.clone(), - self.vxastro.clone(), - &voting_escrow::ExecuteMsg::Lock { receiver: None }, - &funds, - ) - } - - pub fn unlock(&mut self, user: &Addr) -> AnyResult { - self.app.execute_contract( - user.clone(), - self.vxastro.clone(), - &voting_escrow::ExecuteMsg::Unlock {}, - &[], - ) - } - - pub fn user_vp(&self, user: &Addr, timestamp: Option) -> StdResult { - self.app.wrap().query_wasm_smart( - &self.vxastro, - &voting_escrow::QueryMsg::UserVotingPower { - user: user.to_string(), - timestamp, - }, - ) - } - - pub fn create_pair(&mut self, denom1: &str, denom2: &str) -> String { - let asset_infos = vec![AssetInfo::native(denom1), AssetInfo::native(denom2)]; - self.app - .execute_contract( - self.owner.clone(), - self.factory.clone(), - &factory::ExecuteMsg::CreatePair { - pair_type: PairType::Xyk {}, - asset_infos: asset_infos.clone(), - init_params: None, - }, - &[], - ) - .unwrap(); - - self.app - .wrap() - .query_wasm_smart::(&self.factory, &factory::QueryMsg::Pair { asset_infos }) - .unwrap() - .liquidity_token - } - - pub fn vote(&mut self, user: &Addr, votes: &[(String, Decimal)]) -> AnyResult { - self.app.execute_contract( - user.clone(), - self.emission_controller.clone(), - &ExecuteMsg::::Vote { - votes: votes.to_vec(), - }, - &[], - ) - } - - pub fn set_emissions( - &mut self, - sender: &Addr, - schedules: &[(&str, InputSchedule)], - funds: &[Coin], - ) -> AnyResult { - self.app.execute_contract( - sender.clone(), - self.emission_controller.clone(), - &emissions_controller::msg::ExecuteMsg::::Custom( - OutpostMsg::SetEmissions { - schedules: schedules - .iter() - .map(|(pool, schedule)| (pool.to_string(), schedule.clone())) - .collect(), - }, - ), - funds, - ) - } - - pub fn permissioned_set_emissions( - &mut self, - user: &Addr, - schedules: &[(&str, InputSchedule)], - funds: &[Coin], - ) -> AnyResult { - self.app.execute_contract( - user.clone(), - self.emission_controller.clone(), - &emissions_controller::msg::ExecuteMsg::::Custom( - OutpostMsg::PermissionedSetEmissions { - schedules: schedules - .iter() - .map(|(pool, schedule)| (pool.to_string(), schedule.clone())) - .collect(), - }, - ), - funds, - ) - } - - pub fn query_config(&self) -> StdResult { - self.app.wrap().query_wasm_smart( - &self.emission_controller, - &emissions_controller::outpost::QueryMsg::Config {}, - ) - } - - pub fn timetravel(&mut self, time: u64) { - self.app.update_block(|block| { - block.time = block.time.plus_seconds(time); - }) - } - - pub fn withdraw(&mut self, user: &Addr) -> AnyResult { - self.app.execute_contract( - user.clone(), - self.vxastro.clone(), - &voting_escrow::ExecuteMsg::Withdraw {}, - &[], - ) - } - - pub fn query_rewards(&self, pool: impl Into) -> StdResult> { - self.app - .wrap() - .query_wasm_smart::( - &self.incentives, - &incentives::QueryMsg::PoolInfo { - lp_token: pool.into(), - }, - ) - .map(|x| x.rewards) - } - - pub fn lock_info(&self, user: &Addr) -> StdResult { - self.app.wrap().query_wasm_smart( - &self.vxastro, - &voting_escrow::QueryMsg::LockInfo { - user: user.to_string(), - }, - ) - } - - pub fn refresh_user(&mut self, user: &Addr) -> AnyResult { - self.app.execute_contract( - user.clone(), - self.emission_controller.clone(), - &ExecuteMsg::::RefreshUserVotes {}, - &[], - ) - } - - pub fn query_ibc_status( - &self, - user: &Addr, - ) -> StdResult { - self.app.wrap().query_wasm_smart( - &self.emission_controller, - &emissions_controller::outpost::QueryMsg::QueryUserIbcStatus { - user: user.to_string(), - }, - ) - } - - pub fn set_voting_channel(&mut self) { - self.update_config( - &self.owner.clone(), - Some("channel-1".to_string()), - None, - None, - ) - .unwrap(); - } - - pub fn mock_ibc_ack( - &mut self, - ibc_msg: VxAstroIbcMsg, - error: Option<&str>, - ) -> AnyResult { - let ack_result = if let Some(err) = error { - IbcAckResult::Error(err.to_string()) - } else { - IbcAckResult::Ok(b"null".into()) - }; - let packet = IbcPacketAckMsg::new( - IbcAcknowledgement::encode_json(&ack_result).unwrap(), - IbcPacket::new( - to_json_binary(&ibc_msg).unwrap(), - IbcEndpoint { - port_id: "".to_string(), - channel_id: "".to_string(), - }, - IbcEndpoint { - port_id: "".to_string(), - channel_id: "".to_string(), - }, - 0, - Timestamp::from_seconds(0).into(), - ), - Addr::unchecked("relayer"), - ); - self.app - .wasm_sudo(self.emission_controller.clone(), &TestSudoMsg::Ack(packet)) - } - - pub fn mock_ibc_timeout(&mut self, ibc_msg: VxAstroIbcMsg) -> AnyResult { - let packet = IbcPacketTimeoutMsg::new( - IbcPacket::new( - to_json_binary(&ibc_msg).unwrap(), - IbcEndpoint { - port_id: "".to_string(), - channel_id: "".to_string(), - }, - IbcEndpoint { - port_id: "".to_string(), - channel_id: "".to_string(), - }, - 0, - Timestamp::from_seconds(0).into(), - ), - Addr::unchecked("relayer"), - ); - self.app.wasm_sudo( - self.emission_controller.clone(), - &TestSudoMsg::Timeout(packet), - ) - } - - pub fn mock_packet_receive( - &mut self, - ibc_msg: VxAstroIbcMsg, - dst_channel: &str, - ) -> AnyResult { - let packet = IbcPacketReceiveMsg::new( - IbcPacket::new( - to_json_binary(&ibc_msg).unwrap(), - IbcEndpoint { - port_id: "".to_string(), - channel_id: "".to_string(), - }, - IbcEndpoint { - port_id: "".to_string(), - channel_id: dst_channel.to_string(), - }, - 0, - Timestamp::from_seconds(0).into(), - ), - Addr::unchecked("relayer"), - ); - self.app.wasm_sudo( - self.emission_controller.clone(), - &TestSudoMsg::IbcRecv(packet), - ) - } - - pub fn update_config( - &mut self, - sender: &Addr, - voting_ibc_channel: Option, - hub_emissions_controller: Option, - ics20_channel: Option, - ) -> AnyResult { - self.app.execute_contract( - sender.clone(), - self.emission_controller.clone(), - &ExecuteMsg::Custom(OutpostMsg::UpdateConfig { - voting_ibc_channel, - hub_emissions_controller, - ics20_channel, - }), - &[], - ) - } - - pub fn cast_vote(&mut self, user: &Addr, proposal_id: u64) -> AnyResult { - self.app.execute_contract( - user.clone(), - self.emission_controller.clone(), - &ExecuteMsg::Custom(OutpostMsg::CastVote { - proposal_id, - vote: ProposalVoteOption::For, - }), - &[], - ) - } - - pub fn is_prop_registered(&self, proposal_id: u64) -> bool { - self.app - .wrap() - .query_wasm_smart::>( - &self.emission_controller, - &emissions_controller::outpost::QueryMsg::QueryRegisteredProposals { - limit: Some(100), - start_after: None, - }, - ) - .map(|proposals| proposals.iter().any(|p| p.id == proposal_id)) - .unwrap() - } -} diff --git a/contracts/emissions_controller_outpost/tests/common/ibc_module.rs b/contracts/emissions_controller_outpost/tests/common/ibc_module.rs deleted file mode 100644 index 1f2e01c..0000000 --- a/contracts/emissions_controller_outpost/tests/common/ibc_module.rs +++ /dev/null @@ -1,171 +0,0 @@ -use cosmwasm_schema::serde::de::DeserializeOwned; -use cosmwasm_std::{ - attr, from_json, to_json_binary, Addr, Api, BankMsg, Binary, BlockInfo, ChannelResponse, - ContractResult, CustomMsg, CustomQuery, Empty, Event, IbcChannel, IbcEndpoint, IbcMsg, - IbcOrder, IbcQuery, Querier, QuerierResult, QuerierWrapper, QueryRequest, Storage, SystemError, - SystemResult, -}; -use cw_multi_test::error::{anyhow, AnyResult}; -use cw_multi_test::{AppResponse, CosmosRouter, Ibc, Module}; - -use astroport_governance::utils::check_contract_supports_channel; - -pub struct RouterQuerier<'a, ExecC, QueryC> { - router: &'a dyn CosmosRouter, - api: &'a dyn Api, - storage: &'a dyn Storage, - block_info: &'a BlockInfo, -} - -impl<'a, ExecC, QueryC> RouterQuerier<'a, ExecC, QueryC> { - pub fn new( - router: &'a dyn CosmosRouter, - api: &'a dyn Api, - storage: &'a dyn Storage, - block_info: &'a BlockInfo, - ) -> Self { - Self { - router, - api, - storage, - block_info, - } - } -} - -impl<'a, ExecC, QueryC> Querier for RouterQuerier<'a, ExecC, QueryC> -where - ExecC: CustomMsg + DeserializeOwned + 'static, - QueryC: CustomQuery + DeserializeOwned + 'static, -{ - fn raw_query(&self, bin_request: &[u8]) -> QuerierResult { - let request: QueryRequest = match from_json(bin_request) { - Ok(v) => v, - Err(e) => { - return SystemResult::Err(SystemError::InvalidRequest { - error: format!("Parsing query request: {}", e), - request: bin_request.into(), - }) - } - }; - let contract_result: ContractResult = self - .router - .query(self.api, self.storage, self.block_info, request) - .into(); - SystemResult::Ok(contract_result) - } -} - -pub struct IbcMockModule; - -impl Ibc for IbcMockModule {} - -impl Module for IbcMockModule { - type ExecT = IbcMsg; - type QueryT = IbcQuery; - type SudoT = Empty; - - fn execute( - &self, - api: &dyn Api, - storage: &mut dyn Storage, - router: &dyn CosmosRouter, - block: &BlockInfo, - sender: Addr, - msg: Self::ExecT, - ) -> AnyResult - where - ExecC: CustomMsg + DeserializeOwned + 'static, - QueryC: CustomQuery + DeserializeOwned + 'static, - { - match msg { - IbcMsg::SendPacket { channel_id, .. } => { - let querier = RouterQuerier::new(router, api, storage, block); - let querier = QuerierWrapper::new(&querier); - check_contract_supports_channel(querier, &sender, &channel_id) - .map(|_| AppResponse::default()) - .map_err(Into::into) - } - IbcMsg::Transfer { - channel_id, - to_address, - amount, - timeout, - } => { - // Very simplified IBC transfer processing given cosmwasm-multitest constraints - let ibc_event = Event::new("transfer").add_attributes([ - attr( - "packet_timeout_timestamp", - timeout.timestamp().unwrap().seconds().to_string(), - ), - attr("packet_src_port", "transfer"), - attr("packet_src_channel", channel_id), - attr("to_address", to_address), - attr("amount", amount.to_string()), - ]); - let mut response = router.execute( - api, - storage, - block, - sender.clone(), - BankMsg::Burn { - amount: vec![amount], - } - .into(), - )?; - response.events.push(ibc_event); - Ok(response) - } - _ => unimplemented!("Execute {msg:?} not supported"), - } - } - - fn query( - &self, - _api: &dyn Api, - _storage: &dyn Storage, - _querier: &dyn Querier, - _block: &BlockInfo, - request: Self::QueryT, - ) -> AnyResult { - match &request { - IbcQuery::Channel { channel_id, .. } if channel_id == "channel-1" => { - to_json_binary(&ChannelResponse { - channel: Some(IbcChannel::new( - IbcEndpoint { - port_id: "".to_string(), - channel_id: "channel-1".to_string(), - }, - IbcEndpoint { - port_id: "".to_string(), - channel_id: "".to_string(), - }, - IbcOrder::Unordered, - "", - "", - )), - }) - .map_err(Into::into) - } - IbcQuery::Channel { .. } => { - to_json_binary(&ChannelResponse { channel: None }).map_err(Into::into) - } - _ => Err(anyhow!("Query {request:?} not supported")), - } - } - - fn sudo( - &self, - _api: &dyn Api, - _storage: &mut dyn Storage, - _router: &dyn CosmosRouter, - _block: &BlockInfo, - _msg: Self::SudoT, - ) -> AnyResult - where - ExecC: CustomMsg + DeserializeOwned + 'static, - QueryC: CustomQuery + DeserializeOwned + 'static, - { - unimplemented!() - } -} diff --git a/contracts/emissions_controller_outpost/tests/common/mod.rs b/contracts/emissions_controller_outpost/tests/common/mod.rs deleted file mode 100644 index 7ec7ef5..0000000 --- a/contracts/emissions_controller_outpost/tests/common/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub mod contracts; -pub mod helper; -pub mod ibc_module; -pub mod stargate; diff --git a/contracts/emissions_controller_outpost/tests/common/stargate.rs b/contracts/emissions_controller_outpost/tests/common/stargate.rs deleted file mode 100644 index ae9e99a..0000000 --- a/contracts/emissions_controller_outpost/tests/common/stargate.rs +++ /dev/null @@ -1,121 +0,0 @@ -use anyhow::anyhow; -use cosmwasm_schema::serde::de::DeserializeOwned; -use cosmwasm_std::{ - coin, Addr, Api, BankMsg, Binary, BlockInfo, CustomMsg, CustomQuery, Empty, Querier, Storage, - SubMsgResponse, -}; -use cw_multi_test::error::AnyResult; -use cw_multi_test::{ - AppResponse, BankSudo, CosmosRouter, Module, Stargate, StargateMsg, StargateQuery, -}; -use osmosis_std::types::osmosis::tokenfactory::v1beta1::{ - MsgBurn, MsgCreateDenom, MsgCreateDenomResponse, MsgMint, MsgSetBeforeSendHook, - MsgSetDenomMetadata, -}; - -#[derive(Default)] -pub struct StargateModule; - -impl Stargate for StargateModule {} - -impl Module for StargateModule { - type ExecT = StargateMsg; - type QueryT = StargateQuery; - type SudoT = Empty; - - fn execute( - &self, - api: &dyn Api, - storage: &mut dyn Storage, - router: &dyn CosmosRouter, - block: &BlockInfo, - sender: Addr, - msg: Self::ExecT, - ) -> AnyResult - where - ExecC: CustomMsg + DeserializeOwned + 'static, - QueryC: CustomQuery + DeserializeOwned + 'static, - { - match msg.type_url.as_str() { - MsgCreateDenom::TYPE_URL => { - let tf_msg: MsgCreateDenom = msg.value.try_into()?; - let submsg_response = SubMsgResponse { - events: vec![], - data: Some( - MsgCreateDenomResponse { - new_token_denom: format!( - "factory/{}/{}", - tf_msg.sender, tf_msg.subdenom - ), - } - .into(), - ), - }; - Ok(submsg_response.into()) - } - MsgMint::TYPE_URL => { - let tf_msg: MsgMint = msg.value.try_into()?; - let mint_coins = tf_msg - .amount - .expect("Empty amount in tokenfactory MsgMint!"); - let cw_coin = coin(mint_coins.amount.parse()?, mint_coins.denom); - let bank_sudo = BankSudo::Mint { - to_address: tf_msg.mint_to_address.clone(), - amount: vec![cw_coin.clone()], - }; - - router.sudo(api, storage, block, bank_sudo.into()) - } - MsgBurn::TYPE_URL => { - let tf_msg: MsgBurn = msg.value.try_into()?; - let burn_coins = tf_msg - .amount - .expect("Empty amount in tokenfactory MsgBurn!"); - let cw_coin = coin(burn_coins.amount.parse()?, burn_coins.denom); - let burn_msg = BankMsg::Burn { - amount: vec![cw_coin.clone()], - }; - - router.execute( - api, - storage, - block, - Addr::unchecked(&tf_msg.sender), - burn_msg.into(), - ) - } - MsgSetDenomMetadata::TYPE_URL => Ok(AppResponse::default()), - MsgSetBeforeSendHook::TYPE_URL => Ok(AppResponse::default()), - _ => Err(anyhow!( - "Unexpected exec msg {} from {sender:?}", - msg.type_url - )), - } - } - - fn query( - &self, - _api: &dyn Api, - _storage: &dyn Storage, - _querier: &dyn Querier, - _block: &BlockInfo, - _request: Self::QueryT, - ) -> AnyResult { - unimplemented!("Stargate queries are not implemented") - } - - fn sudo( - &self, - _api: &dyn Api, - _storage: &mut dyn Storage, - _router: &dyn CosmosRouter, - _block: &BlockInfo, - _msg: Self::SudoT, - ) -> AnyResult - where - ExecC: CustomMsg + DeserializeOwned + 'static, - QueryC: CustomQuery + DeserializeOwned + 'static, - { - unimplemented!("Stargate sudo is not implemented") - } -} diff --git a/contracts/emissions_controller_outpost/tests/emissions_controller_outpost_integration.rs b/contracts/emissions_controller_outpost/tests/emissions_controller_outpost_integration.rs deleted file mode 100644 index 90e1aa2..0000000 --- a/contracts/emissions_controller_outpost/tests/emissions_controller_outpost_integration.rs +++ /dev/null @@ -1,870 +0,0 @@ -use astroport::asset::{Asset, AssetInfo}; -use astroport::incentives::{InputSchedule, RewardType}; -use cosmwasm_std::{attr, coin, coins, Decimal, Decimal256, Empty, Event}; -use cw_multi_test::Executor; -use cw_utils::PaymentError; - -use astroport_emissions_controller_outpost::error::ContractError; -use astroport_governance::assembly::ProposalVoteOption; -use astroport_governance::emissions_controller::consts::{EPOCH_LENGTH, IBC_TIMEOUT}; -use astroport_governance::emissions_controller::msg::{ExecuteMsg, VxAstroIbcMsg}; -use astroport_governance::emissions_controller::outpost::UserIbcError; -use astroport_governance::voting_escrow::LockInfoResponse; -use astroport_governance::{emissions_controller, voting_escrow}; -use astroport_voting_escrow::state::UNLOCK_PERIOD; - -use crate::common::helper::{get_epoch_start, ControllerHelper}; - -mod common; - -#[test] -fn set_emissions_test() { - let mut helper = ControllerHelper::new(); - let astro = helper.astro.clone(); - - let pool1 = helper.create_pair("token1", "token2"); - let user = helper.app.api().addr_make("permissionless"); - - // Incentivizing with any token other than astro should fail - let funds = [coin(100_000000, "token1")]; - helper.mint_tokens(&user, &funds).unwrap(); - let schedules = [( - pool1.as_str(), - InputSchedule { - reward: Asset::native("token1", 100_000000u64), - duration_periods: 1, - }, - )]; - let err = helper.set_emissions(&user, &schedules, &funds).unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::PaymentError(PaymentError::MissingDenom("astro".to_string())) - ); - - // Trying to bypass payment error by sending astro. - // Still should fail due to incentive fee absence - let funds = [coin(100_000000, &astro)]; - helper.mint_tokens(&user, &funds).unwrap(); - let schedules = [( - pool1.as_str(), - InputSchedule { - reward: Asset::native("token1", 100_000000u64), - duration_periods: 1, - }, - )]; - let err = helper.set_emissions(&user, &schedules, &funds).unwrap_err(); - assert_eq!( - err.downcast::() - .unwrap(), - astroport_incentives::error::ContractError::IncentivizationFeeExpected { - fee: coin(250_000000, &astro).to_string(), - lp_token: pool1.to_string(), - new_reward_token: "token1".to_string(), - } - ); - - let mut schedules = vec![ - ( - pool1.as_str(), - InputSchedule { - reward: Asset::native(&astro, 100_000000u64), - duration_periods: 1, - }, - ), - ( - "random", // <--- invalid pool - InputSchedule { - reward: Asset::native(&astro, 100_000000u64), - duration_periods: 1, - }, - ), - ]; - - // Try to incentivize with wrong funds - let funds = coins(100_000000, &astro); - helper.mint_tokens(&user, &funds).unwrap(); - let err = helper - .set_emissions(&user, &schedules, &coins(100_000000, &astro)) - .unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::InvalidAstroAmount { - expected: 200_000000u128.into(), - actual: 100_000000u128.into() - } - ); - - // Try schedule with <1 uASTRO reward per second - let invalid_schedules = [( - pool1.as_str(), - InputSchedule { - reward: Asset::native(&astro, 1000u64), - duration_periods: 1, - }, - )]; - let err = helper - .set_emissions(&user, &invalid_schedules, &coins(1000, &astro)) - .unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::NoValidSchedules {} - ); - - // However, if we mix this invalid schedule with valid ones, it will be filtered out - schedules.push(( - pool1.as_str(), - InputSchedule { - reward: Asset::native(&astro, 1000u64), - duration_periods: 1, - }, - )); - let funds = coins(200_001000, &astro); - helper.mint_tokens(&user, &funds).unwrap(); - - let resp = helper.set_emissions(&user, &schedules, &funds).unwrap(); - // Assert mocked ibc event - let has_event = resp.has_event( - &Event::new("transfer").add_attributes([ - attr( - "packet_timeout_timestamp", - helper - .app - .block_info() - .time - .plus_seconds(IBC_TIMEOUT) - .seconds() - .to_string(), - ), - attr("packet_src_port", "transfer"), - attr("packet_src_channel", "channel-2"), - attr("to_address", "emissions_controller"), - attr("amount", coin(100_001000, &astro).to_string()), - ]), - ); - assert!( - has_event, - "Expected IBC transfer event. Actual {:?}", - resp.events - ); - - // Check schedule in the incentives contract - let expected_rps = Decimal256::from_ratio(100_000000u64, EPOCH_LENGTH); - let rewards = helper.query_rewards(&pool1).unwrap(); - let epoch_start = get_epoch_start(helper.app.block_info().time.seconds()); - assert_eq!(rewards.len(), 1); - assert_eq!(rewards[0].rps, expected_rps); - assert_eq!( - rewards[0].reward, - RewardType::Ext { - info: AssetInfo::native(&astro), - next_update_ts: epoch_start + EPOCH_LENGTH - } - ); -} - -#[test] -fn permissioned_set_emissions_test() { - let mut helper = ControllerHelper::new(); - let astro = helper.astro.clone(); - let owner = helper.owner.clone(); - - let pool1 = helper.create_pair("token1", "token2"); - - // Unauthorized check - let random = helper.app.api().addr_make("random"); - let err = helper - .permissioned_set_emissions(&random, &[], &[]) - .unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::Unauthorized {} - ); - - // Incentivizing with any token other than astro should fail due to fee absence - let funds = [coin(100_000000, &astro)]; - helper.mint_tokens(&owner, &funds).unwrap(); - let schedules = [( - pool1.as_str(), - InputSchedule { - reward: Asset::native("token1", 100_000000u64), - duration_periods: 1, - }, - )]; - let err = helper - .permissioned_set_emissions(&owner, &schedules, &funds) - .unwrap_err(); - assert_eq!( - err.downcast::() - .unwrap(), - astroport_incentives::error::ContractError::IncentivizationFeeExpected { - fee: coin(250_000000, &astro).to_string(), - lp_token: pool1.to_string(), - new_reward_token: "token1".to_string(), - } - ); - - let schedules = [ - ( - pool1.as_str(), - InputSchedule { - reward: Asset::native(&astro, 100_000000u64), - duration_periods: 1, - }, - ), - ( - "random", // <--- invalid pool - InputSchedule { - reward: Asset::native(&astro, 100_000000u64), - duration_periods: 1, - }, - ), - ]; - - // Try to incentivize with zero funds in balance. - // Error happens on dispatch from emissions controller to incentives contract - let err = helper - .permissioned_set_emissions(&owner, &schedules, &[]) - .unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::InvalidAstroAmount { - expected: 200_000000u128.into(), - actual: 0u128.into() - } - ); - - // Mint funds to the emissions controller - let funds = coins(200_000000, &astro); - helper - .mint_tokens(&helper.emission_controller.clone(), &funds) - .unwrap(); - - let resp = helper - .permissioned_set_emissions(&owner, &schedules, &[]) - .unwrap(); - // Assert mocked ibc event - let has_event = resp.has_event( - &Event::new("transfer").add_attributes([ - attr( - "packet_timeout_timestamp", - helper - .app - .block_info() - .time - .plus_seconds(IBC_TIMEOUT) - .seconds() - .to_string(), - ), - attr("packet_src_port", "transfer"), - attr("packet_src_channel", "channel-2"), - attr("to_address", "emissions_controller"), - attr("amount", coin(100_000000, &astro).to_string()), - ]), - ); - assert!( - has_event, - "Expected IBC transfer event. Actual {:?}", - resp.events - ); - - // Check schedule in the incentives contract - let expected_rps = Decimal256::from_ratio(100_000000u64, EPOCH_LENGTH); - let rewards = helper.query_rewards(&pool1).unwrap(); - let epoch_start = get_epoch_start(helper.app.block_info().time.seconds()); - assert_eq!(rewards.len(), 1); - assert_eq!(rewards[0].rps, expected_rps); - assert_eq!( - rewards[0].reward, - RewardType::Ext { - info: AssetInfo::native(&astro), - next_update_ts: epoch_start + EPOCH_LENGTH - } - ); -} - -#[test] -fn test_voting() { - let mut helper = ControllerHelper::new(); - - let user = helper.app.api().addr_make("user"); - - let err = helper - .vote( - &user, - &[ - ("pool1".to_string(), Decimal::percent(1)), - ("pool1".to_string(), Decimal::percent(1)), - ], - ) - .unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::DuplicatedVotes {} - ); - - let err = helper - .vote( - &user, - &[ - ("pool1".to_string(), Decimal::percent(1)), - ("pool2".to_string(), Decimal::percent(1)), - ("pool3".to_string(), Decimal::percent(1)), - ("pool4".to_string(), Decimal::percent(1)), - ("pool5".to_string(), Decimal::percent(1)), - ("pool6".to_string(), Decimal::percent(1)), - ], - ) - .unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::ExceededMaxPoolsToVote {} - ); - - let err = helper - .vote(&user, &[("pool1".to_string(), Decimal::percent(1))]) - .unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::ZeroVotingPower {} - ); - - let err = helper - .vote( - &user, - &[ - ("pool1".to_string(), Decimal::one()), - ("pool2".to_string(), Decimal::one()), - ], - ) - .unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::InvalidTotalWeight {} - ); - - // Until voting channel set by the owner, any vxASTRO interactions should fail - let err = helper.lock(&user, 1000u64.into()).unwrap_err(); - assert_eq!( - err.root_cause().to_string(), - "Generic error: The contract does not have channel " - ); - - helper.set_voting_channel(); - helper.lock(&user, 1000u64.into()).unwrap(); - - // Can't lock more until the hub acknowledges a previous message - let err = helper.lock(&user, 1000u64.into()).unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::PendingUser(user.to_string()) - ); - - // Mock ibc ack - helper - .mock_ibc_ack( - VxAstroIbcMsg::UpdateUserVotes { - voter: user.to_string(), - voting_power: Default::default(), - total_voting_power: Default::default(), - is_unlock: false, - }, - None, - ) - .unwrap(); - - helper - .vote(&user, &[("pool1".to_string(), Decimal::one())]) - .unwrap(); - - // Cant do anything until the hub acknowledges the vote - let err = helper - .vote(&user, &[("pool1".to_string(), Decimal::one())]) - .unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::PendingUser(user.to_string()) - ); - let err = helper.unlock(&user).unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::PendingUser(user.to_string()) - ); - let err = helper.refresh_user(&user).unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::PendingUser(user.to_string()) - ); - - // Time out IBC packet - let mock_packet = VxAstroIbcMsg::EmissionsVote { - voter: user.to_string(), - voting_power: Default::default(), - total_voting_power: Default::default(), - votes: Default::default(), - }; - helper.mock_ibc_timeout(mock_packet.clone()).unwrap(); - - let ibc_status = helper.query_ibc_status(&user).unwrap(); - assert_eq!(ibc_status.pending_msg, None); - assert_eq!( - ibc_status.error, - Some(UserIbcError { - msg: mock_packet, - err: "IBC packet timeout".to_string() - }) - ); - - helper - .vote(&user, &[("pool1".to_string(), Decimal::one())]) - .unwrap(); - - // Refreshing user with 0 voting power should fail - let random = helper.app.api().addr_make("random"); - let err = helper.refresh_user(&random).unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::ZeroVotingPower {} - ); - - helper - .mock_ibc_ack( - VxAstroIbcMsg::EmissionsVote { - voter: user.to_string(), - voting_power: Default::default(), - total_voting_power: Default::default(), - votes: Default::default(), - }, - None, - ) - .unwrap(); - - // Check failed unlock - - helper.unlock(&user).unwrap(); - // Check user VP became 0 - let user_vp = helper.user_vp(&user, None).unwrap(); - assert_eq!(user_vp.u128(), 0); - - let mock_packet = VxAstroIbcMsg::UpdateUserVotes { - voter: user.to_string(), - voting_power: Default::default(), - total_voting_power: Default::default(), - is_unlock: true, - }; - helper - .mock_ibc_ack(mock_packet.clone(), Some("error")) - .unwrap(); - let ibc_status = helper.query_ibc_status(&user).unwrap(); - assert_eq!(ibc_status.pending_msg, None); - assert_eq!( - ibc_status.error, - Some(UserIbcError { - msg: mock_packet, - err: "error".to_string() - }) - ); - let lock_info = helper.lock_info(&user).unwrap(); - assert_eq!( - lock_info, - LockInfoResponse { - amount: 1000u128.into(), - unlock_status: None, - } - ); - // Ensure user VP was recovered - let user_vp = helper.user_vp(&user, None).unwrap(); - assert_eq!(user_vp.u128(), 1000); - - // Ensure nobody but vxASTRO can call UpdateUserVotes - let err = helper - .app - .execute_contract( - user.clone(), - helper.emission_controller.clone(), - &ExecuteMsg::::UpdateUserVotes { - user: user.to_string(), - is_unlock: true, - }, - &[], - ) - .unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::Unauthorized {} - ); -} - -#[test] -fn test_privileged_list_disabled() { - let mut helper = ControllerHelper::new(); - let owner = helper.owner.clone(); - let user = helper.app.api().addr_make("user"); - - // Must fail to deserialize outpost controller Config into Hub's controller Config - helper - .app - .execute_contract( - owner.clone(), - helper.vxastro.clone(), - &voting_escrow::ExecuteMsg::SetPrivilegedList { - list: vec![user.to_string()], - }, - &[], - ) - .unwrap_err(); -} - -#[test] -fn test_unlock_and_withdraw() { - let mut helper = ControllerHelper::new(); - let user = helper.app.api().addr_make("user"); - - helper.set_voting_channel(); - helper.lock(&user, 1000u64.into()).unwrap(); - - // Mock ibc ack - helper - .mock_ibc_ack( - VxAstroIbcMsg::UpdateUserVotes { - voter: user.to_string(), - voting_power: Default::default(), - total_voting_power: Default::default(), - is_unlock: false, - }, - None, - ) - .unwrap(); - - helper.unlock(&user).unwrap(); - helper.timetravel(UNLOCK_PERIOD); - - let err = helper.withdraw(&user).unwrap_err(); - assert_eq!( - err.downcast::() - .unwrap(), - astroport_voting_escrow::error::ContractError::HubNotConfirmed {} - ); - - // Mock hub confirmation - helper - .mock_ibc_ack( - VxAstroIbcMsg::UpdateUserVotes { - voter: user.to_string(), - voting_power: Default::default(), - total_voting_power: Default::default(), - is_unlock: true, - }, - None, - ) - .unwrap(); - - helper.withdraw(&user).unwrap(); - let user_bal = helper - .app - .wrap() - .query_balance(&user, &helper.xastro) - .unwrap() - .amount - .u128(); - assert_eq!(user_bal, 1000); -} - -#[test] -fn test_interchain_governance() { - let mut helper = ControllerHelper::new(); - helper.set_voting_channel(); - - let user = helper.app.api().addr_make("user"); - - // Proposal is not registered - helper.cast_vote(&user, 1).unwrap_err(); - - let now = helper.app.block_info().time.seconds(); - - let err = helper - .mock_packet_receive( - VxAstroIbcMsg::RegisterProposal { - proposal_id: 1, - start_time: now - 10, - }, - "channel-100", - ) - .unwrap_err(); - assert_eq!( - err.root_cause().to_string(), - "Generic error: Invalid channel" - ); - - helper - .mock_packet_receive( - VxAstroIbcMsg::RegisterProposal { - proposal_id: 1, - start_time: now, - }, - "channel-1", - ) - .unwrap(); - - assert!( - helper.is_prop_registered(1), - "Proposal should be registered" - ); - - let err = helper - .mock_packet_receive( - VxAstroIbcMsg::RegisterProposal { - proposal_id: 1, - start_time: now, - }, - "channel-1", - ) - .unwrap_err(); - assert_eq!( - err.root_cause().to_string(), - "Generic error: Proposal already registered" - ); - - let err = helper.cast_vote(&user, 1).unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::ZeroVotingPower {} - ); - - helper.lock(&user, 1000u64.into()).unwrap(); - - // User locked after proposal registration. Still zero voting power - let err = helper.cast_vote(&user, 1).unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::ZeroVotingPower {} - ); - - helper.timetravel(100); - - let now = helper.app.block_info().time.seconds(); - - helper - .mock_packet_receive( - VxAstroIbcMsg::RegisterProposal { - proposal_id: 2, - start_time: now, - }, - "channel-1", - ) - .unwrap(); - - let err = helper.cast_vote(&user, 2).unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::PendingUser(user.to_string()) - ); - - // Mock ibc ack - helper - .mock_ibc_ack( - VxAstroIbcMsg::UpdateUserVotes { - voter: user.to_string(), - voting_power: Default::default(), - total_voting_power: Default::default(), - is_unlock: false, - }, - None, - ) - .unwrap(); - - helper.cast_vote(&user, 2).unwrap(); - - // Timeout voting packet - helper - .mock_ibc_timeout(VxAstroIbcMsg::GovernanceVote { - voter: user.to_string(), - voting_power: Default::default(), - total_voting_power: Default::default(), - proposal_id: 2, - vote: ProposalVoteOption::For, - }) - .unwrap(); - - helper.cast_vote(&user, 2).unwrap(); - - // Mock ack - helper - .mock_ibc_ack( - VxAstroIbcMsg::GovernanceVote { - voter: user.to_string(), - voting_power: Default::default(), - total_voting_power: Default::default(), - proposal_id: 2, - vote: ProposalVoteOption::For, - }, - None, - ) - .unwrap(); - - // Can't vote again - let err = helper.cast_vote(&user, 2).unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::AlreadyVoted {} - ); - - let voters = helper - .app - .wrap() - .query_wasm_smart::>( - &helper.emission_controller, - &emissions_controller::outpost::QueryMsg::QueryProposalVoters { - proposal_id: 2, - limit: Some(100), - start_after: None, - }, - ) - .unwrap(); - assert_eq!(voters, vec![user.to_string()]); -} - -#[test] -fn test_update_config() { - let mut helper = ControllerHelper::new(); - let owner = helper.owner.clone(); - - // Unauthorized check - let random = helper.app.api().addr_make("random"); - let err = helper.update_config(&random, None, None, None).unwrap_err(); - assert_eq!( - err.downcast::().unwrap(), - ContractError::Unauthorized {} - ); - - let err = helper - .update_config(&owner, Some("channel-100".to_string()), None, None) - .unwrap_err(); - assert_eq!( - err.root_cause().to_string(), - "Generic error: The contract does not have channel channel-100" - ); - - helper - .update_config( - &owner, - Some("channel-1".to_string()), - Some("hub_emissions_controller".to_string()), - Some("channel-10".to_string()), - ) - .unwrap(); - let config = helper.query_config().unwrap(); - assert_eq!(config.voting_ibc_channel, "channel-1"); - assert_eq!(config.hub_emissions_controller, "hub_emissions_controller"); - assert_eq!(config.ics20_channel, "channel-10"); -} - -#[test] -fn test_change_ownership() { - let mut helper = ControllerHelper::new(); - - let new_owner = helper.app.api().addr_make("new_owner"); - - // New owner - let msg = ExecuteMsg::::ProposeNewOwner { - new_owner: new_owner.to_string(), - expires_in: 100, // seconds - }; - - // Unauthorized check - let err = helper - .app - .execute_contract( - helper.app.api().addr_make("not_owner"), - helper.emission_controller.clone(), - &msg, - &[], - ) - .unwrap_err(); - assert_eq!(err.root_cause().to_string(), "Generic error: Unauthorized"); - - // Claim before proposal - let err = helper - .app - .execute_contract( - new_owner.clone(), - helper.emission_controller.clone(), - &ExecuteMsg::::ClaimOwnership {}, - &[], - ) - .unwrap_err(); - assert_eq!( - err.root_cause().to_string(), - "Generic error: Ownership proposal not found" - ); - - // Propose a new owner - helper - .app - .execute_contract( - helper.owner.clone(), - helper.emission_controller.clone(), - &msg, - &[], - ) - .unwrap(); - - // Claim from invalid addr - let err = helper - .app - .execute_contract( - helper.app.api().addr_make("invalid_addr"), - helper.emission_controller.clone(), - &ExecuteMsg::::ClaimOwnership {}, - &[], - ) - .unwrap_err(); - assert_eq!(err.root_cause().to_string(), "Generic error: Unauthorized"); - - // Drop the ownership proposal - helper - .app - .execute_contract( - helper.owner.clone(), - helper.emission_controller.clone(), - &ExecuteMsg::::DropOwnershipProposal {}, - &[], - ) - .unwrap(); - - // Claim ownership - let err = helper - .app - .execute_contract( - new_owner.clone(), - helper.emission_controller.clone(), - &ExecuteMsg::::ClaimOwnership {}, - &[], - ) - .unwrap_err(); - assert_eq!( - err.root_cause().to_string(), - "Generic error: Ownership proposal not found" - ); - - // Propose a new owner again - helper - .app - .execute_contract( - helper.owner.clone(), - helper.emission_controller.clone(), - &msg, - &[], - ) - .unwrap(); - helper - .app - .execute_contract( - new_owner.clone(), - helper.emission_controller.clone(), - &ExecuteMsg::::ClaimOwnership {}, - &[], - ) - .unwrap(); - - assert_eq!(helper.query_config().unwrap().owner.to_string(), new_owner) -} diff --git a/contracts/voting_escrow/Cargo.toml b/contracts/voting_escrow/Cargo.toml index af60d2c..a99207a 100644 --- a/contracts/voting_escrow/Cargo.toml +++ b/contracts/voting_escrow/Cargo.toml @@ -24,7 +24,7 @@ cosmwasm-std.workspace = true cw-storage-plus.workspace = true thiserror.workspace = true cosmwasm-schema.workspace = true -astroport-governance = { path = "../../packages/astroport-governance", version = "4.0.0" } +astroport-governance = { path = "../../packages/astroport-governance", version = "4.2.1-cw1.0" } astroport.workspace = true [dev-dependencies] diff --git a/packages/astroport-governance/Cargo.toml b/packages/astroport-governance/Cargo.toml index 282a846..f80dee9 100644 --- a/packages/astroport-governance/Cargo.toml +++ b/packages/astroport-governance/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "astroport-governance" -version = "4.2.1" +version = "4.2.1-cw1.0" authors = ["Astroport"] edition = "2021" description = "Astroport Governance common types, queriers and other utils" diff --git a/schemas/astro-assembly/astro-assembly.json b/schemas/astro-assembly/astro-assembly.json deleted file mode 100644 index 39f2813..0000000 --- a/schemas/astro-assembly/astro-assembly.json +++ /dev/null @@ -1,3413 +0,0 @@ -{ - "contract_name": "astro-assembly", - "contract_version": "3.0.0", - "idl_version": "1.0.0", - "instantiate": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "description": "This structure holds the parameters used for creating an Assembly contract.", - "type": "object", - "required": [ - "builder_unlock_addr", - "proposal_effective_delay", - "proposal_expiration_period", - "proposal_required_deposit", - "proposal_required_quorum", - "proposal_required_threshold", - "proposal_voting_period", - "staking_addr", - "whitelisted_links" - ], - "properties": { - "builder_unlock_addr": { - "description": "Address of the builder unlock contract", - "type": "string" - }, - "ibc_controller": { - "description": "Astroport IBC controller contract", - "type": [ - "string", - "null" - ] - }, - "proposal_effective_delay": { - "description": "Proposal effective delay", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "proposal_expiration_period": { - "description": "Proposal expiration period", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "proposal_required_deposit": { - "description": "Proposal required deposit", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "proposal_required_quorum": { - "description": "Proposal required quorum", - "type": "string" - }, - "proposal_required_threshold": { - "description": "Proposal required threshold", - "type": "string" - }, - "proposal_voting_period": { - "description": "Proposal voting period", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "staking_addr": { - "description": "Astroport xASTRO staking address. xASTRO denom and tracker contract address are queried on assembly instantiation.", - "type": "string" - }, - "whitelisted_links": { - "description": "Whitelisted links", - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "execute": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ExecuteMsg", - "description": "This enum describes all execute functions available in the contract.", - "oneOf": [ - { - "description": "Submit a new governance proposal", - "type": "object", - "required": [ - "submit_proposal" - ], - "properties": { - "submit_proposal": { - "type": "object", - "required": [ - "description", - "title" - ], - "properties": { - "description": { - "type": "string" - }, - "ibc_channel": { - "description": "If proposal should be executed on a remote chain this field should specify governance channel", - "type": [ - "string", - "null" - ] - }, - "link": { - "type": [ - "string", - "null" - ] - }, - "messages": { - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/CosmosMsg_for_Empty" - } - }, - "title": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Cast a vote for an active proposal", - "type": "object", - "required": [ - "cast_vote" - ], - "properties": { - "cast_vote": { - "type": "object", - "required": [ - "proposal_id", - "vote" - ], - "properties": { - "proposal_id": { - "description": "Proposal identifier", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vote": { - "description": "Vote option", - "allOf": [ - { - "$ref": "#/definitions/ProposalVoteOption" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Cast a vote for an active proposal. Permissioned to emissions controller contract. Called on an IBC packet receive.", - "type": "object", - "required": [ - "cast_vote_outpost" - ], - "properties": { - "cast_vote_outpost": { - "type": "object", - "required": [ - "proposal_id", - "vote", - "voter", - "voting_power" - ], - "properties": { - "proposal_id": { - "description": "Proposal identifier", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vote": { - "description": "Vote option", - "allOf": [ - { - "$ref": "#/definitions/ProposalVoteOption" - } - ] - }, - "voter": { - "type": "string" - }, - "voting_power": { - "description": "Voting power reported from outpost", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Set the status of a proposal that expired", - "type": "object", - "required": [ - "end_proposal" - ], - "properties": { - "end_proposal": { - "type": "object", - "required": [ - "proposal_id" - ], - "properties": { - "proposal_id": { - "description": "Proposal identifier", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Checks that proposal messages are correct.", - "type": "object", - "required": [ - "check_messages" - ], - "properties": { - "check_messages": { - "type": "array", - "items": { - "$ref": "#/definitions/CosmosMsg_for_Empty" - } - } - }, - "additionalProperties": false - }, - { - "description": "The last endpoint which is executed only if all proposal messages have been passed", - "type": "object", - "required": [ - "check_messages_passed" - ], - "properties": { - "check_messages_passed": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Execute a successful proposal", - "type": "object", - "required": [ - "execute_proposal" - ], - "properties": { - "execute_proposal": { - "type": "object", - "required": [ - "proposal_id" - ], - "properties": { - "proposal_id": { - "description": "Proposal identifier", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update parameters in the Assembly contract ## Executor Only the Assembly contract is allowed to update its own parameters", - "type": "object", - "required": [ - "update_config" - ], - "properties": { - "update_config": { - "$ref": "#/definitions/UpdateConfig" - } - }, - "additionalProperties": false - }, - { - "description": "Update proposal status InProgress -> Executed or Failed. ## Executor Only the IBC controller contract is allowed to call this method.", - "type": "object", - "required": [ - "i_b_c_proposal_completed" - ], - "properties": { - "i_b_c_proposal_completed": { - "type": "object", - "required": [ - "proposal_id", - "status" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "status": { - "$ref": "#/definitions/ProposalStatus" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "execute_from_multisig" - ], - "properties": { - "execute_from_multisig": { - "type": "array", - "items": { - "$ref": "#/definitions/CosmosMsg_for_Empty" - } - } - }, - "additionalProperties": false - } - ], - "definitions": { - "BankMsg": { - "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", - "oneOf": [ - { - "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "send" - ], - "properties": { - "send": { - "type": "object", - "required": [ - "amount", - "to_address" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "to_address": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", - "type": "object", - "required": [ - "burn" - ], - "properties": { - "burn": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - } - } - }, - "additionalProperties": false - } - ] - }, - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", - "type": "string" - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "CosmosMsg_for_Empty": { - "oneOf": [ - { - "type": "object", - "required": [ - "bank" - ], - "properties": { - "bank": { - "$ref": "#/definitions/BankMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "custom" - ], - "properties": { - "custom": { - "$ref": "#/definitions/Empty" - } - }, - "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", - "required": [ - "stargate" - ], - "properties": { - "stargate": { - "type": "object", - "required": [ - "type_url", - "value" - ], - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/Binary" - } - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "ibc" - ], - "properties": { - "ibc": { - "$ref": "#/definitions/IbcMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "$ref": "#/definitions/WasmMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "gov" - ], - "properties": { - "gov": { - "$ref": "#/definitions/GovMsg" - } - }, - "additionalProperties": false - } - ] - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "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" - }, - "GovMsg": { - "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, vote: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", - "oneOf": [ - { - "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", - "type": "object", - "required": [ - "vote" - ], - "properties": { - "vote": { - "type": "object", - "required": [ - "proposal_id", - "vote" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vote": { - "description": "The vote option.\n\nThis should be called \"option\" for consistency with Cosmos SDK. Sorry for that. See .", - "allOf": [ - { - "$ref": "#/definitions/VoteOption" - } - ] - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcMsg": { - "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", - "oneOf": [ - { - "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", - "type": "object", - "required": [ - "transfer" - ], - "properties": { - "transfer": { - "type": "object", - "required": [ - "amount", - "channel_id", - "timeout", - "to_address" - ], - "properties": { - "amount": { - "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "channel_id": { - "description": "existing channel to send the tokens over", - "type": "string" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - }, - "to_address": { - "description": "address on the remote chain to receive these tokens", - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "data", - "timeout" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/Binary" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", - "type": "object", - "required": [ - "close_channel" - ], - "properties": { - "close_channel": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcTimeout": { - "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", - "type": "object", - "properties": { - "block": { - "anyOf": [ - { - "$ref": "#/definitions/IbcTimeoutBlock" - }, - { - "type": "null" - } - ] - }, - "timestamp": { - "anyOf": [ - { - "$ref": "#/definitions/Timestamp" - }, - { - "type": "null" - } - ] - } - } - }, - "IbcTimeoutBlock": { - "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", - "type": "object", - "required": [ - "height", - "revision" - ], - "properties": { - "height": { - "description": "block height after which the packet times out. the height within the given revision", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "revision": { - "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - }, - "ProposalStatus": { - "description": "This enum describes available statuses/states for a Proposal.", - "type": "string", - "enum": [ - "active", - "passed", - "rejected", - "in_progress", - "failed", - "executed", - "expired" - ] - }, - "ProposalVoteOption": { - "description": "This enum describes available options for voting on a proposal.", - "type": "string", - "enum": [ - "for", - "against" - ] - }, - "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": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "Uint64": { - "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", - "type": "string" - }, - "UpdateConfig": { - "description": "This structure stores the params used when updating the main Assembly contract params.", - "type": "object", - "properties": { - "builder_unlock_addr": { - "description": "Builder unlock contract address", - "type": [ - "string", - "null" - ] - }, - "ibc_controller": { - "description": "Astroport IBC controller contract", - "type": [ - "string", - "null" - ] - }, - "proposal_effective_delay": { - "description": "Proposal effective delay", - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "proposal_expiration_period": { - "description": "Proposal expiration period", - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "proposal_required_deposit": { - "description": "Proposal required deposit", - "anyOf": [ - { - "$ref": "#/definitions/Uint128" - }, - { - "type": "null" - } - ] - }, - "proposal_required_quorum": { - "description": "Proposal required quorum", - "anyOf": [ - { - "$ref": "#/definitions/Decimal" - }, - { - "type": "null" - } - ] - }, - "proposal_required_threshold": { - "description": "Proposal required threshold", - "anyOf": [ - { - "$ref": "#/definitions/Decimal" - }, - { - "type": "null" - } - ] - }, - "proposal_voting_period": { - "description": "Proposal voting period", - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "vxastro": { - "description": "Set vxASTRO and emissions controller contract at the same time. Emissions controller is queried from the vxASTRO contract.", - "type": [ - "string", - "null" - ] - }, - "whitelist_add": { - "description": "Links to add to whitelist", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "whitelist_remove": { - "description": "Links to remove from whitelist", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "VoteOption": { - "type": "string", - "enum": [ - "yes", - "no", - "abstain", - "no_with_veto" - ] - }, - "WasmMsg": { - "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", - "oneOf": [ - { - "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "execute" - ], - "properties": { - "execute": { - "type": "object", - "required": [ - "contract_addr", - "funds", - "msg" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "msg": { - "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "type": "object", - "required": [ - "code_id", - "funds", - "label", - "msg" - ], - "properties": { - "admin": { - "type": [ - "string", - "null" - ] - }, - "code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "label": { - "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", - "type": "string" - }, - "msg": { - "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "migrate" - ], - "properties": { - "migrate": { - "type": "object", - "required": [ - "contract_addr", - "msg", - "new_code_id" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "msg": { - "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "new_code_id": { - "description": "the code_id of the new logic to place in the given contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "update_admin" - ], - "properties": { - "update_admin": { - "type": "object", - "required": [ - "admin", - "contract_addr" - ], - "properties": { - "admin": { - "type": "string" - }, - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "clear_admin" - ], - "properties": { - "clear_admin": { - "type": "object", - "required": [ - "contract_addr" - ], - "properties": { - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - } - } - }, - "query": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "description": "Thie enum describes all the queries available in the contract.", - "oneOf": [ - { - "description": "Return the contract's configuration", - "type": "object", - "required": [ - "config" - ], - "properties": { - "config": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Return the current list of proposals", - "type": "object", - "required": [ - "proposals" - ], - "properties": { - "proposals": { - "type": "object", - "properties": { - "limit": { - "description": "The amount of proposals to return", - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "start": { - "description": "Id from which to start querying", - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Return proposal voters of specified proposal", - "type": "object", - "required": [ - "proposal_voters" - ], - "properties": { - "proposal_voters": { - "type": "object", - "required": [ - "proposal_id" - ], - "properties": { - "limit": { - "description": "The amount of proposals to return", - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "proposal_id": { - "description": "Proposal unique id", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "start_after": { - "description": "Address after which to query", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Return information about a specific proposal", - "type": "object", - "required": [ - "proposal" - ], - "properties": { - "proposal": { - "type": "object", - "required": [ - "proposal_id" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Return information about the votes cast on a specific proposal", - "type": "object", - "required": [ - "proposal_votes" - ], - "properties": { - "proposal_votes": { - "type": "object", - "required": [ - "proposal_id" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Return user voting power for a specific proposal", - "type": "object", - "required": [ - "user_voting_power" - ], - "properties": { - "user_voting_power": { - "type": "object", - "required": [ - "proposal_id", - "user" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Return total voting power for a specific proposal", - "type": "object", - "required": [ - "total_voting_power" - ], - "properties": { - "total_voting_power": { - "type": "object", - "required": [ - "proposal_id" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "migrate": null, - "sudo": null, - "responses": { - "config": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Config", - "description": "This structure stores general parameters for the Assembly contract.", - "type": "object", - "required": [ - "builder_unlock_addr", - "proposal_effective_delay", - "proposal_expiration_period", - "proposal_required_deposit", - "proposal_required_quorum", - "proposal_required_threshold", - "proposal_voting_period", - "whitelisted_links", - "xastro_denom", - "xastro_denom_tracking" - ], - "properties": { - "builder_unlock_addr": { - "description": "Builder unlock contract address", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "emissions_controller": { - "description": "Emissions controller contract. Optional", - "anyOf": [ - { - "$ref": "#/definitions/Addr" - }, - { - "type": "null" - } - ] - }, - "ibc_controller": { - "description": "Astroport IBC controller contract", - "anyOf": [ - { - "$ref": "#/definitions/Addr" - }, - { - "type": "null" - } - ] - }, - "proposal_effective_delay": { - "description": "Proposal effective delay", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "proposal_expiration_period": { - "description": "Proposal expiration period", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "proposal_required_deposit": { - "description": "Proposal required deposit", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "proposal_required_quorum": { - "description": "Proposal required quorum", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - }, - "proposal_required_threshold": { - "description": "Proposal required threshold", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - }, - "proposal_voting_period": { - "description": "Proposal voting period", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vxastro_contract": { - "description": "vxASTRO contract address. Optional", - "anyOf": [ - { - "$ref": "#/definitions/Addr" - }, - { - "type": "null" - } - ] - }, - "whitelisted_links": { - "description": "Whitelisted links", - "type": "array", - "items": { - "type": "string" - } - }, - "xastro_denom": { - "description": "xASTRO token denom", - "type": "string" - }, - "xastro_denom_tracking": { - "description": "xASTRO denom tracking contract", - "type": "string" - } - }, - "additionalProperties": false, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "proposal": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Proposal", - "description": "This structure stores data for a proposal.", - "type": "object", - "required": [ - "against_power", - "delayed_end_block", - "deposit_amount", - "description", - "end_block", - "expiration_block", - "for_power", - "messages", - "proposal_id", - "start_block", - "start_time", - "status", - "submitter", - "title", - "total_voting_power" - ], - "properties": { - "against_power": { - "description": "`Against` power of proposal", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "delayed_end_block": { - "description": "Delayed end block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "deposit_amount": { - "description": "Amount of xASTRO deposited to post the proposal", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "description": { - "description": "Proposal description", - "type": "string" - }, - "end_block": { - "description": "End block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "expiration_block": { - "description": "Expiration block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "for_power": { - "description": "`For` power of proposal", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "ibc_channel": { - "description": "IBC channel", - "type": [ - "string", - "null" - ] - }, - "link": { - "description": "Proposal link", - "type": [ - "string", - "null" - ] - }, - "messages": { - "description": "Proposal messages", - "type": "array", - "items": { - "$ref": "#/definitions/CosmosMsg_for_Empty" - } - }, - "proposal_id": { - "description": "Unique proposal ID", - "allOf": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "start_block": { - "description": "Start block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "start_time": { - "description": "Start time of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "status": { - "description": "Status of the proposal", - "allOf": [ - { - "$ref": "#/definitions/ProposalStatus" - } - ] - }, - "submitter": { - "description": "The address of the proposal submitter", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "title": { - "description": "Proposal title", - "type": "string" - }, - "total_voting_power": { - "description": "Total voting power 1 second before the proposal was created", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "BankMsg": { - "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", - "oneOf": [ - { - "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "send" - ], - "properties": { - "send": { - "type": "object", - "required": [ - "amount", - "to_address" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "to_address": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", - "type": "object", - "required": [ - "burn" - ], - "properties": { - "burn": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - } - } - }, - "additionalProperties": false - } - ] - }, - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", - "type": "string" - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "CosmosMsg_for_Empty": { - "oneOf": [ - { - "type": "object", - "required": [ - "bank" - ], - "properties": { - "bank": { - "$ref": "#/definitions/BankMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "custom" - ], - "properties": { - "custom": { - "$ref": "#/definitions/Empty" - } - }, - "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", - "required": [ - "stargate" - ], - "properties": { - "stargate": { - "type": "object", - "required": [ - "type_url", - "value" - ], - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/Binary" - } - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "ibc" - ], - "properties": { - "ibc": { - "$ref": "#/definitions/IbcMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "$ref": "#/definitions/WasmMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "gov" - ], - "properties": { - "gov": { - "$ref": "#/definitions/GovMsg" - } - }, - "additionalProperties": false - } - ] - }, - "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" - }, - "GovMsg": { - "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, vote: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", - "oneOf": [ - { - "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", - "type": "object", - "required": [ - "vote" - ], - "properties": { - "vote": { - "type": "object", - "required": [ - "proposal_id", - "vote" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vote": { - "description": "The vote option.\n\nThis should be called \"option\" for consistency with Cosmos SDK. Sorry for that. See .", - "allOf": [ - { - "$ref": "#/definitions/VoteOption" - } - ] - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcMsg": { - "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", - "oneOf": [ - { - "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", - "type": "object", - "required": [ - "transfer" - ], - "properties": { - "transfer": { - "type": "object", - "required": [ - "amount", - "channel_id", - "timeout", - "to_address" - ], - "properties": { - "amount": { - "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "channel_id": { - "description": "existing channel to send the tokens over", - "type": "string" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - }, - "to_address": { - "description": "address on the remote chain to receive these tokens", - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "data", - "timeout" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/Binary" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", - "type": "object", - "required": [ - "close_channel" - ], - "properties": { - "close_channel": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcTimeout": { - "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", - "type": "object", - "properties": { - "block": { - "anyOf": [ - { - "$ref": "#/definitions/IbcTimeoutBlock" - }, - { - "type": "null" - } - ] - }, - "timestamp": { - "anyOf": [ - { - "$ref": "#/definitions/Timestamp" - }, - { - "type": "null" - } - ] - } - } - }, - "IbcTimeoutBlock": { - "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", - "type": "object", - "required": [ - "height", - "revision" - ], - "properties": { - "height": { - "description": "block height after which the packet times out. the height within the given revision", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "revision": { - "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - }, - "ProposalStatus": { - "description": "This enum describes available statuses/states for a Proposal.", - "type": "string", - "enum": [ - "active", - "passed", - "rejected", - "in_progress", - "failed", - "executed", - "expired" - ] - }, - "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": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "Uint64": { - "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", - "type": "string" - }, - "VoteOption": { - "type": "string", - "enum": [ - "yes", - "no", - "abstain", - "no_with_veto" - ] - }, - "WasmMsg": { - "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", - "oneOf": [ - { - "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "execute" - ], - "properties": { - "execute": { - "type": "object", - "required": [ - "contract_addr", - "funds", - "msg" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "msg": { - "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "type": "object", - "required": [ - "code_id", - "funds", - "label", - "msg" - ], - "properties": { - "admin": { - "type": [ - "string", - "null" - ] - }, - "code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "label": { - "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", - "type": "string" - }, - "msg": { - "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "migrate" - ], - "properties": { - "migrate": { - "type": "object", - "required": [ - "contract_addr", - "msg", - "new_code_id" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "msg": { - "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "new_code_id": { - "description": "the code_id of the new logic to place in the given contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "update_admin" - ], - "properties": { - "update_admin": { - "type": "object", - "required": [ - "admin", - "contract_addr" - ], - "properties": { - "admin": { - "type": "string" - }, - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "clear_admin" - ], - "properties": { - "clear_admin": { - "type": "object", - "required": [ - "contract_addr" - ], - "properties": { - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - } - } - }, - "proposal_voters": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Array_of_ProposalVoterResponse", - "type": "array", - "items": { - "$ref": "#/definitions/ProposalVoterResponse" - }, - "definitions": { - "ProposalVoteOption": { - "description": "This enum describes available options for voting on a proposal.", - "type": "string", - "enum": [ - "for", - "against" - ] - }, - "ProposalVoterResponse": { - "type": "object", - "required": [ - "address", - "vote_option" - ], - "properties": { - "address": { - "description": "The address of the voter", - "type": "string" - }, - "vote_option": { - "description": "The option address voted with", - "allOf": [ - { - "$ref": "#/definitions/ProposalVoteOption" - } - ] - } - }, - "additionalProperties": false - } - } - }, - "proposal_votes": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ProposalVotesResponse", - "description": "This structure describes a proposal vote response.", - "type": "object", - "required": [ - "against_power", - "for_power", - "proposal_id" - ], - "properties": { - "against_power": { - "description": "Total amount of `against` votes for a proposal.", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "for_power": { - "description": "Total amount of `for` votes for a proposal", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "proposal_id": { - "description": "Proposal identifier", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "proposals": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ProposalListResponse", - "description": "This structure describes a proposal list response.", - "type": "object", - "required": [ - "proposal_count", - "proposal_list" - ], - "properties": { - "proposal_count": { - "description": "The amount of proposals returned", - "allOf": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "proposal_list": { - "description": "The list of proposals that are returned", - "type": "array", - "items": { - "$ref": "#/definitions/Proposal" - } - } - }, - "additionalProperties": false, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "BankMsg": { - "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", - "oneOf": [ - { - "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "send" - ], - "properties": { - "send": { - "type": "object", - "required": [ - "amount", - "to_address" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "to_address": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", - "type": "object", - "required": [ - "burn" - ], - "properties": { - "burn": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - } - } - }, - "additionalProperties": false - } - ] - }, - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", - "type": "string" - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "CosmosMsg_for_Empty": { - "oneOf": [ - { - "type": "object", - "required": [ - "bank" - ], - "properties": { - "bank": { - "$ref": "#/definitions/BankMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "custom" - ], - "properties": { - "custom": { - "$ref": "#/definitions/Empty" - } - }, - "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", - "required": [ - "stargate" - ], - "properties": { - "stargate": { - "type": "object", - "required": [ - "type_url", - "value" - ], - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/Binary" - } - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "ibc" - ], - "properties": { - "ibc": { - "$ref": "#/definitions/IbcMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "$ref": "#/definitions/WasmMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "gov" - ], - "properties": { - "gov": { - "$ref": "#/definitions/GovMsg" - } - }, - "additionalProperties": false - } - ] - }, - "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" - }, - "GovMsg": { - "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, vote: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", - "oneOf": [ - { - "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", - "type": "object", - "required": [ - "vote" - ], - "properties": { - "vote": { - "type": "object", - "required": [ - "proposal_id", - "vote" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vote": { - "description": "The vote option.\n\nThis should be called \"option\" for consistency with Cosmos SDK. Sorry for that. See .", - "allOf": [ - { - "$ref": "#/definitions/VoteOption" - } - ] - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcMsg": { - "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", - "oneOf": [ - { - "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", - "type": "object", - "required": [ - "transfer" - ], - "properties": { - "transfer": { - "type": "object", - "required": [ - "amount", - "channel_id", - "timeout", - "to_address" - ], - "properties": { - "amount": { - "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "channel_id": { - "description": "existing channel to send the tokens over", - "type": "string" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - }, - "to_address": { - "description": "address on the remote chain to receive these tokens", - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "data", - "timeout" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/Binary" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", - "type": "object", - "required": [ - "close_channel" - ], - "properties": { - "close_channel": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcTimeout": { - "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", - "type": "object", - "properties": { - "block": { - "anyOf": [ - { - "$ref": "#/definitions/IbcTimeoutBlock" - }, - { - "type": "null" - } - ] - }, - "timestamp": { - "anyOf": [ - { - "$ref": "#/definitions/Timestamp" - }, - { - "type": "null" - } - ] - } - } - }, - "IbcTimeoutBlock": { - "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", - "type": "object", - "required": [ - "height", - "revision" - ], - "properties": { - "height": { - "description": "block height after which the packet times out. the height within the given revision", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "revision": { - "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - }, - "Proposal": { - "description": "This structure stores data for a proposal.", - "type": "object", - "required": [ - "against_power", - "delayed_end_block", - "deposit_amount", - "description", - "end_block", - "expiration_block", - "for_power", - "messages", - "proposal_id", - "start_block", - "start_time", - "status", - "submitter", - "title", - "total_voting_power" - ], - "properties": { - "against_power": { - "description": "`Against` power of proposal", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "delayed_end_block": { - "description": "Delayed end block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "deposit_amount": { - "description": "Amount of xASTRO deposited to post the proposal", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "description": { - "description": "Proposal description", - "type": "string" - }, - "end_block": { - "description": "End block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "expiration_block": { - "description": "Expiration block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "for_power": { - "description": "`For` power of proposal", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "ibc_channel": { - "description": "IBC channel", - "type": [ - "string", - "null" - ] - }, - "link": { - "description": "Proposal link", - "type": [ - "string", - "null" - ] - }, - "messages": { - "description": "Proposal messages", - "type": "array", - "items": { - "$ref": "#/definitions/CosmosMsg_for_Empty" - } - }, - "proposal_id": { - "description": "Unique proposal ID", - "allOf": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "start_block": { - "description": "Start block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "start_time": { - "description": "Start time of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "status": { - "description": "Status of the proposal", - "allOf": [ - { - "$ref": "#/definitions/ProposalStatus" - } - ] - }, - "submitter": { - "description": "The address of the proposal submitter", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "title": { - "description": "Proposal title", - "type": "string" - }, - "total_voting_power": { - "description": "Total voting power 1 second before the proposal was created", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false - }, - "ProposalStatus": { - "description": "This enum describes available statuses/states for a Proposal.", - "type": "string", - "enum": [ - "active", - "passed", - "rejected", - "in_progress", - "failed", - "executed", - "expired" - ] - }, - "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": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "Uint64": { - "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", - "type": "string" - }, - "VoteOption": { - "type": "string", - "enum": [ - "yes", - "no", - "abstain", - "no_with_veto" - ] - }, - "WasmMsg": { - "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", - "oneOf": [ - { - "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "execute" - ], - "properties": { - "execute": { - "type": "object", - "required": [ - "contract_addr", - "funds", - "msg" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "msg": { - "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "type": "object", - "required": [ - "code_id", - "funds", - "label", - "msg" - ], - "properties": { - "admin": { - "type": [ - "string", - "null" - ] - }, - "code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "label": { - "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", - "type": "string" - }, - "msg": { - "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "migrate" - ], - "properties": { - "migrate": { - "type": "object", - "required": [ - "contract_addr", - "msg", - "new_code_id" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "msg": { - "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "new_code_id": { - "description": "the code_id of the new logic to place in the given contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "update_admin" - ], - "properties": { - "update_admin": { - "type": "object", - "required": [ - "admin", - "contract_addr" - ], - "properties": { - "admin": { - "type": "string" - }, - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "clear_admin" - ], - "properties": { - "clear_admin": { - "type": "object", - "required": [ - "contract_addr" - ], - "properties": { - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - } - } - }, - "total_voting_power": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Uint128", - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "user_voting_power": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Uint128", - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/astro-assembly/raw/execute.json b/schemas/astro-assembly/raw/execute.json deleted file mode 100644 index a935ce8..0000000 --- a/schemas/astro-assembly/raw/execute.json +++ /dev/null @@ -1,1121 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ExecuteMsg", - "description": "This enum describes all execute functions available in the contract.", - "oneOf": [ - { - "description": "Submit a new governance proposal", - "type": "object", - "required": [ - "submit_proposal" - ], - "properties": { - "submit_proposal": { - "type": "object", - "required": [ - "description", - "title" - ], - "properties": { - "description": { - "type": "string" - }, - "ibc_channel": { - "description": "If proposal should be executed on a remote chain this field should specify governance channel", - "type": [ - "string", - "null" - ] - }, - "link": { - "type": [ - "string", - "null" - ] - }, - "messages": { - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/CosmosMsg_for_Empty" - } - }, - "title": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Cast a vote for an active proposal", - "type": "object", - "required": [ - "cast_vote" - ], - "properties": { - "cast_vote": { - "type": "object", - "required": [ - "proposal_id", - "vote" - ], - "properties": { - "proposal_id": { - "description": "Proposal identifier", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vote": { - "description": "Vote option", - "allOf": [ - { - "$ref": "#/definitions/ProposalVoteOption" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Cast a vote for an active proposal. Permissioned to emissions controller contract. Called on an IBC packet receive.", - "type": "object", - "required": [ - "cast_vote_outpost" - ], - "properties": { - "cast_vote_outpost": { - "type": "object", - "required": [ - "proposal_id", - "vote", - "voter", - "voting_power" - ], - "properties": { - "proposal_id": { - "description": "Proposal identifier", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vote": { - "description": "Vote option", - "allOf": [ - { - "$ref": "#/definitions/ProposalVoteOption" - } - ] - }, - "voter": { - "type": "string" - }, - "voting_power": { - "description": "Voting power reported from outpost", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Set the status of a proposal that expired", - "type": "object", - "required": [ - "end_proposal" - ], - "properties": { - "end_proposal": { - "type": "object", - "required": [ - "proposal_id" - ], - "properties": { - "proposal_id": { - "description": "Proposal identifier", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Checks that proposal messages are correct.", - "type": "object", - "required": [ - "check_messages" - ], - "properties": { - "check_messages": { - "type": "array", - "items": { - "$ref": "#/definitions/CosmosMsg_for_Empty" - } - } - }, - "additionalProperties": false - }, - { - "description": "The last endpoint which is executed only if all proposal messages have been passed", - "type": "object", - "required": [ - "check_messages_passed" - ], - "properties": { - "check_messages_passed": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Execute a successful proposal", - "type": "object", - "required": [ - "execute_proposal" - ], - "properties": { - "execute_proposal": { - "type": "object", - "required": [ - "proposal_id" - ], - "properties": { - "proposal_id": { - "description": "Proposal identifier", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update parameters in the Assembly contract ## Executor Only the Assembly contract is allowed to update its own parameters", - "type": "object", - "required": [ - "update_config" - ], - "properties": { - "update_config": { - "$ref": "#/definitions/UpdateConfig" - } - }, - "additionalProperties": false - }, - { - "description": "Update proposal status InProgress -> Executed or Failed. ## Executor Only the IBC controller contract is allowed to call this method.", - "type": "object", - "required": [ - "i_b_c_proposal_completed" - ], - "properties": { - "i_b_c_proposal_completed": { - "type": "object", - "required": [ - "proposal_id", - "status" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "status": { - "$ref": "#/definitions/ProposalStatus" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "execute_from_multisig" - ], - "properties": { - "execute_from_multisig": { - "type": "array", - "items": { - "$ref": "#/definitions/CosmosMsg_for_Empty" - } - } - }, - "additionalProperties": false - } - ], - "definitions": { - "BankMsg": { - "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", - "oneOf": [ - { - "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "send" - ], - "properties": { - "send": { - "type": "object", - "required": [ - "amount", - "to_address" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "to_address": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", - "type": "object", - "required": [ - "burn" - ], - "properties": { - "burn": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - } - } - }, - "additionalProperties": false - } - ] - }, - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", - "type": "string" - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "CosmosMsg_for_Empty": { - "oneOf": [ - { - "type": "object", - "required": [ - "bank" - ], - "properties": { - "bank": { - "$ref": "#/definitions/BankMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "custom" - ], - "properties": { - "custom": { - "$ref": "#/definitions/Empty" - } - }, - "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", - "required": [ - "stargate" - ], - "properties": { - "stargate": { - "type": "object", - "required": [ - "type_url", - "value" - ], - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/Binary" - } - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "ibc" - ], - "properties": { - "ibc": { - "$ref": "#/definitions/IbcMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "$ref": "#/definitions/WasmMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "gov" - ], - "properties": { - "gov": { - "$ref": "#/definitions/GovMsg" - } - }, - "additionalProperties": false - } - ] - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "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" - }, - "GovMsg": { - "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, vote: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", - "oneOf": [ - { - "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", - "type": "object", - "required": [ - "vote" - ], - "properties": { - "vote": { - "type": "object", - "required": [ - "proposal_id", - "vote" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vote": { - "description": "The vote option.\n\nThis should be called \"option\" for consistency with Cosmos SDK. Sorry for that. See .", - "allOf": [ - { - "$ref": "#/definitions/VoteOption" - } - ] - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcMsg": { - "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", - "oneOf": [ - { - "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", - "type": "object", - "required": [ - "transfer" - ], - "properties": { - "transfer": { - "type": "object", - "required": [ - "amount", - "channel_id", - "timeout", - "to_address" - ], - "properties": { - "amount": { - "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "channel_id": { - "description": "existing channel to send the tokens over", - "type": "string" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - }, - "to_address": { - "description": "address on the remote chain to receive these tokens", - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "data", - "timeout" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/Binary" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", - "type": "object", - "required": [ - "close_channel" - ], - "properties": { - "close_channel": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcTimeout": { - "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", - "type": "object", - "properties": { - "block": { - "anyOf": [ - { - "$ref": "#/definitions/IbcTimeoutBlock" - }, - { - "type": "null" - } - ] - }, - "timestamp": { - "anyOf": [ - { - "$ref": "#/definitions/Timestamp" - }, - { - "type": "null" - } - ] - } - } - }, - "IbcTimeoutBlock": { - "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", - "type": "object", - "required": [ - "height", - "revision" - ], - "properties": { - "height": { - "description": "block height after which the packet times out. the height within the given revision", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "revision": { - "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - }, - "ProposalStatus": { - "description": "This enum describes available statuses/states for a Proposal.", - "type": "string", - "enum": [ - "active", - "passed", - "rejected", - "in_progress", - "failed", - "executed", - "expired" - ] - }, - "ProposalVoteOption": { - "description": "This enum describes available options for voting on a proposal.", - "type": "string", - "enum": [ - "for", - "against" - ] - }, - "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": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "Uint64": { - "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", - "type": "string" - }, - "UpdateConfig": { - "description": "This structure stores the params used when updating the main Assembly contract params.", - "type": "object", - "properties": { - "builder_unlock_addr": { - "description": "Builder unlock contract address", - "type": [ - "string", - "null" - ] - }, - "ibc_controller": { - "description": "Astroport IBC controller contract", - "type": [ - "string", - "null" - ] - }, - "proposal_effective_delay": { - "description": "Proposal effective delay", - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "proposal_expiration_period": { - "description": "Proposal expiration period", - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "proposal_required_deposit": { - "description": "Proposal required deposit", - "anyOf": [ - { - "$ref": "#/definitions/Uint128" - }, - { - "type": "null" - } - ] - }, - "proposal_required_quorum": { - "description": "Proposal required quorum", - "anyOf": [ - { - "$ref": "#/definitions/Decimal" - }, - { - "type": "null" - } - ] - }, - "proposal_required_threshold": { - "description": "Proposal required threshold", - "anyOf": [ - { - "$ref": "#/definitions/Decimal" - }, - { - "type": "null" - } - ] - }, - "proposal_voting_period": { - "description": "Proposal voting period", - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "vxastro": { - "description": "Set vxASTRO and emissions controller contract at the same time. Emissions controller is queried from the vxASTRO contract.", - "type": [ - "string", - "null" - ] - }, - "whitelist_add": { - "description": "Links to add to whitelist", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "whitelist_remove": { - "description": "Links to remove from whitelist", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "VoteOption": { - "type": "string", - "enum": [ - "yes", - "no", - "abstain", - "no_with_veto" - ] - }, - "WasmMsg": { - "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", - "oneOf": [ - { - "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "execute" - ], - "properties": { - "execute": { - "type": "object", - "required": [ - "contract_addr", - "funds", - "msg" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "msg": { - "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "type": "object", - "required": [ - "code_id", - "funds", - "label", - "msg" - ], - "properties": { - "admin": { - "type": [ - "string", - "null" - ] - }, - "code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "label": { - "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", - "type": "string" - }, - "msg": { - "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "migrate" - ], - "properties": { - "migrate": { - "type": "object", - "required": [ - "contract_addr", - "msg", - "new_code_id" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "msg": { - "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "new_code_id": { - "description": "the code_id of the new logic to place in the given contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "update_admin" - ], - "properties": { - "update_admin": { - "type": "object", - "required": [ - "admin", - "contract_addr" - ], - "properties": { - "admin": { - "type": "string" - }, - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "clear_admin" - ], - "properties": { - "clear_admin": { - "type": "object", - "required": [ - "contract_addr" - ], - "properties": { - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - } - } -} diff --git a/schemas/astro-assembly/raw/instantiate.json b/schemas/astro-assembly/raw/instantiate.json deleted file mode 100644 index fc1d3d2..0000000 --- a/schemas/astro-assembly/raw/instantiate.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "description": "This structure holds the parameters used for creating an Assembly contract.", - "type": "object", - "required": [ - "builder_unlock_addr", - "proposal_effective_delay", - "proposal_expiration_period", - "proposal_required_deposit", - "proposal_required_quorum", - "proposal_required_threshold", - "proposal_voting_period", - "staking_addr", - "whitelisted_links" - ], - "properties": { - "builder_unlock_addr": { - "description": "Address of the builder unlock contract", - "type": "string" - }, - "ibc_controller": { - "description": "Astroport IBC controller contract", - "type": [ - "string", - "null" - ] - }, - "proposal_effective_delay": { - "description": "Proposal effective delay", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "proposal_expiration_period": { - "description": "Proposal expiration period", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "proposal_required_deposit": { - "description": "Proposal required deposit", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "proposal_required_quorum": { - "description": "Proposal required quorum", - "type": "string" - }, - "proposal_required_threshold": { - "description": "Proposal required threshold", - "type": "string" - }, - "proposal_voting_period": { - "description": "Proposal voting period", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "staking_addr": { - "description": "Astroport xASTRO staking address. xASTRO denom and tracker contract address are queried on assembly instantiation.", - "type": "string" - }, - "whitelisted_links": { - "description": "Whitelisted links", - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/astro-assembly/raw/query.json b/schemas/astro-assembly/raw/query.json deleted file mode 100644 index 645ab71..0000000 --- a/schemas/astro-assembly/raw/query.json +++ /dev/null @@ -1,196 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "description": "Thie enum describes all the queries available in the contract.", - "oneOf": [ - { - "description": "Return the contract's configuration", - "type": "object", - "required": [ - "config" - ], - "properties": { - "config": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Return the current list of proposals", - "type": "object", - "required": [ - "proposals" - ], - "properties": { - "proposals": { - "type": "object", - "properties": { - "limit": { - "description": "The amount of proposals to return", - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "start": { - "description": "Id from which to start querying", - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Return proposal voters of specified proposal", - "type": "object", - "required": [ - "proposal_voters" - ], - "properties": { - "proposal_voters": { - "type": "object", - "required": [ - "proposal_id" - ], - "properties": { - "limit": { - "description": "The amount of proposals to return", - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "proposal_id": { - "description": "Proposal unique id", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "start_after": { - "description": "Address after which to query", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Return information about a specific proposal", - "type": "object", - "required": [ - "proposal" - ], - "properties": { - "proposal": { - "type": "object", - "required": [ - "proposal_id" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Return information about the votes cast on a specific proposal", - "type": "object", - "required": [ - "proposal_votes" - ], - "properties": { - "proposal_votes": { - "type": "object", - "required": [ - "proposal_id" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Return user voting power for a specific proposal", - "type": "object", - "required": [ - "user_voting_power" - ], - "properties": { - "user_voting_power": { - "type": "object", - "required": [ - "proposal_id", - "user" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Return total voting power for a specific proposal", - "type": "object", - "required": [ - "total_voting_power" - ], - "properties": { - "total_voting_power": { - "type": "object", - "required": [ - "proposal_id" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] -} diff --git a/schemas/astro-assembly/raw/response_to_config.json b/schemas/astro-assembly/raw/response_to_config.json deleted file mode 100644 index a41c8af..0000000 --- a/schemas/astro-assembly/raw/response_to_config.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Config", - "description": "This structure stores general parameters for the Assembly contract.", - "type": "object", - "required": [ - "builder_unlock_addr", - "proposal_effective_delay", - "proposal_expiration_period", - "proposal_required_deposit", - "proposal_required_quorum", - "proposal_required_threshold", - "proposal_voting_period", - "whitelisted_links", - "xastro_denom", - "xastro_denom_tracking" - ], - "properties": { - "builder_unlock_addr": { - "description": "Builder unlock contract address", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "emissions_controller": { - "description": "Emissions controller contract. Optional", - "anyOf": [ - { - "$ref": "#/definitions/Addr" - }, - { - "type": "null" - } - ] - }, - "ibc_controller": { - "description": "Astroport IBC controller contract", - "anyOf": [ - { - "$ref": "#/definitions/Addr" - }, - { - "type": "null" - } - ] - }, - "proposal_effective_delay": { - "description": "Proposal effective delay", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "proposal_expiration_period": { - "description": "Proposal expiration period", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "proposal_required_deposit": { - "description": "Proposal required deposit", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "proposal_required_quorum": { - "description": "Proposal required quorum", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - }, - "proposal_required_threshold": { - "description": "Proposal required threshold", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - }, - "proposal_voting_period": { - "description": "Proposal voting period", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vxastro_contract": { - "description": "vxASTRO contract address. Optional", - "anyOf": [ - { - "$ref": "#/definitions/Addr" - }, - { - "type": "null" - } - ] - }, - "whitelisted_links": { - "description": "Whitelisted links", - "type": "array", - "items": { - "type": "string" - } - }, - "xastro_denom": { - "description": "xASTRO token denom", - "type": "string" - }, - "xastro_denom_tracking": { - "description": "xASTRO denom tracking contract", - "type": "string" - } - }, - "additionalProperties": false, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/astro-assembly/raw/response_to_proposal.json b/schemas/astro-assembly/raw/response_to_proposal.json deleted file mode 100644 index 9f625bb..0000000 --- a/schemas/astro-assembly/raw/response_to_proposal.json +++ /dev/null @@ -1,876 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Proposal", - "description": "This structure stores data for a proposal.", - "type": "object", - "required": [ - "against_power", - "delayed_end_block", - "deposit_amount", - "description", - "end_block", - "expiration_block", - "for_power", - "messages", - "proposal_id", - "start_block", - "start_time", - "status", - "submitter", - "title", - "total_voting_power" - ], - "properties": { - "against_power": { - "description": "`Against` power of proposal", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "delayed_end_block": { - "description": "Delayed end block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "deposit_amount": { - "description": "Amount of xASTRO deposited to post the proposal", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "description": { - "description": "Proposal description", - "type": "string" - }, - "end_block": { - "description": "End block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "expiration_block": { - "description": "Expiration block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "for_power": { - "description": "`For` power of proposal", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "ibc_channel": { - "description": "IBC channel", - "type": [ - "string", - "null" - ] - }, - "link": { - "description": "Proposal link", - "type": [ - "string", - "null" - ] - }, - "messages": { - "description": "Proposal messages", - "type": "array", - "items": { - "$ref": "#/definitions/CosmosMsg_for_Empty" - } - }, - "proposal_id": { - "description": "Unique proposal ID", - "allOf": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "start_block": { - "description": "Start block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "start_time": { - "description": "Start time of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "status": { - "description": "Status of the proposal", - "allOf": [ - { - "$ref": "#/definitions/ProposalStatus" - } - ] - }, - "submitter": { - "description": "The address of the proposal submitter", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "title": { - "description": "Proposal title", - "type": "string" - }, - "total_voting_power": { - "description": "Total voting power 1 second before the proposal was created", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "BankMsg": { - "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", - "oneOf": [ - { - "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "send" - ], - "properties": { - "send": { - "type": "object", - "required": [ - "amount", - "to_address" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "to_address": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", - "type": "object", - "required": [ - "burn" - ], - "properties": { - "burn": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - } - } - }, - "additionalProperties": false - } - ] - }, - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", - "type": "string" - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "CosmosMsg_for_Empty": { - "oneOf": [ - { - "type": "object", - "required": [ - "bank" - ], - "properties": { - "bank": { - "$ref": "#/definitions/BankMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "custom" - ], - "properties": { - "custom": { - "$ref": "#/definitions/Empty" - } - }, - "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", - "required": [ - "stargate" - ], - "properties": { - "stargate": { - "type": "object", - "required": [ - "type_url", - "value" - ], - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/Binary" - } - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "ibc" - ], - "properties": { - "ibc": { - "$ref": "#/definitions/IbcMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "$ref": "#/definitions/WasmMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "gov" - ], - "properties": { - "gov": { - "$ref": "#/definitions/GovMsg" - } - }, - "additionalProperties": false - } - ] - }, - "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" - }, - "GovMsg": { - "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, vote: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", - "oneOf": [ - { - "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", - "type": "object", - "required": [ - "vote" - ], - "properties": { - "vote": { - "type": "object", - "required": [ - "proposal_id", - "vote" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vote": { - "description": "The vote option.\n\nThis should be called \"option\" for consistency with Cosmos SDK. Sorry for that. See .", - "allOf": [ - { - "$ref": "#/definitions/VoteOption" - } - ] - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcMsg": { - "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", - "oneOf": [ - { - "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", - "type": "object", - "required": [ - "transfer" - ], - "properties": { - "transfer": { - "type": "object", - "required": [ - "amount", - "channel_id", - "timeout", - "to_address" - ], - "properties": { - "amount": { - "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "channel_id": { - "description": "existing channel to send the tokens over", - "type": "string" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - }, - "to_address": { - "description": "address on the remote chain to receive these tokens", - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "data", - "timeout" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/Binary" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", - "type": "object", - "required": [ - "close_channel" - ], - "properties": { - "close_channel": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcTimeout": { - "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", - "type": "object", - "properties": { - "block": { - "anyOf": [ - { - "$ref": "#/definitions/IbcTimeoutBlock" - }, - { - "type": "null" - } - ] - }, - "timestamp": { - "anyOf": [ - { - "$ref": "#/definitions/Timestamp" - }, - { - "type": "null" - } - ] - } - } - }, - "IbcTimeoutBlock": { - "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", - "type": "object", - "required": [ - "height", - "revision" - ], - "properties": { - "height": { - "description": "block height after which the packet times out. the height within the given revision", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "revision": { - "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - }, - "ProposalStatus": { - "description": "This enum describes available statuses/states for a Proposal.", - "type": "string", - "enum": [ - "active", - "passed", - "rejected", - "in_progress", - "failed", - "executed", - "expired" - ] - }, - "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": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "Uint64": { - "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", - "type": "string" - }, - "VoteOption": { - "type": "string", - "enum": [ - "yes", - "no", - "abstain", - "no_with_veto" - ] - }, - "WasmMsg": { - "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", - "oneOf": [ - { - "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "execute" - ], - "properties": { - "execute": { - "type": "object", - "required": [ - "contract_addr", - "funds", - "msg" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "msg": { - "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "type": "object", - "required": [ - "code_id", - "funds", - "label", - "msg" - ], - "properties": { - "admin": { - "type": [ - "string", - "null" - ] - }, - "code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "label": { - "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", - "type": "string" - }, - "msg": { - "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "migrate" - ], - "properties": { - "migrate": { - "type": "object", - "required": [ - "contract_addr", - "msg", - "new_code_id" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "msg": { - "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "new_code_id": { - "description": "the code_id of the new logic to place in the given contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "update_admin" - ], - "properties": { - "update_admin": { - "type": "object", - "required": [ - "admin", - "contract_addr" - ], - "properties": { - "admin": { - "type": "string" - }, - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "clear_admin" - ], - "properties": { - "clear_admin": { - "type": "object", - "required": [ - "contract_addr" - ], - "properties": { - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - } - } -} diff --git a/schemas/astro-assembly/raw/response_to_proposal_voters.json b/schemas/astro-assembly/raw/response_to_proposal_voters.json deleted file mode 100644 index 4145f8b..0000000 --- a/schemas/astro-assembly/raw/response_to_proposal_voters.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Array_of_ProposalVoterResponse", - "type": "array", - "items": { - "$ref": "#/definitions/ProposalVoterResponse" - }, - "definitions": { - "ProposalVoteOption": { - "description": "This enum describes available options for voting on a proposal.", - "type": "string", - "enum": [ - "for", - "against" - ] - }, - "ProposalVoterResponse": { - "type": "object", - "required": [ - "address", - "vote_option" - ], - "properties": { - "address": { - "description": "The address of the voter", - "type": "string" - }, - "vote_option": { - "description": "The option address voted with", - "allOf": [ - { - "$ref": "#/definitions/ProposalVoteOption" - } - ] - } - }, - "additionalProperties": false - } - } -} diff --git a/schemas/astro-assembly/raw/response_to_proposal_votes.json b/schemas/astro-assembly/raw/response_to_proposal_votes.json deleted file mode 100644 index e6b6834..0000000 --- a/schemas/astro-assembly/raw/response_to_proposal_votes.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ProposalVotesResponse", - "description": "This structure describes a proposal vote response.", - "type": "object", - "required": [ - "against_power", - "for_power", - "proposal_id" - ], - "properties": { - "against_power": { - "description": "Total amount of `against` votes for a proposal.", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "for_power": { - "description": "Total amount of `for` votes for a proposal", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "proposal_id": { - "description": "Proposal identifier", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/astro-assembly/raw/response_to_proposals.json b/schemas/astro-assembly/raw/response_to_proposals.json deleted file mode 100644 index 54a2289..0000000 --- a/schemas/astro-assembly/raw/response_to_proposals.json +++ /dev/null @@ -1,902 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ProposalListResponse", - "description": "This structure describes a proposal list response.", - "type": "object", - "required": [ - "proposal_count", - "proposal_list" - ], - "properties": { - "proposal_count": { - "description": "The amount of proposals returned", - "allOf": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "proposal_list": { - "description": "The list of proposals that are returned", - "type": "array", - "items": { - "$ref": "#/definitions/Proposal" - } - } - }, - "additionalProperties": false, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "BankMsg": { - "description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto", - "oneOf": [ - { - "description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "send" - ], - "properties": { - "send": { - "type": "object", - "required": [ - "amount", - "to_address" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "to_address": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.", - "type": "object", - "required": [ - "burn" - ], - "properties": { - "burn": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - } - } - }, - "additionalProperties": false - } - ] - }, - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", - "type": "string" - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "CosmosMsg_for_Empty": { - "oneOf": [ - { - "type": "object", - "required": [ - "bank" - ], - "properties": { - "bank": { - "$ref": "#/definitions/BankMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "custom" - ], - "properties": { - "custom": { - "$ref": "#/definitions/Empty" - } - }, - "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", - "required": [ - "stargate" - ], - "properties": { - "stargate": { - "type": "object", - "required": [ - "type_url", - "value" - ], - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/Binary" - } - } - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "ibc" - ], - "properties": { - "ibc": { - "$ref": "#/definitions/IbcMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "$ref": "#/definitions/WasmMsg" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": [ - "gov" - ], - "properties": { - "gov": { - "$ref": "#/definitions/GovMsg" - } - }, - "additionalProperties": false - } - ] - }, - "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" - }, - "GovMsg": { - "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, vote: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", - "oneOf": [ - { - "description": "This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.", - "type": "object", - "required": [ - "vote" - ], - "properties": { - "vote": { - "type": "object", - "required": [ - "proposal_id", - "vote" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vote": { - "description": "The vote option.\n\nThis should be called \"option\" for consistency with Cosmos SDK. Sorry for that. See .", - "allOf": [ - { - "$ref": "#/definitions/VoteOption" - } - ] - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcMsg": { - "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)", - "oneOf": [ - { - "description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.", - "type": "object", - "required": [ - "transfer" - ], - "properties": { - "transfer": { - "type": "object", - "required": [ - "amount", - "channel_id", - "timeout", - "to_address" - ], - "properties": { - "amount": { - "description": "packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "channel_id": { - "description": "existing channel to send the tokens over", - "type": "string" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - }, - "to_address": { - "description": "address on the remote chain to receive these tokens", - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sends an IBC packet with given data over the existing channel. Data should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "data", - "timeout" - ], - "properties": { - "channel_id": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/Binary" - }, - "timeout": { - "description": "when packet times out, measured on remote chain", - "allOf": [ - { - "$ref": "#/definitions/IbcTimeout" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port", - "type": "object", - "required": [ - "close_channel" - ], - "properties": { - "close_channel": { - "type": "object", - "required": [ - "channel_id" - ], - "properties": { - "channel_id": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - }, - "IbcTimeout": { - "description": "In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set.", - "type": "object", - "properties": { - "block": { - "anyOf": [ - { - "$ref": "#/definitions/IbcTimeoutBlock" - }, - { - "type": "null" - } - ] - }, - "timestamp": { - "anyOf": [ - { - "$ref": "#/definitions/Timestamp" - }, - { - "type": "null" - } - ] - } - } - }, - "IbcTimeoutBlock": { - "description": "IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)", - "type": "object", - "required": [ - "height", - "revision" - ], - "properties": { - "height": { - "description": "block height after which the packet times out. the height within the given revision", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "revision": { - "description": "the version that the client is currently on (e.g. after resetting the chain this could increment 1 as height drops to 0)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - }, - "Proposal": { - "description": "This structure stores data for a proposal.", - "type": "object", - "required": [ - "against_power", - "delayed_end_block", - "deposit_amount", - "description", - "end_block", - "expiration_block", - "for_power", - "messages", - "proposal_id", - "start_block", - "start_time", - "status", - "submitter", - "title", - "total_voting_power" - ], - "properties": { - "against_power": { - "description": "`Against` power of proposal", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "delayed_end_block": { - "description": "Delayed end block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "deposit_amount": { - "description": "Amount of xASTRO deposited to post the proposal", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "description": { - "description": "Proposal description", - "type": "string" - }, - "end_block": { - "description": "End block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "expiration_block": { - "description": "Expiration block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "for_power": { - "description": "`For` power of proposal", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "ibc_channel": { - "description": "IBC channel", - "type": [ - "string", - "null" - ] - }, - "link": { - "description": "Proposal link", - "type": [ - "string", - "null" - ] - }, - "messages": { - "description": "Proposal messages", - "type": "array", - "items": { - "$ref": "#/definitions/CosmosMsg_for_Empty" - } - }, - "proposal_id": { - "description": "Unique proposal ID", - "allOf": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "start_block": { - "description": "Start block of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "start_time": { - "description": "Start time of proposal", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "status": { - "description": "Status of the proposal", - "allOf": [ - { - "$ref": "#/definitions/ProposalStatus" - } - ] - }, - "submitter": { - "description": "The address of the proposal submitter", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "title": { - "description": "Proposal title", - "type": "string" - }, - "total_voting_power": { - "description": "Total voting power 1 second before the proposal was created", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false - }, - "ProposalStatus": { - "description": "This enum describes available statuses/states for a Proposal.", - "type": "string", - "enum": [ - "active", - "passed", - "rejected", - "in_progress", - "failed", - "executed", - "expired" - ] - }, - "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": [ - { - "$ref": "#/definitions/Uint64" - } - ] - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "Uint64": { - "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", - "type": "string" - }, - "VoteOption": { - "type": "string", - "enum": [ - "yes", - "no", - "abstain", - "no_with_veto" - ] - }, - "WasmMsg": { - "description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto", - "oneOf": [ - { - "description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "execute" - ], - "properties": { - "execute": { - "type": "object", - "required": [ - "contract_addr", - "funds", - "msg" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "msg": { - "description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "instantiate" - ], - "properties": { - "instantiate": { - "type": "object", - "required": [ - "code_id", - "funds", - "label", - "msg" - ], - "properties": { - "admin": { - "type": [ - "string", - "null" - ] - }, - "code_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "funds": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "label": { - "description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace", - "type": "string" - }, - "msg": { - "description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.", - "type": "object", - "required": [ - "migrate" - ], - "properties": { - "migrate": { - "type": "object", - "required": [ - "contract_addr", - "msg", - "new_code_id" - ], - "properties": { - "contract_addr": { - "type": "string" - }, - "msg": { - "description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "new_code_id": { - "description": "the code_id of the new logic to place in the given contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "update_admin" - ], - "properties": { - "update_admin": { - "type": "object", - "required": [ - "admin", - "contract_addr" - ], - "properties": { - "admin": { - "type": "string" - }, - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - }, - { - "description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.", - "type": "object", - "required": [ - "clear_admin" - ], - "properties": { - "clear_admin": { - "type": "object", - "required": [ - "contract_addr" - ], - "properties": { - "contract_addr": { - "type": "string" - } - } - } - }, - "additionalProperties": false - } - ] - } - } -} diff --git a/schemas/astro-assembly/raw/response_to_total_voting_power.json b/schemas/astro-assembly/raw/response_to_total_voting_power.json deleted file mode 100644 index 25b73e8..0000000 --- a/schemas/astro-assembly/raw/response_to_total_voting_power.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Uint128", - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" -} diff --git a/schemas/astro-assembly/raw/response_to_user_voting_power.json b/schemas/astro-assembly/raw/response_to_user_voting_power.json deleted file mode 100644 index 25b73e8..0000000 --- a/schemas/astro-assembly/raw/response_to_user_voting_power.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Uint128", - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" -} diff --git a/schemas/astroport-emissions-controller/astroport-emissions-controller.json b/schemas/astroport-emissions-controller/astroport-emissions-controller.json deleted file mode 100644 index 2b6399a..0000000 --- a/schemas/astroport-emissions-controller/astroport-emissions-controller.json +++ /dev/null @@ -1,1529 +0,0 @@ -{ - "contract_name": "astroport-emissions-controller", - "contract_version": "1.1.1", - "idl_version": "1.0.0", - "instantiate": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "description": "This structure describes the basic settings for creating a contract.", - "type": "object", - "required": [ - "assembly", - "astro_denom", - "collected_astro", - "ema", - "emissions_multiple", - "factory", - "fee_receiver", - "max_astro", - "owner", - "pools_per_outpost", - "vxastro_code_id", - "vxastro_marketing_info", - "whitelist_threshold", - "whitelisting_fee", - "xastro_denom" - ], - "properties": { - "assembly": { - "description": "Astroport Assembly contract address", - "type": "string" - }, - "astro_denom": { - "description": "ASTRO denom on the Hub", - "type": "string" - }, - "collected_astro": { - "description": "Defines the number of ASTRO collected to staking contract from 2-weeks period preceding the current epoch.", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "ema": { - "description": "EMA of the collected ASTRO from the previous epoch", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "emissions_multiple": { - "description": "Controls ASTRO emissions for the next epoch. If multiple < 1 then protocol emits less ASTRO than it buys back, otherwise protocol is inflating ASTRO supply.", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - }, - "factory": { - "description": "Astroport Factory contract", - "type": "string" - }, - "fee_receiver": { - "description": "Address that receives the whitelisting fee", - "type": "string" - }, - "max_astro": { - "description": "Max ASTRO allowed per epoch. Parameter of the dynamic emissions curve.", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "owner": { - "description": "Contract owner", - "type": "string" - }, - "pools_per_outpost": { - "description": "Max number of pools that can receive ASTRO emissions per outpost added. For example, if there are 3 outposts, and the pools_limit is 10, then 30 pools can receive ASTRO emissions. This limit doesn't enforce the exact number of pools per outpost, but adds flexibility to the contract to automatically adjust the max number of pools based on the number of outposts.", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vxastro_code_id": { - "description": "vxASTRO contract code id", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vxastro_marketing_info": { - "description": "vxASTRO token marketing info", - "allOf": [ - { - "$ref": "#/definitions/UpdateMarketingInfo" - } - ] - }, - "whitelist_threshold": { - "description": "Minimal percentage of total voting power required to keep a pool in the whitelist", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - }, - "whitelisting_fee": { - "description": "Fee required to whitelist a pool", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "xastro_denom": { - "description": "xASTRO denom", - "type": "string" - } - }, - "additionalProperties": false, - "definitions": { - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", - "type": "string" - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "EmbeddedLogo": { - "description": "This is used to store the logo on the blockchain in an accepted format. Enforce maximum size of 5KB on all variants.", - "oneOf": [ - { - "description": "Store the Logo as an SVG file. The content must conform to the spec at https://en.wikipedia.org/wiki/Scalable_Vector_Graphics (The contract should do some light-weight sanity-check validation)", - "type": "object", - "required": [ - "svg" - ], - "properties": { - "svg": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false - }, - { - "description": "Store the Logo as a PNG file. This will likely only support up to 64x64 or so within the 5KB limit.", - "type": "object", - "required": [ - "png" - ], - "properties": { - "png": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false - } - ] - }, - "Logo": { - "description": "This is used for uploading logo data, or setting it in InstantiateData", - "oneOf": [ - { - "description": "A reference to an externally hosted logo. Must be a valid HTTP or HTTPS URL.", - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false - }, - { - "description": "Logo content stored on the blockchain. Enforce maximum size of 5KB on all variants", - "type": "object", - "required": [ - "embedded" - ], - "properties": { - "embedded": { - "$ref": "#/definitions/EmbeddedLogo" - } - }, - "additionalProperties": false - } - ] - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "UpdateMarketingInfo": { - "description": "This structure stores marketing information for vxASTRO.", - "type": "object", - "required": [ - "logo" - ], - "properties": { - "description": { - "description": "Token description", - "type": [ - "string", - "null" - ] - }, - "logo": { - "description": "Token logo", - "allOf": [ - { - "$ref": "#/definitions/Logo" - } - ] - }, - "marketing": { - "description": "Token marketing information", - "type": [ - "string", - "null" - ] - }, - "project": { - "description": "Project URL", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - } - }, - "execute": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ExecuteMsg", - "oneOf": [ - { - "description": "Vote allows a vxASTRO holders to cast votes on which pools should get ASTRO emissions in the next epoch", - "type": "object", - "required": [ - "vote" - ], - "properties": { - "vote": { - "type": "object", - "required": [ - "votes" - ], - "properties": { - "votes": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/Decimal" - } - ], - "maxItems": 2, - "minItems": 2 - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Only vxASTRO contract can call this endpoint. Updates user votes according to the current voting power.", - "type": "object", - "required": [ - "update_user_votes" - ], - "properties": { - "update_user_votes": { - "type": "object", - "required": [ - "is_unlock", - "user" - ], - "properties": { - "is_unlock": { - "type": "boolean" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Permissionless endpoint which allows user to update their voting power contribution in case of IBC failures or if pool has been re-added to whitelist.", - "type": "object", - "required": [ - "refresh_user_votes" - ], - "properties": { - "refresh_user_votes": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "ProposeNewOwner proposes a new owner for the contract", - "type": "object", - "required": [ - "propose_new_owner" - ], - "properties": { - "propose_new_owner": { - "type": "object", - "required": [ - "expires_in", - "new_owner" - ], - "properties": { - "expires_in": { - "description": "The timestamp when the contract ownership change expires", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "new_owner": { - "description": "Newly proposed contract owner", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "DropOwnershipProposal removes the latest contract ownership transfer proposal", - "type": "object", - "required": [ - "drop_ownership_proposal" - ], - "properties": { - "drop_ownership_proposal": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "ClaimOwnership allows the newly proposed owner to claim contract ownership", - "type": "object", - "required": [ - "claim_ownership" - ], - "properties": { - "claim_ownership": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Set of endpoints specific for Hub/Outpost", - "type": "object", - "required": [ - "custom" - ], - "properties": { - "custom": { - "$ref": "#/definitions/HubMsg" - } - }, - "additionalProperties": false - } - ], - "definitions": { - "AstroPoolConfig": { - "description": "Each outpost may have one pool that receives flat ASTRO emissions. This pools doesn't participate in the voting process.", - "type": "object", - "required": [ - "astro_pool", - "constant_emissions" - ], - "properties": { - "astro_pool": { - "description": "Pool with ASTRO which needs to receive flat emissions", - "type": "string" - }, - "constant_emissions": { - "description": "Amount of ASTRO per epoch", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "HubMsg": { - "oneOf": [ - { - "description": "TunePools transforms the latest vote distribution into ASTRO emissions", - "type": "object", - "required": [ - "tune_pools" - ], - "properties": { - "tune_pools": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Repeats IBC transfer messages with IBC hook for all outposts in Failed state.", - "type": "object", - "required": [ - "retry_failed_outposts" - ], - "properties": { - "retry_failed_outposts": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update the contract configuration", - "type": "object", - "required": [ - "update_config" - ], - "properties": { - "update_config": { - "type": "object", - "properties": { - "emissions_multiple": { - "anyOf": [ - { - "$ref": "#/definitions/Decimal" - }, - { - "type": "null" - } - ] - }, - "fee_receiver": { - "type": [ - "string", - "null" - ] - }, - "max_astro": { - "anyOf": [ - { - "$ref": "#/definitions/Uint128" - }, - { - "type": "null" - } - ] - }, - "pools_per_outpost": { - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "whitelisting_fee": { - "anyOf": [ - { - "$ref": "#/definitions/Coin" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Whitelists a pool to receive ASTRO emissions. Requires fee payment", - "type": "object", - "required": [ - "whitelist_pool" - ], - "properties": { - "whitelist_pool": { - "type": "object", - "required": [ - "lp_token" - ], - "properties": { - "lp_token": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Register or update an outpost", - "type": "object", - "required": [ - "update_outpost" - ], - "properties": { - "update_outpost": { - "type": "object", - "required": [ - "astro_denom", - "prefix" - ], - "properties": { - "astro_denom": { - "description": "Astro denom on this outpost", - "type": "string" - }, - "astro_pool_config": { - "description": "A pool that must receive flat ASTRO emissions. Optional.", - "anyOf": [ - { - "$ref": "#/definitions/AstroPoolConfig" - }, - { - "type": "null" - } - ] - }, - "outpost_params": { - "description": "Outpost params contain all necessary information to interact with the remote outpost. This field also serves as marker whether it is The hub (params: None) or remote outpost (Some(params))", - "anyOf": [ - { - "$ref": "#/definitions/InputOutpostParams" - }, - { - "type": "null" - } - ] - }, - "prefix": { - "description": "Bech32 prefix", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Jail an outpost. Jailed outposts can't participate in the voting process but still allow outpost users to unlock their vxASTRO.", - "type": "object", - "required": [ - "jail_outpost" - ], - "properties": { - "jail_outpost": { - "type": "object", - "required": [ - "prefix" - ], - "properties": { - "prefix": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Unjail an outpost. Unjailed outposts retain all previous configurations but will need to whitelist pools and start a voting process from scratch.", - "type": "object", - "required": [ - "unjail_outpost" - ], - "properties": { - "unjail_outpost": { - "type": "object", - "required": [ - "prefix" - ], - "properties": { - "prefix": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Permissionless endpoint to stream proposal info from the Hub to all outposts", - "type": "object", - "required": [ - "register_proposal" - ], - "properties": { - "register_proposal": { - "type": "object", - "required": [ - "proposal_id" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "InputOutpostParams": { - "type": "object", - "required": [ - "emissions_controller", - "ics20_channel", - "voting_channel" - ], - "properties": { - "emissions_controller": { - "description": "Emissions controller on a given outpost", - "type": "string" - }, - "ics20_channel": { - "description": "General IBC channel for fungible token transfers", - "type": "string" - }, - "voting_channel": { - "description": "wasm<>wasm IBC channel for voting", - "type": "string" - } - }, - "additionalProperties": false - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "query": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "description": "This structure describes the query messages available in the contract.", - "oneOf": [ - { - "description": "UserInfo returns information about a voter and the pools they voted for. If timestamp is not provided, the current block time is used.", - "type": "object", - "required": [ - "user_info" - ], - "properties": { - "user_info": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "timestamp": { - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "TuneInfo returns emissions voting outcome at a certain timestamp. If timestamp is not provided, return the latest tune info.", - "type": "object", - "required": [ - "tune_info" - ], - "properties": { - "tune_info": { - "type": "object", - "properties": { - "timestamp": { - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Config returns the contract configuration", - "type": "object", - "required": [ - "config" - ], - "properties": { - "config": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "VotedPools returns how much voting power a pool received at a certain timestamp.", - "type": "object", - "required": [ - "voted_pool" - ], - "properties": { - "voted_pool": { - "type": "object", - "required": [ - "pool" - ], - "properties": { - "pool": { - "type": "string" - }, - "timestamp": { - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Returns paginated list of all pools that received votes at the current epoch", - "type": "object", - "required": [ - "voted_pools" - ], - "properties": { - "voted_pools": { - "type": "object", - "properties": { - "limit": { - "type": [ - "integer", - "null" - ], - "format": "uint8", - "minimum": 0.0 - }, - "start_after": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "ListOutposts returns all outposts registered in the contract", - "type": "object", - "required": [ - "list_outposts" - ], - "properties": { - "list_outposts": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "QueryWhitelist returns the list of pools that are allowed to be voted for. The query is paginated. If 'start_after' is provided, it yields a list **excluding** 'start_after'.", - "type": "object", - "required": [ - "query_whitelist" - ], - "properties": { - "query_whitelist": { - "type": "object", - "properties": { - "limit": { - "type": [ - "integer", - "null" - ], - "format": "uint8", - "minimum": 0.0 - }, - "start_after": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "SimulateTune simulates the ASTRO amount that will be emitted in the next epoch per pool considering if the next epoch starts right now. This query is useful for the UI to show the expected ASTRO emissions as well as might be useful for integrator estimations. It filters out pools which don't belong to any of outposts and invalid Hub-based LP tokens. Returns TuneResultResponse object which contains emissions state and next pools grouped by outpost prefix.", - "type": "object", - "required": [ - "simulate_tune" - ], - "properties": { - "simulate_tune": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "migrate": null, - "sudo": null, - "responses": { - "config": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Config", - "description": "General contract configuration", - "type": "object", - "required": [ - "assembly", - "astro_denom", - "emissions_multiple", - "factory", - "fee_receiver", - "incentives_addr", - "max_astro", - "owner", - "pools_per_outpost", - "staking", - "vxastro", - "whitelist_threshold", - "whitelisting_fee", - "xastro_denom" - ], - "properties": { - "assembly": { - "description": "Astroport Assembly contract address", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "astro_denom": { - "description": "ASTRO denom on the Hub", - "type": "string" - }, - "emissions_multiple": { - "description": "Controls the number of ASTRO emissions for the next epoch where next amount = two epoch EMA * emissions_multiple. If multiple < 1 then protocol emits less ASTRO than it buys back, otherwise protocol is inflating ASTRO supply.", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - }, - "factory": { - "description": "Astroport Factory contract", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "fee_receiver": { - "description": "Address that receives the whitelisting fee", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "incentives_addr": { - "description": "The Astroport Incentives contract", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "max_astro": { - "description": "Max ASTRO allowed per epoch. Parameter of the dynamic emissions curve.", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "owner": { - "description": "Address that's allowed to change contract parameters", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "pools_per_outpost": { - "description": "Max number of pools that can receive ASTRO emissions per outpost added. For example, if there are 3 outposts, and the pools_limit is 10, then 30 pools can receive ASTRO emissions. This limit doesn't enforce the exact number of pools per outpost, but adds flexibility to the contract to automatically adjust the max number of pools based on the number of outposts.", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "staking": { - "description": "Staking contract", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "vxastro": { - "description": "vxASTRO contract address", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "whitelist_threshold": { - "description": "Minimal percentage of total voting power required to keep a pool in the whitelist", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - }, - "whitelisting_fee": { - "description": "Fee required to whitelist a pool", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "xastro_denom": { - "description": "xASTRO denom", - "type": "string" - } - }, - "additionalProperties": false, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "list_outposts": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Array_of_Tuple_of_String_and_OutpostInfo", - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/OutpostInfo" - } - ], - "maxItems": 2, - "minItems": 2 - }, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "AstroPoolConfig": { - "description": "Each outpost may have one pool that receives flat ASTRO emissions. This pools doesn't participate in the voting process.", - "type": "object", - "required": [ - "astro_pool", - "constant_emissions" - ], - "properties": { - "astro_pool": { - "description": "Pool with ASTRO which needs to receive flat emissions", - "type": "string" - }, - "constant_emissions": { - "description": "Amount of ASTRO per epoch", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false - }, - "OutpostInfo": { - "type": "object", - "required": [ - "astro_denom", - "jailed" - ], - "properties": { - "astro_denom": { - "description": "ASTRO token denom", - "type": "string" - }, - "astro_pool_config": { - "description": "A pool that must receive flat ASTRO emissions. Optional.", - "anyOf": [ - { - "$ref": "#/definitions/AstroPoolConfig" - }, - { - "type": "null" - } - ] - }, - "jailed": { - "description": "Defines whether outpost is jailed. Jailed outposts can't participate in the voting process, but they still allow remote users to unstake their vxASTRO.", - "type": "boolean" - }, - "params": { - "description": "Outpost params contain all necessary information to interact with the remote outpost. This field also serves as marker whether it is The hub (params: None) or remote outpost (Some(params))", - "anyOf": [ - { - "$ref": "#/definitions/OutpostParams" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - }, - "OutpostParams": { - "type": "object", - "required": [ - "emissions_controller", - "escrow_address", - "ics20_channel", - "voting_channel" - ], - "properties": { - "emissions_controller": { - "description": "Emissions controller on a given outpost", - "type": "string" - }, - "escrow_address": { - "description": "ICS20 transfer escrow address on Neutron. Calculated automatically based on channel id", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "ics20_channel": { - "description": "General IBC channel for fungible token transfers", - "type": "string" - }, - "voting_channel": { - "description": "wasm<>wasm IBC channel for voting", - "type": "string" - } - }, - "additionalProperties": false - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "query_whitelist": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Array_of_String", - "type": "array", - "items": { - "type": "string" - } - }, - "simulate_tune": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SimulateTuneResponse", - "type": "object", - "required": [ - "new_emissions_state", - "next_pools_grouped" - ], - "properties": { - "new_emissions_state": { - "$ref": "#/definitions/EmissionsState" - }, - "next_pools_grouped": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/Uint128" - } - ], - "maxItems": 2, - "minItems": 2 - } - } - } - }, - "additionalProperties": false, - "definitions": { - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "EmissionsState": { - "type": "object", - "required": [ - "collected_astro", - "ema", - "emissions_amount", - "xastro_rate" - ], - "properties": { - "collected_astro": { - "description": "Collected ASTRO from previous epoch.", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "ema": { - "description": "EMA of the collected ASTRO from the previous epoch", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "emissions_amount": { - "description": "Amount of ASTRO to be emitted in the current epoch", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "xastro_rate": { - "description": "xASTRO to ASTRO staking rate from the previous epoch", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - } - }, - "additionalProperties": false - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "tune_info": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "TuneInfo", - "type": "object", - "required": [ - "emissions_state", - "outpost_emissions_statuses", - "pools_grouped", - "tune_ts" - ], - "properties": { - "emissions_state": { - "description": "State of the dynamic emissions curve", - "allOf": [ - { - "$ref": "#/definitions/EmissionsState" - } - ] - }, - "outpost_emissions_statuses": { - "description": "Map of outpost prefix -> IBC status. Hub should never enter this map.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/OutpostStatus" - } - }, - "pools_grouped": { - "description": "Map of outpost prefix -> array of pools with their emissions", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/Uint128" - } - ], - "maxItems": 2, - "minItems": 2 - } - } - }, - "tune_ts": { - "description": "Last time when the tune was executed. Matches epoch start i.e., Monday 00:00 UTC every 2 weeks", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false, - "definitions": { - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "EmissionsState": { - "type": "object", - "required": [ - "collected_astro", - "ema", - "emissions_amount", - "xastro_rate" - ], - "properties": { - "collected_astro": { - "description": "Collected ASTRO from previous epoch.", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "ema": { - "description": "EMA of the collected ASTRO from the previous epoch", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "emissions_amount": { - "description": "Amount of ASTRO to be emitted in the current epoch", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "xastro_rate": { - "description": "xASTRO to ASTRO staking rate from the previous epoch", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - } - }, - "additionalProperties": false - }, - "OutpostStatus": { - "type": "string", - "enum": [ - "in_progress", - "failed", - "done" - ] - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "user_info": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "UserInfoResponse", - "type": "object", - "required": [ - "applied_votes", - "vote_ts", - "votes", - "voting_power" - ], - "properties": { - "applied_votes": { - "description": "Actual applied votes. This list excludes non-whitelisted pools", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Decimal" - } - }, - "vote_ts": { - "description": "Last time when a user voted", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "votes": { - "description": "Vote distribution for all the pools a user picked", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Decimal" - } - }, - "voting_power": { - "description": "Voting power used for the vote", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "voted_pool": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "VotedPoolInfo", - "type": "object", - "required": [ - "init_ts", - "voting_power" - ], - "properties": { - "init_ts": { - "description": "Time when the pool was whitelisted", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "voting_power": { - "description": "Voting power the pool received", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "voted_pools": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Array_of_Tuple_of_String_and_VotedPoolInfo", - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/VotedPoolInfo" - } - ], - "maxItems": 2, - "minItems": 2 - }, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "VotedPoolInfo": { - "type": "object", - "required": [ - "init_ts", - "voting_power" - ], - "properties": { - "init_ts": { - "description": "Time when the pool was whitelisted", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "voting_power": { - "description": "Voting power the pool received", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false - } - } - } - } -} diff --git a/schemas/astroport-emissions-controller/raw/execute.json b/schemas/astroport-emissions-controller/raw/execute.json deleted file mode 100644 index 49d596e..0000000 --- a/schemas/astroport-emissions-controller/raw/execute.json +++ /dev/null @@ -1,455 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ExecuteMsg", - "oneOf": [ - { - "description": "Vote allows a vxASTRO holders to cast votes on which pools should get ASTRO emissions in the next epoch", - "type": "object", - "required": [ - "vote" - ], - "properties": { - "vote": { - "type": "object", - "required": [ - "votes" - ], - "properties": { - "votes": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/Decimal" - } - ], - "maxItems": 2, - "minItems": 2 - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Only vxASTRO contract can call this endpoint. Updates user votes according to the current voting power.", - "type": "object", - "required": [ - "update_user_votes" - ], - "properties": { - "update_user_votes": { - "type": "object", - "required": [ - "is_unlock", - "user" - ], - "properties": { - "is_unlock": { - "type": "boolean" - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Permissionless endpoint which allows user to update their voting power contribution in case of IBC failures or if pool has been re-added to whitelist.", - "type": "object", - "required": [ - "refresh_user_votes" - ], - "properties": { - "refresh_user_votes": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "ProposeNewOwner proposes a new owner for the contract", - "type": "object", - "required": [ - "propose_new_owner" - ], - "properties": { - "propose_new_owner": { - "type": "object", - "required": [ - "expires_in", - "new_owner" - ], - "properties": { - "expires_in": { - "description": "The timestamp when the contract ownership change expires", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "new_owner": { - "description": "Newly proposed contract owner", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "DropOwnershipProposal removes the latest contract ownership transfer proposal", - "type": "object", - "required": [ - "drop_ownership_proposal" - ], - "properties": { - "drop_ownership_proposal": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "ClaimOwnership allows the newly proposed owner to claim contract ownership", - "type": "object", - "required": [ - "claim_ownership" - ], - "properties": { - "claim_ownership": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Set of endpoints specific for Hub/Outpost", - "type": "object", - "required": [ - "custom" - ], - "properties": { - "custom": { - "$ref": "#/definitions/HubMsg" - } - }, - "additionalProperties": false - } - ], - "definitions": { - "AstroPoolConfig": { - "description": "Each outpost may have one pool that receives flat ASTRO emissions. This pools doesn't participate in the voting process.", - "type": "object", - "required": [ - "astro_pool", - "constant_emissions" - ], - "properties": { - "astro_pool": { - "description": "Pool with ASTRO which needs to receive flat emissions", - "type": "string" - }, - "constant_emissions": { - "description": "Amount of ASTRO per epoch", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "HubMsg": { - "oneOf": [ - { - "description": "TunePools transforms the latest vote distribution into ASTRO emissions", - "type": "object", - "required": [ - "tune_pools" - ], - "properties": { - "tune_pools": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Repeats IBC transfer messages with IBC hook for all outposts in Failed state.", - "type": "object", - "required": [ - "retry_failed_outposts" - ], - "properties": { - "retry_failed_outposts": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update the contract configuration", - "type": "object", - "required": [ - "update_config" - ], - "properties": { - "update_config": { - "type": "object", - "properties": { - "emissions_multiple": { - "anyOf": [ - { - "$ref": "#/definitions/Decimal" - }, - { - "type": "null" - } - ] - }, - "fee_receiver": { - "type": [ - "string", - "null" - ] - }, - "max_astro": { - "anyOf": [ - { - "$ref": "#/definitions/Uint128" - }, - { - "type": "null" - } - ] - }, - "pools_per_outpost": { - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "whitelisting_fee": { - "anyOf": [ - { - "$ref": "#/definitions/Coin" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Whitelists a pool to receive ASTRO emissions. Requires fee payment", - "type": "object", - "required": [ - "whitelist_pool" - ], - "properties": { - "whitelist_pool": { - "type": "object", - "required": [ - "lp_token" - ], - "properties": { - "lp_token": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Register or update an outpost", - "type": "object", - "required": [ - "update_outpost" - ], - "properties": { - "update_outpost": { - "type": "object", - "required": [ - "astro_denom", - "prefix" - ], - "properties": { - "astro_denom": { - "description": "Astro denom on this outpost", - "type": "string" - }, - "astro_pool_config": { - "description": "A pool that must receive flat ASTRO emissions. Optional.", - "anyOf": [ - { - "$ref": "#/definitions/AstroPoolConfig" - }, - { - "type": "null" - } - ] - }, - "outpost_params": { - "description": "Outpost params contain all necessary information to interact with the remote outpost. This field also serves as marker whether it is The hub (params: None) or remote outpost (Some(params))", - "anyOf": [ - { - "$ref": "#/definitions/InputOutpostParams" - }, - { - "type": "null" - } - ] - }, - "prefix": { - "description": "Bech32 prefix", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Jail an outpost. Jailed outposts can't participate in the voting process but still allow outpost users to unlock their vxASTRO.", - "type": "object", - "required": [ - "jail_outpost" - ], - "properties": { - "jail_outpost": { - "type": "object", - "required": [ - "prefix" - ], - "properties": { - "prefix": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Unjail an outpost. Unjailed outposts retain all previous configurations but will need to whitelist pools and start a voting process from scratch.", - "type": "object", - "required": [ - "unjail_outpost" - ], - "properties": { - "unjail_outpost": { - "type": "object", - "required": [ - "prefix" - ], - "properties": { - "prefix": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Permissionless endpoint to stream proposal info from the Hub to all outposts", - "type": "object", - "required": [ - "register_proposal" - ], - "properties": { - "register_proposal": { - "type": "object", - "required": [ - "proposal_id" - ], - "properties": { - "proposal_id": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "InputOutpostParams": { - "type": "object", - "required": [ - "emissions_controller", - "ics20_channel", - "voting_channel" - ], - "properties": { - "emissions_controller": { - "description": "Emissions controller on a given outpost", - "type": "string" - }, - "ics20_channel": { - "description": "General IBC channel for fungible token transfers", - "type": "string" - }, - "voting_channel": { - "description": "wasm<>wasm IBC channel for voting", - "type": "string" - } - }, - "additionalProperties": false - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/astroport-emissions-controller/raw/instantiate.json b/schemas/astroport-emissions-controller/raw/instantiate.json deleted file mode 100644 index 87b3a69..0000000 --- a/schemas/astroport-emissions-controller/raw/instantiate.json +++ /dev/null @@ -1,248 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "description": "This structure describes the basic settings for creating a contract.", - "type": "object", - "required": [ - "assembly", - "astro_denom", - "collected_astro", - "ema", - "emissions_multiple", - "factory", - "fee_receiver", - "max_astro", - "owner", - "pools_per_outpost", - "vxastro_code_id", - "vxastro_marketing_info", - "whitelist_threshold", - "whitelisting_fee", - "xastro_denom" - ], - "properties": { - "assembly": { - "description": "Astroport Assembly contract address", - "type": "string" - }, - "astro_denom": { - "description": "ASTRO denom on the Hub", - "type": "string" - }, - "collected_astro": { - "description": "Defines the number of ASTRO collected to staking contract from 2-weeks period preceding the current epoch.", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "ema": { - "description": "EMA of the collected ASTRO from the previous epoch", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "emissions_multiple": { - "description": "Controls ASTRO emissions for the next epoch. If multiple < 1 then protocol emits less ASTRO than it buys back, otherwise protocol is inflating ASTRO supply.", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - }, - "factory": { - "description": "Astroport Factory contract", - "type": "string" - }, - "fee_receiver": { - "description": "Address that receives the whitelisting fee", - "type": "string" - }, - "max_astro": { - "description": "Max ASTRO allowed per epoch. Parameter of the dynamic emissions curve.", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "owner": { - "description": "Contract owner", - "type": "string" - }, - "pools_per_outpost": { - "description": "Max number of pools that can receive ASTRO emissions per outpost added. For example, if there are 3 outposts, and the pools_limit is 10, then 30 pools can receive ASTRO emissions. This limit doesn't enforce the exact number of pools per outpost, but adds flexibility to the contract to automatically adjust the max number of pools based on the number of outposts.", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vxastro_code_id": { - "description": "vxASTRO contract code id", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "vxastro_marketing_info": { - "description": "vxASTRO token marketing info", - "allOf": [ - { - "$ref": "#/definitions/UpdateMarketingInfo" - } - ] - }, - "whitelist_threshold": { - "description": "Minimal percentage of total voting power required to keep a pool in the whitelist", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - }, - "whitelisting_fee": { - "description": "Fee required to whitelist a pool", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "xastro_denom": { - "description": "xASTRO denom", - "type": "string" - } - }, - "additionalProperties": false, - "definitions": { - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", - "type": "string" - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "EmbeddedLogo": { - "description": "This is used to store the logo on the blockchain in an accepted format. Enforce maximum size of 5KB on all variants.", - "oneOf": [ - { - "description": "Store the Logo as an SVG file. The content must conform to the spec at https://en.wikipedia.org/wiki/Scalable_Vector_Graphics (The contract should do some light-weight sanity-check validation)", - "type": "object", - "required": [ - "svg" - ], - "properties": { - "svg": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false - }, - { - "description": "Store the Logo as a PNG file. This will likely only support up to 64x64 or so within the 5KB limit.", - "type": "object", - "required": [ - "png" - ], - "properties": { - "png": { - "$ref": "#/definitions/Binary" - } - }, - "additionalProperties": false - } - ] - }, - "Logo": { - "description": "This is used for uploading logo data, or setting it in InstantiateData", - "oneOf": [ - { - "description": "A reference to an externally hosted logo. Must be a valid HTTP or HTTPS URL.", - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "type": "string" - } - }, - "additionalProperties": false - }, - { - "description": "Logo content stored on the blockchain. Enforce maximum size of 5KB on all variants", - "type": "object", - "required": [ - "embedded" - ], - "properties": { - "embedded": { - "$ref": "#/definitions/EmbeddedLogo" - } - }, - "additionalProperties": false - } - ] - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "UpdateMarketingInfo": { - "description": "This structure stores marketing information for vxASTRO.", - "type": "object", - "required": [ - "logo" - ], - "properties": { - "description": { - "description": "Token description", - "type": [ - "string", - "null" - ] - }, - "logo": { - "description": "Token logo", - "allOf": [ - { - "$ref": "#/definitions/Logo" - } - ] - }, - "marketing": { - "description": "Token marketing information", - "type": [ - "string", - "null" - ] - }, - "project": { - "description": "Project URL", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - } -} diff --git a/schemas/astroport-emissions-controller/raw/query.json b/schemas/astroport-emissions-controller/raw/query.json deleted file mode 100644 index 86bda0f..0000000 --- a/schemas/astroport-emissions-controller/raw/query.json +++ /dev/null @@ -1,193 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "description": "This structure describes the query messages available in the contract.", - "oneOf": [ - { - "description": "UserInfo returns information about a voter and the pools they voted for. If timestamp is not provided, the current block time is used.", - "type": "object", - "required": [ - "user_info" - ], - "properties": { - "user_info": { - "type": "object", - "required": [ - "user" - ], - "properties": { - "timestamp": { - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - }, - "user": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "TuneInfo returns emissions voting outcome at a certain timestamp. If timestamp is not provided, return the latest tune info.", - "type": "object", - "required": [ - "tune_info" - ], - "properties": { - "tune_info": { - "type": "object", - "properties": { - "timestamp": { - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Config returns the contract configuration", - "type": "object", - "required": [ - "config" - ], - "properties": { - "config": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "VotedPools returns how much voting power a pool received at a certain timestamp.", - "type": "object", - "required": [ - "voted_pool" - ], - "properties": { - "voted_pool": { - "type": "object", - "required": [ - "pool" - ], - "properties": { - "pool": { - "type": "string" - }, - "timestamp": { - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Returns paginated list of all pools that received votes at the current epoch", - "type": "object", - "required": [ - "voted_pools" - ], - "properties": { - "voted_pools": { - "type": "object", - "properties": { - "limit": { - "type": [ - "integer", - "null" - ], - "format": "uint8", - "minimum": 0.0 - }, - "start_after": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "ListOutposts returns all outposts registered in the contract", - "type": "object", - "required": [ - "list_outposts" - ], - "properties": { - "list_outposts": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "QueryWhitelist returns the list of pools that are allowed to be voted for. The query is paginated. If 'start_after' is provided, it yields a list **excluding** 'start_after'.", - "type": "object", - "required": [ - "query_whitelist" - ], - "properties": { - "query_whitelist": { - "type": "object", - "properties": { - "limit": { - "type": [ - "integer", - "null" - ], - "format": "uint8", - "minimum": 0.0 - }, - "start_after": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "SimulateTune simulates the ASTRO amount that will be emitted in the next epoch per pool considering if the next epoch starts right now. This query is useful for the UI to show the expected ASTRO emissions as well as might be useful for integrator estimations. It filters out pools which don't belong to any of outposts and invalid Hub-based LP tokens. Returns TuneResultResponse object which contains emissions state and next pools grouped by outpost prefix.", - "type": "object", - "required": [ - "simulate_tune" - ], - "properties": { - "simulate_tune": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] -} diff --git a/schemas/astroport-emissions-controller/raw/response_to_config.json b/schemas/astroport-emissions-controller/raw/response_to_config.json deleted file mode 100644 index fb59f4a..0000000 --- a/schemas/astroport-emissions-controller/raw/response_to_config.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Config", - "description": "General contract configuration", - "type": "object", - "required": [ - "assembly", - "astro_denom", - "emissions_multiple", - "factory", - "fee_receiver", - "incentives_addr", - "max_astro", - "owner", - "pools_per_outpost", - "staking", - "vxastro", - "whitelist_threshold", - "whitelisting_fee", - "xastro_denom" - ], - "properties": { - "assembly": { - "description": "Astroport Assembly contract address", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "astro_denom": { - "description": "ASTRO denom on the Hub", - "type": "string" - }, - "emissions_multiple": { - "description": "Controls the number of ASTRO emissions for the next epoch where next amount = two epoch EMA * emissions_multiple. If multiple < 1 then protocol emits less ASTRO than it buys back, otherwise protocol is inflating ASTRO supply.", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - }, - "factory": { - "description": "Astroport Factory contract", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "fee_receiver": { - "description": "Address that receives the whitelisting fee", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "incentives_addr": { - "description": "The Astroport Incentives contract", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "max_astro": { - "description": "Max ASTRO allowed per epoch. Parameter of the dynamic emissions curve.", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "owner": { - "description": "Address that's allowed to change contract parameters", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "pools_per_outpost": { - "description": "Max number of pools that can receive ASTRO emissions per outpost added. For example, if there are 3 outposts, and the pools_limit is 10, then 30 pools can receive ASTRO emissions. This limit doesn't enforce the exact number of pools per outpost, but adds flexibility to the contract to automatically adjust the max number of pools based on the number of outposts.", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "staking": { - "description": "Staking contract", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "vxastro": { - "description": "vxASTRO contract address", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "whitelist_threshold": { - "description": "Minimal percentage of total voting power required to keep a pool in the whitelist", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - }, - "whitelisting_fee": { - "description": "Fee required to whitelist a pool", - "allOf": [ - { - "$ref": "#/definitions/Coin" - } - ] - }, - "xastro_denom": { - "description": "xASTRO denom", - "type": "string" - } - }, - "additionalProperties": false, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - } - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/astroport-emissions-controller/raw/response_to_list_outposts.json b/schemas/astroport-emissions-controller/raw/response_to_list_outposts.json deleted file mode 100644 index 3879d04..0000000 --- a/schemas/astroport-emissions-controller/raw/response_to_list_outposts.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Array_of_Tuple_of_String_and_OutpostInfo", - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/OutpostInfo" - } - ], - "maxItems": 2, - "minItems": 2 - }, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "AstroPoolConfig": { - "description": "Each outpost may have one pool that receives flat ASTRO emissions. This pools doesn't participate in the voting process.", - "type": "object", - "required": [ - "astro_pool", - "constant_emissions" - ], - "properties": { - "astro_pool": { - "description": "Pool with ASTRO which needs to receive flat emissions", - "type": "string" - }, - "constant_emissions": { - "description": "Amount of ASTRO per epoch", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false - }, - "OutpostInfo": { - "type": "object", - "required": [ - "astro_denom", - "jailed" - ], - "properties": { - "astro_denom": { - "description": "ASTRO token denom", - "type": "string" - }, - "astro_pool_config": { - "description": "A pool that must receive flat ASTRO emissions. Optional.", - "anyOf": [ - { - "$ref": "#/definitions/AstroPoolConfig" - }, - { - "type": "null" - } - ] - }, - "jailed": { - "description": "Defines whether outpost is jailed. Jailed outposts can't participate in the voting process, but they still allow remote users to unstake their vxASTRO.", - "type": "boolean" - }, - "params": { - "description": "Outpost params contain all necessary information to interact with the remote outpost. This field also serves as marker whether it is The hub (params: None) or remote outpost (Some(params))", - "anyOf": [ - { - "$ref": "#/definitions/OutpostParams" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - }, - "OutpostParams": { - "type": "object", - "required": [ - "emissions_controller", - "escrow_address", - "ics20_channel", - "voting_channel" - ], - "properties": { - "emissions_controller": { - "description": "Emissions controller on a given outpost", - "type": "string" - }, - "escrow_address": { - "description": "ICS20 transfer escrow address on Neutron. Calculated automatically based on channel id", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - }, - "ics20_channel": { - "description": "General IBC channel for fungible token transfers", - "type": "string" - }, - "voting_channel": { - "description": "wasm<>wasm IBC channel for voting", - "type": "string" - } - }, - "additionalProperties": false - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/astroport-emissions-controller/raw/response_to_query_whitelist.json b/schemas/astroport-emissions-controller/raw/response_to_query_whitelist.json deleted file mode 100644 index 4290cb1..0000000 --- a/schemas/astroport-emissions-controller/raw/response_to_query_whitelist.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Array_of_String", - "type": "array", - "items": { - "type": "string" - } -} diff --git a/schemas/astroport-emissions-controller/raw/response_to_simulate_tune.json b/schemas/astroport-emissions-controller/raw/response_to_simulate_tune.json deleted file mode 100644 index 6eabc4d..0000000 --- a/schemas/astroport-emissions-controller/raw/response_to_simulate_tune.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SimulateTuneResponse", - "type": "object", - "required": [ - "new_emissions_state", - "next_pools_grouped" - ], - "properties": { - "new_emissions_state": { - "$ref": "#/definitions/EmissionsState" - }, - "next_pools_grouped": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/Uint128" - } - ], - "maxItems": 2, - "minItems": 2 - } - } - } - }, - "additionalProperties": false, - "definitions": { - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "EmissionsState": { - "type": "object", - "required": [ - "collected_astro", - "ema", - "emissions_amount", - "xastro_rate" - ], - "properties": { - "collected_astro": { - "description": "Collected ASTRO from previous epoch.", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "ema": { - "description": "EMA of the collected ASTRO from the previous epoch", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "emissions_amount": { - "description": "Amount of ASTRO to be emitted in the current epoch", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "xastro_rate": { - "description": "xASTRO to ASTRO staking rate from the previous epoch", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - } - }, - "additionalProperties": false - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/astroport-emissions-controller/raw/response_to_tune_info.json b/schemas/astroport-emissions-controller/raw/response_to_tune_info.json deleted file mode 100644 index fe182bf..0000000 --- a/schemas/astroport-emissions-controller/raw/response_to_tune_info.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "TuneInfo", - "type": "object", - "required": [ - "emissions_state", - "outpost_emissions_statuses", - "pools_grouped", - "tune_ts" - ], - "properties": { - "emissions_state": { - "description": "State of the dynamic emissions curve", - "allOf": [ - { - "$ref": "#/definitions/EmissionsState" - } - ] - }, - "outpost_emissions_statuses": { - "description": "Map of outpost prefix -> IBC status. Hub should never enter this map.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/OutpostStatus" - } - }, - "pools_grouped": { - "description": "Map of outpost prefix -> array of pools with their emissions", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/Uint128" - } - ], - "maxItems": 2, - "minItems": 2 - } - } - }, - "tune_ts": { - "description": "Last time when the tune was executed. Matches epoch start i.e., Monday 00:00 UTC every 2 weeks", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false, - "definitions": { - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "EmissionsState": { - "type": "object", - "required": [ - "collected_astro", - "ema", - "emissions_amount", - "xastro_rate" - ], - "properties": { - "collected_astro": { - "description": "Collected ASTRO from previous epoch.", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "ema": { - "description": "EMA of the collected ASTRO from the previous epoch", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "emissions_amount": { - "description": "Amount of ASTRO to be emitted in the current epoch", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "xastro_rate": { - "description": "xASTRO to ASTRO staking rate from the previous epoch", - "allOf": [ - { - "$ref": "#/definitions/Decimal" - } - ] - } - }, - "additionalProperties": false - }, - "OutpostStatus": { - "type": "string", - "enum": [ - "in_progress", - "failed", - "done" - ] - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/astroport-emissions-controller/raw/response_to_user_info.json b/schemas/astroport-emissions-controller/raw/response_to_user_info.json deleted file mode 100644 index b8c3d04..0000000 --- a/schemas/astroport-emissions-controller/raw/response_to_user_info.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "UserInfoResponse", - "type": "object", - "required": [ - "applied_votes", - "vote_ts", - "votes", - "voting_power" - ], - "properties": { - "applied_votes": { - "description": "Actual applied votes. This list excludes non-whitelisted pools", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Decimal" - } - }, - "vote_ts": { - "description": "Last time when a user voted", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "votes": { - "description": "Vote distribution for all the pools a user picked", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Decimal" - } - }, - "voting_power": { - "description": "Voting power used for the vote", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/astroport-emissions-controller/raw/response_to_voted_pool.json b/schemas/astroport-emissions-controller/raw/response_to_voted_pool.json deleted file mode 100644 index 11cfbc1..0000000 --- a/schemas/astroport-emissions-controller/raw/response_to_voted_pool.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "VotedPoolInfo", - "type": "object", - "required": [ - "init_ts", - "voting_power" - ], - "properties": { - "init_ts": { - "description": "Time when the pool was whitelisted", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "voting_power": { - "description": "Voting power the pool received", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/astroport-emissions-controller/raw/response_to_voted_pools.json b/schemas/astroport-emissions-controller/raw/response_to_voted_pools.json deleted file mode 100644 index 3cdf584..0000000 --- a/schemas/astroport-emissions-controller/raw/response_to_voted_pools.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Array_of_Tuple_of_String_and_VotedPoolInfo", - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/VotedPoolInfo" - } - ], - "maxItems": 2, - "minItems": 2 - }, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - }, - "VotedPoolInfo": { - "type": "object", - "required": [ - "init_ts", - "voting_power" - ], - "properties": { - "init_ts": { - "description": "Time when the pool was whitelisted", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "voting_power": { - "description": "Voting power the pool received", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false - } - } -} diff --git a/schemas/builder-unlock/builder-unlock.json b/schemas/builder-unlock/builder-unlock.json deleted file mode 100644 index 97dd320..0000000 --- a/schemas/builder-unlock/builder-unlock.json +++ /dev/null @@ -1,955 +0,0 @@ -{ - "contract_name": "builder-unlock", - "contract_version": "3.0.0", - "idl_version": "1.0.0", - "instantiate": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "type": "object", - "required": [ - "astro_denom", - "max_allocations_amount", - "owner" - ], - "properties": { - "astro_denom": { - "description": "ASTRO token denom", - "type": "string" - }, - "max_allocations_amount": { - "description": "Max ASTRO tokens to allocate", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "owner": { - "description": "Account that can create new allocations", - "type": "string" - } - }, - "additionalProperties": false, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "execute": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ExecuteMsg", - "description": "This enum describes all the execute functions available in the contract.", - "oneOf": [ - { - "description": "CreateAllocations creates new ASTRO allocations", - "type": "object", - "required": [ - "create_allocations" - ], - "properties": { - "create_allocations": { - "type": "object", - "required": [ - "allocations" - ], - "properties": { - "allocations": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/CreateAllocationParams" - } - ], - "maxItems": 2, - "minItems": 2 - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Withdraw claims withdrawable ASTRO", - "type": "object", - "required": [ - "withdraw" - ], - "properties": { - "withdraw": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "ProposeNewReceiver allows a user to change the receiver address for their ASTRO allocation", - "type": "object", - "required": [ - "propose_new_receiver" - ], - "properties": { - "propose_new_receiver": { - "type": "object", - "required": [ - "new_receiver" - ], - "properties": { - "new_receiver": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "DropNewReceiver allows a user to remove the previously proposed new receiver for their ASTRO allocation", - "type": "object", - "required": [ - "drop_new_receiver" - ], - "properties": { - "drop_new_receiver": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "ClaimReceiver allows newly proposed receivers to claim ASTRO allocations ownership", - "type": "object", - "required": [ - "claim_receiver" - ], - "properties": { - "claim_receiver": { - "type": "object", - "required": [ - "prev_receiver" - ], - "properties": { - "prev_receiver": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Increase the ASTRO allocation of a receiver", - "type": "object", - "required": [ - "increase_allocation" - ], - "properties": { - "increase_allocation": { - "type": "object", - "required": [ - "amount", - "receiver" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "receiver": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Decrease the ASTRO allocation of a receiver", - "type": "object", - "required": [ - "decrease_allocation" - ], - "properties": { - "decrease_allocation": { - "type": "object", - "required": [ - "amount", - "receiver" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "receiver": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Transfer unallocated tokens (only accessible to the owner)", - "type": "object", - "required": [ - "transfer_unallocated" - ], - "properties": { - "transfer_unallocated": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "recipient": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Propose a new owner for the contract", - "type": "object", - "required": [ - "propose_new_owner" - ], - "properties": { - "propose_new_owner": { - "type": "object", - "required": [ - "expires_in", - "new_owner" - ], - "properties": { - "expires_in": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "new_owner": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Remove the ownership transfer proposal", - "type": "object", - "required": [ - "drop_ownership_proposal" - ], - "properties": { - "drop_ownership_proposal": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Claim contract ownership", - "type": "object", - "required": [ - "claim_ownership" - ], - "properties": { - "claim_ownership": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update parameters in the contract configuration", - "type": "object", - "required": [ - "update_config" - ], - "properties": { - "update_config": { - "type": "object", - "required": [ - "new_max_allocations_amount" - ], - "properties": { - "new_max_allocations_amount": { - "$ref": "#/definitions/Uint128" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update a schedule of allocation for specified accounts", - "type": "object", - "required": [ - "update_unlock_schedules" - ], - "properties": { - "update_unlock_schedules": { - "type": "object", - "required": [ - "new_unlock_schedules" - ], - "properties": { - "new_unlock_schedules": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/Schedule" - } - ], - "maxItems": 2, - "minItems": 2 - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ], - "definitions": { - "CreateAllocationParams": { - "description": "This structure stores the parameters used to describe an ASTRO allocation.", - "type": "object", - "required": [ - "amount", - "unlock_schedule" - ], - "properties": { - "amount": { - "description": "Total amount of ASTRO tokens allocated to a specific account", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "unlock_schedule": { - "description": "Parameters controlling the unlocking process", - "allOf": [ - { - "$ref": "#/definitions/Schedule" - } - ] - } - }, - "additionalProperties": false - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "Schedule": { - "description": "This structure stores the parameters describing a typical unlock schedule.", - "type": "object", - "required": [ - "cliff", - "duration", - "start_time" - ], - "properties": { - "cliff": { - "description": "Cliff period during which no tokens can be withdrawn out of the contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "duration": { - "description": "Time after the cliff during which the remaining tokens linearly unlock", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "percent_at_cliff": { - "description": "Percentage of tokens unlocked at the cliff", - "anyOf": [ - { - "$ref": "#/definitions/Decimal" - }, - { - "type": "null" - } - ] - }, - "start_time": { - "description": "Timestamp for the start of the unlock schedule (in seconds)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "query": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "description": "This enum describes all the queries available in the contract.", - "oneOf": [ - { - "description": "Config returns the configuration for this contract", - "type": "object", - "required": [ - "config" - ], - "properties": { - "config": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "State returns the state of this contract", - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "type": "object", - "properties": { - "timestamp": { - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Allocation returns the parameters and current status of an allocation", - "type": "object", - "required": [ - "allocation" - ], - "properties": { - "allocation": { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "description": "Account whose allocation status we query", - "type": "string" - }, - "timestamp": { - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Allocations returns a vector that contains builder unlock allocations by specified parameters", - "type": "object", - "required": [ - "allocations" - ], - "properties": { - "allocations": { - "type": "object", - "properties": { - "limit": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "start_after": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "UnlockedTokens returns the unlocked tokens from an allocation", - "type": "object", - "required": [ - "unlocked_tokens" - ], - "properties": { - "unlocked_tokens": { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "description": "Account whose amount of unlocked ASTRO we query for", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "SimulateWithdraw simulates how many ASTRO will be released if a withdrawal is attempted", - "type": "object", - "required": [ - "simulate_withdraw" - ], - "properties": { - "simulate_withdraw": { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "description": "Account for which we simulate a withdrawal", - "type": "string" - }, - "timestamp": { - "description": "Timestamp used to simulate how much ASTRO the account can withdraw", - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "migrate": null, - "sudo": null, - "responses": { - "allocation": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "AllocationResponse", - "description": "This structure stores the parameters used to return the response when querying for an allocation data.", - "type": "object", - "required": [ - "params", - "status" - ], - "properties": { - "params": { - "description": "The allocation parameters", - "allOf": [ - { - "$ref": "#/definitions/AllocationParams" - } - ] - }, - "status": { - "description": "The allocation status", - "allOf": [ - { - "$ref": "#/definitions/AllocationStatus" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "AllocationParams": { - "type": "object", - "required": [ - "unlock_schedule" - ], - "properties": { - "proposed_receiver": { - "description": "Proposed new receiver who will get the ASTRO allocation", - "anyOf": [ - { - "$ref": "#/definitions/Addr" - }, - { - "type": "null" - } - ] - }, - "unlock_schedule": { - "description": "Parameters controlling the unlocking process", - "allOf": [ - { - "$ref": "#/definitions/Schedule" - } - ] - } - }, - "additionalProperties": false - }, - "AllocationStatus": { - "description": "This structure stores the parameters used to describe the status of an allocation.", - "type": "object", - "required": [ - "amount", - "astro_withdrawn", - "unlocked_amount_checkpoint" - ], - "properties": { - "amount": { - "description": "Total amount of ASTRO tokens allocated to a specific account", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "astro_withdrawn": { - "description": "Amount of ASTRO already withdrawn", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "unlocked_amount_checkpoint": { - "description": "Already unlocked amount after decreasing", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "Schedule": { - "description": "This structure stores the parameters describing a typical unlock schedule.", - "type": "object", - "required": [ - "cliff", - "duration", - "start_time" - ], - "properties": { - "cliff": { - "description": "Cliff period during which no tokens can be withdrawn out of the contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "duration": { - "description": "Time after the cliff during which the remaining tokens linearly unlock", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "percent_at_cliff": { - "description": "Percentage of tokens unlocked at the cliff", - "anyOf": [ - { - "$ref": "#/definitions/Decimal" - }, - { - "type": "null" - } - ] - }, - "start_time": { - "description": "Timestamp for the start of the unlock schedule (in seconds)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "allocations": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Array_of_Tuple_of_String_and_AllocationParams", - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/AllocationParams" - } - ], - "maxItems": 2, - "minItems": 2 - }, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "AllocationParams": { - "type": "object", - "required": [ - "unlock_schedule" - ], - "properties": { - "proposed_receiver": { - "description": "Proposed new receiver who will get the ASTRO allocation", - "anyOf": [ - { - "$ref": "#/definitions/Addr" - }, - { - "type": "null" - } - ] - }, - "unlock_schedule": { - "description": "Parameters controlling the unlocking process", - "allOf": [ - { - "$ref": "#/definitions/Schedule" - } - ] - } - }, - "additionalProperties": false - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "Schedule": { - "description": "This structure stores the parameters describing a typical unlock schedule.", - "type": "object", - "required": [ - "cliff", - "duration", - "start_time" - ], - "properties": { - "cliff": { - "description": "Cliff period during which no tokens can be withdrawn out of the contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "duration": { - "description": "Time after the cliff during which the remaining tokens linearly unlock", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "percent_at_cliff": { - "description": "Percentage of tokens unlocked at the cliff", - "anyOf": [ - { - "$ref": "#/definitions/Decimal" - }, - { - "type": "null" - } - ] - }, - "start_time": { - "description": "Timestamp for the start of the unlock schedule (in seconds)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - } - }, - "config": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Config", - "description": "This structure stores general parameters for the builder unlock contract.", - "type": "object", - "required": [ - "astro_denom", - "max_allocations_amount", - "owner" - ], - "properties": { - "astro_denom": { - "description": "ASTRO token denom", - "type": "string" - }, - "max_allocations_amount": { - "description": "Max ASTRO tokens to allocate", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "owner": { - "description": "Account that can create new unlock schedules", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "simulate_withdraw": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SimulateWithdrawResponse", - "description": "This structure stores the parameters used to return a response when simulating a withdrawal.", - "type": "object", - "required": [ - "astro_to_withdraw" - ], - "properties": { - "astro_to_withdraw": { - "description": "Amount of ASTRO to receive", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "state": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "State", - "description": "This structure stores the total and the remaining amount of ASTRO to be unlocked by all accounts.", - "type": "object", - "required": [ - "remaining_astro_tokens", - "total_astro_deposited", - "unallocated_astro_tokens" - ], - "properties": { - "remaining_astro_tokens": { - "description": "Currently available ASTRO tokens that still need to be unlocked and/or withdrawn", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "total_astro_deposited": { - "description": "Amount of ASTRO tokens deposited into the contract", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "unallocated_astro_tokens": { - "description": "Amount of ASTRO tokens deposited into the contract but not assigned to an allocation", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "unlocked_tokens": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Uint128", - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/builder-unlock/raw/execute.json b/schemas/builder-unlock/raw/execute.json deleted file mode 100644 index 6de6294..0000000 --- a/schemas/builder-unlock/raw/execute.json +++ /dev/null @@ -1,385 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ExecuteMsg", - "description": "This enum describes all the execute functions available in the contract.", - "oneOf": [ - { - "description": "CreateAllocations creates new ASTRO allocations", - "type": "object", - "required": [ - "create_allocations" - ], - "properties": { - "create_allocations": { - "type": "object", - "required": [ - "allocations" - ], - "properties": { - "allocations": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/CreateAllocationParams" - } - ], - "maxItems": 2, - "minItems": 2 - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Withdraw claims withdrawable ASTRO", - "type": "object", - "required": [ - "withdraw" - ], - "properties": { - "withdraw": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "ProposeNewReceiver allows a user to change the receiver address for their ASTRO allocation", - "type": "object", - "required": [ - "propose_new_receiver" - ], - "properties": { - "propose_new_receiver": { - "type": "object", - "required": [ - "new_receiver" - ], - "properties": { - "new_receiver": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "DropNewReceiver allows a user to remove the previously proposed new receiver for their ASTRO allocation", - "type": "object", - "required": [ - "drop_new_receiver" - ], - "properties": { - "drop_new_receiver": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "ClaimReceiver allows newly proposed receivers to claim ASTRO allocations ownership", - "type": "object", - "required": [ - "claim_receiver" - ], - "properties": { - "claim_receiver": { - "type": "object", - "required": [ - "prev_receiver" - ], - "properties": { - "prev_receiver": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Increase the ASTRO allocation of a receiver", - "type": "object", - "required": [ - "increase_allocation" - ], - "properties": { - "increase_allocation": { - "type": "object", - "required": [ - "amount", - "receiver" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "receiver": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Decrease the ASTRO allocation of a receiver", - "type": "object", - "required": [ - "decrease_allocation" - ], - "properties": { - "decrease_allocation": { - "type": "object", - "required": [ - "amount", - "receiver" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "receiver": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Transfer unallocated tokens (only accessible to the owner)", - "type": "object", - "required": [ - "transfer_unallocated" - ], - "properties": { - "transfer_unallocated": { - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "recipient": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Propose a new owner for the contract", - "type": "object", - "required": [ - "propose_new_owner" - ], - "properties": { - "propose_new_owner": { - "type": "object", - "required": [ - "expires_in", - "new_owner" - ], - "properties": { - "expires_in": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "new_owner": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Remove the ownership transfer proposal", - "type": "object", - "required": [ - "drop_ownership_proposal" - ], - "properties": { - "drop_ownership_proposal": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Claim contract ownership", - "type": "object", - "required": [ - "claim_ownership" - ], - "properties": { - "claim_ownership": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update parameters in the contract configuration", - "type": "object", - "required": [ - "update_config" - ], - "properties": { - "update_config": { - "type": "object", - "required": [ - "new_max_allocations_amount" - ], - "properties": { - "new_max_allocations_amount": { - "$ref": "#/definitions/Uint128" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Update a schedule of allocation for specified accounts", - "type": "object", - "required": [ - "update_unlock_schedules" - ], - "properties": { - "update_unlock_schedules": { - "type": "object", - "required": [ - "new_unlock_schedules" - ], - "properties": { - "new_unlock_schedules": { - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/Schedule" - } - ], - "maxItems": 2, - "minItems": 2 - } - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ], - "definitions": { - "CreateAllocationParams": { - "description": "This structure stores the parameters used to describe an ASTRO allocation.", - "type": "object", - "required": [ - "amount", - "unlock_schedule" - ], - "properties": { - "amount": { - "description": "Total amount of ASTRO tokens allocated to a specific account", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "unlock_schedule": { - "description": "Parameters controlling the unlocking process", - "allOf": [ - { - "$ref": "#/definitions/Schedule" - } - ] - } - }, - "additionalProperties": false - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "Schedule": { - "description": "This structure stores the parameters describing a typical unlock schedule.", - "type": "object", - "required": [ - "cliff", - "duration", - "start_time" - ], - "properties": { - "cliff": { - "description": "Cliff period during which no tokens can be withdrawn out of the contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "duration": { - "description": "Time after the cliff during which the remaining tokens linearly unlock", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "percent_at_cliff": { - "description": "Percentage of tokens unlocked at the cliff", - "anyOf": [ - { - "$ref": "#/definitions/Decimal" - }, - { - "type": "null" - } - ] - }, - "start_time": { - "description": "Timestamp for the start of the unlock schedule (in seconds)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/builder-unlock/raw/instantiate.json b/schemas/builder-unlock/raw/instantiate.json deleted file mode 100644 index a689505..0000000 --- a/schemas/builder-unlock/raw/instantiate.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "type": "object", - "required": [ - "astro_denom", - "max_allocations_amount", - "owner" - ], - "properties": { - "astro_denom": { - "description": "ASTRO token denom", - "type": "string" - }, - "max_allocations_amount": { - "description": "Max ASTRO tokens to allocate", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "owner": { - "description": "Account that can create new allocations", - "type": "string" - } - }, - "additionalProperties": false, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/builder-unlock/raw/query.json b/schemas/builder-unlock/raw/query.json deleted file mode 100644 index cc0d46c..0000000 --- a/schemas/builder-unlock/raw/query.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "description": "This enum describes all the queries available in the contract.", - "oneOf": [ - { - "description": "Config returns the configuration for this contract", - "type": "object", - "required": [ - "config" - ], - "properties": { - "config": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "State returns the state of this contract", - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "type": "object", - "properties": { - "timestamp": { - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Allocation returns the parameters and current status of an allocation", - "type": "object", - "required": [ - "allocation" - ], - "properties": { - "allocation": { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "description": "Account whose allocation status we query", - "type": "string" - }, - "timestamp": { - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Allocations returns a vector that contains builder unlock allocations by specified parameters", - "type": "object", - "required": [ - "allocations" - ], - "properties": { - "allocations": { - "type": "object", - "properties": { - "limit": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "start_after": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "UnlockedTokens returns the unlocked tokens from an allocation", - "type": "object", - "required": [ - "unlocked_tokens" - ], - "properties": { - "unlocked_tokens": { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "description": "Account whose amount of unlocked ASTRO we query for", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "SimulateWithdraw simulates how many ASTRO will be released if a withdrawal is attempted", - "type": "object", - "required": [ - "simulate_withdraw" - ], - "properties": { - "simulate_withdraw": { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "description": "Account for which we simulate a withdrawal", - "type": "string" - }, - "timestamp": { - "description": "Timestamp used to simulate how much ASTRO the account can withdraw", - "type": [ - "integer", - "null" - ], - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] -} diff --git a/schemas/builder-unlock/raw/response_to_allocation.json b/schemas/builder-unlock/raw/response_to_allocation.json deleted file mode 100644 index 8546d0f..0000000 --- a/schemas/builder-unlock/raw/response_to_allocation.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "AllocationResponse", - "description": "This structure stores the parameters used to return the response when querying for an allocation data.", - "type": "object", - "required": [ - "params", - "status" - ], - "properties": { - "params": { - "description": "The allocation parameters", - "allOf": [ - { - "$ref": "#/definitions/AllocationParams" - } - ] - }, - "status": { - "description": "The allocation status", - "allOf": [ - { - "$ref": "#/definitions/AllocationStatus" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "AllocationParams": { - "type": "object", - "required": [ - "unlock_schedule" - ], - "properties": { - "proposed_receiver": { - "description": "Proposed new receiver who will get the ASTRO allocation", - "anyOf": [ - { - "$ref": "#/definitions/Addr" - }, - { - "type": "null" - } - ] - }, - "unlock_schedule": { - "description": "Parameters controlling the unlocking process", - "allOf": [ - { - "$ref": "#/definitions/Schedule" - } - ] - } - }, - "additionalProperties": false - }, - "AllocationStatus": { - "description": "This structure stores the parameters used to describe the status of an allocation.", - "type": "object", - "required": [ - "amount", - "astro_withdrawn", - "unlocked_amount_checkpoint" - ], - "properties": { - "amount": { - "description": "Total amount of ASTRO tokens allocated to a specific account", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "astro_withdrawn": { - "description": "Amount of ASTRO already withdrawn", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "unlocked_amount_checkpoint": { - "description": "Already unlocked amount after decreasing", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "Schedule": { - "description": "This structure stores the parameters describing a typical unlock schedule.", - "type": "object", - "required": [ - "cliff", - "duration", - "start_time" - ], - "properties": { - "cliff": { - "description": "Cliff period during which no tokens can be withdrawn out of the contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "duration": { - "description": "Time after the cliff during which the remaining tokens linearly unlock", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "percent_at_cliff": { - "description": "Percentage of tokens unlocked at the cliff", - "anyOf": [ - { - "$ref": "#/definitions/Decimal" - }, - { - "type": "null" - } - ] - }, - "start_time": { - "description": "Timestamp for the start of the unlock schedule (in seconds)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/builder-unlock/raw/response_to_allocations.json b/schemas/builder-unlock/raw/response_to_allocations.json deleted file mode 100644 index 0665f06..0000000 --- a/schemas/builder-unlock/raw/response_to_allocations.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Array_of_Tuple_of_String_and_AllocationParams", - "type": "array", - "items": { - "type": "array", - "items": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/AllocationParams" - } - ], - "maxItems": 2, - "minItems": 2 - }, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "AllocationParams": { - "type": "object", - "required": [ - "unlock_schedule" - ], - "properties": { - "proposed_receiver": { - "description": "Proposed new receiver who will get the ASTRO allocation", - "anyOf": [ - { - "$ref": "#/definitions/Addr" - }, - { - "type": "null" - } - ] - }, - "unlock_schedule": { - "description": "Parameters controlling the unlocking process", - "allOf": [ - { - "$ref": "#/definitions/Schedule" - } - ] - } - }, - "additionalProperties": false - }, - "Decimal": { - "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", - "type": "string" - }, - "Schedule": { - "description": "This structure stores the parameters describing a typical unlock schedule.", - "type": "object", - "required": [ - "cliff", - "duration", - "start_time" - ], - "properties": { - "cliff": { - "description": "Cliff period during which no tokens can be withdrawn out of the contract", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "duration": { - "description": "Time after the cliff during which the remaining tokens linearly unlock", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - }, - "percent_at_cliff": { - "description": "Percentage of tokens unlocked at the cliff", - "anyOf": [ - { - "$ref": "#/definitions/Decimal" - }, - { - "type": "null" - } - ] - }, - "start_time": { - "description": "Timestamp for the start of the unlock schedule (in seconds)", - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - } -} diff --git a/schemas/builder-unlock/raw/response_to_config.json b/schemas/builder-unlock/raw/response_to_config.json deleted file mode 100644 index 1711557..0000000 --- a/schemas/builder-unlock/raw/response_to_config.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Config", - "description": "This structure stores general parameters for the builder unlock contract.", - "type": "object", - "required": [ - "astro_denom", - "max_allocations_amount", - "owner" - ], - "properties": { - "astro_denom": { - "description": "ASTRO token denom", - "type": "string" - }, - "max_allocations_amount": { - "description": "Max ASTRO tokens to allocate", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "owner": { - "description": "Account that can create new unlock schedules", - "allOf": [ - { - "$ref": "#/definitions/Addr" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Addr": { - "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", - "type": "string" - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/builder-unlock/raw/response_to_simulate_withdraw.json b/schemas/builder-unlock/raw/response_to_simulate_withdraw.json deleted file mode 100644 index f5b0b8b..0000000 --- a/schemas/builder-unlock/raw/response_to_simulate_withdraw.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SimulateWithdrawResponse", - "description": "This structure stores the parameters used to return a response when simulating a withdrawal.", - "type": "object", - "required": [ - "astro_to_withdraw" - ], - "properties": { - "astro_to_withdraw": { - "description": "Amount of ASTRO to receive", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/builder-unlock/raw/response_to_state.json b/schemas/builder-unlock/raw/response_to_state.json deleted file mode 100644 index d940aae..0000000 --- a/schemas/builder-unlock/raw/response_to_state.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "State", - "description": "This structure stores the total and the remaining amount of ASTRO to be unlocked by all accounts.", - "type": "object", - "required": [ - "remaining_astro_tokens", - "total_astro_deposited", - "unallocated_astro_tokens" - ], - "properties": { - "remaining_astro_tokens": { - "description": "Currently available ASTRO tokens that still need to be unlocked and/or withdrawn", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "total_astro_deposited": { - "description": "Amount of ASTRO tokens deposited into the contract", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - }, - "unallocated_astro_tokens": { - "description": "Amount of ASTRO tokens deposited into the contract but not assigned to an allocation", - "allOf": [ - { - "$ref": "#/definitions/Uint128" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } -} diff --git a/schemas/builder-unlock/raw/response_to_unlocked_tokens.json b/schemas/builder-unlock/raw/response_to_unlocked_tokens.json deleted file mode 100644 index 25b73e8..0000000 --- a/schemas/builder-unlock/raw/response_to_unlocked_tokens.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Uint128", - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" -}