diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad302b74..024b8968 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ on: inputs: toolchain: description: 'Default Rust Toolchain' - default: "1.71.0" + default: "1.73.0" required: true type: string target: @@ -31,7 +31,7 @@ on: type: string env: - TOOLCHAIN: ${{ inputs.toolchain || '1.71.0' }} + TOOLCHAIN: ${{ inputs.toolchain || '1.73.0' }} TARGET: ${{ inputs.target || 'wasm32-unknown-unknown' }} REF: ${{ github.event_name == 'push' && github.ref || inputs.branch || 'main' }} ID: ${{ inputs.id || 'scheduled' }} @@ -46,7 +46,7 @@ jobs: ref: ${{ env.REF }} fetch-depth: 0 - name: Save SHA - run: echo "sha=$(/usr/bin/git log -1 --format='%H')" >> $GITHUB_ENV + run: echo "sha=$(/usr/bin/git log -1 --format='%H')" >> $GITHUB_ENV - name: Check input type run: | if git show-ref --quiet --heads $REF; then diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4c2d8a43..62f2494f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: fetch-depth: 1 - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.71.0 + toolchain: 1.73.0 components: clippy profile: minimal override: true @@ -31,7 +31,7 @@ jobs: fetch-depth: 1 - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.71.0 + toolchain: 1.73.0 components: rustfmt profile: minimal override: true @@ -42,14 +42,14 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macOS-latest, ubuntu-latest] + os: [ macOS-latest, ubuntu-latest ] steps: - uses: actions/checkout@v1 with: fetch-depth: 1 - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.71.0 + toolchain: 1.73.0 profile: minimal - run: cargo fetch --verbose - run: cargo build diff --git a/.gitignore b/.gitignore index 66fbe02a..a66a9316 100644 --- a/.gitignore +++ b/.gitignore @@ -2,10 +2,6 @@ # will have compiled files and executables target/ -# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries -# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html -Cargo.lock - # These are backup files generated by rustfmt **/*.rs.bk diff --git a/Cargo.lock b/Cargo.lock index 09c2ba78..5a31c816 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ "getrandom", "once_cell", @@ -22,26 +22,26 @@ checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "astroport" version = "2.0.0" -source = "git+https://github.com/neutron-org/neutron-tge-contracts.git?branch=main#8afcc769f1e577e54b4969d7936c47d08f9dfbad" +source = "git+https://github.com/neutron-org/neutron-tge-contracts.git?branch=main#c73552b5ed09c2a74e5854cb1d5c3c4c9fe599af" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.15.1", - "cw20 0.15.1", - "itertools 0.10.5", + "cw-storage-plus 1.2.0", + "cw20 1.1.2", + "itertools 0.11.0", "uint", ] [[package]] name = "astroport" version = "2.0.0" -source = "git+https://github.com/neutron-org/neutron-tge-contracts.git#8afcc769f1e577e54b4969d7936c47d08f9dfbad" +source = "git+https://github.com/neutron-org/neutron-tge-contracts.git#c73552b5ed09c2a74e5854cb1d5c3c4c9fe599af" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.15.1", - "cw20 0.15.1", - "itertools 0.10.5", + "cw-storage-plus 1.2.0", + "cw20 1.1.2", + "itertools 0.11.0", "uint", ] @@ -62,16 +62,15 @@ dependencies = [ [[package]] name = "astroport-periphery" version = "1.1.0" -source = "git+https://github.com/neutron-org/neutron-tge-contracts.git?branch=main#8afcc769f1e577e54b4969d7936c47d08f9dfbad" +source = "git+https://github.com/neutron-org/neutron-tge-contracts.git?branch=main#c73552b5ed09c2a74e5854cb1d5c3c4c9fe599af" dependencies = [ "astroport 2.5.0", "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 0.15.1", - "cw20 0.13.4", + "cw20 1.1.2", "schemars", "serde", - "terraswap", ] [[package]] @@ -94,9 +93,9 @@ checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" -version = "0.21.4" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64ct" @@ -130,9 +129,9 @@ dependencies = [ [[package]] name = "bnum" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128a44527fc0d6abf05f9eda748b9027536e12dff93f5acc8449f51583309350" +checksum = "ab9008b6bb9fc80b5277f2fe481c09e828743d9151203e804583eb4c9e15b31d" [[package]] name = "byteorder" @@ -157,9 +156,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "const-oid" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "cosmos-sdk-proto" @@ -167,38 +166,39 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32560304ab4c365791fd307282f76637213d8083c1a98490c35159cd67852237" dependencies = [ - "prost 0.12.1", + "prost 0.12.3", "prost-types", "tendermint-proto", ] [[package]] name = "cosmwasm-crypto" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6fb22494cf7d23d0c348740e06e5c742070b2991fd41db77bba0bcfbae1a723" +checksum = "d8bb3c77c3b7ce472056968c745eb501c440fbc07be5004eba02782c35bfbbe3" dependencies = [ "digest 0.10.7", + "ecdsa 0.16.9", "ed25519-zebra", - "k256 0.13.1", + "k256 0.13.2", "rand_core 0.6.4", "thiserror", ] [[package]] name = "cosmwasm-derive" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e199424486ea97d6b211db6387fd72e26b4a439d40cc23140b2d8305728055b" +checksum = "fea73e9162e6efde00018d55ed0061e93a108b5d6ec4548b4f8ce3c706249687" dependencies = [ "syn 1.0.109", ] [[package]] name = "cosmwasm-schema" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fef683a9c1c4eabd6d31515719d0d2cc66952c4c87f7eb192bfc90384517dc34" +checksum = "0df41ea55f2946b6b43579659eec048cc2f66e8c8e2e3652fc5e5e476f673856" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -209,9 +209,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9567025acbb4c0c008178393eb53b3ac3c2e492c25949d3bf415b9cbe80772d8" +checksum = "43609e92ce1b9368aa951b334dd354a2d0dd4d484931a5f83ae10e12a26c8ba9" dependencies = [ "proc-macro2", "quote", @@ -220,11 +220,12 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d89d680fb60439b7c5947b15f9c84b961b88d1f8a3b20c4bd178a3f87db8bae" +checksum = "04d6864742e3a7662d024b51a94ea81c9af21db6faea2f9a6d2232bb97c6e53e" dependencies = [ "base64", + "bech32", "bnum", "cosmwasm-crypto", "cosmwasm-derive", @@ -233,16 +234,17 @@ dependencies = [ "hex", "schemars", "serde", - "serde-json-wasm 0.5.1", + "serde-json-wasm 0.5.2", "sha2 0.10.8", + "static_assertions", "thiserror", ] [[package]] name = "cosmwasm-storage" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a1c574d30feffe4b8121e61e839c231a5ce21901221d2fb4d5c945968a4f00" +checksum = "bd2b4ae72a03e8f56c85df59d172d51d2d7dc9cec6e2bc811e3fb60c588032a4" dependencies = [ "cosmwasm-std", "serde", @@ -250,16 +252,16 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] [[package]] name = "credits-vault" -version = "0.2.0" +version = "0.2.1" dependencies = [ "anyhow", "cosmwasm-schema", @@ -268,10 +270,10 @@ dependencies = [ "cw-controllers", "cw-multi-test", "cw-paginate 0.2.0", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", - "cw20 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", "cwd-interface", "cwd-macros", "cwd-voting", @@ -300,9 +302,9 @@ dependencies = [ [[package]] name = "crypto-bigint" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", "rand_core 0.6.4", @@ -344,14 +346,14 @@ dependencies = [ [[package]] name = "cw-controllers" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b129ca74fa41111fd2e1727426532556dc63973420343b659f5c072b85d789" +checksum = "57de8d3761e46be863e3ac1eba8c8a976362a48c6abf240df1e26c3e421ee9e8" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", "schemars", "serde", "thiserror", @@ -405,7 +407,7 @@ version = "0.2.0" dependencies = [ "cosmwasm-std", "cw-multi-test", - "cw20 1.1.1", + "cw20 1.1.2", "cw20-base", "schemars", "serde", @@ -420,8 +422,8 @@ checksum = "127c7bb95853b8e828bdab97065c81cb5ddc20f7339180b61b2300565aaa99d1" dependencies = [ "anyhow", "cosmwasm-std", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", "derivative", "itertools 0.10.5", "k256 0.11.6", @@ -441,8 +443,8 @@ dependencies = [ "cosmwasm-std", "cw-address-like", "cw-ownable-derive", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", "thiserror", ] @@ -475,7 +477,7 @@ dependencies = [ "cosmwasm-std", "cosmwasm-storage", "cw-multi-test", - "cw-storage-plus 1.1.0", + "cw-storage-plus 1.2.0", "serde", ] @@ -538,9 +540,9 @@ dependencies = [ [[package]] name = "cw-storage-plus" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f0e92a069d62067f3472c62e30adedb4cab1754725c0f2a682b3128d2bf3c79" +checksum = "d5ff29294ee99373e2cd5fd21786a3c0ced99a52fec2ca347d565489c61b723c" dependencies = [ "cosmwasm-std", "schemars", @@ -591,13 +593,13 @@ dependencies = [ [[package]] name = "cw-utils" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9f351a4e4d81ef7c890e44d903f8c0bdcdc00f094fd3a181eaf70c0eec7a3a" +checksum = "1c4a657e5caacc3a0d00ee96ca8618745d050b8f757c709babafb81208d4239c" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw2 1.1.1", + "cw2 1.1.2", "schemars", "semver", "serde", @@ -644,14 +646,15 @@ dependencies = [ [[package]] name = "cw2" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9431d14f64f49e41c6ef5561ed11a5391c417d0cb16455dea8cdcb9037a8d197" +checksum = "c6c120b24fbbf5c3bedebb97f2cc85fbfa1c3287e09223428e7e597b5293c1fa" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 1.1.0", + "cw-storage-plus 1.2.0", "schemars", + "semver", "serde", "thiserror", ] @@ -683,29 +686,28 @@ dependencies = [ [[package]] name = "cw20" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786e9da5e937f473cecd2463e81384c1af65d0f6398bbd851be7655487c55492" +checksum = "526e39bb20534e25a1cd0386727f0038f4da294e5e535729ba3ef54055246abd" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-utils 1.0.2", + "cw-utils 1.0.3", "schemars", "serde", ] [[package]] name = "cw20-base" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09558f87fd3d5e4a479761051b3f98ee2fa723d9e484b5679b6058ad0eadf8f1" +checksum = "17ad79e86ea3707229bf78df94e08732e8f713207b4a77b2699755596725e7d9" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", - "cw20 1.1.1", + "cw-storage-plus 1.2.0", + "cw2 1.1.2", + "cw20 1.1.2", "schemars", "semver", "serde", @@ -726,14 +728,14 @@ dependencies = [ [[package]] name = "cw3" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d056ec33ec146554aa1d16c9535763341db75589a47743c006c377e62b54034" +checksum = "2967fbd073d4b626dd9e7148e05a84a3bebd9794e71342e12351110ffbb12395" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-utils 1.0.2", - "cw20 1.1.1", + "cw-utils 1.0.3", + "cw20 1.1.2", "schemars", "serde", "thiserror", @@ -741,29 +743,29 @@ dependencies = [ [[package]] name = "cw4" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d9fce5c21c0623762a78c658a01cd5053dc98705b71453685359554b423d8a6" +checksum = "24754ff6e45f2a1c60adc409d9b2eb87666012c44021329141ffaab3388fccd2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 1.1.0", + "cw-storage-plus 1.2.0", "schemars", "serde", ] [[package]] name = "cw4-group" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad498a23264ee2f24e7e15b56295b23a82e7167e6fbf2564d8c818f6e75ae9e7" +checksum = "9e24a22c3af54c52edf528673b420a67a1648be2c159b8ec778d2fbf543df24b" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-controllers", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cw4", "schemars", "serde", @@ -803,7 +805,7 @@ checksum = "e3c4d286625ccadc957fe480dd3bdc54ada19e0e6b5b9325379db3130569e914" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-utils 1.0.2", + "cw-utils 1.0.3", "schemars", "serde", ] @@ -834,9 +836,9 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-ownable", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cw721 0.18.0", "cw721-base 0.16.0", "schemars", @@ -849,8 +851,8 @@ name = "cw721-controllers" version = "0.2.0" dependencies = [ "cosmwasm-std", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", "schemars", "serde", "thiserror", @@ -858,17 +860,17 @@ dependencies = [ [[package]] name = "cwd-core" -version = "0.2.1" +version = "0.2.2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cw-core", "cw-paginate 0.2.0", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", - "cw20 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", "cw721 0.18.0", "cwd-interface", "cwd-macros", @@ -883,7 +885,7 @@ name = "cwd-hooks" version = "0.2.0" dependencies = [ "cosmwasm-std", - "cw-storage-plus 1.1.0", + "cw-storage-plus 1.2.0", "schemars", "serde", "thiserror", @@ -895,7 +897,7 @@ version = "0.2.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw2 1.1.1", + "cw2 1.1.2", "cwd-macros", "schemars", "serde", @@ -923,9 +925,9 @@ dependencies = [ "cosmwasm-std", "cw-denom", "cw-multi-test", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cwd-interface", "cwd-proposal-hooks", "cwd-voting", @@ -936,15 +938,15 @@ dependencies = [ [[package]] name = "cwd-pre-propose-multiple" -version = "0.2.1" +version = "0.2.2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-denom", "cw-multi-test", - "cw-utils 1.0.2", - "cw2 1.1.1", - "cw20 1.1.1", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", "cw20-base", "cw4-group", "cwd-core", @@ -960,14 +962,14 @@ dependencies = [ [[package]] name = "cwd-pre-propose-overrule" -version = "0.2.1" +version = "0.2.2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-denom", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cwd-core", "cwd-interface", "cwd-pre-propose-base", @@ -985,15 +987,15 @@ dependencies = [ [[package]] name = "cwd-pre-propose-single" -version = "0.2.1" +version = "0.2.2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-denom", "cw-multi-test", - "cw-utils 1.0.2", - "cw2 1.1.1", - "cw20 1.1.1", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", "cw20-base", "cw4-group", "cwd-core", @@ -1020,19 +1022,19 @@ dependencies = [ [[package]] name = "cwd-proposal-multiple" -version = "0.2.1" +version = "0.2.2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cw-denom", "cw-multi-test", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", - "cw20 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", "cw20-base", - "cw3 1.1.1", + "cw3 1.1.2", "cw4", "cw4-group", "cw721-base 0.18.0", @@ -1059,7 +1061,7 @@ dependencies = [ [[package]] name = "cwd-proposal-single" -version = "0.2.1" +version = "0.2.2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -1067,12 +1069,12 @@ dependencies = [ "cw-denom", "cw-multi-test", "cw-proposal-single", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", - "cw20 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", "cw20-base", - "cw3 1.1.1", + "cw3 1.1.2", "cw4", "cw4-group", "cw721-base 0.18.0", @@ -1097,15 +1099,15 @@ dependencies = [ [[package]] name = "cwd-security-subdao-pre-propose" -version = "0.2.1" +version = "0.2.2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-denom", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", - "cw20 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", "cwd-interface", "cwd-pre-propose-base", "cwd-voting", @@ -1120,17 +1122,17 @@ dependencies = [ [[package]] name = "cwd-subdao-core" -version = "0.2.1" +version = "0.2.2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cosmwasm-storage", "cw-core", "cw-paginate 0.2.0", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", - "cw20 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", "cw721 0.18.0", "cwd-interface", "cwd-macros", @@ -1147,15 +1149,15 @@ dependencies = [ [[package]] name = "cwd-subdao-pre-propose-single" -version = "0.2.1" +version = "0.2.2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-denom", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", - "cw20 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", "cwd-interface", "cwd-pre-propose-base", "cwd-voting", @@ -1170,7 +1172,7 @@ dependencies = [ [[package]] name = "cwd-subdao-proposal-single" -version = "0.2.1" +version = "0.2.2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -1178,12 +1180,12 @@ dependencies = [ "cw-denom", "cw-multi-test", "cw-proposal-single", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", - "cw20 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", "cw20-base", - "cw3 1.1.1", + "cw3 1.1.2", "cw4", "cw4-group", "cw721-base 0.18.0", @@ -1207,7 +1209,7 @@ dependencies = [ [[package]] name = "cwd-subdao-timelock-single" -version = "0.2.1" +version = "0.2.2" dependencies = [ "anyhow", "cosmwasm-schema", @@ -1215,9 +1217,9 @@ dependencies = [ "cosmwasm-storage", "cw-controllers", "cw-multi-test", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cwd-interface", "cwd-macros", "cwd-pre-propose-base", @@ -1242,9 +1244,9 @@ dependencies = [ "cosmwasm-std", "cw-multi-test", "cw-proposal-single", - "cw-utils 1.0.2", - "cw2 1.1.1", - "cw20 1.1.1", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", "cw20-base", "cw4", "cw4-group", @@ -1279,9 +1281,9 @@ version = "0.2.0" dependencies = [ "cosmwasm-std", "cw-denom", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw20 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw20 1.1.2", "cwd-core", "cwd-interface", "cwd-macros", @@ -1313,9 +1315,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" dependencies = [ "powerfmt", ] @@ -1354,9 +1356,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "ecdsa" @@ -1372,16 +1374,16 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.16.8" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der 0.7.8", "digest 0.10.7", - "elliptic-curve 0.13.6", + "elliptic-curve 0.13.8", "rfc6979 0.4.0", - "signature 2.1.0", - "spki 0.7.2", + "signature 2.2.0", + "spki 0.7.3", ] [[package]] @@ -1427,12 +1429,12 @@ dependencies = [ [[package]] name = "elliptic-curve" -version = "0.13.6" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct 0.2.0", - "crypto-bigint 0.5.3", + "crypto-bigint 0.5.5", "digest 0.10.7", "ff 0.13.0", "generic-array", @@ -1502,9 +1504,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "libc", @@ -1542,6 +1544,12 @@ 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" @@ -1571,7 +1579,7 @@ dependencies = [ [[package]] name = "investors-vesting-vault" -version = "0.2.0" +version = "0.2.1" dependencies = [ "anyhow", "cosmwasm-schema", @@ -1580,10 +1588,10 @@ dependencies = [ "cw-controllers", "cw-multi-test", "cw-paginate 0.2.0", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", - "cw20 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", "cwd-interface", "cwd-macros", "cwd-voting", @@ -1613,9 +1621,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "k256" @@ -1631,27 +1639,27 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" dependencies = [ "cfg-if", - "ecdsa 0.16.8", - "elliptic-curve 0.13.6", + "ecdsa 0.16.9", + "elliptic-curve 0.13.8", "once_cell", "sha2 0.10.8", - "signature 2.1.0", + "signature 2.2.0", ] [[package]] name = "libc" -version = "0.2.149" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "lockdrop-vault" -version = "0.1.0" +version = "0.1.1" dependencies = [ "anyhow", "astroport 2.0.0 (git+https://github.com/neutron-org/neutron-tge-contracts.git?branch=main)", @@ -1659,9 +1667,9 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-multi-test", - "cw-storage-plus 1.1.0", - "cw2 1.1.1", - "cw20 1.1.1", + "cw-storage-plus 1.2.0", + "cw2 1.1.2", + "cw20 1.1.2", "cwd-interface", "cwd-macros", "cwd-voting", @@ -1682,11 +1690,12 @@ dependencies = [ [[package]] name = "neutron-distribution" -version = "0.1.0" +version = "0.1.1" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 1.1.0", + "cw-storage-plus 1.2.0", + "cw2 1.1.2", "cwd-macros", "exec-control", "schemars", @@ -1719,12 +1728,12 @@ dependencies = [ [[package]] name = "neutron-reserve" -version = "0.1.1" +version = "0.1.2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 1.1.0", - "cw2 1.1.1", + "cw-storage-plus 1.2.0", + "cw2 1.1.2", "cwd-macros", "exec-control", "neutron-sdk", @@ -1735,18 +1744,23 @@ dependencies = [ [[package]] name = "neutron-sdk" -version = "0.7.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583150155911cb93ef38108259bcfdf19b85b75ef9e98dcd88927fcf24a809b3" +checksum = "26fb513aae0c82b3185228e96664d8312e79c3aa763f6ebdc70cf4b8d513d533" dependencies = [ "bech32", "cosmos-sdk-proto", "cosmwasm-schema", "cosmwasm-std", - "protobuf 3.3.0", + "prost 0.12.3", + "prost-types", + "protobuf", "schemars", "serde", - "serde-json-wasm 1.0.0", + "serde-json-wasm 1.0.1", + "serde_json", + "speedate", + "tendermint-proto", "thiserror", ] @@ -1755,7 +1769,7 @@ name = "neutron-security-subdao-pre-propose" version = "0.1.0" dependencies = [ "cosmwasm-std", - "cw-utils 1.0.2", + "cw-utils 1.0.3", "cwd-interface", "cwd-pre-propose-base", "cwd-voting", @@ -1770,8 +1784,8 @@ version = "0.1.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-utils 1.0.2", - "cw2 1.1.1", + "cw-utils 1.0.3", + "cw2 1.1.2", "cwd-interface", "cwd-macros", "cwd-voting", @@ -1801,7 +1815,7 @@ version = "0.1.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-utils 1.0.2", + "cw-utils 1.0.3", "cwd-hooks", "cwd-interface", "cwd-macros", @@ -1824,7 +1838,7 @@ dependencies = [ [[package]] name = "neutron-vault" -version = "0.2.0" +version = "0.2.1" dependencies = [ "anyhow", "cosmwasm-schema", @@ -1833,9 +1847,9 @@ dependencies = [ "cw-controllers", "cw-multi-test", "cw-paginate 0.2.0", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cwd-interface", "cwd-macros", "cwd-voting", @@ -1859,7 +1873,7 @@ dependencies = [ [[package]] name = "neutron-voting-registry" -version = "0.3.0" +version = "0.3.1" dependencies = [ "anyhow", "cosmwasm-schema", @@ -1868,9 +1882,9 @@ dependencies = [ "cw-controllers", "cw-multi-test", "cw-paginate 0.2.0", - "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", - "cw2 1.1.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", "cwd-interface", "cwd-macros", "neutron-vault", @@ -1901,9 +1915,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -1934,7 +1948,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ "der 0.7.8", - "spki 0.7.2", + "spki 0.7.3", ] [[package]] @@ -1951,9 +1965,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -1981,12 +1995,12 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fdd22f3b9c31b53c060df4a0613a1c7f062d4115a2b984dd15b1858f7e340d" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ "bytes", - "prost-derive 0.12.1", + "prost-derive 0.12.3", ] [[package]] @@ -2004,33 +2018,24 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] name = "prost-types" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e081b29f63d83a4bc75cfc9f3fe424f9156cf92d8a4f0c9407cce9a1b67327cf" -dependencies = [ - "prost 0.12.1", -] - -[[package]] -name = "protobuf" -version = "2.28.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" +checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" dependencies = [ - "bytes", + "prost 0.12.3", ] [[package]] @@ -2119,17 +2124,23 @@ dependencies = [ "subtle", ] +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "schemars" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" dependencies = [ "dyn-clone", "schemars_derive", @@ -2139,9 +2150,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" dependencies = [ "proc-macro2", "quote", @@ -2185,27 +2196,27 @@ checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.189" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde-json-wasm" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a62a1fad1e1828b24acac8f2b468971dade7b8c3c2e672bcadefefb1f8c137" +checksum = "9e9213a07d53faa0b8dd81e767a54a8188a242fdb9be99ab75ec576a774bfdd7" dependencies = [ "serde", ] [[package]] name = "serde-json-wasm" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c37d03f3b0f6b5f77c11af1e7c772de1c9af83e50bef7bb6069601900ba67b" +checksum = "f05da0d153dd4595bdffd5099dc0e9ce425b205ee648eb93437ff7302af8c9a5" dependencies = [ "serde", ] @@ -2221,13 +2232,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.189" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -2243,9 +2254,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -2288,14 +2299,24 @@ dependencies = [ [[package]] name = "signature" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", "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.6.0" @@ -2308,9 +2329,9 @@ dependencies = [ [[package]] name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", "der 0.7.8", @@ -2322,6 +2343,28 @@ 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.41", +] + [[package]] name = "subtle" version = "2.5.0" @@ -2350,9 +2393,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" dependencies = [ "proc-macro2", "quote", @@ -2369,7 +2412,7 @@ dependencies = [ "flex-error", "num-derive", "num-traits", - "prost 0.12.1", + "prost 0.12.3", "prost-types", "serde", "serde_bytes", @@ -2377,39 +2420,24 @@ dependencies = [ "time", ] -[[package]] -name = "terraswap" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73bbfb46c586aeaaa91da9532bff8b12fd909dcc80ff2817d58b87eab2f3a2b5" -dependencies = [ - "cosmwasm-std", - "cosmwasm-storage", - "cw2 0.13.4", - "cw20 0.13.4", - "protobuf 2.28.0", - "schemars", - "serde", -] - [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.41", ] [[package]] @@ -2472,58 +2500,54 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vesting-base" version = "1.1.0" -source = "git+https://github.com/neutron-org/neutron-tge-contracts.git?branch=main#8afcc769f1e577e54b4969d7936c47d08f9dfbad" +source = "git+https://github.com/neutron-org/neutron-tge-contracts.git?branch=main#c73552b5ed09c2a74e5854cb1d5c3c4c9fe599af" dependencies = [ "astroport 2.0.0 (git+https://github.com/neutron-org/neutron-tge-contracts.git?branch=main)", "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.15.1", + "cw-storage-plus 1.2.0", "cw-utils 0.15.1", - "cw2 0.15.1", - "cw20 0.15.1", - "serde", + "cw20 1.1.2", "thiserror", ] [[package]] name = "vesting-base" version = "1.1.0" -source = "git+https://github.com/neutron-org/neutron-tge-contracts.git#8afcc769f1e577e54b4969d7936c47d08f9dfbad" +source = "git+https://github.com/neutron-org/neutron-tge-contracts.git#c73552b5ed09c2a74e5854cb1d5c3c4c9fe599af" dependencies = [ "astroport 2.0.0 (git+https://github.com/neutron-org/neutron-tge-contracts.git)", "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.15.1", + "cw-storage-plus 1.2.0", "cw-utils 0.15.1", - "cw2 0.15.1", - "cw20 0.15.1", - "serde", + "cw20 1.1.2", "thiserror", ] [[package]] name = "vesting-lp" version = "1.1.0" -source = "git+https://github.com/neutron-org/neutron-tge-contracts.git?branch=main#8afcc769f1e577e54b4969d7936c47d08f9dfbad" +source = "git+https://github.com/neutron-org/neutron-tge-contracts.git?branch=main#c73552b5ed09c2a74e5854cb1d5c3c4c9fe599af" dependencies = [ "astroport 2.0.0 (git+https://github.com/neutron-org/neutron-tge-contracts.git?branch=main)", "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.15.1", - "cw2 0.15.1", + "cw2 1.1.2", + "cw20 1.1.2", "vesting-base 1.1.0 (git+https://github.com/neutron-org/neutron-tge-contracts.git?branch=main)", ] [[package]] name = "vesting-lp-vault" -version = "0.1.0" +version = "0.1.1" dependencies = [ "anyhow", "cosmwasm-schema", "cosmwasm-std", "cw-multi-test", - "cw-storage-plus 1.1.0", - "cw2 1.1.1", + "cw-storage-plus 1.2.0", + "cw2 1.1.2", "cwd-interface", "cwd-macros", "neutron-oracle", @@ -2565,6 +2589,6 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/Makefile b/Makefile index b1eaadae..9b99a985 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,6 @@ compile: --mount type=volume,source="$(notdir $(CURDIR))_cache",target=/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ --platform linux/amd64 \ - cosmwasm/workspace-optimizer:0.14.0 + cosmwasm/workspace-optimizer:0.15.0 build: schema clippy fmt test compile check_contracts diff --git a/contracts/dao/cwd-core/Cargo.toml b/contracts/dao/cwd-core/Cargo.toml index 9d51aa84..fc9a57ae 100644 --- a/contracts/dao/cwd-core/Cargo.toml +++ b/contracts/dao/cwd-core/Cargo.toml @@ -4,7 +4,7 @@ description = "A DAO DAO core module." edition = "2021" name = "cwd-core" repository = "https://github.com/DA0-DA0/dao-contracts" -version = "0.2.1" +version = "0.2.2" [lib] crate-type = ["cdylib", "rlib"] @@ -16,19 +16,19 @@ backtraces = ["cosmwasm-std/backtraces"] library = [] [dependencies] -cosmwasm-schema = {version = "1.3.0"} -cosmwasm-std = {version = "1.3.0", features = ["ibc3"]} -cosmwasm-storage = {version = "1.3.0"} -cw-core-v1 = {package = "cw-core", version = "0.1.0", git = "https://github.com/DA0-DA0/dao-contracts.git", tag = "v1.0.0"} -cw-paginate = {path = "../../../packages/cw-paginate"} +cosmwasm-schema = { version = "1.3.0" } +cosmwasm-std = { version = "1.3.0", features = ["ibc3"] } +cosmwasm-storage = { version = "1.3.0" } +cw-core-v1 = { package = "cw-core", version = "0.1.0", git = "https://github.com/DA0-DA0/dao-contracts.git", tag = "v1.0.0" } +cw-paginate = { path = "../../../packages/cw-paginate" } cw-storage-plus = "1.1.0" -cw-utils = {version = "1.0.1"} +cw-utils = { version = "1.0.1" } cw2 = "1.1.0" cw20 = "1.1.0" cw721 = "0.18.0" -cwd-interface = {path = "../../../packages/cwd-interface"} -cwd-macros = {path = "../../../packages/cwd-macros"} -neutron-sdk = {package = "neutron-sdk", version = "0.7.0"} +cwd-interface = { path = "../../../packages/cwd-interface" } +cwd-macros = { path = "../../../packages/cwd-macros" } +neutron-sdk = "0.10.0" schemars = "0.8.8" -serde = {version = "1.0.175", default-features = false, features = ["derive"]} -thiserror = {version = "1.0"} +serde = { version = "1.0.175", default-features = false, features = ["derive"] } +thiserror = { version = "1.0" } diff --git a/contracts/dao/cwd-core/schema/cwd-core.json b/contracts/dao/cwd-core/schema/cwd-core.json index e7aa2258..22cf49e8 100644 --- a/contracts/dao/cwd-core/schema/cwd-core.json +++ b/contracts/dao/cwd-core/schema/cwd-core.json @@ -402,6 +402,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -414,54 +415,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -474,6 +496,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -486,6 +510,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -498,6 +524,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -510,6 +538,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -585,7 +615,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -603,7 +634,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1142,6 +1174,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1506,6 +1548,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1563,6 +1630,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1616,7 +1706,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1667,6 +1758,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -1711,7 +1815,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1757,7 +1862,8 @@ } }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1805,7 +1911,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1833,7 +1940,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1861,7 +1969,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/cwd-core/schema/raw/execute.json b/contracts/dao/cwd-core/schema/raw/execute.json index 95f6643a..a5d9c145 100644 --- a/contracts/dao/cwd-core/schema/raw/execute.json +++ b/contracts/dao/cwd-core/schema/raw/execute.json @@ -242,6 +242,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -254,54 +255,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -314,6 +336,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -326,6 +350,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -338,6 +364,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -350,6 +378,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -425,7 +455,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -443,7 +474,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -982,6 +1014,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1346,6 +1388,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1403,6 +1470,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1456,7 +1546,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1507,6 +1598,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -1551,7 +1655,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1597,7 +1702,8 @@ } }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1645,7 +1751,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1673,7 +1780,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1701,7 +1809,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/cwd-core/src/contract.rs b/contracts/dao/cwd-core/src/contract.rs index 138f0fed..d27c17c6 100644 --- a/contracts/dao/cwd-core/src/contract.rs +++ b/contracts/dao/cwd-core/src/contract.rs @@ -1,8 +1,8 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Addr, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Reply, Response, StdError, - StdResult, SubMsg, + to_json_binary, Addr, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Reply, Response, + StdError, StdResult, SubMsg, }; use cw2::{get_contract_version, set_contract_version}; use cw_utils::{parse_reply_instantiate_data, Duration}; @@ -337,12 +337,12 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { pub fn query_config(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config) + to_json_binary(&config) } pub fn query_voting_module(deps: Deps) -> StdResult { let voting_module = VOTING_REGISTRY_MODULE.load(deps.storage)?; - to_binary(&voting_module) + to_json_binary(&voting_module) } pub fn query_proposal_modules( @@ -363,7 +363,7 @@ pub fn query_proposal_modules( // // Even if this does lock up one can determine the existing // proposal modules by looking at past transactions on chain. - to_binary(&paginate_map_values( + to_json_binary(&paginate_map_values( deps, &PROPOSAL_MODULES, start_after @@ -393,7 +393,7 @@ pub fn query_active_proposal_modules( let limit = limit.unwrap_or(values.len() as u32); - to_binary::>( + to_json_binary::>( &values .into_iter() .filter(|module: &ProposalModule| module.status == ProposalModuleStatus::Enabled) @@ -416,7 +416,7 @@ fn get_pause_info(deps: Deps, env: Env) -> StdResult { } pub fn query_paused(deps: Deps, env: Env) -> StdResult { - to_binary(&get_pause_info(deps, env)?) + to_json_binary(&get_pause_info(deps, env)?) } pub fn query_dump_state(deps: Deps, env: Env) -> StdResult { @@ -430,7 +430,7 @@ pub fn query_dump_state(deps: Deps, env: Env) -> StdResult { let version = get_contract_version(deps.storage)?; let active_proposal_module_count = ACTIVE_PROPOSAL_MODULE_COUNT.load(deps.storage)?; let total_proposal_module_count = TOTAL_PROPOSAL_MODULE_COUNT.load(deps.storage)?; - to_binary(&DumpStateResponse { + to_json_binary(&DumpStateResponse { config, version, pause_info, @@ -451,7 +451,7 @@ pub fn query_voting_power_at_height( voting_registry_module, &voting::Query::VotingPowerAtHeight { height, address }, )?; - to_binary(&voting_power) + to_json_binary(&voting_power) } pub fn query_total_power_at_height(deps: Deps, height: Option) -> StdResult { @@ -460,17 +460,17 @@ pub fn query_total_power_at_height(deps: Deps, height: Option) -> StdResult voting_registry_module, &voting::Query::TotalPowerAtHeight { height }, )?; - to_binary(&total_power) + to_json_binary(&total_power) } pub fn query_get_item(deps: Deps, item: String) -> StdResult { let item = ITEMS.may_load(deps.storage, item)?; - to_binary(&GetItemResponse { item }) + to_json_binary(&GetItemResponse { item }) } pub fn query_info(deps: Deps) -> StdResult { let info = cw2::get_contract_version(deps.storage)?; - to_binary(&cwd_interface::voting::InfoResponse { info }) + to_json_binary(&cwd_interface::voting::InfoResponse { info }) } pub fn query_list_items( @@ -478,7 +478,7 @@ pub fn query_list_items( start_after: Option, limit: Option, ) -> StdResult { - to_binary(&paginate_map( + to_json_binary(&paginate_map( deps, &ITEMS, start_after, @@ -512,7 +512,7 @@ pub fn query_list_sub_daos( }) .collect(); - to_binary(&subdaos) + to_json_binary(&subdaos) } pub fn query_sub_dao(deps: Deps, address: String) -> StdResult { @@ -520,7 +520,7 @@ pub fn query_sub_dao(deps: Deps, address: String) -> StdResult { let item = SUBDAO_LIST.may_load(deps.storage, &addr)?; match item { None => Err(StdError::generic_err("SubDao not found")), - Some(charter) => to_binary(&SubDao { + Some(charter) => to_json_binary(&SubDao { addr: address, charter, }), @@ -529,7 +529,7 @@ pub fn query_sub_dao(deps: Deps, address: String) -> StdResult { pub fn query_dao_uri(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config.dao_uri) + to_json_binary(&config.dao_uri) } #[cfg_attr(not(feature = "library"), entry_point)] diff --git a/contracts/dao/pre-propose/cwd-pre-propose-multiple/Cargo.toml b/contracts/dao/pre-propose/cwd-pre-propose-multiple/Cargo.toml index 1bcb3fab..ec491cd8 100644 --- a/contracts/dao/pre-propose/cwd-pre-propose-multiple/Cargo.toml +++ b/contracts/dao/pre-propose/cwd-pre-propose-multiple/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cwd-pre-propose-multiple" -version = "0.2.1" +version = "0.2.2" authors = ["ekez ", "Jake Hartnell ", "blue-note"] edition = "2021" repository = "https://github.com/DA0-DA0/dao-contracts" @@ -21,7 +21,7 @@ cw2 = "1.1.0" serde = { version = "1.0.175", default-features = false, features = ["derive"] } cwd-pre-propose-base = { version = "*", path = "../../../../packages/cwd-pre-propose-base" } cwd-voting = { path = "../../../../packages/cwd-voting" } -neutron-sdk = { package = "neutron-sdk", version = "0.7.0" } +neutron-sdk = "0.10.0" schemars = "0.8.8" cosmwasm-schema = "1.3.0" diff --git a/contracts/dao/pre-propose/cwd-pre-propose-multiple/schema/cwd-pre-propose-multiple.json b/contracts/dao/pre-propose/cwd-pre-propose-multiple/schema/cwd-pre-propose-multiple.json index 2f96067f..c32b0602 100644 --- a/contracts/dao/pre-propose/cwd-pre-propose-multiple/schema/cwd-pre-propose-multiple.json +++ b/contracts/dao/pre-propose/cwd-pre-propose-multiple/schema/cwd-pre-propose-multiple.json @@ -305,6 +305,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -317,54 +318,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -377,6 +399,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -389,6 +413,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -401,6 +427,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -413,6 +441,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -488,7 +518,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -506,7 +537,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1119,6 +1151,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1483,6 +1525,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1540,6 +1607,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1593,7 +1683,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1644,6 +1735,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposeMessage": { "oneOf": [ { @@ -1721,7 +1825,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1878,7 +1983,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1992,7 +2098,8 @@ } }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -2020,7 +2127,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -2048,7 +2156,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/pre-propose/cwd-pre-propose-multiple/schema/raw/execute.json b/contracts/dao/pre-propose/cwd-pre-propose-multiple/schema/raw/execute.json index 22182580..f532499d 100644 --- a/contracts/dao/pre-propose/cwd-pre-propose-multiple/schema/raw/execute.json +++ b/contracts/dao/pre-propose/cwd-pre-propose-multiple/schema/raw/execute.json @@ -140,6 +140,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -152,54 +153,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -212,6 +234,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -224,6 +248,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -236,6 +262,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -248,6 +276,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -323,7 +353,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -341,7 +372,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -954,6 +986,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1318,6 +1360,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1375,6 +1442,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1428,7 +1518,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1479,6 +1570,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposeMessage": { "oneOf": [ { @@ -1556,7 +1660,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1713,7 +1818,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1827,7 +1933,8 @@ } }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1855,7 +1962,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1883,7 +1991,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/Cargo.toml b/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/Cargo.toml index bb1ad76d..9de422da 100644 --- a/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/Cargo.toml +++ b/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cwd-pre-propose-overrule" -version = "0.2.1" +version = "0.2.2" authors = ["oldremez"] edition = "2021" repository = "https://github.com/neutron-org/neutron-dao" @@ -22,14 +22,14 @@ cw-storage-plus = "1.1.0" serde = { version = "1.0.175", default-features = false, features = ["derive"] } cwd-pre-propose-base = { version = "*", path = "../../../../packages/cwd-pre-propose-base" } cwd-voting = { path = "../../../../packages/cwd-voting" } -neutron-sdk = { package = "neutron-sdk", version = "0.7.0" } +neutron-sdk = "0.10.0" schemars = "0.8.8" thiserror = { version = "1.0.31" } neutron-subdao-core = { version = "*", path = "../../../../packages/neutron-subdao-core" } -cwd-core = { version = "*", path = "../../../../contracts/dao/cwd-core", features = ["library"] } +cwd-core = { version = "*", path = "../../../../contracts/dao/cwd-core", features = ["library"] } neutron-subdao-timelock-single = { version = "*", path = "../../../../packages/neutron-subdao-timelock-single" } neutron-dao-pre-propose-overrule = { version = "*", path = "../../../../packages/neutron-dao-pre-propose-overrule" } -cwd-proposal-single = { version = "*", path = "../../../../contracts/dao/proposal/cwd-proposal-single", features = ["library"] } +cwd-proposal-single = { version = "*", path = "../../../../contracts/dao/proposal/cwd-proposal-single", features = ["library"] } [dev-dependencies] cosmwasm-schema = "1.3.0" diff --git a/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/contract.rs b/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/contract.rs index 5923bf93..1b864ba2 100644 --- a/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/contract.rs +++ b/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/contract.rs @@ -1,7 +1,7 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Addr, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Response, StdResult, + to_json_binary, Addr, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Response, StdResult, WasmMsg, }; use cw2::set_contract_version; @@ -102,7 +102,7 @@ pub fn execute( let overrule_msg = CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: timelock_contract_addr.to_string(), - msg: to_binary(&TimelockMsg::ExecuteMsg::OverruleProposal { proposal_id })?, + msg: to_json_binary(&TimelockMsg::ExecuteMsg::OverruleProposal { proposal_id })?, funds: vec![], }); @@ -258,7 +258,7 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { deps.api.addr_validate(&timelock_address)?, ), )?; - to_binary(&overrule_proposal_id) + to_json_binary(&overrule_proposal_id) } _ => PrePropose::default().query(deps, env, msg), } diff --git a/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/testing/mock_querier.rs b/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/testing/mock_querier.rs index 6e94ddb9..e66f6ad6 100644 --- a/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/testing/mock_querier.rs +++ b/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/testing/mock_querier.rs @@ -2,9 +2,9 @@ use std::collections::{HashMap, HashSet}; use std::marker::PhantomData; use cosmwasm_std::{ - from_binary, from_slice, + from_json, testing::{MockApi, MockQuerier, MockStorage}, - to_binary, Addr, Binary, ContractResult, Empty, OwnedDeps, Querier, QuerierResult, + to_json_binary, Addr, Binary, ContractResult, Empty, OwnedDeps, Querier, QuerierResult, QueryRequest, SystemError, SystemResult, WasmQuery, }; use cwd_core::{msg::QueryMsg as MainDaoQueryMsg, query::SubDao}; @@ -46,7 +46,7 @@ pub struct WasmMockQuerier { impl Querier for WasmMockQuerier { fn raw_query(&self, bin_request: &[u8]) -> QuerierResult { - let request: QueryRequest = match from_slice(bin_request) { + let request: QueryRequest = match from_json(bin_request) { Ok(v) => v, Err(e) => { return QuerierResult::Err(SystemError::InvalidRequest { @@ -92,10 +92,10 @@ pub struct MockDaoQueries { impl ContractQuerier for MockDaoQueries { fn query(&self, msg: &Binary) -> QuerierResult { - let q: MainDaoQueryMsg = from_binary(msg).unwrap(); + let q: MainDaoQueryMsg = from_json(msg).unwrap(); match q { MainDaoQueryMsg::GetSubDao { address } => match self.sub_dao_set.contains(&address) { - true => SystemResult::Ok(ContractResult::from(to_binary(&SubDao { + true => SystemResult::Ok(ContractResult::from(to_json_binary(&SubDao { addr: address.clone(), charter: None, }))), @@ -113,25 +113,25 @@ pub struct MockTimelockQueries { impl ContractQuerier for MockTimelockQueries { fn query(&self, msg: &Binary) -> QuerierResult { - let q: TimelockMsg::QueryMsg = from_binary(msg).unwrap(); + let q: TimelockMsg::QueryMsg = from_json(msg).unwrap(); match q { - TimelockMsg::QueryMsg::Config {} => { - SystemResult::Ok(ContractResult::from(to_binary(&TimelockTypes::Config { + TimelockMsg::QueryMsg::Config {} => SystemResult::Ok(ContractResult::from( + to_json_binary(&TimelockTypes::Config { owner: Addr::unchecked(self.owner.clone()), overrule_pre_propose: Addr::unchecked(""), subdao: Addr::unchecked(self.subdao.clone()), - }))) - } - TimelockMsg::QueryMsg::Proposal { proposal_id } => { - SystemResult::Ok(ContractResult::from(to_binary(&SingleChoiceProposal { + }), + )), + TimelockMsg::QueryMsg::Proposal { proposal_id } => SystemResult::Ok( + ContractResult::from(to_json_binary(&SingleChoiceProposal { id: proposal_id, msgs: vec![], status: match proposal_id { TIMELOCKED_PROPOSAL_ID => ProposalStatus::Timelocked, _ => ProposalStatus::Executed, }, - }))) - } + })), + ), _ => SystemResult::Err(SystemError::Unknown {}), } } @@ -143,13 +143,13 @@ pub struct MockDaoProposalQueries { impl ContractQuerier for MockDaoProposalQueries { fn query(&self, msg: &Binary) -> QuerierResult { - let q: ProposalSingleQueryMsg = from_binary(msg).unwrap(); + let q: ProposalSingleQueryMsg = from_json(msg).unwrap(); match q { ProposalSingleQueryMsg::Dao {} => { - SystemResult::Ok(ContractResult::from(to_binary(&self.dao_core))) + SystemResult::Ok(ContractResult::from(to_json_binary(&self.dao_core))) } ProposalSingleQueryMsg::ProposalCount {} => { - SystemResult::Ok(ContractResult::from(to_binary(&PROPOSALS_COUNT))) + SystemResult::Ok(ContractResult::from(to_json_binary(&PROPOSALS_COUNT))) } _ => SystemResult::Err(SystemError::Unknown {}), } @@ -163,13 +163,13 @@ pub struct MockSubdaoCoreQueries { impl ContractQuerier for MockSubdaoCoreQueries { fn query(&self, msg: &Binary) -> QuerierResult { - let q: SubdaoQueryMsg = from_binary(msg).unwrap(); + let q: SubdaoQueryMsg = from_json(msg).unwrap(); match q { SubdaoQueryMsg::VerifyTimelock { timelock } => SystemResult::Ok(ContractResult::from( - to_binary(&(timelock == self.timelock)), + to_json_binary(&(timelock == self.timelock)), )), SubdaoQueryMsg::Config {} => { - SystemResult::Ok(ContractResult::from(to_binary(&SubdaoTypes::Config { + SystemResult::Ok(ContractResult::from(to_json_binary(&SubdaoTypes::Config { name: SUBDAO_NAME.to_string(), description: "".to_string(), dao_uri: None, diff --git a/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/testing/tests.rs b/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/testing/tests.rs index 6fdd5236..7dc3ef7e 100644 --- a/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/testing/tests.rs +++ b/contracts/dao/pre-propose/cwd-pre-propose-single-overrule/src/testing/tests.rs @@ -1,7 +1,7 @@ use cosmwasm_std::{ - from_binary, + from_json, testing::{mock_env, mock_info}, - to_binary, Addr, CosmosMsg, DepsMut, Empty, SubMsg, WasmMsg, + to_json_binary, Addr, CosmosMsg, DepsMut, Empty, SubMsg, WasmMsg, }; use std::collections::HashMap; @@ -62,12 +62,12 @@ overrule the proposal #{} of '{}' subdao (address {})", res.unwrap().messages, vec![SubMsg::new(CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: MOCK_DAO_PROPOSE_MODULE.to_string(), - msg: to_binary(&ProposeMessageInternal::Propose { + msg: to_json_binary(&ProposeMessageInternal::Propose { title: prop_name, description: prop_desc, msgs: vec![CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: MOCK_TIMELOCK_CONTRACT.to_string(), - msg: to_binary(&TimelockMsg::ExecuteMsg::OverruleProposal { + msg: to_json_binary(&TimelockMsg::ExecuteMsg::OverruleProposal { proposal_id: PROPOSAL_ID }) .unwrap(), @@ -88,7 +88,7 @@ fn test_base_queries() { init_base_contract(deps.as_mut()); let res_config = query(deps.as_ref(), mock_env(), QueryMsg::Config {}).unwrap(); - let queried_config = from_binary(&res_config).unwrap(); + let queried_config = from_json(res_config).unwrap(); let expected_config = Config { deposit_info: None, open_proposal_submission: true, @@ -96,13 +96,13 @@ fn test_base_queries() { assert_eq!(expected_config, queried_config); let res_dao = query(deps.as_ref(), mock_env(), QueryMsg::Dao {}).unwrap(); - let queried_dao: Addr = from_binary(&res_dao).unwrap(); + let queried_dao: Addr = from_json(res_dao).unwrap(); let expected_dao = Addr::unchecked(MOCK_DAO_CORE); assert_eq!(expected_dao, queried_dao); let res_proposal_module = query(deps.as_ref(), mock_env(), QueryMsg::ProposalModule {}).unwrap(); - let queried_proposal_module: Addr = from_binary(&res_proposal_module).unwrap(); + let queried_proposal_module: Addr = from_json(res_proposal_module).unwrap(); let expected_proposal_module = Addr::unchecked(MOCK_DAO_PROPOSE_MODULE); assert_eq!(expected_proposal_module, queried_proposal_module); @@ -141,7 +141,7 @@ fn test_proposal_id_query() { }, ) .unwrap(); - let queried_id: u64 = from_binary(&res_id).unwrap(); + let queried_id: u64 = from_json(res_id).unwrap(); let expected_id = PROPOSALS_COUNT + 1; assert_eq!(expected_id, queried_id); } diff --git a/contracts/dao/pre-propose/cwd-pre-propose-single/Cargo.toml b/contracts/dao/pre-propose/cwd-pre-propose-single/Cargo.toml index 138e5c79..f966579a 100644 --- a/contracts/dao/pre-propose/cwd-pre-propose-single/Cargo.toml +++ b/contracts/dao/pre-propose/cwd-pre-propose-single/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cwd-pre-propose-single" -version = "0.2.1" +version = "0.2.2" authors = ["ekez "] edition = "2021" repository = "https://github.com/DA0-DA0/dao-contracts" @@ -20,7 +20,7 @@ cosmwasm-std = { version = "1.3.0" } cw2 = "1.1.0" serde = { version = "1.0.175", default-features = false, features = ["derive"] } cwd-pre-propose-base = { version = "*", path = "../../../../packages/cwd-pre-propose-base" } -neutron-sdk = { package = "neutron-sdk", version = "0.7.0" } +neutron-sdk = "0.10.0" schemars = "0.8.8" [dev-dependencies] diff --git a/contracts/dao/pre-propose/cwd-pre-propose-single/schema/cwd-pre-propose-single.json b/contracts/dao/pre-propose/cwd-pre-propose-single/schema/cwd-pre-propose-single.json index a8591d7a..bceb9a7b 100644 --- a/contracts/dao/pre-propose/cwd-pre-propose-single/schema/cwd-pre-propose-single.json +++ b/contracts/dao/pre-propose/cwd-pre-propose-single/schema/cwd-pre-propose-single.json @@ -305,6 +305,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -317,54 +318,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -377,6 +399,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -389,6 +413,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -401,6 +427,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -413,6 +441,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -488,7 +518,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -506,7 +537,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1083,6 +1115,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1447,6 +1489,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1504,6 +1571,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1557,7 +1647,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1608,6 +1699,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposeMessage": { "oneOf": [ { @@ -1687,7 +1791,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1844,7 +1949,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1958,7 +2064,8 @@ } }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1986,7 +2093,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -2014,7 +2122,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/pre-propose/cwd-pre-propose-single/schema/raw/execute.json b/contracts/dao/pre-propose/cwd-pre-propose-single/schema/raw/execute.json index c1f760ee..6c2a2a20 100644 --- a/contracts/dao/pre-propose/cwd-pre-propose-single/schema/raw/execute.json +++ b/contracts/dao/pre-propose/cwd-pre-propose-single/schema/raw/execute.json @@ -140,6 +140,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -152,54 +153,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -212,6 +234,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -224,6 +248,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -236,6 +262,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -248,6 +276,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -323,7 +353,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -341,7 +372,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -918,6 +950,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1282,6 +1324,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1339,6 +1406,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1392,7 +1482,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1443,6 +1534,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposeMessage": { "oneOf": [ { @@ -1522,7 +1626,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1679,7 +1784,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1793,7 +1899,8 @@ } }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1821,7 +1928,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1849,7 +1957,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/proposal/cwd-proposal-multiple/Cargo.toml b/contracts/dao/proposal/cwd-proposal-multiple/Cargo.toml index d655dbc3..eddc9089 100644 --- a/contracts/dao/proposal/cwd-proposal-multiple/Cargo.toml +++ b/contracts/dao/proposal/cwd-proposal-multiple/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cwd-proposal-multiple" -version = "0.2.1" +version = "0.2.2" authors = ["blue-note"] edition = "2021" repository = "https://github.com/DA0-DA0/dao-contracts" @@ -17,7 +17,7 @@ backtraces = ["cosmwasm-std/backtraces"] library = [] [dependencies] -neutron-sdk = { package = "neutron-sdk", version = "0.7.0" } +neutron-sdk = "0.10.0" cosmwasm-std = { version = "1.3.0", features = ["ibc3"] } cosmwasm-storage = { version = "1.3.0" } cw-storage-plus = "1.1.0" diff --git a/contracts/dao/proposal/cwd-proposal-multiple/schema/cwd-proposal-multiple.json b/contracts/dao/proposal/cwd-proposal-multiple/schema/cwd-proposal-multiple.json index 737a4969..935fdb16 100644 --- a/contracts/dao/proposal/cwd-proposal-multiple/schema/cwd-proposal-multiple.json +++ b/contracts/dao/proposal/cwd-proposal-multiple/schema/cwd-proposal-multiple.json @@ -632,6 +632,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -644,54 +645,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -704,6 +726,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -716,6 +740,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -728,6 +754,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -740,6 +768,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -815,7 +845,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -833,7 +864,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1474,6 +1506,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1838,6 +1880,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1895,6 +1962,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1979,7 +2069,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -2068,6 +2159,19 @@ } ] }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -2112,7 +2216,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -2223,7 +2328,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -2271,7 +2377,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -2299,7 +2406,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -2327,7 +2435,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", @@ -3334,6 +3442,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -3346,54 +3455,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -3406,6 +3536,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -3418,6 +3550,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -3430,6 +3564,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -3442,6 +3578,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -3517,7 +3655,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -3570,7 +3709,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -4267,6 +4407,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -4631,6 +4781,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -4688,6 +4863,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -4772,7 +4970,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -4823,6 +5022,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalResponse": { "description": "Information about a proposal returned by proposal queries.", "type": "object", @@ -4886,7 +5098,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -5043,7 +5256,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -5091,7 +5305,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -5119,7 +5334,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -5147,7 +5363,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", @@ -5499,6 +5715,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -5511,54 +5728,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -5571,6 +5809,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -5583,6 +5823,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -5595,6 +5837,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -5607,6 +5851,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -5682,7 +5928,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -5735,7 +5982,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -6432,6 +6680,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -6796,6 +7054,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -6853,6 +7136,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -6937,7 +7243,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -6988,6 +7295,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -7032,7 +7352,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -7189,7 +7510,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -7237,7 +7559,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -7265,7 +7588,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -7293,7 +7617,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", @@ -7641,6 +7965,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -7653,54 +7978,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -7713,6 +8059,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -7725,6 +8073,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -7737,6 +8087,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -7749,6 +8101,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -7824,7 +8178,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -7877,7 +8232,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -8574,6 +8930,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -8938,6 +9304,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -8995,6 +9386,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -9079,7 +9493,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -9130,6 +9545,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalResponse": { "description": "Information about a proposal returned by proposal queries.", "type": "object", @@ -9193,7 +9621,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -9350,7 +9779,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -9398,7 +9828,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -9426,7 +9857,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -9454,7 +9886,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/execute.json b/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/execute.json index e94eaa32..5b00cac2 100644 --- a/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/execute.json +++ b/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/execute.json @@ -348,6 +348,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -360,54 +361,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -420,6 +442,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -432,6 +456,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -444,6 +470,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -456,6 +484,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -531,7 +561,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -549,7 +580,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1190,6 +1222,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1554,6 +1596,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1611,6 +1678,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1695,7 +1785,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1784,6 +1875,19 @@ } ] }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -1828,7 +1932,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1939,7 +2044,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1987,7 +2093,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -2015,7 +2122,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -2043,7 +2151,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/response_to_list_proposals.json b/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/response_to_list_proposals.json index d189aa5a..370208a5 100644 --- a/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/response_to_list_proposals.json +++ b/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/response_to_list_proposals.json @@ -23,6 +23,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -35,54 +36,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -95,6 +117,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -107,6 +131,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -119,6 +145,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -131,6 +159,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -206,7 +236,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -259,7 +290,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -956,6 +988,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1320,6 +1362,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1377,6 +1444,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1461,7 +1551,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1512,6 +1603,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalResponse": { "description": "Information about a proposal returned by proposal queries.", "type": "object", @@ -1575,7 +1679,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1732,7 +1837,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1780,7 +1886,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1808,7 +1915,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1836,7 +1944,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/response_to_proposal.json b/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/response_to_proposal.json index de4fd8f0..268c0c9b 100644 --- a/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/response_to_proposal.json +++ b/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/response_to_proposal.json @@ -27,6 +27,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -39,54 +40,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -99,6 +121,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -111,6 +135,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -123,6 +149,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -135,6 +163,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -210,7 +240,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -263,7 +294,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -960,6 +992,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1324,6 +1366,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1381,6 +1448,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1465,7 +1555,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1516,6 +1607,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -1560,7 +1664,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1717,7 +1822,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1765,7 +1871,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1793,7 +1900,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1821,7 +1929,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/response_to_reverse_proposals.json b/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/response_to_reverse_proposals.json index d189aa5a..370208a5 100644 --- a/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/response_to_reverse_proposals.json +++ b/contracts/dao/proposal/cwd-proposal-multiple/schema/raw/response_to_reverse_proposals.json @@ -23,6 +23,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -35,54 +36,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -95,6 +117,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -107,6 +131,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -119,6 +145,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -131,6 +159,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -206,7 +236,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -259,7 +290,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -956,6 +988,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1320,6 +1362,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1377,6 +1444,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1461,7 +1551,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1512,6 +1603,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalResponse": { "description": "Information about a proposal returned by proposal queries.", "type": "object", @@ -1575,7 +1679,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1732,7 +1837,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1780,7 +1886,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1808,7 +1915,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1836,7 +1944,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/proposal/cwd-proposal-multiple/src/contract.rs b/contracts/dao/proposal/cwd-proposal-multiple/src/contract.rs index 3a4907f9..d4aa3b4e 100644 --- a/contracts/dao/proposal/cwd-proposal-multiple/src/contract.rs +++ b/contracts/dao/proposal/cwd-proposal-multiple/src/contract.rs @@ -1,8 +1,8 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Addr, Binary, Deps, DepsMut, Empty, Env, MessageInfo, Reply, Response, StdError, - StdResult, Storage, SubMsg, WasmMsg, + to_json_binary, Addr, Binary, Deps, DepsMut, Empty, Env, MessageInfo, Reply, Response, + StdError, StdResult, Storage, SubMsg, WasmMsg, }; use cw2::set_contract_version; @@ -232,9 +232,9 @@ pub fn execute_propose( // contract to the Juno mainnet until queries worked within a // reasonable margin of error. // - // `to_vec` is the method used by cosmwasm to convert a struct + // `to_json_vec` is the method used by cosmwasm to convert a struct // into it's byte representation in storage. - let proposal_size = cosmwasm_std::to_vec(&proposal)?.len() as u64; + let proposal_size = cosmwasm_std::to_json_vec(&proposal)?.len() as u64; if proposal_size > MAX_PROPOSAL_SIZE { return Err(ContractError::ProposalTooLarge { size: proposal_size, @@ -251,7 +251,7 @@ pub fn execute_propose( let hooks = match proposal_creation_policy { ProposalCreationPolicy::Anyone {} => hooks, ProposalCreationPolicy::Module { addr } => { - let msg = to_binary(&PreProposeMsg::ProposalCreatedHook { + let msg = to_json_binary(&PreProposeMsg::ProposalCreatedHook { proposal_id: id, proposer: proposer.into_string(), })?; @@ -413,7 +413,7 @@ pub fn execute_execute( if !msgs.is_empty() { let execute_message = WasmMsg::Execute { contract_addr: config.dao.to_string(), - msg: to_binary(&cwd_core::msg::ExecuteMsg::ExecuteProposalHook { + msg: to_json_binary(&cwd_core::msg::ExecuteMsg::ExecuteProposalHook { msgs, })?, funds: vec![], @@ -449,7 +449,7 @@ pub fn execute_execute( let hooks = match proposal_creation_policy { ProposalCreationPolicy::Anyone {} => hooks, ProposalCreationPolicy::Module { addr } => { - let msg = to_binary(&PreProposeMsg::ProposalCompletedHook { + let msg = to_json_binary(&PreProposeMsg::ProposalCompletedHook { proposal_id, new_status: prop.status, })?; @@ -508,7 +508,7 @@ pub fn execute_close( let hooks = match proposal_creation_policy { ProposalCreationPolicy::Anyone {} => hooks, ProposalCreationPolicy::Module { addr } => { - let msg = to_binary(&PreProposeMsg::ProposalCompletedHook { + let msg = to_json_binary(&PreProposeMsg::ProposalCompletedHook { proposal_id, new_status: prop.status, })?; @@ -728,8 +728,8 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { limit, } => query_reverse_proposals(deps, env, start_before, limit), QueryMsg::ProposalCreationPolicy {} => query_creation_policy(deps), - QueryMsg::ProposalHooks {} => to_binary(&PROPOSAL_HOOKS.query_hooks(deps)?), - QueryMsg::VoteHooks {} => to_binary(&VOTE_HOOKS.query_hooks(deps)?), + QueryMsg::ProposalHooks {} => to_json_binary(&PROPOSAL_HOOKS.query_hooks(deps)?), + QueryMsg::VoteHooks {} => to_json_binary(&VOTE_HOOKS.query_hooks(deps)?), QueryMsg::Dao {} => query_dao(deps), QueryMsg::ProposalExecutionError { proposal_id } => { query_proposal_execution_error(deps, proposal_id) @@ -739,22 +739,22 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { pub fn query_config(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config) + to_json_binary(&config) } pub fn query_dao(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config.dao) + to_json_binary(&config.dao) } pub fn query_proposal(deps: Deps, env: Env, id: u64) -> StdResult { let proposal = PROPOSALS.load(deps.storage, id)?; - to_binary(&proposal.into_response(&env.block, id)?) + to_json_binary(&proposal.into_response(&env.block, id)?) } pub fn query_creation_policy(deps: Deps) -> StdResult { let policy = CREATION_POLICY.load(deps.storage)?; - to_binary(&policy) + to_json_binary(&policy) } pub fn query_list_proposals( @@ -773,7 +773,7 @@ pub fn query_list_proposals( .map(|(id, proposal)| proposal.into_response(&env.block, id)) .collect::>>()?; - to_binary(&ProposalListResponse { proposals: props }) + to_json_binary(&ProposalListResponse { proposals: props }) } pub fn query_reverse_proposals( @@ -792,12 +792,12 @@ pub fn query_reverse_proposals( .map(|(id, proposal)| proposal.into_response(&env.block, id)) .collect::>>()?; - to_binary(&ProposalListResponse { proposals: props }) + to_json_binary(&ProposalListResponse { proposals: props }) } pub fn query_proposal_count(deps: Deps) -> StdResult { let proposal_count = PROPOSAL_COUNT.load(deps.storage)?; - to_binary(&proposal_count) + to_json_binary(&proposal_count) } pub fn query_vote(deps: Deps, proposal_id: u64, voter: String) -> StdResult { @@ -808,7 +808,7 @@ pub fn query_vote(deps: Deps, proposal_id: u64, voter: String) -> StdResult>>()?; - to_binary(&VoteListResponse { votes }) + to_json_binary(&VoteListResponse { votes }) } pub fn query_info(deps: Deps) -> StdResult { let info = cw2::get_contract_version(deps.storage)?; - to_binary(&cwd_interface::voting::InfoResponse { info }) + to_json_binary(&cwd_interface::voting::InfoResponse { info }) } pub fn query_proposal_execution_error(deps: Deps, proposal_id: u64) -> StdResult { let error = PROPOSAL_EXECUTION_ERRORS.may_load(deps.storage, proposal_id)?; - to_binary(&error) + to_json_binary(&error) } #[cfg_attr(not(feature = "library"), entry_point)] diff --git a/contracts/dao/proposal/cwd-proposal-multiple/src/testing/do_votes.rs b/contracts/dao/proposal/cwd-proposal-multiple/src/testing/do_votes.rs index 02298d9d..d9e34160 100644 --- a/contracts/dao/proposal/cwd-proposal-multiple/src/testing/do_votes.rs +++ b/contracts/dao/proposal/cwd-proposal-multiple/src/testing/do_votes.rs @@ -639,7 +639,7 @@ where let one_sum: u64 = one.iter().sum(); let none_sum: u64 = none.iter().sum(); - let mut sums = vec![zero_sum, one_sum, none_sum]; + let mut sums = [zero_sum, one_sum, none_sum]; sums.sort_unstable(); // If none of the above wins or there is a tie between second and first choice. diff --git a/contracts/dao/proposal/cwd-proposal-multiple/src/testing/instantiate.rs b/contracts/dao/proposal/cwd-proposal-multiple/src/testing/instantiate.rs index f166ce7f..dfa23712 100644 --- a/contracts/dao/proposal/cwd-proposal-multiple/src/testing/instantiate.rs +++ b/contracts/dao/proposal/cwd-proposal-multiple/src/testing/instantiate.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{to_binary, Addr, Coin, Uint128}; +use cosmwasm_std::{to_json_binary, Addr, Coin, Uint128}; use cw20::Cw20Coin; use cw_multi_test::{next_block, BankSudo, BasicApp, Contract, ContractWrapper, Executor, SudoMsg}; @@ -25,7 +25,7 @@ fn get_pre_propose_info( PreProposeInfo::ModuleMayPropose { info: ModuleInstantiateInfo { code_id: pre_propose_contract, - msg: to_binary(&cppm::InstantiateMsg { + msg: to_json_binary(&cppm::InstantiateMsg { deposit_info, open_proposal_submission, }) @@ -125,7 +125,7 @@ pub(crate) fn instantiate_with_native_bonded_balances_governance( dao_uri: None, voting_registry_module_instantiate_info: ModuleInstantiateInfo { code_id: voting_registry_id, - msg: to_binary(&neutron_voting_registry::msg::InstantiateMsg { + msg: to_json_binary(&neutron_voting_registry::msg::InstantiateMsg { owner: DAO_ADDR.to_string(), voting_vaults: vec![vault_addr.to_string()], }) @@ -137,7 +137,7 @@ pub(crate) fn instantiate_with_native_bonded_balances_governance( code_id: proposal_module_code_id, label: "DAO DAO governance module.".to_string(), admin: Some(Admin::CoreModule {}), - msg: to_binary(&proposal_module_instantiate).unwrap(), + msg: to_json_binary(&proposal_module_instantiate).unwrap(), }], initial_items: None, }; diff --git a/contracts/dao/proposal/cwd-proposal-multiple/src/testing/tests.rs b/contracts/dao/proposal/cwd-proposal-multiple/src/testing/tests.rs index 1907d445..d331f91c 100644 --- a/contracts/dao/proposal/cwd-proposal-multiple/src/testing/tests.rs +++ b/contracts/dao/proposal/cwd-proposal-multiple/src/testing/tests.rs @@ -1,6 +1,6 @@ use cosmwasm_std::testing::{mock_dependencies, mock_env}; use cosmwasm_std::{ - coins, from_binary, to_binary, Addr, Api, Attribute, Coin, CosmosMsg, Decimal, Empty, Reply, + coins, from_json, to_json_binary, Addr, Api, Attribute, Coin, CosmosMsg, Decimal, Empty, Reply, Storage, SubMsgResult, Timestamp, Uint128, WasmMsg, }; use cw20::Cw20Coin; @@ -100,7 +100,7 @@ pub fn get_pre_propose_info( PreProposeInfo::ModuleMayPropose { info: ModuleInstantiateInfo { code_id: pre_propose_contract, - msg: to_binary(&cppm::InstantiateMsg { + msg: to_json_binary(&cppm::InstantiateMsg { deposit_info, open_proposal_submission, }) @@ -446,7 +446,7 @@ fn test_propose_with_messages() { let wasm_msg = WasmMsg::Execute { contract_addr: govmod.to_string(), - msg: to_binary(&config_msg).unwrap(), + msg: to_json_binary(&config_msg).unwrap(), funds: vec![], }; @@ -1963,7 +1963,7 @@ fn test_close_failed_proposal() { let msg = cw20::Cw20ExecuteMsg::Burn { amount: Uint128::new(2000), }; - let binary_msg = to_binary(&msg).unwrap(); + let binary_msg = to_json_binary(&msg).unwrap(); let options = vec![ MultipleChoiceOption { @@ -2011,7 +2011,7 @@ fn test_close_failed_proposal() { // Update block let timestamp = Timestamp::from_seconds(300_000_000); - app.update_block(|block| block.time = timestamp); + app.update_block(|b| b.time = timestamp); // Execute proposal app.execute_contract( @@ -2042,7 +2042,7 @@ fn test_close_failed_proposal() { description: "Disable closing failed proposals".to_string(), msgs: Some(vec![WasmMsg::Execute { contract_addr: govmod.to_string(), - msg: to_binary(&ExecuteMsg::UpdateConfig { + msg: to_json_binary(&ExecuteMsg::UpdateConfig { voting_strategy: VotingStrategy::SingleChoice { quorum }, max_voting_period: original.max_voting_period, min_voting_period: original.min_voting_period, @@ -2185,6 +2185,6 @@ fn test_reply_proposal_mock() { // reply writes the failed proposal error let query_res = query_proposal_execution_error(deps.as_ref(), 1).unwrap(); - let error: Option = from_binary(&query_res).unwrap(); + let error: Option = from_json(query_res).unwrap(); assert_eq!(error, Some("error".to_string())); } diff --git a/contracts/dao/proposal/cwd-proposal-single/Cargo.toml b/contracts/dao/proposal/cwd-proposal-single/Cargo.toml index d47cbaf1..8df38a31 100644 --- a/contracts/dao/proposal/cwd-proposal-single/Cargo.toml +++ b/contracts/dao/proposal/cwd-proposal-single/Cargo.toml @@ -4,7 +4,7 @@ description = "A DAO DAO proposal module for single choice (yes / no) voting." edition = "2021" name = "cwd-proposal-single" repository = "https://github.com/DA0-DA0/dao-contracts" -version = "0.2.1" +version = "0.2.2" [lib] crate-type = ["cdylib", "rlib"] @@ -16,39 +16,39 @@ backtraces = ["cosmwasm-std/backtraces"] library = [] [dependencies] -cosmwasm-schema = {version = "1.3.0"} -cosmwasm-std = {version = "1.3.0", features = ["ibc3"]} -cosmwasm-storage = {version = "1.3.0"} +cosmwasm-schema = { version = "1.3.0" } +cosmwasm-std = { version = "1.3.0", features = ["ibc3"] } +cosmwasm-storage = { version = "1.3.0" } cw-storage-plus = "1.1.0" -cw-utils = {version = "1.0.1"} +cw-utils = { version = "1.0.1" } cw2 = "1.1.0" cw20 = "1.1.0" cw3 = "1.1.0" -neutron-sdk = {package = "neutron-sdk", version = "0.7.0"} +neutron-sdk = "0.10.0" schemars = "0.8.8" -serde = {version = "1.0.175", default-features = false, features = ["derive"]} -thiserror = {version = "1.0"} +serde = { version = "1.0.175", default-features = false, features = ["derive"] } +thiserror = { version = "1.0" } -cwd-core = {path = "../../cwd-core", features = ["library"]} -cwd-hooks = {path = "../../../../packages/cwd-hooks"} -cwd-interface = {path = "../../../../packages/cwd-interface"} -cwd-macros = {path = "../../../../packages/cwd-macros"} -cwd-pre-propose-base = {path = "../../../../packages/cwd-pre-propose-base"} -cwd-pre-propose-single = {path = "../../pre-propose/cwd-pre-propose-single"} -cwd-proposal-hooks = {path = "../../../../packages/cwd-proposal-hooks"} -cwd-vote-hooks = {path = "../../../../packages/cwd-vote-hooks"} -cwd-voting = {path = "../../../../packages/cwd-voting"} +cwd-core = { path = "../../cwd-core", features = ["library"] } +cwd-hooks = { path = "../../../../packages/cwd-hooks" } +cwd-interface = { path = "../../../../packages/cwd-interface" } +cwd-macros = { path = "../../../../packages/cwd-macros" } +cwd-pre-propose-base = { path = "../../../../packages/cwd-pre-propose-base" } +cwd-pre-propose-single = { path = "../../pre-propose/cwd-pre-propose-single" } +cwd-proposal-hooks = { path = "../../../../packages/cwd-proposal-hooks" } +cwd-vote-hooks = { path = "../../../../packages/cwd-vote-hooks" } +cwd-voting = { path = "../../../../packages/cwd-voting" } -cw-proposal-single-v1 = {package = "cw-proposal-single", version = "0.1.0", git = "https://github.com/DA0-DA0/dao-contracts.git", tag = "v1.0.0"} -voting-v1 = {package = "voting", version = "0.1.0", git = "https://github.com/DA0-DA0/dao-contracts.git", tag = "v1.0.0"} +cw-proposal-single-v1 = { package = "cw-proposal-single", version = "0.1.0", git = "https://github.com/DA0-DA0/dao-contracts.git", tag = "v1.0.0" } +voting-v1 = { package = "voting", version = "0.1.0", git = "https://github.com/DA0-DA0/dao-contracts.git", tag = "v1.0.0" } [dev-dependencies] -cw-denom = {path = "../../../../packages/cw-denom"} +cw-denom = { path = "../../../../packages/cw-denom" } cw-multi-test = "0.16.5" cw20-base = "1.1.0" cw4 = "1.1.0" cw4-group = "1.1.0" cw721-base = "0.18.0" -cwd-testing = {path = "../../../../packages/cwd-testing"} -neutron-vault = {path = "../../voting/neutron-vault"} -neutron-voting-registry = {path = "../../voting/neutron-voting-registry"} +cwd-testing = { path = "../../../../packages/cwd-testing" } +neutron-vault = { path = "../../voting/neutron-vault" } +neutron-voting-registry = { path = "../../voting/neutron-voting-registry" } diff --git a/contracts/dao/proposal/cwd-proposal-single/schema/cwd-proposal-single.json b/contracts/dao/proposal/cwd-proposal-single/schema/cwd-proposal-single.json index 7f99880c..58eae03c 100644 --- a/contracts/dao/proposal/cwd-proposal-single/schema/cwd-proposal-single.json +++ b/contracts/dao/proposal/cwd-proposal-single/schema/cwd-proposal-single.json @@ -665,6 +665,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -677,54 +678,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -737,6 +759,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -749,6 +773,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -761,6 +787,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -773,6 +801,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -848,7 +878,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -866,7 +897,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1457,6 +1489,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1821,6 +1863,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1878,6 +1945,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1962,7 +2052,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -2051,6 +2142,19 @@ } ] }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -2095,7 +2199,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -2206,7 +2311,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -2326,7 +2432,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -2354,7 +2461,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -2382,7 +2490,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", @@ -3284,6 +3392,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -3296,54 +3405,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -3356,6 +3486,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -3368,6 +3500,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -3380,6 +3514,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -3392,6 +3528,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -3467,7 +3605,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -3485,7 +3624,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -4049,6 +4189,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -4413,6 +4563,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -4470,6 +4645,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -4554,7 +4752,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -4605,6 +4804,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalResponse": { "description": "Information about a proposal returned by proposal queries.", "type": "object", @@ -4757,7 +4969,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -4914,7 +5127,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -5034,7 +5248,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -5062,7 +5277,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -5090,7 +5306,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", @@ -5446,6 +5662,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -5458,54 +5675,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -5518,6 +5756,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -5530,6 +5770,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -5542,6 +5784,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -5554,6 +5798,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -5629,7 +5875,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -5647,7 +5894,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -6211,6 +6459,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -6575,6 +6833,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -6632,6 +6915,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -6716,7 +7022,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -6767,6 +7074,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -6900,7 +7220,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -7057,7 +7378,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -7177,7 +7499,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -7205,7 +7528,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -7233,7 +7557,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", @@ -7575,6 +7899,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -7587,54 +7912,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -7647,6 +7993,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -7659,6 +8007,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -7671,6 +8021,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -7683,6 +8035,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -7758,7 +8112,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -7776,7 +8131,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -8340,6 +8696,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -8704,6 +9070,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -8761,6 +9152,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -8845,7 +9259,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -8896,6 +9311,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalResponse": { "description": "Information about a proposal returned by proposal queries.", "type": "object", @@ -9048,7 +9476,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -9205,7 +9634,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -9325,7 +9755,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -9353,7 +9784,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -9381,7 +9813,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/proposal/cwd-proposal-single/schema/raw/execute.json b/contracts/dao/proposal/cwd-proposal-single/schema/raw/execute.json index ce70c0f6..b4b82a61 100644 --- a/contracts/dao/proposal/cwd-proposal-single/schema/raw/execute.json +++ b/contracts/dao/proposal/cwd-proposal-single/schema/raw/execute.json @@ -336,6 +336,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -348,54 +349,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -408,6 +430,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -420,6 +444,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -432,6 +458,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -444,6 +472,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -519,7 +549,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -537,7 +568,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1128,6 +1160,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1492,6 +1534,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1549,6 +1616,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1633,7 +1723,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1722,6 +1813,19 @@ } ] }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -1766,7 +1870,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1877,7 +1982,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1997,7 +2103,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -2025,7 +2132,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -2053,7 +2161,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/proposal/cwd-proposal-single/schema/raw/response_to_list_proposals.json b/contracts/dao/proposal/cwd-proposal-single/schema/raw/response_to_list_proposals.json index ea9f556d..e3609c7c 100644 --- a/contracts/dao/proposal/cwd-proposal-single/schema/raw/response_to_list_proposals.json +++ b/contracts/dao/proposal/cwd-proposal-single/schema/raw/response_to_list_proposals.json @@ -23,6 +23,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -35,54 +36,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -95,6 +117,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -107,6 +131,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -119,6 +145,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -131,6 +159,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -206,7 +236,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -224,7 +255,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -788,6 +820,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1152,6 +1194,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1209,6 +1276,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1293,7 +1383,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1344,6 +1435,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalResponse": { "description": "Information about a proposal returned by proposal queries.", "type": "object", @@ -1496,7 +1600,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1653,7 +1758,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1773,7 +1879,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1801,7 +1908,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1829,7 +1937,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/proposal/cwd-proposal-single/schema/raw/response_to_proposal.json b/contracts/dao/proposal/cwd-proposal-single/schema/raw/response_to_proposal.json index e3772581..1d4cd442 100644 --- a/contracts/dao/proposal/cwd-proposal-single/schema/raw/response_to_proposal.json +++ b/contracts/dao/proposal/cwd-proposal-single/schema/raw/response_to_proposal.json @@ -27,6 +27,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -39,54 +40,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -99,6 +121,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -111,6 +135,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -123,6 +149,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -135,6 +163,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -210,7 +240,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -228,7 +259,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -792,6 +824,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1156,6 +1198,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1213,6 +1280,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1297,7 +1387,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1348,6 +1439,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -1481,7 +1585,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1638,7 +1743,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1758,7 +1864,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1786,7 +1893,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1814,7 +1922,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/proposal/cwd-proposal-single/schema/raw/response_to_reverse_proposals.json b/contracts/dao/proposal/cwd-proposal-single/schema/raw/response_to_reverse_proposals.json index ea9f556d..e3609c7c 100644 --- a/contracts/dao/proposal/cwd-proposal-single/schema/raw/response_to_reverse_proposals.json +++ b/contracts/dao/proposal/cwd-proposal-single/schema/raw/response_to_reverse_proposals.json @@ -23,6 +23,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -35,54 +36,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -95,6 +117,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -107,6 +131,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -119,6 +145,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -131,6 +159,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -206,7 +236,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -224,7 +255,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -788,6 +820,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1152,6 +1194,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1209,6 +1276,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1293,7 +1383,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1344,6 +1435,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalResponse": { "description": "Information about a proposal returned by proposal queries.", "type": "object", @@ -1496,7 +1600,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1653,7 +1758,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1773,7 +1879,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1801,7 +1908,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1829,7 +1937,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/dao/proposal/cwd-proposal-single/src/contract.rs b/contracts/dao/proposal/cwd-proposal-single/src/contract.rs index b435474b..93640607 100644 --- a/contracts/dao/proposal/cwd-proposal-single/src/contract.rs +++ b/contracts/dao/proposal/cwd-proposal-single/src/contract.rs @@ -1,8 +1,8 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Addr, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Reply, Response, StdError, - StdResult, Storage, SubMsg, WasmMsg, + to_json_binary, Addr, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Reply, Response, + StdError, StdResult, Storage, SubMsg, WasmMsg, }; use cw2::set_contract_version; use cw_storage_plus::Bound; @@ -199,9 +199,9 @@ pub fn execute_propose( // contract to the Juno mainnet until queries worked within a // reasonable margin of error. // - // `to_vec` is the method used by cosmwasm to convert a struct + // `to_json_vec` is the method used by cosmwasm to convert a struct // into it's byte representation in storage. - let proposal_size = cosmwasm_std::to_vec(&proposal)?.len() as u64; + let proposal_size = cosmwasm_std::to_json_vec(&proposal)?.len() as u64; if proposal_size > MAX_PROPOSAL_SIZE { return Err(ContractError::ProposalTooLarge { size: proposal_size, @@ -219,7 +219,7 @@ pub fn execute_propose( let hooks = match proposal_creation_policy { ProposalCreationPolicy::Anyone {} => hooks, ProposalCreationPolicy::Module { addr } => { - let msg = to_binary(&PreProposeMsg::ProposalCreatedHook { + let msg = to_json_binary(&PreProposeMsg::ProposalCreatedHook { proposal_id: id, proposer: proposer.into_string(), })?; @@ -273,7 +273,7 @@ pub fn execute_execute( if !prop.msgs.is_empty() { let execute_message = WasmMsg::Execute { contract_addr: config.dao.to_string(), - msg: to_binary(&cwd_core::msg::ExecuteMsg::ExecuteProposalHook { + msg: to_json_binary(&cwd_core::msg::ExecuteMsg::ExecuteProposalHook { msgs: prop.msgs, })?, funds: vec![], @@ -304,7 +304,7 @@ pub fn execute_execute( let hooks = match proposal_creation_policy { ProposalCreationPolicy::Anyone {} => hooks, ProposalCreationPolicy::Module { addr } => { - let msg = to_binary(&PreProposeMsg::ProposalCompletedHook { + let msg = to_json_binary(&PreProposeMsg::ProposalCompletedHook { proposal_id, new_status: prop.status, })?; @@ -452,7 +452,7 @@ pub fn execute_close( let hooks = match proposal_creation_policy { ProposalCreationPolicy::Anyone {} => hooks, ProposalCreationPolicy::Module { addr } => { - let msg = to_binary(&PreProposeMsg::ProposalCompletedHook { + let msg = to_json_binary(&PreProposeMsg::ProposalCompletedHook { proposal_id, new_status: prop.status, })?; @@ -665,8 +665,8 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { limit, } => query_reverse_proposals(deps, env, start_before, limit), QueryMsg::ProposalCreationPolicy {} => query_creation_policy(deps), - QueryMsg::ProposalHooks {} => to_binary(&PROPOSAL_HOOKS.query_hooks(deps)?), - QueryMsg::VoteHooks {} => to_binary(&VOTE_HOOKS.query_hooks(deps)?), + QueryMsg::ProposalHooks {} => to_json_binary(&PROPOSAL_HOOKS.query_hooks(deps)?), + QueryMsg::VoteHooks {} => to_json_binary(&VOTE_HOOKS.query_hooks(deps)?), QueryMsg::ProposalExecutionError { proposal_id } => { query_proposal_execution_error(deps, proposal_id) } @@ -675,22 +675,22 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { pub fn query_config(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config) + to_json_binary(&config) } pub fn query_dao(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config.dao) + to_json_binary(&config.dao) } pub fn query_proposal(deps: Deps, env: Env, id: u64) -> StdResult { let proposal = PROPOSALS.load(deps.storage, id)?; - to_binary(&proposal.into_response(&env.block, id)) + to_json_binary(&proposal.into_response(&env.block, id)) } pub fn query_creation_policy(deps: Deps) -> StdResult { let policy = CREATION_POLICY.load(deps.storage)?; - to_binary(&policy) + to_json_binary(&policy) } pub fn query_list_proposals( @@ -709,7 +709,7 @@ pub fn query_list_proposals( .map(|(id, proposal)| proposal.into_response(&env.block, id)) .collect(); - to_binary(&ProposalListResponse { proposals: props }) + to_json_binary(&ProposalListResponse { proposals: props }) } pub fn query_reverse_proposals( @@ -728,12 +728,12 @@ pub fn query_reverse_proposals( .map(|(id, proposal)| proposal.into_response(&env.block, id)) .collect(); - to_binary(&ProposalListResponse { proposals: props }) + to_json_binary(&ProposalListResponse { proposals: props }) } pub fn query_proposal_count(deps: Deps) -> StdResult { let proposal_count = PROPOSAL_COUNT.load(deps.storage)?; - to_binary(&proposal_count) + to_json_binary(&proposal_count) } pub fn query_vote(deps: Deps, proposal_id: u64, voter: String) -> StdResult { @@ -744,7 +744,7 @@ pub fn query_vote(deps: Deps, proposal_id: u64, voter: String) -> StdResult>>()?; - to_binary(&VoteListResponse { votes }) + to_json_binary(&VoteListResponse { votes }) } pub fn query_info(deps: Deps) -> StdResult { let info = cw2::get_contract_version(deps.storage)?; - to_binary(&cwd_interface::voting::InfoResponse { info }) + to_json_binary(&cwd_interface::voting::InfoResponse { info }) } pub fn query_proposal_execution_error(deps: Deps, proposal_id: u64) -> StdResult { let error = PROPOSAL_EXECUTION_ERRORS.may_load(deps.storage, proposal_id)?; - to_binary(&error) + to_json_binary(&error) } #[cfg_attr(not(feature = "library"), entry_point)] diff --git a/contracts/dao/proposal/cwd-proposal-single/src/testing/instantiate.rs b/contracts/dao/proposal/cwd-proposal-single/src/testing/instantiate.rs index cc52648b..548e6815 100644 --- a/contracts/dao/proposal/cwd-proposal-single/src/testing/instantiate.rs +++ b/contracts/dao/proposal/cwd-proposal-single/src/testing/instantiate.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{to_binary, Addr, Coin, Decimal, Uint128}; +use cosmwasm_std::{to_json_binary, Addr, Coin, Decimal, Uint128}; use cw20::Cw20Coin; use cw_denom::UncheckedDenom; @@ -34,7 +34,7 @@ pub(crate) fn get_pre_propose_info( PreProposeInfo::ModuleMayPropose { info: ModuleInstantiateInfo { code_id: pre_propose_contract, - msg: to_binary(&cppbps::InstantiateMsg { + msg: to_json_binary(&cppbps::InstantiateMsg { deposit_info, open_proposal_submission, }) @@ -128,7 +128,7 @@ pub(crate) fn instantiate_with_native_bonded_balances_governance( dao_uri: None, voting_registry_module_instantiate_info: ModuleInstantiateInfo { code_id: voting_registry_id, - msg: to_binary(&neutron_voting_registry::msg::InstantiateMsg { + msg: to_json_binary(&neutron_voting_registry::msg::InstantiateMsg { owner: DAO_ADDR.to_string(), voting_vaults: vec![vault_addr.to_string()], }) @@ -140,7 +140,7 @@ pub(crate) fn instantiate_with_native_bonded_balances_governance( code_id: proposal_module_code_id, label: "DAO DAO governance module.".to_string(), admin: Some(Admin::CoreModule {}), - msg: to_binary(&proposal_module_instantiate).unwrap(), + msg: to_json_binary(&proposal_module_instantiate).unwrap(), }], initial_items: None, }; diff --git a/contracts/dao/proposal/cwd-proposal-single/src/testing/tests.rs b/contracts/dao/proposal/cwd-proposal-single/src/testing/tests.rs index 1f39b281..54aaf83e 100644 --- a/contracts/dao/proposal/cwd-proposal-single/src/testing/tests.rs +++ b/contracts/dao/proposal/cwd-proposal-single/src/testing/tests.rs @@ -1,9 +1,9 @@ use crate::contract::query_proposal_execution_error; use cosmwasm_std::{ - coins, from_binary, + coins, from_json, testing::{mock_dependencies, mock_env}, - to_binary, Addr, Attribute, BankMsg, ContractInfoResponse, CosmosMsg, Decimal, Empty, Reply, - StdError, StdResult, SubMsgResult, Uint128, WasmMsg, WasmQuery, + to_json_binary, Addr, Attribute, BankMsg, ContractInfoResponse, CosmosMsg, Decimal, Empty, + Reply, StdError, StdResult, SubMsgResult, Uint128, WasmMsg, WasmQuery, }; use cosmwasm_std::{Api, Storage}; use cw2::ContractVersion; @@ -286,7 +286,7 @@ fn test_update_config() { CREATOR_ADDR, vec![WasmMsg::Execute { contract_addr: proposal_module.to_string(), - msg: to_binary(&ExecuteMsg::UpdateConfig { + msg: to_json_binary(&ExecuteMsg::UpdateConfig { threshold: Threshold::AbsoluteCount { threshold: Uint128::new(10_000), }, @@ -973,7 +973,7 @@ fn test_reply_proposal_mock() { // reply writes the failed proposal error let query_res = query_proposal_execution_error(deps.as_ref(), 1).unwrap(); - let error: Option = from_binary(&query_res).unwrap(); + let error: Option = from_json(query_res).unwrap(); assert_eq!(error, Some("error_msg".to_string())); } diff --git a/contracts/dao/proposal/cwd-proposal-single/src/tests.rs b/contracts/dao/proposal/cwd-proposal-single/src/tests.rs index a10194c3..5dd80c46 100644 --- a/contracts/dao/proposal/cwd-proposal-single/src/tests.rs +++ b/contracts/dao/proposal/cwd-proposal-single/src/tests.rs @@ -3,25 +3,22 @@ use std::u128; use cosmwasm_std::{ coins, testing::{mock_dependencies, mock_env}, - to_binary, Addr, Coin, CosmosMsg, Decimal, Empty, Order, Timestamp, Uint128, WasmMsg, + to_json_binary, Addr, Coin, CosmosMsg, Decimal, Empty, Order, Timestamp, Uint128, WasmMsg, }; use cw20::Cw20Coin; use cwd_voting_cw20_staked::msg::ActiveThreshold; -use cwd_core::state::ProposalModule; -use cwd_interface::{Admin, ModuleInstantiateInfo}; use cw_multi_test::{next_block, App, BankSudo, Contract, ContractWrapper, Executor, SudoMsg}; use cw_pre_propose_base_proposal_single as cppbps; use cw_storage_plus::{Item, Map}; use cw_utils::Duration; use cw_utils::Expiration; +use cwd_core::state::ProposalModule; +use cwd_interface::{Admin, ModuleInstantiateInfo}; use cwd_hooks::HooksResponse; use cw_denom::{CheckedDenom, UncheckedDenom}; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; -use testing::{ShouldExecute, TestSingleChoiceVote}; use cwd_voting::{ deposit::{CheckedDepositInfo, DepositRefundPolicy, DepositToken, UncheckedDepositInfo}, pre_propose::{PreProposeInfo, ProposalCreationPolicy}, @@ -29,6 +26,9 @@ use cwd_voting::{ threshold::{PercentageThreshold, Threshold}, voting::{Vote, Votes}, }; +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; +use testing::{ShouldExecute, TestSingleChoiceVote}; use crate::{ contract::{migrate, CONTRACT_NAME, CONTRACT_VERSION}, @@ -208,7 +208,7 @@ fn test_close_failed_proposal() { let msg = cw20::Cw20ExecuteMsg::Send { contract: staking_contract.to_string(), amount: Uint128::new(2000), - msg: to_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(), + msg: to_json_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(), }; app.execute_contract( Addr::unchecked(CREATOR_ADDR), @@ -222,7 +222,7 @@ fn test_close_failed_proposal() { let msg = cw20::Cw20ExecuteMsg::Burn { amount: Uint128::new(2000), }; - let binary_msg = to_binary(&msg).unwrap(); + let binary_msg = to_json_binary(&msg).unwrap(); // Overburn tokens app.execute_contract( @@ -292,7 +292,7 @@ fn test_close_failed_proposal() { description: "We want to re-execute failed proposals".to_string(), msgs: vec![WasmMsg::Execute { contract_addr: govmod_single.to_string(), - msg: to_binary(&ExecuteMsg::UpdateConfig { + msg: to_json_binary(&ExecuteMsg::UpdateConfig { threshold: original.threshold, max_voting_period: original.max_voting_period, min_voting_period: original.min_voting_period, @@ -466,7 +466,7 @@ fn test_no_double_refund_on_execute_fail_and_close() { let msg = cw20::Cw20ExecuteMsg::Send { contract: staking_contract.to_string(), amount: Uint128::new(1), - msg: to_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(), + msg: to_json_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(), }; app.execute_contract( Addr::unchecked(CREATOR_ADDR), @@ -494,7 +494,7 @@ fn test_no_double_refund_on_execute_fail_and_close() { let msg = cw20::Cw20ExecuteMsg::Burn { amount: Uint128::new(2000), }; - let binary_msg = to_binary(&msg).unwrap(); + let binary_msg = to_json_binary(&msg).unwrap(); // Increase allowance to pay the proposal deposit. app.execute_contract( diff --git a/contracts/dao/voting/credits-vault/Cargo.toml b/contracts/dao/voting/credits-vault/Cargo.toml index 1d94e0d0..ddcc4412 100644 --- a/contracts/dao/voting/credits-vault/Cargo.toml +++ b/contracts/dao/voting/credits-vault/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "credits-vault" -version = "0.2.0" +version = "0.2.1" authors = ["Callum Anderson ", "Albert Andrejev "] edition = "2021" repository = "https://github.com/neutron-org/neutron-dao" diff --git a/contracts/dao/voting/credits-vault/src/contract.rs b/contracts/dao/voting/credits-vault/src/contract.rs index ce14a8c1..fd7385dd 100644 --- a/contracts/dao/voting/credits-vault/src/contract.rs +++ b/contracts/dao/voting/credits-vault/src/contract.rs @@ -4,7 +4,7 @@ use crate::state::{Config, TotalSupplyResponse, CONFIG, DAO}; #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult, Uint128, + to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult, Uint128, }; use cw2::set_contract_version; use cwd_interface::voting::{ @@ -139,10 +139,10 @@ pub fn execute_update_config( pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { match msg { QueryMsg::VotingPowerAtHeight { address, height } => { - to_binary(&query_voting_power_at_height(deps, env, address, height)?) + to_json_binary(&query_voting_power_at_height(deps, env, address, height)?) } QueryMsg::TotalPowerAtHeight { height } => { - to_binary(&query_total_power_at_height(deps, env, height)?) + to_json_binary(&query_total_power_at_height(deps, env, height)?) } QueryMsg::Info {} => query_info(deps), QueryMsg::Dao {} => query_dao(deps), @@ -153,7 +153,7 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { query_list_bonders(deps, start_after, limit) } QueryMsg::BondingStatus { height, address } => { - to_binary(&query_bonding_status(deps, env, height, address)?) + to_json_binary(&query_bonding_status(deps, env, height, address)?) } } } @@ -222,27 +222,27 @@ pub fn query_total_power_at_height( pub fn query_info(deps: Deps) -> StdResult { let info = cw2::get_contract_version(deps.storage)?; - to_binary(&cwd_interface::voting::InfoResponse { info }) + to_json_binary(&cwd_interface::voting::InfoResponse { info }) } pub fn query_dao(deps: Deps) -> StdResult { let dao = DAO.load(deps.storage)?; - to_binary(&dao) + to_json_binary(&dao) } pub fn query_name(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config.name) + to_json_binary(&config.name) } pub fn query_description(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config.description) + to_json_binary(&config.description) } pub fn query_config(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config) + to_json_binary(&config) } pub fn query_list_bonders( diff --git a/contracts/dao/voting/credits-vault/src/tests.rs b/contracts/dao/voting/credits-vault/src/tests.rs index 43d8db71..75e8102a 100644 --- a/contracts/dao/voting/credits-vault/src/tests.rs +++ b/contracts/dao/voting/credits-vault/src/tests.rs @@ -3,7 +3,7 @@ use crate::msg::{CreditsQueryMsg, ExecuteMsg, InstantiateMsg, MigrateMsg, QueryM use crate::state::{Config, TotalSupplyResponse}; use crate::ContractError; use cosmwasm_std::testing::{mock_dependencies, mock_env}; -use cosmwasm_std::{to_binary, Addr, Binary, Deps, Empty, Env, Response, StdResult, Uint128}; +use cosmwasm_std::{to_json_binary, Addr, Binary, Deps, Empty, Env, Response, StdResult, Uint128}; use cw_multi_test::{custom_app, App, AppResponse, Contract, ContractWrapper, Executor}; use cwd_interface::voting::{ InfoResponse, TotalPowerAtHeightResponse, VotingPowerAtHeightResponse, @@ -39,13 +39,13 @@ fn credits_query(_deps: Deps, _env: Env, msg: CreditsQueryMsg) -> StdResult { let response = TotalSupplyResponse { total_supply: Uint128::from(10000u64), }; - to_binary(&response) + to_json_binary(&response) } } } diff --git a/contracts/dao/voting/investors-vesting-vault/Cargo.toml b/contracts/dao/voting/investors-vesting-vault/Cargo.toml index f20308b4..36ea2b5e 100644 --- a/contracts/dao/voting/investors-vesting-vault/Cargo.toml +++ b/contracts/dao/voting/investors-vesting-vault/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "investors-vesting-vault" -version = "0.2.0" +version = "0.2.1" authors = ["Callum Anderson ", "Mikhail Mozhaev "] edition = "2021" repository = "https://github.com/neutron-org/neutron-dao" diff --git a/contracts/dao/voting/investors-vesting-vault/src/contract.rs b/contracts/dao/voting/investors-vesting-vault/src/contract.rs index 77ac2f0d..a0b54922 100644 --- a/contracts/dao/voting/investors-vesting-vault/src/contract.rs +++ b/contracts/dao/voting/investors-vesting-vault/src/contract.rs @@ -1,7 +1,7 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult, Uint128, + to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult, Uint128, }; use cw2::set_contract_version; use cwd_interface::voting::{ @@ -138,18 +138,18 @@ pub fn execute_update_config( pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { match msg { QueryMsg::VotingPowerAtHeight { address, height } => { - to_binary(&query_voting_power_at_height(deps, env, address, height)?) + to_json_binary(&query_voting_power_at_height(deps, env, address, height)?) } QueryMsg::TotalPowerAtHeight { height } => { - to_binary(&query_total_power_at_height(deps, env, height)?) + to_json_binary(&query_total_power_at_height(deps, env, height)?) } QueryMsg::Info {} => query_info(deps), QueryMsg::Dao {} => query_dao(deps), QueryMsg::Name {} => query_name(deps), QueryMsg::Description {} => query_description(deps), - QueryMsg::Config {} => to_binary(&CONFIG.load(deps.storage)?), + QueryMsg::Config {} => to_json_binary(&CONFIG.load(deps.storage)?), QueryMsg::BondingStatus { height, address } => { - to_binary(&query_bonding_status(deps, env, height, address)?) + to_json_binary(&query_bonding_status(deps, env, height, address)?) } QueryMsg::ListBonders { start_after, limit } => { query_list_bonders(deps, env, start_after, limit) @@ -228,22 +228,22 @@ pub fn query_total_power_at_height( pub fn query_info(deps: Deps) -> StdResult { let info = cw2::get_contract_version(deps.storage)?; - to_binary(&cwd_interface::voting::InfoResponse { info }) + to_json_binary(&cwd_interface::voting::InfoResponse { info }) } pub fn query_dao(deps: Deps) -> StdResult { let dao = DAO.load(deps.storage)?; - to_binary(&dao) + to_json_binary(&dao) } pub fn query_name(deps: Deps) -> StdResult { let config: Config = CONFIG.load(deps.storage)?; - to_binary(&config.name) + to_json_binary(&config.name) } pub fn query_description(deps: Deps) -> StdResult { let config: Config = CONFIG.load(deps.storage)?; - to_binary(&config.description) + to_json_binary(&config.description) } #[cfg_attr(not(feature = "library"), entry_point)] diff --git a/contracts/dao/voting/investors-vesting-vault/src/tests.rs b/contracts/dao/voting/investors-vesting-vault/src/tests.rs index 2f559010..72d5821d 100644 --- a/contracts/dao/voting/investors-vesting-vault/src/tests.rs +++ b/contracts/dao/voting/investors-vesting-vault/src/tests.rs @@ -3,7 +3,7 @@ use crate::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; use crate::state::Config; use crate::ContractError; use cosmwasm_std::testing::{mock_dependencies, mock_env}; -use cosmwasm_std::{to_binary, Addr, Binary, Deps, Empty, Env, Response, StdResult, Uint128}; +use cosmwasm_std::{to_json_binary, Addr, Binary, Deps, Empty, Env, Response, StdResult, Uint128}; use cw_multi_test::{custom_app, App, AppResponse, Contract, ContractWrapper, Executor}; use cwd_interface::voting::{ InfoResponse, TotalPowerAtHeightResponse, VotingPowerAtHeightResponse, @@ -36,13 +36,13 @@ fn vesting_query(_deps: Deps, _env: Env, msg: vesting_base::msg::QueryMsg) -> St }, } => { let response = Uint128::from(10000u64); - to_binary(&response) + to_json_binary(&response) } vesting_base::msg::QueryMsg::HistoricalExtension { msg: vesting_base::msg::QueryMsgHistorical::UnclaimedTotalAmountAtHeight { height: _ }, } => { let response = Uint128::from(10000u64); - to_binary(&response) + to_json_binary(&response) } _ => unimplemented!(), } diff --git a/contracts/dao/voting/lockdrop-vault/Cargo.toml b/contracts/dao/voting/lockdrop-vault/Cargo.toml index 3830ada9..a578f30f 100644 --- a/contracts/dao/voting/lockdrop-vault/Cargo.toml +++ b/contracts/dao/voting/lockdrop-vault/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "Apache-2.0" name = "lockdrop-vault" repository = "https://github.com/neutron/neutron-dao" -version = "0.1.0" +version = "0.1.1" [lib] crate-type = ["cdylib", "rlib"] @@ -16,20 +16,20 @@ backtraces = ["cosmwasm-std/backtraces"] library = [] [dependencies] -astroport = {package = "astroport", git = "https://github.com/neutron-org/neutron-tge-contracts.git", branch = "main"} -astroport-periphery = {package = "astroport-periphery", git = "https://github.com/neutron-org/neutron-tge-contracts.git", branch = "main"} -cosmwasm-schema = {version = "1.3.0"} -cosmwasm-std = {version = "1.3.0"} +astroport = { package = "astroport", git = "https://github.com/neutron-org/neutron-tge-contracts.git", branch = "main" } +astroport-periphery = { package = "astroport-periphery", git = "https://github.com/neutron-org/neutron-tge-contracts.git", branch = "main" } +cosmwasm-schema = { version = "1.3.0" } +cosmwasm-std = { version = "1.3.0" } cw-storage-plus = "1.1.0" cw2 = "1.1.0" cw20 = "1.1.0" -cwd-interface = {path = "../../../../packages/cwd-interface"} -cwd-macros = {path = "../../../../packages/cwd-macros"} -cwd-voting = {path = "../../../../packages/cwd-voting"} -neutron-lockdrop-vault = {path = "../../../../packages/neutron-lockdrop-vault"} +cwd-interface = { path = "../../../../packages/cwd-interface" } +cwd-macros = { path = "../../../../packages/cwd-macros" } +cwd-voting = { path = "../../../../packages/cwd-voting" } +neutron-lockdrop-vault = { path = "../../../../packages/neutron-lockdrop-vault" } schemars = "0.8.8" -serde = {version = "1.0.175", default-features = false, features = ["derive"]} -thiserror = {version = "1.0"} +serde = { version = "1.0.175", default-features = false, features = ["derive"] } +thiserror = { version = "1.0" } [dev-dependencies] anyhow = "1.0.57" diff --git a/contracts/dao/voting/lockdrop-vault/src/contract.rs b/contracts/dao/voting/lockdrop-vault/src/contract.rs index 028d3f1b..8fd7cf9f 100644 --- a/contracts/dao/voting/lockdrop-vault/src/contract.rs +++ b/contracts/dao/voting/lockdrop-vault/src/contract.rs @@ -1,7 +1,7 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Binary, Deps, DepsMut, Env, Fraction, MessageInfo, Response, StdError, Uint128, + to_json_binary, Binary, Deps, DepsMut, Env, Fraction, MessageInfo, Response, StdError, Uint128, }; use cw2::set_contract_version; use cwd_interface::voting::{ @@ -162,12 +162,12 @@ pub fn execute_update_config( #[cfg_attr(not(feature = "library"), entry_point)] pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> ContractResult { match msg { - QueryMsg::VotingPowerAtHeight { address, height } => Ok(to_binary( + QueryMsg::VotingPowerAtHeight { address, height } => Ok(to_json_binary( &query_voting_power_at_height(deps, env, address, height)?, )?), - QueryMsg::TotalPowerAtHeight { height } => { - Ok(to_binary(&query_total_power_at_height(deps, env, height)?)?) - } + QueryMsg::TotalPowerAtHeight { height } => Ok(to_json_binary( + &query_total_power_at_height(deps, env, height)?, + )?), QueryMsg::Info {} => query_info(deps), QueryMsg::Dao {} => query_dao(deps), QueryMsg::Name {} => query_name(deps), @@ -176,7 +176,7 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> ContractResult { QueryMsg::ListBonders { start_after, limit } => { query_list_bonders(deps, start_after, limit) } - QueryMsg::BondingStatus { height, address } => Ok(to_binary(&query_bonding_status( + QueryMsg::BondingStatus { height, address } => Ok(to_json_binary(&query_bonding_status( deps, env, height, address, )?)?), } @@ -255,27 +255,29 @@ pub fn query_total_power_at_height( pub fn query_info(deps: Deps) -> ContractResult { let info = cw2::get_contract_version(deps.storage)?; - Ok(to_binary(&cwd_interface::voting::InfoResponse { info })?) + Ok(to_json_binary(&cwd_interface::voting::InfoResponse { + info, + })?) } pub fn query_dao(deps: Deps) -> ContractResult { let dao = DAO.load(deps.storage)?; - Ok(to_binary(&dao)?) + Ok(to_json_binary(&dao)?) } pub fn query_name(deps: Deps) -> ContractResult { let config = CONFIG.load(deps.storage)?; - Ok(to_binary(&config.name)?) + Ok(to_json_binary(&config.name)?) } pub fn query_description(deps: Deps) -> ContractResult { let config = CONFIG.load(deps.storage)?; - Ok(to_binary(&config.description)?) + Ok(to_json_binary(&config.description)?) } pub fn query_config(deps: Deps) -> ContractResult { let config = CONFIG.load(deps.storage)?; - Ok(to_binary(&config)?) + Ok(to_json_binary(&config)?) } pub fn query_list_bonders( diff --git a/contracts/dao/voting/lockdrop-vault/src/tests.rs b/contracts/dao/voting/lockdrop-vault/src/tests.rs index 93430499..1f860e33 100644 --- a/contracts/dao/voting/lockdrop-vault/src/tests.rs +++ b/contracts/dao/voting/lockdrop-vault/src/tests.rs @@ -4,7 +4,7 @@ use astroport::oracle::QueryMsg as OracleQueryMsg; use astroport_periphery::lockdrop::{PoolType, QueryMsg as LockdropQueryMsg}; use cosmwasm_std::testing::{mock_dependencies, mock_env}; use cosmwasm_std::{ - coins, to_binary, Addr, Binary, Coin, Decimal256, Deps, Empty, Env, Response, StdResult, + coins, to_json_binary, Addr, Binary, Coin, Decimal256, Deps, Empty, Env, Response, StdResult, Uint128, }; use cw_multi_test::{custom_app, App, AppResponse, Contract, ContractWrapper, Executor}; @@ -98,7 +98,7 @@ fn lockdrop_query(_deps: Deps, _env: Env, msg: LockdropQueryMsg) -> StdResult Uint128::from(USER_USDC_LOCKUP_AT_HEIGHT), }; - to_binary(&response) + to_json_binary(&response) } LockdropQueryMsg::QueryLockupTotalAtHeight { pool_type, @@ -109,7 +109,7 @@ fn lockdrop_query(_deps: Deps, _env: Env, msg: LockdropQueryMsg) -> StdResult Uint128::from(TOTAL_USDC_LOCKUP_AT_HEIGHT), }; - to_binary(&response) + to_json_binary(&response) } _ => unreachable!(), } @@ -158,7 +158,7 @@ fn oracle_query(_deps: Deps, _env: Env, msg: OracleQueryMsg) -> StdResult unreachable!(), } diff --git a/contracts/dao/voting/neutron-vault/Cargo.toml b/contracts/dao/voting/neutron-vault/Cargo.toml index 9f862195..0a661b9f 100644 --- a/contracts/dao/voting/neutron-vault/Cargo.toml +++ b/contracts/dao/voting/neutron-vault/Cargo.toml @@ -4,7 +4,7 @@ description = "A DAO DAO voting module based on staked cw721 tokens." edition = "2021" name = "neutron-vault" repository = "https://github.com/DA0-DA0/dao-contracts" -version = "0.2.0" +version = "0.2.1" [lib] crate-type = ["cdylib", "rlib"] @@ -16,20 +16,20 @@ backtraces = ["cosmwasm-std/backtraces"] library = [] [dependencies] -cosmwasm-schema = {version = "1.3.0"} -cosmwasm-std = {version = "1.3.0"} -cosmwasm-storage = {version = "1.3.0"} +cosmwasm-schema = { version = "1.3.0" } +cosmwasm-std = { version = "1.3.0" } +cosmwasm-storage = { version = "1.3.0" } cw-controllers = "1.1.0" -cw-paginate = {path = "../../../../packages/cw-paginate"} +cw-paginate = { path = "../../../../packages/cw-paginate" } cw-storage-plus = "1.1.0" -cw-utils = {version = "1.0.1"} +cw-utils = { version = "1.0.1" } cw2 = "1.1.0" -cwd-interface = {path = "../../../../packages/cwd-interface"} -cwd-macros = {path = "../../../../packages/cwd-macros"} -cwd-voting = {path = "../../../../packages/cwd-voting"} +cwd-interface = { path = "../../../../packages/cwd-interface" } +cwd-macros = { path = "../../../../packages/cwd-macros" } +cwd-voting = { path = "../../../../packages/cwd-voting" } schemars = "0.8.8" -serde = {version = "1.0.175", default-features = false, features = ["derive"]} -thiserror = {version = "1.0"} +serde = { version = "1.0.175", default-features = false, features = ["derive"] } +thiserror = { version = "1.0" } [dev-dependencies] anyhow = "1.0.57" diff --git a/contracts/dao/voting/neutron-vault/src/contract.rs b/contracts/dao/voting/neutron-vault/src/contract.rs index 81351be4..1d8d178b 100644 --- a/contracts/dao/voting/neutron-vault/src/contract.rs +++ b/contracts/dao/voting/neutron-vault/src/contract.rs @@ -1,7 +1,7 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - coins, to_binary, BankMsg, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Response, + coins, to_json_binary, BankMsg, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Response, StdResult, Uint128, }; use cw2::set_contract_version; @@ -158,21 +158,21 @@ pub fn execute_update_config( pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { match msg { QueryMsg::VotingPowerAtHeight { address, height } => { - to_binary(&query_voting_power_at_height(deps, env, address, height)?) + to_json_binary(&query_voting_power_at_height(deps, env, address, height)?) } QueryMsg::TotalPowerAtHeight { height } => { - to_binary(&query_total_power_at_height(deps, env, height)?) + to_json_binary(&query_total_power_at_height(deps, env, height)?) } QueryMsg::Info {} => query_info(deps), QueryMsg::Dao {} => query_dao(deps), QueryMsg::Name {} => query_name(deps), QueryMsg::Description {} => query_description(deps), - QueryMsg::Config {} => to_binary(&CONFIG.load(deps.storage)?), + QueryMsg::Config {} => to_json_binary(&CONFIG.load(deps.storage)?), QueryMsg::ListBonders { start_after, limit } => { query_list_bonders(deps, start_after, limit) } QueryMsg::BondingStatus { height, address } => { - to_binary(&query_bonding_status(deps, env, height, address)?) + to_json_binary(&query_bonding_status(deps, env, height, address)?) } } } @@ -205,22 +205,22 @@ pub fn query_total_power_at_height( pub fn query_info(deps: Deps) -> StdResult { let info = cw2::get_contract_version(deps.storage)?; - to_binary(&cwd_interface::voting::InfoResponse { info }) + to_json_binary(&cwd_interface::voting::InfoResponse { info }) } pub fn query_dao(deps: Deps) -> StdResult { let dao = DAO.load(deps.storage)?; - to_binary(&dao) + to_json_binary(&dao) } pub fn query_name(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config.name) + to_json_binary(&config.name) } pub fn query_description(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config.description) + to_json_binary(&config.description) } pub fn query_list_bonders( @@ -248,7 +248,7 @@ pub fn query_list_bonders( }) .collect(); - to_binary(&ListBondersResponse { bonders }) + to_json_binary(&ListBondersResponse { bonders }) } pub fn query_bonding_status( diff --git a/contracts/dao/voting/neutron-voting-registry/Cargo.toml b/contracts/dao/voting/neutron-voting-registry/Cargo.toml index bb9eb2df..3bed3375 100644 --- a/contracts/dao/voting/neutron-voting-registry/Cargo.toml +++ b/contracts/dao/voting/neutron-voting-registry/Cargo.toml @@ -4,7 +4,7 @@ description = "A DAO DAO voting module based on staked cw721 tokens." edition = "2021" name = "neutron-voting-registry" repository = "https://github.com/DA0-DA0/dao-contracts" -version = "0.3.0" +version = "0.3.1" [lib] crate-type = ["cdylib", "rlib"] @@ -16,20 +16,20 @@ backtraces = ["cosmwasm-std/backtraces"] library = [] [dependencies] -cosmwasm-schema = {version = "1.3.0"} -cosmwasm-std = {version = "1.3.0"} -cosmwasm-storage = {version = "1.3.0"} +cosmwasm-schema = { version = "1.3.0" } +cosmwasm-std = { version = "1.3.0" } +cosmwasm-storage = { version = "1.3.0" } cw-controllers = "1.1.0" -cw-paginate = {path = "../../../../packages/cw-paginate"} +cw-paginate = { path = "../../../../packages/cw-paginate" } cw-storage-plus = "1.1.0" -cw-utils = {version = "1.0.1"} +cw-utils = { version = "1.0.1" } cw2 = "1.1.0" -cwd-interface = {path = "../../../../packages/cwd-interface"} -cwd-macros = {path = "../../../../packages/cwd-macros"} -neutron-vault = {path = "../neutron-vault"} +cwd-interface = { path = "../../../../packages/cwd-interface" } +cwd-macros = { path = "../../../../packages/cwd-macros" } +neutron-vault = { path = "../neutron-vault" } schemars = "0.8.8" -serde = {version = "1.0.175", default-features = false, features = ["derive"]} -thiserror = {version = "1.0"} +serde = { version = "1.0.175", default-features = false, features = ["derive"] } +thiserror = { version = "1.0" } [dev-dependencies] anyhow = "1.0.57" diff --git a/contracts/dao/voting/neutron-voting-registry/src/contract.rs b/contracts/dao/voting/neutron-voting-registry/src/contract.rs index 35043253..3edff988 100644 --- a/contracts/dao/voting/neutron-voting-registry/src/contract.rs +++ b/contracts/dao/voting/neutron-voting-registry/src/contract.rs @@ -3,15 +3,12 @@ use crate::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, VotingVault}; use crate::state::{Config, VotingVaultState, CONFIG, DAO, VAULT_STATES}; #[cfg(not(feature = "library"))] use cosmwasm_std::{ - entry_point, to_binary, Addr, Binary, Deps, DepsMut, Env, MessageInfo, Order, Response, + entry_point, to_json_binary, Addr, Binary, Deps, DepsMut, Env, MessageInfo, Order, Response, StdError, StdResult, }; use cw2::set_contract_version; -use cw_storage_plus::Item; use cwd_interface::voting::{self, TotalPowerAtHeightResponse, VotingPowerAtHeightResponse}; use neutron_vault::msg::QueryMsg as VaultQueryMsg; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; pub(crate) const CONTRACT_NAME: &str = "crates.io:neutron-voting-registry"; pub(crate) const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); @@ -180,15 +177,17 @@ pub fn execute_update_config( pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { match msg { QueryMsg::VotingPowerAtHeight { address, height } => { - to_binary(&query_voting_power_at_height(deps, env, address, height)?) + to_json_binary(&query_voting_power_at_height(deps, env, address, height)?) } QueryMsg::TotalPowerAtHeight { height } => { - to_binary(&query_total_power_at_height(deps, env, height)?) + to_json_binary(&query_total_power_at_height(deps, env, height)?) } QueryMsg::Info {} => query_info(deps), QueryMsg::Dao {} => query_dao(deps), - QueryMsg::Config {} => to_binary(&CONFIG.load(deps.storage)?), - QueryMsg::VotingVaults { height } => to_binary(&query_voting_vaults(deps, env, height)?), + QueryMsg::Config {} => to_json_binary(&CONFIG.load(deps.storage)?), + QueryMsg::VotingVaults { height } => { + to_json_binary(&query_voting_vaults(deps, env, height)?) + } } } @@ -296,37 +295,16 @@ pub fn query_total_power_at_height( pub fn query_info(deps: Deps) -> StdResult { let info = cw2::get_contract_version(deps.storage)?; - to_binary(&voting::InfoResponse { info }) + to_json_binary(&voting::InfoResponse { info }) } pub fn query_dao(deps: Deps) -> StdResult { let dao = DAO.load(deps.storage)?; - to_binary(&dao) + to_json_binary(&dao) } #[cfg_attr(not(feature = "library"), entry_point)] pub fn migrate(deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result { - // read the prev version config - #[derive(Serialize, Deserialize, JsonSchema)] - struct OldConfig { - pub owner: Addr, - pub voting_vaults: Vec, - } - let old_config: OldConfig = Item::new("config").load(deps.storage)?; - - // move vaults from old config to a dedicated Item - for vault in old_config.voting_vaults { - VAULT_STATES.save(deps.storage, vault, &VotingVaultState::Active, 1u64)?; - } - - // overwrite value behind config key - CONFIG.save( - deps.storage, - &Config { - owner: old_config.owner, - }, - )?; - // Set contract to version to latest set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?; Ok(Response::default()) diff --git a/contracts/dao/voting/neutron-voting-registry/src/testing/mock_querier.rs b/contracts/dao/voting/neutron-voting-registry/src/testing/mock_querier.rs index b6750a8d..2dc9c8da 100644 --- a/contracts/dao/voting/neutron-voting-registry/src/testing/mock_querier.rs +++ b/contracts/dao/voting/neutron-voting-registry/src/testing/mock_querier.rs @@ -1,8 +1,8 @@ use cosmwasm_std::StdResult; use cosmwasm_std::{ - from_binary, from_slice, + from_json, testing::{MockApi, MockQuerier, MockStorage}, - to_binary, Binary, ContractResult, Empty, OwnedDeps, Querier, QuerierResult, QueryRequest, + to_json_binary, Binary, ContractResult, Empty, OwnedDeps, Querier, QuerierResult, QueryRequest, SystemError, SystemResult, Uint128, WasmQuery, }; use cwd_interface::voting::{TotalPowerAtHeightResponse, VotingPowerAtHeightResponse}; @@ -44,7 +44,7 @@ pub struct WasmMockQuerier { impl Querier for WasmMockQuerier { fn raw_query(&self, bin_request: &[u8]) -> QuerierResult { - let request: QueryRequest = match from_slice(bin_request) { + let request: QueryRequest = match from_json(bin_request) { Ok(v) => v, Err(e) => { return QuerierResult::Err(SystemError::InvalidRequest { @@ -63,90 +63,96 @@ impl WasmMockQuerier { QueryRequest::Wasm(WasmQuery::Smart { contract_addr, msg }) => { match contract_addr.as_str() { MOCK_VAULT_1 => { - let q: VaultQueryMsg = from_binary(msg).unwrap(); + let q: VaultQueryMsg = from_json(msg).unwrap(); let resp: StdResult = match q { VaultQueryMsg::VotingPowerAtHeight { address, height } => { if address.as_str() == MOCK_VAULT_MEMBER { - to_binary(&VotingPowerAtHeightResponse { + to_json_binary(&VotingPowerAtHeightResponse { power: Uint128::from(MOCK_VAULT_1_VP), height: height.unwrap_or_default(), }) } else { - to_binary(&VotingPowerAtHeightResponse { + to_json_binary(&VotingPowerAtHeightResponse { power: Uint128::zero(), height: height.unwrap_or_default(), }) } } VaultQueryMsg::TotalPowerAtHeight { height } => { - to_binary(&TotalPowerAtHeightResponse { + to_json_binary(&TotalPowerAtHeightResponse { power: Uint128::from(MOCK_VAULT_1_VP), height: height.unwrap_or_default(), }) } - VaultQueryMsg::Name {} => to_binary(&String::from(MOCK_VAULT_1_NAME)), + VaultQueryMsg::Name {} => { + to_json_binary(&String::from(MOCK_VAULT_1_NAME)) + } VaultQueryMsg::Description {} => { - to_binary(&String::from(MOCK_VAULT_1_DESC)) + to_json_binary(&String::from(MOCK_VAULT_1_DESC)) } _ => todo!(), }; SystemResult::Ok(ContractResult::from(resp)) } MOCK_VAULT_2 => { - let q: VaultQueryMsg = from_binary(msg).unwrap(); + let q: VaultQueryMsg = from_json(msg).unwrap(); let resp: StdResult = match q { VaultQueryMsg::VotingPowerAtHeight { address, height } => { if address.as_str() == MOCK_VAULT_MEMBER { - to_binary(&VotingPowerAtHeightResponse { + to_json_binary(&VotingPowerAtHeightResponse { power: Uint128::from(MOCK_VAULT_2_VP), height: height.unwrap_or_default(), }) } else { - to_binary(&VotingPowerAtHeightResponse { + to_json_binary(&VotingPowerAtHeightResponse { power: Uint128::zero(), height: height.unwrap_or_default(), }) } } VaultQueryMsg::TotalPowerAtHeight { height } => { - to_binary(&TotalPowerAtHeightResponse { + to_json_binary(&TotalPowerAtHeightResponse { power: Uint128::from(MOCK_VAULT_2_VP), height: height.unwrap_or_default(), }) } - VaultQueryMsg::Name {} => to_binary(&String::from(MOCK_VAULT_2_NAME)), + VaultQueryMsg::Name {} => { + to_json_binary(&String::from(MOCK_VAULT_2_NAME)) + } VaultQueryMsg::Description {} => { - to_binary(&String::from(MOCK_VAULT_2_DESC)) + to_json_binary(&String::from(MOCK_VAULT_2_DESC)) } _ => todo!(), }; SystemResult::Ok(ContractResult::from(resp)) } MOCK_VAULT_3 => { - let q: VaultQueryMsg = from_binary(msg).unwrap(); + let q: VaultQueryMsg = from_json(msg).unwrap(); let resp: StdResult = match q { VaultQueryMsg::VotingPowerAtHeight { address, height } => { if address.as_str() == MOCK_VAULT_MEMBER { - to_binary(&VotingPowerAtHeightResponse { + to_json_binary(&VotingPowerAtHeightResponse { power: Uint128::from(MOCK_VAULT_3_VP), height: height.unwrap_or_default(), }) } else { - to_binary(&VotingPowerAtHeightResponse { + to_json_binary(&VotingPowerAtHeightResponse { power: Uint128::zero(), height: height.unwrap_or_default(), }) } } VaultQueryMsg::TotalPowerAtHeight { height } => { - to_binary(&TotalPowerAtHeightResponse { + to_json_binary(&TotalPowerAtHeightResponse { power: Uint128::from(MOCK_VAULT_3_VP), height: height.unwrap_or_default(), }) } - VaultQueryMsg::Name {} => to_binary(&String::from(MOCK_VAULT_3_NAME)), + VaultQueryMsg::Name {} => { + to_json_binary(&String::from(MOCK_VAULT_3_NAME)) + } VaultQueryMsg::Description {} => { - to_binary(&String::from(MOCK_VAULT_3_DESC)) + to_json_binary(&String::from(MOCK_VAULT_3_DESC)) } _ => todo!(), }; diff --git a/contracts/dao/voting/neutron-voting-registry/src/testing/tests.rs b/contracts/dao/voting/neutron-voting-registry/src/testing/tests.rs index a84982b1..99e4ce05 100644 --- a/contracts/dao/voting/neutron-voting-registry/src/testing/tests.rs +++ b/contracts/dao/voting/neutron-voting-registry/src/testing/tests.rs @@ -1,6 +1,6 @@ -use crate::contract::{execute, instantiate, migrate, query, CONTRACT_NAME, CONTRACT_VERSION}; +use crate::contract::{execute, instantiate, query}; use crate::error::ContractError; -use crate::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, VotingVault}; +use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg, VotingVault}; use crate::state::{Config, VotingVaultState}; use crate::testing::mock_querier::{ mock_dependencies, MOCK_VAULT_1, MOCK_VAULT_1_DESC, MOCK_VAULT_1_NAME, MOCK_VAULT_1_VP, @@ -8,14 +8,10 @@ use crate::testing::mock_querier::{ MOCK_VAULT_3_DESC, MOCK_VAULT_3_NAME, MOCK_VAULT_MEMBER, }; use cosmwasm_std::testing::{mock_env, mock_info}; -use cosmwasm_std::{from_binary, Addr, Deps, DepsMut, Env, MessageInfo, Response, Uint128}; -use cw_storage_plus::Item; +use cosmwasm_std::{from_json, Addr, Deps, DepsMut, Env, MessageInfo, Response, Uint128}; use cwd_interface::voting::{ InfoResponse, TotalPowerAtHeightResponse, VotingPowerAtHeightResponse, }; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; - const DAO_ADDR: &str = "dao"; const ADDR1: &str = "addr1"; @@ -794,98 +790,24 @@ fn test_vaults_activation_deactivation_wrong_switch() { ); } -#[test] -pub fn test_migrate() { - let mut deps = mock_dependencies(); - let env = mock_env(); - let migration_height = env.block.height; - cw2::set_contract_version(&mut deps.storage, "my-contract", "old-version").unwrap(); - - // define and store the previous version of config - #[derive(Serialize, Deserialize, JsonSchema)] - struct OldConfig { - pub owner: Addr, - pub voting_vaults: Vec, - } - Item::new("config") - .save( - deps.as_mut().storage, - &OldConfig { - owner: Addr::unchecked(DAO_ADDR), - voting_vaults: vec![Addr::unchecked(MOCK_VAULT_1), Addr::unchecked(MOCK_VAULT_2)], - }, - ) - .unwrap(); - - migrate(deps.as_mut(), env.clone(), MigrateMsg {}).unwrap(); - - let version = cw2::get_contract_version(&deps.storage).unwrap(); - assert_eq!(version.version, CONTRACT_VERSION); - assert_eq!(version.contract, CONTRACT_NAME); - assert_eq!( - get_voting_vaults(deps.as_ref(), env.clone(), Some(migration_height)), - vec![ - VotingVault { - address: String::from(MOCK_VAULT_1), - name: String::from(MOCK_VAULT_1_NAME), - description: String::from(MOCK_VAULT_1_DESC), - state: VotingVaultState::Active, - }, - VotingVault { - address: String::from(MOCK_VAULT_2), - name: String::from(MOCK_VAULT_2_NAME), - description: String::from(MOCK_VAULT_2_DESC), - state: VotingVaultState::Active, - } - ], - ); - assert_eq!( - get_total_voting_power(deps.as_ref(), env.clone(), Some(migration_height)).power, - Uint128::from(MOCK_VAULT_1_VP + MOCK_VAULT_2_VP), - ); - - // make sure vaults are active starting with the height next to the beginning of the chain - assert_eq!( - get_voting_vaults(deps.as_ref(), env.clone(), Some(2u64)), - vec![ - VotingVault { - address: String::from(MOCK_VAULT_1), - name: String::from(MOCK_VAULT_1_NAME), - description: String::from(MOCK_VAULT_1_DESC), - state: VotingVaultState::Active, - }, - VotingVault { - address: String::from(MOCK_VAULT_2), - name: String::from(MOCK_VAULT_2_NAME), - description: String::from(MOCK_VAULT_2_DESC), - state: VotingVaultState::Active, - } - ], - ); - assert_eq!( - get_total_voting_power(deps.as_ref(), env, Some(2u64)).power, - Uint128::from(MOCK_VAULT_1_VP + MOCK_VAULT_2_VP), - ); -} - fn get_voting_vaults(deps: Deps, env: Env, height: Option) -> Vec { let res = query(deps, env, QueryMsg::VotingVaults { height }).unwrap(); - from_binary(&res).unwrap() + from_json(res).unwrap() } fn get_config(deps: Deps, env: Env) -> Config { let res = query(deps, env, QueryMsg::Config {}).unwrap(); - from_binary(&res).unwrap() + from_json(res).unwrap() } fn get_dao(deps: Deps, env: Env) -> Addr { let res = query(deps, env, QueryMsg::Dao {}).unwrap(); - from_binary(&res).unwrap() + from_json(res).unwrap() } fn get_info(deps: Deps, env: Env) -> InfoResponse { let res = query(deps, env, QueryMsg::Info {}).unwrap(); - from_binary(&res).unwrap() + from_json(res).unwrap() } fn get_voting_power( @@ -895,12 +817,12 @@ fn get_voting_power( height: Option, ) -> VotingPowerAtHeightResponse { let res = query(deps, env, QueryMsg::VotingPowerAtHeight { address, height }).unwrap(); - from_binary(&res).unwrap() + from_json(res).unwrap() } fn get_total_voting_power(deps: Deps, env: Env, height: Option) -> TotalPowerAtHeightResponse { let res = query(deps, env, QueryMsg::TotalPowerAtHeight { height }).unwrap(); - from_binary(&res).unwrap() + from_json(res).unwrap() } fn add_voting_vault( diff --git a/contracts/dao/voting/vesting-lp-vault/Cargo.toml b/contracts/dao/voting/vesting-lp-vault/Cargo.toml index 1f880246..8a1b7807 100644 --- a/contracts/dao/voting/vesting-lp-vault/Cargo.toml +++ b/contracts/dao/voting/vesting-lp-vault/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vesting-lp-vault" -version = "0.1.0" +version = "0.1.1" authors = ["Sergei Sotnikov ", "Murad Karammaev "] edition = "2021" license = "Apache-2.0" diff --git a/contracts/dao/voting/vesting-lp-vault/src/contract.rs b/contracts/dao/voting/vesting-lp-vault/src/contract.rs index a3d7eb22..f38a95a4 100644 --- a/contracts/dao/voting/vesting-lp-vault/src/contract.rs +++ b/contracts/dao/voting/vesting-lp-vault/src/contract.rs @@ -1,8 +1,8 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Binary, Decimal256, Deps, DepsMut, Env, Fraction, MessageInfo, Response, StdError, - Uint128, + to_json_binary, Binary, Decimal256, Deps, DepsMut, Env, Fraction, MessageInfo, Response, + StdError, Uint128, }; use cw2::set_contract_version; use cwd_interface::voting::{ @@ -148,12 +148,12 @@ pub fn execute_update_config( #[cfg_attr(not(feature = "library"), entry_point)] pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> ContractResult { match msg { - QueryMsg::VotingPowerAtHeight { address, height } => Ok(to_binary( + QueryMsg::VotingPowerAtHeight { address, height } => Ok(to_json_binary( &query_voting_power_at_height(deps, env, address, height)?, )?), - QueryMsg::TotalPowerAtHeight { height } => { - Ok(to_binary(&query_total_power_at_height(deps, env, height)?)?) - } + QueryMsg::TotalPowerAtHeight { height } => Ok(to_json_binary( + &query_total_power_at_height(deps, env, height)?, + )?), QueryMsg::Info {} => query_info(deps), QueryMsg::Dao {} => query_dao(deps), QueryMsg::Name {} => query_name(deps), @@ -162,7 +162,7 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> ContractResult { QueryMsg::ListBonders { start_after, limit } => { query_list_bonders(deps, start_after, limit) } - QueryMsg::BondingStatus { height, address } => Ok(to_binary(&query_bonding_status( + QueryMsg::BondingStatus { height, address } => Ok(to_json_binary(&query_bonding_status( deps, env, height, address, )?)?), } @@ -240,27 +240,29 @@ pub fn query_total_power_at_height( pub fn query_info(deps: Deps) -> ContractResult { let info = cw2::get_contract_version(deps.storage)?; - Ok(to_binary(&cwd_interface::voting::InfoResponse { info })?) + Ok(to_json_binary(&cwd_interface::voting::InfoResponse { + info, + })?) } pub fn query_dao(deps: Deps) -> ContractResult { let dao = DAO.load(deps.storage)?; - Ok(to_binary(&dao)?) + Ok(to_json_binary(&dao)?) } pub fn query_name(deps: Deps) -> ContractResult { let config = CONFIG.load(deps.storage)?; - Ok(to_binary(&config.name)?) + Ok(to_json_binary(&config.name)?) } pub fn query_description(deps: Deps) -> ContractResult { let config = CONFIG.load(deps.storage)?; - Ok(to_binary(&config.description)?) + Ok(to_json_binary(&config.description)?) } pub fn query_config(deps: Deps) -> ContractResult { let config = CONFIG.load(deps.storage)?; - Ok(to_binary(&config)?) + Ok(to_json_binary(&config)?) } pub fn query_list_bonders( diff --git a/contracts/subdaos/cwd-subdao-core/Cargo.toml b/contracts/subdaos/cwd-subdao-core/Cargo.toml index 1111a667..cf139e74 100644 --- a/contracts/subdaos/cwd-subdao-core/Cargo.toml +++ b/contracts/subdaos/cwd-subdao-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cwd-subdao-core" -version = "0.2.1" +version = "0.2.2" authors = ["ekez "] edition = "2021" repository = "https://github.com/neutron-org/neutron-dao" @@ -16,7 +16,7 @@ backtraces = ["cosmwasm-std/backtraces"] library = [] [dependencies] -neutron-sdk = { package = "neutron-sdk", version = "0.7.0" } +neutron-sdk = "0.10.0" cosmwasm-std = { version = "1.3.0", features = ["ibc3"] } cosmwasm-storage = { version = "1.3.0" } cw-storage-plus = "1.1.0" diff --git a/contracts/subdaos/cwd-subdao-core/schema/cwd-subdao-core.json b/contracts/subdaos/cwd-subdao-core/schema/cwd-subdao-core.json index 27c5faa7..0dc64934 100644 --- a/contracts/subdaos/cwd-subdao-core/schema/cwd-subdao-core.json +++ b/contracts/subdaos/cwd-subdao-core/schema/cwd-subdao-core.json @@ -461,6 +461,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -473,54 +474,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -533,6 +555,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -545,6 +569,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -557,6 +583,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -569,6 +597,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -644,7 +674,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -662,7 +693,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1142,6 +1174,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1506,6 +1548,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1563,6 +1630,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1616,7 +1706,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1667,6 +1758,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -1711,7 +1815,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1757,7 +1862,8 @@ } }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1805,7 +1911,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1833,7 +1940,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1861,7 +1969,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/subdaos/cwd-subdao-core/schema/raw/execute.json b/contracts/subdaos/cwd-subdao-core/schema/raw/execute.json index dd2c302e..496a9649 100644 --- a/contracts/subdaos/cwd-subdao-core/schema/raw/execute.json +++ b/contracts/subdaos/cwd-subdao-core/schema/raw/execute.json @@ -291,6 +291,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -303,54 +304,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -363,6 +385,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -375,6 +399,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -387,6 +413,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -399,6 +427,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -474,7 +504,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -492,7 +523,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -972,6 +1004,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1336,6 +1378,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1393,6 +1460,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1446,7 +1536,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1497,6 +1588,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -1541,7 +1645,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1587,7 +1692,8 @@ } }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1635,7 +1741,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1663,7 +1770,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1691,7 +1799,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/subdaos/cwd-subdao-core/src/contract.rs b/contracts/subdaos/cwd-subdao-core/src/contract.rs index 619ec60d..8de75704 100644 --- a/contracts/subdaos/cwd-subdao-core/src/contract.rs +++ b/contracts/subdaos/cwd-subdao-core/src/contract.rs @@ -1,8 +1,8 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Addr, Binary, CosmosMsg, Deps, DepsMut, Empty, Env, MessageInfo, Reply, Response, - StdError, StdResult, SubMsg, + to_json_binary, Addr, Binary, CosmosMsg, Deps, DepsMut, Empty, Env, MessageInfo, Reply, + Response, StdError, StdResult, SubMsg, }; use cw2::{get_contract_version, set_contract_version}; use cw_paginate::{paginate_map, paginate_map_values}; @@ -409,12 +409,12 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { pub fn query_config(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config) + to_json_binary(&config) } pub fn query_voting_module(deps: Deps) -> StdResult { let voting_module = VOTE_MODULE.load(deps.storage)?; - to_binary(&voting_module) + to_json_binary(&voting_module) } pub fn query_proposal_modules( @@ -435,7 +435,7 @@ pub fn query_proposal_modules( // // Even if this does lock up one can determine the existing // proposal modules by looking at past transactions on chain. - to_binary(&paginate_map_values( + to_json_binary(&paginate_map_values( deps, &PROPOSAL_MODULES, start_after @@ -465,7 +465,7 @@ pub fn query_active_proposal_modules( let limit = limit.unwrap_or(values.len() as u32); - to_binary::>( + to_json_binary::>( &values .into_iter() .filter(|module: &ProposalModule| module.status == ProposalModuleStatus::Enabled) @@ -490,7 +490,7 @@ fn get_pause_info(deps: Deps, env: &Env) -> StdResult { } pub fn query_paused(deps: Deps, env: Env) -> StdResult { - to_binary(&get_pause_info(deps, &env)?) + to_json_binary(&get_pause_info(deps, &env)?) } pub fn query_dump_state(deps: Deps, env: Env) -> StdResult { @@ -504,7 +504,7 @@ pub fn query_dump_state(deps: Deps, env: Env) -> StdResult { let version = get_contract_version(deps.storage)?; let active_proposal_module_count = ACTIVE_PROPOSAL_MODULE_COUNT.load(deps.storage)?; let total_proposal_module_count = TOTAL_PROPOSAL_MODULE_COUNT.load(deps.storage)?; - to_binary(&DumpStateResponse { + to_json_binary(&DumpStateResponse { config, version, pause_info, @@ -525,7 +525,7 @@ pub fn query_voting_power_at_height( voting_registry_module, &voting::Query::VotingPowerAtHeight { height, address }, )?; - to_binary(&voting_power) + to_json_binary(&voting_power) } pub fn query_total_power_at_height(deps: Deps, height: Option) -> StdResult { @@ -534,17 +534,17 @@ pub fn query_total_power_at_height(deps: Deps, height: Option) -> StdResult voting_registry_module, &voting::Query::TotalPowerAtHeight { height }, )?; - to_binary(&total_power) + to_json_binary(&total_power) } pub fn query_get_item(deps: Deps, item: String) -> StdResult { let item = ITEMS.may_load(deps.storage, item)?; - to_binary(&GetItemResponse { item }) + to_json_binary(&GetItemResponse { item }) } pub fn query_info(deps: Deps) -> StdResult { let info = cw2::get_contract_version(deps.storage)?; - to_binary(&cwd_interface::voting::InfoResponse { info }) + to_json_binary(&cwd_interface::voting::InfoResponse { info }) } pub fn query_list_items( @@ -552,7 +552,7 @@ pub fn query_list_items( start_after: Option, limit: Option, ) -> StdResult { - to_binary(&paginate_map( + to_json_binary(&paginate_map( deps, &ITEMS, start_after, @@ -586,28 +586,28 @@ pub fn query_list_sub_daos( }) .collect(); - to_binary(&subdaos) + to_json_binary(&subdaos) } pub fn query_dao_uri(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config.dao_uri) + to_json_binary(&config.dao_uri) } pub fn query_main_dao(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config.main_dao) + to_json_binary(&config.main_dao) } pub fn query_verify_timelock(deps: Deps, timelock: String) -> StdResult { - to_binary(&(execution_access_check(deps, deps.api.addr_validate(&timelock)?).is_ok())) + to_json_binary(&(execution_access_check(deps, deps.api.addr_validate(&timelock)?).is_ok())) } pub fn query_timelock_proposal_module_address(deps: Deps, timelock: String) -> StdResult { let maybe_proposal = proposal_from_timelock(deps, deps.api.addr_validate(&timelock)?)?; let proposal = maybe_proposal.ok_or_else(|| StdError::generic_err("incorrect timelock addr provided"))?; - to_binary(&proposal.address) + to_json_binary(&proposal.address) } #[cfg_attr(not(feature = "library"), entry_point)] diff --git a/contracts/subdaos/cwd-subdao-timelock-single/Cargo.toml b/contracts/subdaos/cwd-subdao-timelock-single/Cargo.toml index 44c53841..f4f1ed79 100644 --- a/contracts/subdaos/cwd-subdao-timelock-single/Cargo.toml +++ b/contracts/subdaos/cwd-subdao-timelock-single/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cwd-subdao-timelock-single" -version = "0.2.1" +version = "0.2.2" authors = ["Andrei Zavgorodnii "] edition = "2021" repository = "https://github.com/neutron-org/neutron-dao" @@ -16,7 +16,7 @@ backtraces = ["cosmwasm-std/backtraces"] library = [] [dependencies] -neutron-sdk = { package = "neutron-sdk", version = "0.7.0" } +neutron-sdk = "0.10.0" cosmwasm-std = { version = "1.3.0" } cosmwasm-storage = { version = "1.3.0" } cw-storage-plus = "1.1.0" @@ -32,7 +32,7 @@ neutron-subdao-timelock-single = { path = "../../../packages/neutron-subdao-time cwd-pre-propose-base = { path = "../../../packages/cwd-pre-propose-base" } neutron-subdao-core = { path = "../../../packages/neutron-subdao-core" } neutron-dao-pre-propose-overrule = { path = "../../../packages/neutron-dao-pre-propose-overrule" } -cwd-proposal-single = { path = "../../../contracts/dao/proposal/cwd-proposal-single", features = ["library"]} +cwd-proposal-single = { path = "../../../contracts/dao/proposal/cwd-proposal-single", features = ["library"] } cwd-voting = { path = "../../../packages/cwd-voting" } neutron-subdao-proposal-single = { path = "../../../packages/neutron-subdao-proposal-single" } diff --git a/contracts/subdaos/cwd-subdao-timelock-single/schema/cwd-subdao-timelock-single.json b/contracts/subdaos/cwd-subdao-timelock-single/schema/cwd-subdao-timelock-single.json index 856baf06..c86e6c27 100644 --- a/contracts/subdaos/cwd-subdao-timelock-single/schema/cwd-subdao-timelock-single.json +++ b/contracts/subdaos/cwd-subdao-timelock-single/schema/cwd-subdao-timelock-single.json @@ -124,6 +124,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -136,54 +137,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -196,6 +218,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -208,6 +232,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -220,6 +246,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -232,6 +260,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -307,7 +337,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -325,7 +356,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -838,6 +870,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1202,6 +1244,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1259,6 +1326,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1312,7 +1402,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1363,6 +1454,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -1407,7 +1511,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1518,7 +1623,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1566,7 +1672,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1594,7 +1701,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1622,7 +1730,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", @@ -2000,6 +2108,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -2012,54 +2121,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -2072,6 +2202,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -2084,6 +2216,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -2096,6 +2230,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -2108,6 +2244,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -2183,7 +2321,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -2201,7 +2340,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -2714,6 +2854,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -3078,6 +3228,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -3135,6 +3310,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -3188,7 +3386,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -3239,6 +3438,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalStatus": { "oneOf": [ { @@ -3341,7 +3553,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -3452,7 +3665,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -3500,7 +3714,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -3528,7 +3743,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -3556,7 +3772,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", @@ -3809,6 +4025,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -3821,54 +4038,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -3881,6 +4119,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -3893,6 +4133,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -3905,6 +4147,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -3917,6 +4161,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -3992,7 +4238,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -4010,7 +4257,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -4523,6 +4771,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -4887,6 +5145,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -4944,6 +5227,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -4997,7 +5303,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -5048,6 +5355,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalStatus": { "oneOf": [ { @@ -5124,7 +5444,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -5235,7 +5556,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -5283,7 +5605,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -5311,7 +5634,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -5339,7 +5663,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/subdaos/cwd-subdao-timelock-single/schema/raw/execute.json b/contracts/subdaos/cwd-subdao-timelock-single/schema/raw/execute.json index f7e55a3d..b9caf19e 100644 --- a/contracts/subdaos/cwd-subdao-timelock-single/schema/raw/execute.json +++ b/contracts/subdaos/cwd-subdao-timelock-single/schema/raw/execute.json @@ -107,6 +107,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -119,54 +120,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -179,6 +201,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -191,6 +215,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -203,6 +229,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -215,6 +243,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -290,7 +320,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -308,7 +339,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -821,6 +853,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1185,6 +1227,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1242,6 +1309,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1295,7 +1385,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1346,6 +1437,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -1390,7 +1494,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1501,7 +1606,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1549,7 +1655,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1577,7 +1684,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1605,7 +1713,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/subdaos/cwd-subdao-timelock-single/schema/raw/response_to_list_proposals.json b/contracts/subdaos/cwd-subdao-timelock-single/schema/raw/response_to_list_proposals.json index 99c4ca30..e1bd19cd 100644 --- a/contracts/subdaos/cwd-subdao-timelock-single/schema/raw/response_to_list_proposals.json +++ b/contracts/subdaos/cwd-subdao-timelock-single/schema/raw/response_to_list_proposals.json @@ -19,6 +19,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -31,54 +32,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -91,6 +113,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -103,6 +127,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -115,6 +141,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -127,6 +155,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -202,7 +232,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -220,7 +251,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -733,6 +765,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1097,6 +1139,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1154,6 +1221,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1207,7 +1297,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1258,6 +1349,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalStatus": { "oneOf": [ { @@ -1360,7 +1464,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1471,7 +1576,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1519,7 +1625,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1547,7 +1654,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1575,7 +1683,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/subdaos/cwd-subdao-timelock-single/schema/raw/response_to_proposal.json b/contracts/subdaos/cwd-subdao-timelock-single/schema/raw/response_to_proposal.json index 93c52423..e0c9e081 100644 --- a/contracts/subdaos/cwd-subdao-timelock-single/schema/raw/response_to_proposal.json +++ b/contracts/subdaos/cwd-subdao-timelock-single/schema/raw/response_to_proposal.json @@ -30,6 +30,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -42,54 +43,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -102,6 +124,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -114,6 +138,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -126,6 +152,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -138,6 +166,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -213,7 +243,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -231,7 +262,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -744,6 +776,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1108,6 +1150,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1165,6 +1232,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1218,7 +1308,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1269,6 +1360,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalStatus": { "oneOf": [ { @@ -1345,7 +1449,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1456,7 +1561,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1504,7 +1610,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1532,7 +1639,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1560,7 +1668,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/subdaos/cwd-subdao-timelock-single/src/contract.rs b/contracts/subdaos/cwd-subdao-timelock-single/src/contract.rs index 0d629d83..f6a6bb6c 100644 --- a/contracts/subdaos/cwd-subdao-timelock-single/src/contract.rs +++ b/contracts/subdaos/cwd-subdao-timelock-single/src/contract.rs @@ -1,7 +1,7 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - from_binary, to_binary, Addr, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Reply, + from_json, to_json_binary, Addr, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Reply, Response, StdError, StdResult, SubMsg, WasmMsg, }; use cw2::set_contract_version; @@ -123,7 +123,7 @@ pub fn execute_timelock_proposal( let create_overrule_proposal = WasmMsg::Execute { contract_addr: config.overrule_pre_propose.to_string(), - msg: to_binary(&OverruleExecuteMsg::Propose { + msg: to_json_binary(&OverruleExecuteMsg::Propose { msg: OverruleProposeMessage::ProposeOverrule { timelock_contract: env.contract.address.to_string(), proposal_id, @@ -216,7 +216,7 @@ fn verify_msg(msgs: Vec>) -> Result, msg: ref core_execute_msg, contract_addr: _, funds: _, - }) => match from_binary::(core_execute_msg) { + }) => match from_json::(core_execute_msg) { Ok(CoreExecuteMsg::ExecuteTimelockedMsgs { msgs: _ }) => {} _ => return Err(ContractError::CanOnlyExecuteExecuteTimelockedMsgs {}), }, @@ -293,7 +293,7 @@ pub fn execute_update_config( #[cfg_attr(not(feature = "library"), entry_point)] pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { match msg { - QueryMsg::Config {} => to_binary(&CONFIG.load(deps.storage)?), + QueryMsg::Config {} => to_json_binary(&CONFIG.load(deps.storage)?), QueryMsg::Proposal { proposal_id } => query_proposal(deps, proposal_id), QueryMsg::ListProposals { start_after, limit } => { query_list_proposals(deps, start_after, limit) @@ -306,7 +306,7 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { pub fn query_proposal(deps: Deps, id: u64) -> StdResult { let proposal = PROPOSALS.load(deps.storage, id)?; - to_binary(&proposal) + to_json_binary(&proposal) } pub fn query_list_proposals( @@ -324,12 +324,12 @@ pub fn query_list_proposals( .map(|(_, proposal)| proposal) .collect(); - to_binary(&ProposalListResponse { proposals: props }) + to_json_binary(&ProposalListResponse { proposals: props }) } pub fn query_proposal_execution_error(deps: Deps, proposal_id: u64) -> StdResult { let error = PROPOSAL_EXECUTION_ERRORS.may_load(deps.storage, proposal_id)?; - to_binary(&error) + to_json_binary(&error) } #[cfg_attr(not(feature = "library"), entry_point)] diff --git a/contracts/subdaos/cwd-subdao-timelock-single/src/testing/mock_querier.rs b/contracts/subdaos/cwd-subdao-timelock-single/src/testing/mock_querier.rs index 8d439892..05e020b2 100644 --- a/contracts/subdaos/cwd-subdao-timelock-single/src/testing/mock_querier.rs +++ b/contracts/subdaos/cwd-subdao-timelock-single/src/testing/mock_querier.rs @@ -3,9 +3,9 @@ use std::marker::PhantomData; use std::rc::Rc; use cosmwasm_std::{ - from_binary, from_slice, + from_json, testing::{MockApi, MockQuerier, MockStorage}, - to_binary, Addr, ContractResult, Empty, OwnedDeps, Querier, QuerierResult, QueryRequest, + to_json_binary, Addr, ContractResult, Empty, OwnedDeps, Querier, QuerierResult, QueryRequest, SystemError, SystemResult, Uint128, WasmQuery, }; use cw_utils::Duration; @@ -55,7 +55,7 @@ pub struct WasmMockQuerier { impl Querier for WasmMockQuerier { fn raw_query(&self, bin_request: &[u8]) -> QuerierResult { - let request: QueryRequest = match from_slice(bin_request) { + let request: QueryRequest = match from_json(bin_request) { Ok(v) => v, Err(e) => { return QuerierResult::Err(SystemError::InvalidRequest { @@ -73,7 +73,7 @@ impl WasmMockQuerier { match &request { QueryRequest::Wasm(WasmQuery::Smart { contract_addr, msg }) => { if contract_addr == MOCK_TIMELOCK_INITIALIZER { - let q: PreProposeQuery = from_binary(msg).unwrap(); + let q: PreProposeQuery = from_json(msg).unwrap(); let addr = match q { PreProposeQuery::ProposalModule {} => { todo!() @@ -85,10 +85,10 @@ impl WasmMockQuerier { msg: PreProposeQueryExt::TimelockAddress {}, } => todo!(), }; - return SystemResult::Ok(ContractResult::from(to_binary(addr))); + return SystemResult::Ok(ContractResult::from(to_json_binary(addr))); } if contract_addr == MOCK_SUBDAO_CORE_ADDR { - let q: CoreSubdaoQuery = from_binary(msg).unwrap(); + let q: CoreSubdaoQuery = from_json(msg).unwrap(); let addr = match q { CoreSubdaoQuery::MainDao {} => MOCK_MAIN_DAO_ADDR, CoreSubdaoQuery::TimelockProposalModuleAddress { timelock: _ } => { @@ -96,29 +96,29 @@ impl WasmMockQuerier { } _ => todo!(), }; - return SystemResult::Ok(ContractResult::from(to_binary(addr))); + return SystemResult::Ok(ContractResult::from(to_json_binary(addr))); } if contract_addr == MOCK_OVERRULE_PREPROPOSAL { - let q: PreProposeOverruleQuery = from_binary(msg).unwrap(); + let q: PreProposeOverruleQuery = from_json(msg).unwrap(); let reply = match q { PreProposeOverruleQuery::ProposalModule {} => { - to_binary(&MOCK_OVERRULE_PROPOSAL.to_string()) + to_json_binary(&MOCK_OVERRULE_PROPOSAL.to_string()) } PreProposeOverruleQuery::Dao {} => { - to_binary(&MOCK_MAIN_DAO_ADDR.to_string()) + to_json_binary(&MOCK_MAIN_DAO_ADDR.to_string()) } PreProposeOverruleQuery::Config {} => todo!(), PreProposeOverruleQuery::DepositInfo { proposal_id: _ } => todo!(), PreProposeOverruleQuery::QueryExtension { msg: PreProposeOverruleQueryExt::OverruleProposalId { .. }, - } => to_binary(&1), + } => to_json_binary(&1), }; return SystemResult::Ok(ContractResult::from(reply)); } if contract_addr == MOCK_OVERRULE_PROPOSAL { - let q: ProposeQuery = from_binary(msg).unwrap(); + let q: ProposeQuery = from_json(msg).unwrap(); let reply = match q { - ProposeQuery::Config {} => to_binary(&OverruleProposalConfig { + ProposeQuery::Config {} => to_json_binary(&OverruleProposalConfig { threshold: Threshold::AbsoluteCount { threshold: Default::default(), }, @@ -128,7 +128,7 @@ impl WasmMockQuerier { dao: Addr::unchecked(MOCK_MAIN_DAO_ADDR), close_proposal_on_execution_failure: false, }), - ProposeQuery::Proposal { .. } => to_binary(&MainDaoProposalResponse { + ProposeQuery::Proposal { .. } => to_json_binary(&MainDaoProposalResponse { id: 1, proposal: MainDaoSingleChoiceProposal { title: "".to_string(), @@ -165,9 +165,9 @@ impl WasmMockQuerier { return SystemResult::Ok(ContractResult::from(reply)); } if contract_addr == MOCK_PROPOSAL_ADDR { - let q: ProposeQuery = from_binary(msg).unwrap(); + let q: ProposeQuery = from_json(msg).unwrap(); let reply = match q { - ProposeQuery::Config {} => to_binary(&ProposalConfig { + ProposeQuery::Config {} => to_json_binary(&ProposalConfig { threshold: Threshold::AbsolutePercentage { percentage: Majority {}, }, diff --git a/contracts/subdaos/cwd-subdao-timelock-single/src/testing/tests.rs b/contracts/subdaos/cwd-subdao-timelock-single/src/testing/tests.rs index c44da723..ef46d379 100644 --- a/contracts/subdaos/cwd-subdao-timelock-single/src/testing/tests.rs +++ b/contracts/subdaos/cwd-subdao-timelock-single/src/testing/tests.rs @@ -1,9 +1,9 @@ use crate::contract::query_proposal_execution_error; use cosmwasm_std::testing::MOCK_CONTRACT_ADDR; use cosmwasm_std::{ - from_binary, + from_json, testing::{mock_env, mock_info}, - to_binary, Addr, Attribute, CosmosMsg, Reply, SubMsg, SubMsgResult, WasmMsg, + to_json_binary, Addr, Attribute, CosmosMsg, Reply, SubMsg, SubMsgResult, WasmMsg, }; use cwd_voting::status::Status; use neutron_sdk::bindings::msg::NeutronMsg; @@ -103,7 +103,7 @@ fn test_execute_timelock_proposal() { correct_msg.clone(), ); assert_eq!( - "neutron_subdao_timelock_single::types::Config not found", + "type: neutron_subdao_timelock_single::types::Config; key: [63, 6F, 6E, 66, 69, 67] not found", res.unwrap_err().to_string() ); @@ -168,7 +168,7 @@ fn test_execute_timelock_proposal() { res_ok.messages, vec![SubMsg::new(CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: MOCK_OVERRULE_PREPROPOSAL.to_string(), - msg: to_binary(&OverruleExecuteMsg::Propose { + msg: to_json_binary(&OverruleExecuteMsg::Propose { msg: OverruleProposeMessage::ProposeOverrule { timelock_contract: MOCK_CONTRACT_ADDR.to_string(), proposal_id: 10, @@ -199,7 +199,7 @@ fn test_execute_proposal() { let res = execute(deps.as_mut(), env.clone(), info.clone(), msg.clone()); assert_eq!( - "neutron_subdao_timelock_single::types::Config not found", + "type: neutron_subdao_timelock_single::types::Config; key: [63, 6F, 6E, 66, 69, 67] not found", res.unwrap_err().to_string() ); @@ -211,7 +211,7 @@ fn test_execute_proposal() { CONFIG.save(deps.as_mut().storage, &config).unwrap(); let res = execute(deps.as_mut(), env.clone(), info.clone(), msg.clone()); assert_eq!( - "neutron_subdao_timelock_single::types::SingleChoiceProposal not found", + "type: neutron_subdao_timelock_single::types::SingleChoiceProposal; key: [00, 09, 70, 72, 6F, 70, 6F, 73, 61, 6C, 73, 00, 00, 00, 00, 00, 00, 00, 0A] not found", res.unwrap_err().to_string() ); @@ -354,7 +354,7 @@ fn test_overrule_proposal() { let res = execute(deps.as_mut(), env.clone(), info.clone(), msg.clone()); assert_eq!( - "neutron_subdao_timelock_single::types::Config not found", + "type: neutron_subdao_timelock_single::types::Config; key: [63, 6F, 6E, 66, 69, 67] not found", res.unwrap_err().to_string() ); @@ -424,7 +424,7 @@ fn execute_update_config() { let res = execute(deps.as_mut(), env.clone(), info.clone(), msg.clone()); assert_eq!( - "neutron_subdao_timelock_single::types::Config not found", + "type: neutron_subdao_timelock_single::types::Config; key: [63, 6F, 6E, 66, 69, 67] not found", res.unwrap_err().to_string() ); @@ -512,7 +512,7 @@ fn test_query_config() { CONFIG.save(deps.as_mut().storage, &config).unwrap(); let query_msg = QueryMsg::Config {}; let res = query(deps.as_ref(), mock_env(), query_msg).unwrap(); - let queried_config: Config = from_binary(&res).unwrap(); + let queried_config: Config = from_json(res).unwrap(); assert_eq!(config, queried_config) } @@ -531,7 +531,7 @@ fn test_query_proposals() { for i in 1..=100 { let query_msg = QueryMsg::Proposal { proposal_id: i }; let res = query(deps.as_ref(), mock_env(), query_msg).unwrap(); - let queried_prop: SingleChoiceProposal = from_binary(&res).unwrap(); + let queried_prop: SingleChoiceProposal = from_json(res).unwrap(); let expected_prop = SingleChoiceProposal { id: i, msgs: vec![correct_proposal_msg()], @@ -545,7 +545,7 @@ fn test_query_proposals() { limit: None, }; let res = query(deps.as_ref(), mock_env(), query_msg).unwrap(); - let queried_props: ProposalListResponse = from_binary(&res).unwrap(); + let queried_props: ProposalListResponse = from_json(res).unwrap(); for (p, i) in queried_props.proposals.iter().zip(1..) { let expected_prop = SingleChoiceProposal { id: i, @@ -561,7 +561,7 @@ fn test_query_proposals() { limit: Some(100), }; let res = query(deps.as_ref(), mock_env(), query_msg).unwrap(); - let queried_props: ProposalListResponse = from_binary(&res).unwrap(); + let queried_props: ProposalListResponse = from_json(res).unwrap(); for (p, i) in queried_props.proposals.iter().zip(1..) { let expected_prop = SingleChoiceProposal { id: i, @@ -577,7 +577,7 @@ fn test_query_proposals() { limit: Some(10), }; let res = query(deps.as_ref(), mock_env(), query_msg).unwrap(); - let queried_props: ProposalListResponse = from_binary(&res).unwrap(); + let queried_props: ProposalListResponse = from_json(res).unwrap(); for (p, i) in queried_props.proposals.iter().zip(1..) { let expected_prop = SingleChoiceProposal { id: i, @@ -593,7 +593,7 @@ fn test_query_proposals() { limit: None, }; let res = query(deps.as_ref(), mock_env(), query_msg).unwrap(); - let queried_props: ProposalListResponse = from_binary(&res).unwrap(); + let queried_props: ProposalListResponse = from_json(res).unwrap(); for (p, i) in queried_props.proposals.iter().zip(51..) { let expected_prop = SingleChoiceProposal { id: i, @@ -609,7 +609,7 @@ fn test_query_proposals() { limit: None, }; let res = query(deps.as_ref(), mock_env(), query_msg).unwrap(); - let queried_props: ProposalListResponse = from_binary(&res).unwrap(); + let queried_props: ProposalListResponse = from_json(res).unwrap(); for (p, i) in queried_props.proposals.iter().zip(91..) { let expected_prop = SingleChoiceProposal { id: i, @@ -645,14 +645,14 @@ fn test_reply() { assert_eq!(expected_attributes, res_ok.attributes); // reply writes the failed proposal error let query_res = query_proposal_execution_error(deps.as_ref(), 10).unwrap(); - let error: Option = from_binary(&query_res).unwrap(); + let error: Option = from_json(query_res).unwrap(); assert_eq!(error, Some("error".to_string())); } fn correct_proposal_msg() -> CosmosMsg { CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: "".to_string(), - msg: to_binary(&CoreExecuteMsg::ExecuteTimelockedMsgs { msgs: vec![] }).unwrap(), + msg: to_json_binary(&CoreExecuteMsg::ExecuteTimelockedMsgs { msgs: vec![] }).unwrap(), funds: vec![], }) } diff --git a/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/Cargo.toml b/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/Cargo.toml index b0feb41d..1b1916b1 100644 --- a/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/Cargo.toml +++ b/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cwd-security-subdao-pre-propose" -version = "0.2.1" +version = "0.2.2" authors = ["Pavel Kalinin "] edition = "2021" repository = "https://github.com/DA0-DA0/dao-contracts" @@ -23,7 +23,7 @@ cw-utils = { version = "1.0.1" } serde = { version = "1.0.175", default-features = false, features = ["derive"] } cwd-pre-propose-base = { version = "*", path = "../../../../packages/cwd-pre-propose-base" } cwd-voting = { path = "../../../../packages/cwd-voting" } -neutron-sdk = { package = "neutron-sdk", version = "0.7.0" } +neutron-sdk = "0.10.0" neutron-subdao-core = { path = "../../../../packages/neutron-subdao-core" } neutron-subdao-timelock-single = { path = "../../../../packages/neutron-subdao-timelock-single" } neutron-subdao-proposal-single = { path = "../../../../packages/neutron-subdao-proposal-single" } diff --git a/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/schema/cwd-security-subdao-pre-propose.json b/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/schema/cwd-security-subdao-pre-propose.json index f6143e0d..4078fe4c 100644 --- a/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/schema/cwd-security-subdao-pre-propose.json +++ b/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/schema/cwd-security-subdao-pre-propose.json @@ -305,6 +305,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -317,54 +318,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -377,6 +399,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -389,6 +413,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -401,6 +427,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -413,6 +441,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -488,7 +518,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -506,7 +537,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1010,6 +1042,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1374,6 +1416,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1431,6 +1498,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1484,7 +1574,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1535,6 +1626,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposeMessage": { "oneOf": [ { @@ -1614,7 +1718,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1687,7 +1792,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1801,7 +1907,8 @@ } }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1829,7 +1936,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1857,7 +1965,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/schema/raw/execute.json b/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/schema/raw/execute.json index 96b45ea8..7af16881 100644 --- a/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/schema/raw/execute.json +++ b/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/schema/raw/execute.json @@ -140,6 +140,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -152,54 +153,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -212,6 +234,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -224,6 +248,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -236,6 +262,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -248,6 +276,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -323,7 +353,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -341,7 +372,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -845,6 +877,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1209,6 +1251,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1266,6 +1333,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1319,7 +1409,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1370,6 +1461,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposeMessage": { "oneOf": [ { @@ -1449,7 +1553,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1522,7 +1627,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1636,7 +1742,8 @@ } }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1664,7 +1771,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1692,7 +1800,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/src/contract.rs b/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/src/contract.rs index 159ffe21..85c234c3 100644 --- a/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/src/contract.rs +++ b/contracts/subdaos/pre-propose/cwd-security-subdao-pre-propose/src/contract.rs @@ -1,7 +1,7 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - from_binary, Binary, CosmosMsg, Deps, DepsMut, Empty, Env, MessageInfo, Response, StdResult, + from_json, Binary, CosmosMsg, Deps, DepsMut, Empty, Env, MessageInfo, Response, StdResult, WasmMsg, }; use cw2::set_contract_version; @@ -81,8 +81,8 @@ pub fn execute( msg, funds, }) => { - if (from_binary::(msg).is_err() - && from_binary::(msg).is_err()) + if (from_json::(msg).is_err() + && from_json::(msg).is_err()) || !funds.is_empty() { return Err(PreProposeError::MalformedProposal {}); diff --git a/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/Cargo.toml b/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/Cargo.toml index 669b7b6b..9023d60c 100644 --- a/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/Cargo.toml +++ b/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cwd-subdao-pre-propose-single" -version = "0.2.1" +version = "0.2.2" authors = ["ekez "] edition = "2021" repository = "https://github.com/DA0-DA0/dao-contracts" @@ -23,7 +23,7 @@ cw-utils = { version = "1.0.1" } serde = { version = "1.0.175", default-features = false, features = ["derive"] } cwd-pre-propose-base = { version = "*", path = "../../../../packages/cwd-pre-propose-base" } cwd-voting = { path = "../../../../packages/cwd-voting" } -neutron-sdk = { package = "neutron-sdk", version = "0.7.0" } +neutron-sdk = "0.10.0" neutron-subdao-core = { path = "../../../../packages/neutron-subdao-core" } neutron-subdao-timelock-single = { path = "../../../../packages/neutron-subdao-timelock-single" } neutron-subdao-proposal-single = { path = "../../../../packages/neutron-subdao-proposal-single" } @@ -38,3 +38,4 @@ cw20 = "1.1.0" cwd-voting = { path = "../../../../packages/cwd-voting" } cw-denom = { path = "../../../../packages/cw-denom" } cwd-interface = { path = "../../../../packages/cwd-interface" } + diff --git a/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/schema/cwd-subdao-pre-propose-single.json b/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/schema/cwd-subdao-pre-propose-single.json index 816febb6..1a8ad0f9 100644 --- a/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/schema/cwd-subdao-pre-propose-single.json +++ b/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/schema/cwd-subdao-pre-propose-single.json @@ -305,6 +305,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -317,54 +318,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -377,6 +399,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -389,6 +413,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -401,6 +427,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -413,6 +441,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -488,7 +518,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -506,7 +537,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1010,6 +1042,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1374,6 +1416,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1431,6 +1498,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1484,7 +1574,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1535,6 +1626,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposeMessage": { "oneOf": [ { @@ -1614,7 +1718,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1687,7 +1792,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1801,7 +1907,8 @@ } }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1829,7 +1936,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1857,7 +1965,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/schema/raw/execute.json b/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/schema/raw/execute.json index 96b45ea8..7af16881 100644 --- a/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/schema/raw/execute.json +++ b/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/schema/raw/execute.json @@ -140,6 +140,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -152,54 +153,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -212,6 +234,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -224,6 +248,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -236,6 +262,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -248,6 +276,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -323,7 +353,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -341,7 +372,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -845,6 +877,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1209,6 +1251,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1266,6 +1333,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1319,7 +1409,8 @@ } }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1370,6 +1461,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposeMessage": { "oneOf": [ { @@ -1449,7 +1553,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1522,7 +1627,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1636,7 +1742,8 @@ } }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1664,7 +1771,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1692,7 +1800,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/src/contract.rs b/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/src/contract.rs index 0984ba4d..07fbf410 100644 --- a/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/src/contract.rs +++ b/contracts/subdaos/pre-propose/cwd-subdao-pre-propose-single/src/contract.rs @@ -1,7 +1,7 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Binary, CosmosMsg, Deps, DepsMut, Empty, Env, MessageInfo, Reply, Response, + to_json_binary, Binary, CosmosMsg, Deps, DepsMut, Empty, Env, MessageInfo, Reply, Response, StdResult, SubMsg, WasmMsg, }; use cw2::set_contract_version; @@ -108,11 +108,12 @@ pub fn execute( // Here, we wrap the original messages in a message to the Timelock module. let timelock_msg = CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: timelock_module.to_string(), - msg: to_binary(&TimelockExecuteMsg::TimelockProposal { + msg: to_json_binary(&TimelockExecuteMsg::TimelockProposal { proposal_id: last_proposal_id + 1, msgs: vec![CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: sub_dao_core.to_string(), - msg: to_binary(&CoreExecuteMsg::ExecuteTimelockedMsgs { msgs }).unwrap(), + msg: to_json_binary(&CoreExecuteMsg::ExecuteTimelockedMsgs { msgs }) + .unwrap(), funds: vec![], })], }) @@ -169,7 +170,7 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { pub fn query_timelock_address(deps: Deps) -> StdResult { let timelock = TIMELOCK_MODULE.load(deps.storage)?; - to_binary(&timelock) + to_json_binary(&timelock) } #[cfg_attr(not(feature = "library"), entry_point)] diff --git a/contracts/subdaos/proposal/cwd-subdao-proposal-single/Cargo.toml b/contracts/subdaos/proposal/cwd-subdao-proposal-single/Cargo.toml index 2a9f68fb..fef654f0 100644 --- a/contracts/subdaos/proposal/cwd-subdao-proposal-single/Cargo.toml +++ b/contracts/subdaos/proposal/cwd-subdao-proposal-single/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cwd-subdao-proposal-single" -version = "0.2.1" +version = "0.2.2" authors = ["ekez "] edition = "2021" repository = "https://github.com/DA0-DA0/dao-contracts" @@ -16,7 +16,7 @@ backtraces = ["cosmwasm-std/backtraces"] library = [] [dependencies] -neutron-sdk = { package = "neutron-sdk", version = "0.7.0" } +neutron-sdk = "0.10.0" cosmwasm-std = { version = "1.3.0", features = ["ibc3"] } cosmwasm-storage = { version = "1.3.0" } cw-storage-plus = "1.1.0" diff --git a/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/cwd-subdao-proposal-single.json b/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/cwd-subdao-proposal-single.json index ad94a801..41e1f13d 100644 --- a/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/cwd-subdao-proposal-single.json +++ b/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/cwd-subdao-proposal-single.json @@ -665,6 +665,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -677,54 +678,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -737,6 +759,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -749,6 +773,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -761,6 +787,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -773,6 +801,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -848,7 +878,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -866,7 +897,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1457,6 +1489,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1821,6 +1863,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1878,6 +1945,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1962,7 +2052,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -2051,6 +2142,19 @@ } ] }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -2095,7 +2199,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -2206,7 +2311,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -2326,7 +2432,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -2354,7 +2461,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -2382,7 +2490,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", @@ -3260,6 +3368,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -3272,54 +3381,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -3332,6 +3462,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -3344,6 +3476,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -3356,6 +3490,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -3368,6 +3504,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -3443,7 +3581,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -3461,7 +3600,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -4025,6 +4165,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -4389,6 +4539,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -4446,6 +4621,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -4530,7 +4728,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -4581,6 +4780,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalResponse": { "description": "Information about a proposal returned by proposal queries.", "type": "object", @@ -4733,7 +4945,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -4890,7 +5103,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -5010,7 +5224,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -5038,7 +5253,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -5066,7 +5282,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", @@ -5422,6 +5638,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -5434,54 +5651,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -5494,6 +5732,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -5506,6 +5746,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -5518,6 +5760,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -5530,6 +5774,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -5605,7 +5851,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -5623,7 +5870,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -6187,6 +6435,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -6551,6 +6809,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -6608,6 +6891,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -6692,7 +6998,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -6743,6 +7050,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -6876,7 +7196,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -7033,7 +7354,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -7153,7 +7475,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -7181,7 +7504,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -7209,7 +7533,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", @@ -7543,6 +7867,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -7555,54 +7880,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -7615,6 +7961,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -7627,6 +7975,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -7639,6 +7989,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -7651,6 +8003,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -7726,7 +8080,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -7744,7 +8099,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -8308,6 +8664,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -8672,6 +9038,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -8729,6 +9120,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -8813,7 +9227,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -8864,6 +9279,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalResponse": { "description": "Information about a proposal returned by proposal queries.", "type": "object", @@ -9016,7 +9444,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -9173,7 +9602,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -9293,7 +9723,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -9321,7 +9752,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -9349,7 +9781,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/execute.json b/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/execute.json index df762e12..51285e40 100644 --- a/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/execute.json +++ b/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/execute.json @@ -336,6 +336,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -348,54 +349,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -408,6 +430,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -420,6 +444,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -432,6 +458,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -444,6 +472,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -519,7 +549,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -537,7 +568,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1128,6 +1160,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1492,6 +1534,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1549,6 +1616,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1633,7 +1723,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1722,6 +1813,19 @@ } ] }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -1766,7 +1870,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1877,7 +1982,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1997,7 +2103,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -2025,7 +2132,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -2053,7 +2161,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/response_to_list_proposals.json b/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/response_to_list_proposals.json index ea9f556d..e3609c7c 100644 --- a/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/response_to_list_proposals.json +++ b/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/response_to_list_proposals.json @@ -23,6 +23,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -35,54 +36,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -95,6 +117,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -107,6 +131,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -119,6 +145,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -131,6 +159,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -206,7 +236,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -224,7 +255,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -788,6 +820,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1152,6 +1194,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1209,6 +1276,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1293,7 +1383,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1344,6 +1435,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalResponse": { "description": "Information about a proposal returned by proposal queries.", "type": "object", @@ -1496,7 +1600,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1653,7 +1758,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1773,7 +1879,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1801,7 +1908,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1829,7 +1937,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/response_to_proposal.json b/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/response_to_proposal.json index e3772581..1d4cd442 100644 --- a/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/response_to_proposal.json +++ b/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/response_to_proposal.json @@ -27,6 +27,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -39,54 +40,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -99,6 +121,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -111,6 +135,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -123,6 +149,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -135,6 +163,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -210,7 +240,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -228,7 +259,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -792,6 +824,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1156,6 +1198,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1213,6 +1280,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1297,7 +1387,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1348,6 +1439,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProtobufAny": { "description": "Type for wrapping any protobuf message", "type": "object", @@ -1481,7 +1585,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1638,7 +1743,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1758,7 +1864,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1786,7 +1893,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1814,7 +1922,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/response_to_reverse_proposals.json b/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/response_to_reverse_proposals.json index ea9f556d..e3609c7c 100644 --- a/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/response_to_reverse_proposals.json +++ b/contracts/subdaos/proposal/cwd-subdao-proposal-single/schema/raw/response_to_reverse_proposals.json @@ -23,6 +23,7 @@ "description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.", "oneOf": [ { + "description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`", "type": "object", "required": [ "param_change_proposal" @@ -35,54 +36,75 @@ "additionalProperties": false }, { + "description": "Proposal to upgrade IBC client", "type": "object", "required": [ - "software_upgrade_proposal" + "upgrade_proposal" ], "properties": { - "software_upgrade_proposal": { - "$ref": "#/definitions/SoftwareUpgradeProposal" + "upgrade_proposal": { + "$ref": "#/definitions/UpgradeProposal" } }, "additionalProperties": false }, { + "description": "Proposal to update IBC client", "type": "object", "required": [ - "cancel_software_upgrade_proposal" + "client_update_proposal" ], "properties": { - "cancel_software_upgrade_proposal": { - "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + "client_update_proposal": { + "$ref": "#/definitions/ClientUpdateProposal" } }, "additionalProperties": false }, { + "description": "Proposal to execute CosmosMsg.", "type": "object", "required": [ - "upgrade_proposal" + "proposal_execute_message" ], "properties": { - "upgrade_proposal": { - "$ref": "#/definitions/UpgradeProposal" + "proposal_execute_message": { + "$ref": "#/definitions/ProposalExecuteMessage" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to upgrade network", + "deprecated": true, "type": "object", "required": [ - "client_update_proposal" + "software_upgrade_proposal" ], "properties": { - "client_update_proposal": { - "$ref": "#/definitions/ClientUpdateProposal" + "software_upgrade_proposal": { + "$ref": "#/definitions/SoftwareUpgradeProposal" } }, "additionalProperties": false }, { + "description": "Deprecated. Proposal to cancel existing software upgrade", + "deprecated": true, + "type": "object", + "required": [ + "cancel_software_upgrade_proposal" + ], + "properties": { + "cancel_software_upgrade_proposal": { + "$ref": "#/definitions/CancelSoftwareUpgradeProposal" + } + }, + "additionalProperties": false + }, + { + "description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes", + "deprecated": true, "type": "object", "required": [ "pin_codes_proposal" @@ -95,6 +117,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.", + "deprecated": true, "type": "object", "required": [ "unpin_codes_proposal" @@ -107,6 +131,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to call sudo on contract.", + "deprecated": true, "type": "object", "required": [ "sudo_contract_proposal" @@ -119,6 +145,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to update contract admin.", + "deprecated": true, "type": "object", "required": [ "update_admin_proposal" @@ -131,6 +159,8 @@ "additionalProperties": false }, { + "description": "Deprecated. Proposal to clear contract admin.", + "deprecated": true, "type": "object", "required": [ "clear_admin_proposal" @@ -206,7 +236,8 @@ "type": "string" }, "CancelSoftwareUpgradeProposal": { - "description": "CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -224,7 +255,8 @@ } }, "ClearAdminProposal": { - "description": "SudoContractProposal defines the struct for clear admin proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -788,6 +820,16 @@ "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your new interchain account. Can be any string. This identifier allows contracts to have multiple interchain accounts on remote chains.", "type": "string" + }, + "register_fee": { + "description": "*register_fee** is a fees required to be payed to register interchain account", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Coin" + } } } } @@ -1152,6 +1194,31 @@ }, "additionalProperties": false }, + { + "description": "TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract's address.", + "type": "object", + "required": [ + "set_before_send_hook" + ], + "properties": { + "set_before_send_hook": { + "type": "object", + "required": [ + "contract_addr", + "denom" + ], + "properties": { + "contract_addr": { + "type": "string" + }, + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "AddSchedule adds new schedule with a given `name`. Until schedule is removed it will execute all `msgs` every `period` blocks. First execution is at least on `current_block + period` block. [Permissioned - DAO Only]", "type": "object", @@ -1209,6 +1276,29 @@ } }, "additionalProperties": false + }, + { + "description": "Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]", + "type": "object", + "required": [ + "resubmit_failure" + ], + "properties": { + "resubmit_failure": { + "type": "object", + "required": [ + "failure_id" + ], + "properties": { + "failure_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] }, @@ -1293,7 +1383,8 @@ ] }, "PinCodesProposal": { - "description": "PinCodesProposal defines the struct for pin contract codes proposal.", + "description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1344,6 +1435,19 @@ } } }, + "ProposalExecuteMessage": { + "description": "ProposalExecuteMessage defines the struct for sdk47 compatible admin proposal.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "*message** is a json representing an sdk message passed to admin module to execute.", + "type": "string" + } + } + }, "ProposalResponse": { "description": "Information about a proposal returned by proposal queries.", "type": "object", @@ -1496,7 +1600,8 @@ } }, "SoftwareUpgradeProposal": { - "description": "SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.", + "deprecated": true, "type": "object", "required": [ "description", @@ -1653,7 +1758,8 @@ ] }, "SudoContractProposal": { - "description": "SudoContractProposal defines the struct for sudo execution proposal.", + "description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1773,7 +1879,8 @@ "type": "string" }, "UnpinCodesProposal": { - "description": "UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.", + "deprecated": true, "type": "object", "required": [ "code_ids", @@ -1801,7 +1908,8 @@ } }, "UpdateAdminProposal": { - "description": "UpdateAdminProposal defines the struct for update admin proposal.", + "description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.", + "deprecated": true, "type": "object", "required": [ "contract", @@ -1829,7 +1937,7 @@ } }, "UpgradeProposal": { - "description": "UpgradeProposal defines the struct for upgrade proposal.", + "description": "UpgradeProposal defines the struct for IBC upgrade proposal.", "type": "object", "required": [ "description", diff --git a/contracts/subdaos/proposal/cwd-subdao-proposal-single/src/contract.rs b/contracts/subdaos/proposal/cwd-subdao-proposal-single/src/contract.rs index a89cd46f..2a5dfd51 100644 --- a/contracts/subdaos/proposal/cwd-subdao-proposal-single/src/contract.rs +++ b/contracts/subdaos/proposal/cwd-subdao-proposal-single/src/contract.rs @@ -8,7 +8,7 @@ use crate::{ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Addr, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Reply, Response, + to_json_binary, Addr, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Reply, Response, StdResult, Storage, SubMsg, WasmMsg, }; use cw2::set_contract_version; @@ -201,9 +201,9 @@ pub fn execute_propose( // contract to the Juno mainnet until queries worked within a // reasonable margin of error. // - // `to_vec` is the method used by cosmwasm to convert a struct + // `to_json_vec` is the method used by cosmwasm to convert a struct // into it's byte representation in storage. - let proposal_size = cosmwasm_std::to_vec(&proposal)?.len() as u64; + let proposal_size = cosmwasm_std::to_json_vec(&proposal)?.len() as u64; if proposal_size > MAX_PROPOSAL_SIZE { return Err(ContractError::ProposalTooLarge { size: proposal_size, @@ -221,7 +221,7 @@ pub fn execute_propose( let hooks = match proposal_creation_policy { ProposalCreationPolicy::Anyone {} => hooks, ProposalCreationPolicy::Module { addr } => { - let msg = to_binary(&PreProposeExecuteMsg::ProposalCreatedHook { + let msg = to_json_binary(&PreProposeExecuteMsg::ProposalCreatedHook { proposal_id: id, proposer: proposer.into_string(), })?; @@ -275,7 +275,7 @@ pub fn execute_execute( if !prop.msgs.is_empty() { let execute_message = WasmMsg::Execute { contract_addr: config.dao.to_string(), - msg: to_binary(&neutron_subdao_core::msg::ExecuteMsg::ExecuteProposalHook { + msg: to_json_binary(&neutron_subdao_core::msg::ExecuteMsg::ExecuteProposalHook { msgs: prop.msgs, })?, funds: vec![], @@ -306,7 +306,7 @@ pub fn execute_execute( let hooks = match proposal_creation_policy { ProposalCreationPolicy::Anyone {} => hooks, ProposalCreationPolicy::Module { addr } => { - let msg = to_binary(&PreProposeExecuteMsg::ProposalCompletedHook { + let msg = to_json_binary(&PreProposeExecuteMsg::ProposalCompletedHook { proposal_id, new_status: prop.status, })?; @@ -454,7 +454,7 @@ pub fn execute_close( let hooks = match proposal_creation_policy { ProposalCreationPolicy::Anyone {} => hooks, ProposalCreationPolicy::Module { addr } => { - let msg = to_binary(&PreProposeExecuteMsg::ProposalCompletedHook { + let msg = to_json_binary(&PreProposeExecuteMsg::ProposalCompletedHook { proposal_id, new_status: prop.status, })?; @@ -667,29 +667,29 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { limit, } => query_reverse_proposals(deps, env, start_before, limit), QueryMsg::ProposalCreationPolicy {} => query_creation_policy(deps), - QueryMsg::ProposalHooks {} => to_binary(&PROPOSAL_HOOKS.query_hooks(deps)?), - QueryMsg::VoteHooks {} => to_binary(&VOTE_HOOKS.query_hooks(deps)?), + QueryMsg::ProposalHooks {} => to_json_binary(&PROPOSAL_HOOKS.query_hooks(deps)?), + QueryMsg::VoteHooks {} => to_json_binary(&VOTE_HOOKS.query_hooks(deps)?), } } pub fn query_config(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config) + to_json_binary(&config) } pub fn query_dao(deps: Deps) -> StdResult { let config = CONFIG.load(deps.storage)?; - to_binary(&config.dao) + to_json_binary(&config.dao) } pub fn query_proposal(deps: Deps, env: Env, id: u64) -> StdResult { let proposal = PROPOSALS.load(deps.storage, id)?; - to_binary(&proposal.into_response(&env.block, id)) + to_json_binary(&proposal.into_response(&env.block, id)) } pub fn query_creation_policy(deps: Deps) -> StdResult { let policy = CREATION_POLICY.load(deps.storage)?; - to_binary(&policy) + to_json_binary(&policy) } pub fn query_list_proposals( @@ -708,7 +708,7 @@ pub fn query_list_proposals( .map(|(id, proposal)| proposal.into_response(&env.block, id)) .collect(); - to_binary(&ProposalListResponse { proposals: props }) + to_json_binary(&ProposalListResponse { proposals: props }) } pub fn query_reverse_proposals( @@ -727,12 +727,12 @@ pub fn query_reverse_proposals( .map(|(id, proposal)| proposal.into_response(&env.block, id)) .collect(); - to_binary(&ProposalListResponse { proposals: props }) + to_json_binary(&ProposalListResponse { proposals: props }) } pub fn query_proposal_count(deps: Deps) -> StdResult { let proposal_count = PROPOSAL_COUNT.load(deps.storage)?; - to_binary(&proposal_count) + to_json_binary(&proposal_count) } pub fn query_vote(deps: Deps, proposal_id: u64, voter: String) -> StdResult { @@ -743,7 +743,7 @@ pub fn query_vote(deps: Deps, proposal_id: u64, voter: String) -> StdResult>>()?; - to_binary(&VoteListResponse { votes }) + to_json_binary(&VoteListResponse { votes }) } pub fn query_info(deps: Deps) -> StdResult { let info = cw2::get_contract_version(deps.storage)?; - to_binary(&cwd_interface::voting::InfoResponse { info }) + to_json_binary(&cwd_interface::voting::InfoResponse { info }) } #[cfg_attr(not(feature = "library"), entry_point)] diff --git a/contracts/subdaos/proposal/cwd-subdao-proposal-single/src/tests.rs b/contracts/subdaos/proposal/cwd-subdao-proposal-single/src/tests.rs index 2b827a62..41ec505d 100644 --- a/contracts/subdaos/proposal/cwd-subdao-proposal-single/src/tests.rs +++ b/contracts/subdaos/proposal/cwd-subdao-proposal-single/src/tests.rs @@ -3,25 +3,22 @@ use std::u128; use cosmwasm_std::{ coins, testing::{mock_dependencies, mock_env}, - to_binary, Addr, Coin, CosmosMsg, Decimal, Empty, Order, Timestamp, Uint128, WasmMsg, + to_json_binary, Addr, Coin, CosmosMsg, Decimal, Empty, Order, Timestamp, Uint128, WasmMsg, }; use cw20::Cw20Coin; use cwd_voting_cw20_staked::msg::ActiveThreshold; -use cwd_core::state::ProposalModule; -use cwd_interface::{Admin, ModuleInstantiateInfo}; use cw_multi_test::{next_block, App, BankSudo, Contract, ContractWrapper, Executor, SudoMsg}; use cw_pre_propose_base_proposal_single as cppbps; use cw_storage_plus::{Item, Map}; use cw_utils::Duration; use cw_utils::Expiration; +use cwd_core::state::ProposalModule; +use cwd_interface::{Admin, ModuleInstantiateInfo}; use cwd_hooks::HooksResponse; use cw_denom::{CheckedDenom, UncheckedDenom}; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; -use testing::{ShouldExecute, TestSingleChoiceVote}; use cwd_voting::{ deposit::{CheckedDepositInfo, DepositRefundPolicy, DepositToken, UncheckedDepositInfo}, pre_propose::{PreProposeInfo, ProposalCreationPolicy}, @@ -29,6 +26,9 @@ use cwd_voting::{ threshold::{PercentageThreshold, Threshold}, voting::{Vote, Votes}, }; +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; +use testing::{ShouldExecute, TestSingleChoiceVote}; use crate::{ contract::{migrate, CONTRACT_NAME, CONTRACT_VERSION}, @@ -208,7 +208,7 @@ fn test_close_failed_proposal() { let msg = cw20::Cw20ExecuteMsg::Send { contract: staking_contract.to_string(), amount: Uint128::new(2000), - msg: to_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(), + msg: to_json_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(), }; app.execute_contract( Addr::unchecked(CREATOR_ADDR), @@ -222,7 +222,7 @@ fn test_close_failed_proposal() { let msg = cw20::Cw20ExecuteMsg::Burn { amount: Uint128::new(2000), }; - let binary_msg = to_binary(&msg).unwrap(); + let binary_msg = to_json_binary(&msg).unwrap(); // Overburn tokens app.execute_contract( @@ -292,7 +292,7 @@ fn test_close_failed_proposal() { description: "We want to re-execute failed proposals".to_string(), msgs: vec![WasmMsg::Execute { contract_addr: govmod_single.to_string(), - msg: to_binary(&ExecuteMsg::UpdateConfig { + msg: to_json_binary(&ExecuteMsg::UpdateConfig { threshold: original.threshold, max_voting_period: original.max_voting_period, min_voting_period: original.min_voting_period, @@ -466,7 +466,7 @@ fn test_no_double_refund_on_execute_fail_and_close() { let msg = cw20::Cw20ExecuteMsg::Send { contract: staking_contract.to_string(), amount: Uint128::new(1), - msg: to_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(), + msg: to_json_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(), }; app.execute_contract( Addr::unchecked(CREATOR_ADDR), @@ -494,7 +494,7 @@ fn test_no_double_refund_on_execute_fail_and_close() { let msg = cw20::Cw20ExecuteMsg::Burn { amount: Uint128::new(2000), }; - let binary_msg = to_binary(&msg).unwrap(); + let binary_msg = to_json_binary(&msg).unwrap(); // Increase allowance to pay the proposal deposit. app.execute_contract( @@ -540,7 +540,7 @@ fn test_no_double_refund_on_execute_fail_and_close() { .unwrap(); let timestamp = Timestamp::from_seconds(300_000_000); - app.update_block(|block| block.time = timestamp); + app.update_block(|b| b.time = timestamp); // Execute proposal app.execute_contract( diff --git a/contracts/tokenomics/distribution/Cargo.toml b/contracts/tokenomics/distribution/Cargo.toml index 57db3887..4bf81045 100644 --- a/contracts/tokenomics/distribution/Cargo.toml +++ b/contracts/tokenomics/distribution/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "Apache-2.0" name = "neutron-distribution" repository = "https://github.com/neutron/neutron-dao" -version = "0.1.0" +version = "0.1.1" [lib] crate-type = ["cdylib", "rlib"] @@ -13,13 +13,14 @@ crate-type = ["cdylib", "rlib"] backtraces = ["cosmwasm-std/backtraces"] [dependencies] -cosmwasm-schema = {version = "1.3.0", default-features = false} -cosmwasm-std = {version = "1.3.0"} +cosmwasm-schema = { version = "1.3.0", default-features = false } +cosmwasm-std = { version = "1.3.0" } cw-storage-plus = "1.1.0" -cwd-macros = {path = "../../../packages/cwd-macros"} -exec-control = {path = "../../../packages/exec-control"} +cwd-macros = { path = "../../../packages/cwd-macros" } +exec-control = { path = "../../../packages/exec-control" } schemars = "0.8.8" -serde = {version = "1.0.175", default-features = false, features = ["derive"]} -thiserror = {version = "1.0"} +serde = { version = "1.0.175", default-features = false, features = ["derive"] } +thiserror = { version = "1.0" } +cw2 = "1.1.0" [dev-dependencies] diff --git a/contracts/tokenomics/distribution/src/contract.rs b/contracts/tokenomics/distribution/src/contract.rs index 33113827..233e548d 100644 --- a/contracts/tokenomics/distribution/src/contract.rs +++ b/contracts/tokenomics/distribution/src/contract.rs @@ -1,16 +1,20 @@ use crate::error::ContractError; -use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; +use crate::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; use crate::state::{Config, CONFIG, FUND_COUNTER, PAUSED_UNTIL, PENDING_DISTRIBUTION, SHARES}; #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Addr, BankMsg, Binary, Coin, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Order, + to_json_binary, Addr, BankMsg, Binary, Coin, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Order, Response, StdResult, Storage, Uint128, }; +use cw2::set_contract_version; use exec_control::pause::{ can_pause, can_unpause, validate_duration, PauseError, PauseInfoResponse, }; +pub(crate) const CONTRACT_NAME: &str = "crates.io:distribution"; +pub(crate) const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); + //-------------------------------------------------------------------------------------------------- // Instantiation //-------------------------------------------------------------------------------------------------- @@ -74,6 +78,12 @@ pub fn execute( } } +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn migrate(deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result { + set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?; + Ok(Response::default()) +} + pub fn execute_pause( deps: DepsMut, env: Env, @@ -262,9 +272,9 @@ pub fn execute_claim(deps: DepsMut, info: MessageInfo) -> Result StdResult { match msg { - QueryMsg::Config {} => to_binary(&query_config(deps)?), - QueryMsg::Pending {} => to_binary(&query_pending(deps)?), - QueryMsg::Shares {} => to_binary(&query_shares(deps)?), + QueryMsg::Config {} => to_json_binary(&query_config(deps)?), + QueryMsg::Pending {} => to_json_binary(&query_pending(deps)?), + QueryMsg::Shares {} => to_json_binary(&query_shares(deps)?), QueryMsg::PauseInfo {} => query_paused(deps, env), } } @@ -289,7 +299,7 @@ pub fn query_pending(deps: Deps) -> StdResult> { } pub fn query_paused(deps: Deps, env: Env) -> StdResult { - to_binary(&get_pause_info(deps, &env)?) + to_json_binary(&get_pause_info(deps, &env)?) } fn get_pause_info(deps: Deps, env: &Env) -> StdResult { diff --git a/contracts/tokenomics/distribution/src/msg.rs b/contracts/tokenomics/distribution/src/msg.rs index 6cf2f4f6..1b063b81 100644 --- a/contracts/tokenomics/distribution/src/msg.rs +++ b/contracts/tokenomics/distribution/src/msg.rs @@ -47,3 +47,7 @@ pub enum QueryMsg { #[returns(Vec<(Addr, Uint128)>)] Shares {}, } + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub struct MigrateMsg {} diff --git a/contracts/tokenomics/distribution/src/testing/tests.rs b/contracts/tokenomics/distribution/src/testing/tests.rs index 126cc2ab..13b9d001 100644 --- a/contracts/tokenomics/distribution/src/testing/tests.rs +++ b/contracts/tokenomics/distribution/src/testing/tests.rs @@ -6,7 +6,7 @@ use crate::{ testing::mock_querier::mock_dependencies, }; use cosmwasm_std::{ - coin, coins, from_binary, + coin, coins, from_json, testing::{mock_env, mock_info}, Addr, BankMsg, CosmosMsg, DepsMut, Empty, Uint128, }; @@ -289,7 +289,7 @@ fn test_query_shares() { let msg = QueryMsg::Shares {}; let res = query(deps.as_ref(), mock_env(), msg); assert!(res.is_ok()); - let value: Vec<(String, Uint128)> = from_binary(&res.unwrap()).unwrap(); + let value: Vec<(String, Uint128)> = from_json(res.unwrap()).unwrap(); assert_eq!( value, vec![ @@ -320,7 +320,7 @@ fn test_query_pending() { let msg = QueryMsg::Pending {}; let res = query(deps.as_ref(), mock_env(), msg); assert!(res.is_ok()); - let value: Vec<(String, Uint128)> = from_binary(&res.unwrap()).unwrap(); + let value: Vec<(String, Uint128)> = from_json(res.unwrap()).unwrap(); assert_eq!( value, vec![ @@ -345,7 +345,7 @@ fn test_pause() { ); assert!(res.is_ok()); let pause_info: PauseInfoResponse = - from_binary(&query(deps.as_ref(), mock_env(), QueryMsg::PauseInfo {}).unwrap()).unwrap(); + from_json(query(deps.as_ref(), mock_env(), QueryMsg::PauseInfo {}).unwrap()).unwrap(); assert_eq!( pause_info, PauseInfoResponse::Paused { @@ -404,7 +404,7 @@ fn test_pause() { ); assert!(res.is_ok()); let pause_info: PauseInfoResponse = - from_binary(&query(deps.as_ref(), env.clone(), QueryMsg::PauseInfo {}).unwrap()).unwrap(); + from_json(query(deps.as_ref(), env.clone(), QueryMsg::PauseInfo {}).unwrap()).unwrap(); assert_eq!( pause_info, PauseInfoResponse::Paused { @@ -422,6 +422,6 @@ fn test_pause() { ); assert!(res.is_ok(),); let pause_info: PauseInfoResponse = - from_binary(&query(deps.as_ref(), mock_env(), QueryMsg::PauseInfo {}).unwrap()).unwrap(); + from_json(query(deps.as_ref(), mock_env(), QueryMsg::PauseInfo {}).unwrap()).unwrap(); assert_eq!(pause_info, PauseInfoResponse::Unpaused {}); } diff --git a/contracts/tokenomics/reserve/Cargo.toml b/contracts/tokenomics/reserve/Cargo.toml index 4a55d4bf..8e0ea288 100644 --- a/contracts/tokenomics/reserve/Cargo.toml +++ b/contracts/tokenomics/reserve/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "Apache-2.0" name = "neutron-reserve" repository = "https://github.com/neutron/neutron-dao" -version = "0.1.1" +version = "0.1.2" [lib] crate-type = ["cdylib", "rlib"] @@ -13,13 +13,13 @@ crate-type = ["cdylib", "rlib"] backtraces = ["cosmwasm-std/backtraces"] [dependencies] -cosmwasm-schema = {version = "1.3.0", default-features = false} -cosmwasm-std = {version = "1.3.0"} +cosmwasm-schema = { version = "1.3.0", default-features = false } +cosmwasm-std = { version = "1.3.0" } cw-storage-plus = "1.1.0" -cwd-macros = {path = "../../../packages/cwd-macros"} -exec-control = {path = "../../../packages/exec-control"} -neutron-sdk = {package = "neutron-sdk", version = "0.7.0" } +cwd-macros = { path = "../../../packages/cwd-macros" } +exec-control = { path = "../../../packages/exec-control" } +neutron-sdk = "0.10.0" schemars = "0.8.8" -serde = {version = "1.0.103", default-features = false, features = ["derive"]} -thiserror = {version = "1.0"} +serde = { version = "1.0.103", default-features = false, features = ["derive"] } +thiserror = { version = "1.0" } cw2 = "1.1.0" diff --git a/contracts/tokenomics/reserve/src/contract.rs b/contracts/tokenomics/reserve/src/contract.rs index 75199b85..1db74a0a 100644 --- a/contracts/tokenomics/reserve/src/contract.rs +++ b/contracts/tokenomics/reserve/src/contract.rs @@ -3,9 +3,10 @@ use crate::error::ContractError; #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - coins, to_binary, Addr, BankMsg, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Response, - StdResult, Uint128, WasmMsg, + coins, to_json_binary, Addr, BankMsg, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, + Response, StdResult, Uint128, WasmMsg, }; +use cw2::set_contract_version; use exec_control::pause::{ can_pause, can_unpause, validate_duration, PauseError, PauseInfoResponse, }; @@ -19,7 +20,6 @@ use crate::state::{ use crate::vesting::{ get_burned_coins, safe_burned_coins_for_period, update_distribution_stats, vesting_function, }; -use cw2::set_contract_version; pub(crate) const CONTRACT_NAME: &str = "crates.io:neutron-reserve"; pub(crate) const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); @@ -174,7 +174,6 @@ pub fn execute( ExecuteMsg::Unpause {} => execute_unpause(deps, info.sender), } } - pub fn execute_transfer_ownership( deps: DepsMut, info: MessageInfo, @@ -306,14 +305,14 @@ pub fn execute_distribute( #[cfg_attr(not(feature = "library"), entry_point)] pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { match msg { - QueryMsg::Config {} => to_binary(&query_config(deps)?), - QueryMsg::Stats {} => to_binary(&query_stats(deps)?), + QueryMsg::Config {} => to_json_binary(&query_config(deps)?), + QueryMsg::Stats {} => to_json_binary(&query_stats(deps)?), QueryMsg::PauseInfo {} => query_paused(deps, env), } } pub fn query_paused(deps: Deps, env: Env) -> StdResult { - to_binary(&get_pause_info(deps, &env)?) + to_json_binary(&get_pause_info(deps, &env)?) } pub fn query_config(deps: Deps) -> StdResult { @@ -348,7 +347,7 @@ pub fn create_distribution_response( let msg = CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: config.distribution_contract.to_string(), funds: coins(to_distribute.u128(), denom.clone()), - msg: to_binary(&DistributeMsg::Fund {})?, + msg: to_json_binary(&DistributeMsg::Fund {})?, }); resp = resp.add_message(msg) } diff --git a/contracts/tokenomics/reserve/src/testing/mock_querier.rs b/contracts/tokenomics/reserve/src/testing/mock_querier.rs index cf17ebfa..2a57443a 100644 --- a/contracts/tokenomics/reserve/src/testing/mock_querier.rs +++ b/contracts/tokenomics/reserve/src/testing/mock_querier.rs @@ -1,9 +1,9 @@ use std::marker::PhantomData; use cosmwasm_std::{ - from_slice, + from_json, testing::{MockApi, MockQuerier, MockStorage}, - to_binary, Binary, Coin, ContractResult, OwnedDeps, Querier, QuerierResult, QueryRequest, + to_json_binary, Binary, Coin, ContractResult, OwnedDeps, Querier, QuerierResult, QueryRequest, SystemError, SystemResult, }; use neutron_sdk::{ @@ -35,7 +35,7 @@ pub struct WasmMockQuerier { impl Querier for WasmMockQuerier { fn raw_query(&self, bin_request: &[u8]) -> QuerierResult { - let request: QueryRequest = match from_slice(bin_request) { + let request: QueryRequest = match from_json(bin_request) { Ok(v) => v, Err(e) => { return QuerierResult::Err(SystemError::InvalidRequest { @@ -52,7 +52,7 @@ impl WasmMockQuerier { pub fn new(base: MockQuerier) -> Self { WasmMockQuerier { base, - total_burned_neutrons: to_binary(&Vec::::with_capacity(0)).unwrap(), + total_burned_neutrons: to_json_binary(&Vec::::with_capacity(0)).unwrap(), throw_error: false, } } @@ -70,7 +70,8 @@ impl WasmMockQuerier { } pub fn set_total_burned_neutrons(&mut self, coin: Coin) { - self.total_burned_neutrons = to_binary(&TotalBurnedNeutronsAmountResponse { coin }).unwrap() + self.total_burned_neutrons = + to_json_binary(&TotalBurnedNeutronsAmountResponse { coin }).unwrap() } pub fn set_total_burned_neutrons_error(&mut self, error_state: bool) { diff --git a/contracts/tokenomics/reserve/src/testing/tests.rs b/contracts/tokenomics/reserve/src/testing/tests.rs index 418ef563..47c5c2a5 100644 --- a/contracts/tokenomics/reserve/src/testing/tests.rs +++ b/contracts/tokenomics/reserve/src/testing/tests.rs @@ -1,9 +1,9 @@ use std::str::FromStr; use cosmwasm_std::{ - coin, coins, from_binary, + coin, coins, from_json, testing::{mock_env, mock_info}, - to_binary, BankMsg, Coin, CosmosMsg, Decimal, DepsMut, StdError, Uint128, WasmMsg, + to_json_binary, BankMsg, Coin, CosmosMsg, Decimal, DepsMut, StdError, Uint128, WasmMsg, }; use exec_control::pause::{PauseError, PauseInfoResponse}; use neutron_sdk::bindings::query::NeutronQuery; @@ -58,7 +58,7 @@ fn test_pause() { let res = execute(deps.as_mut(), mock_env(), mock_info("main_dao", &[]), msg); assert!(res.is_ok()); let pause_info: PauseInfoResponse = - from_binary(&query(deps.as_ref(), mock_env(), QueryMsg::PauseInfo {}).unwrap()).unwrap(); + from_json(query(deps.as_ref(), mock_env(), QueryMsg::PauseInfo {}).unwrap()).unwrap(); assert_eq!( pause_info, PauseInfoResponse::Paused { @@ -107,7 +107,7 @@ fn test_pause() { ); assert!(res.is_ok()); let pause_info: PauseInfoResponse = - from_binary(&query(deps.as_ref(), env.clone(), QueryMsg::PauseInfo {}).unwrap()).unwrap(); + from_json(query(deps.as_ref(), env.clone(), QueryMsg::PauseInfo {}).unwrap()).unwrap(); assert_eq!( pause_info, PauseInfoResponse::Paused { @@ -120,7 +120,7 @@ fn test_pause() { let res = execute(deps.as_mut(), mock_env(), mock_info("main_dao", &[]), msg); assert!(res.is_ok(),); let pause_info: PauseInfoResponse = - from_binary(&query(deps.as_ref(), mock_env(), QueryMsg::PauseInfo {}).unwrap()).unwrap(); + from_json(query(deps.as_ref(), mock_env(), QueryMsg::PauseInfo {}).unwrap()).unwrap(); assert_eq!(pause_info, PauseInfoResponse::Unpaused {}); } @@ -143,7 +143,7 @@ fn test_distribute_success() { denom: DENOM.to_string(), amount: Uint128::from(23u128) }], - msg: to_binary(&DistributeMsg::Fund {}).unwrap(), + msg: to_json_binary(&DistributeMsg::Fund {}).unwrap(), }) ); assert_eq!( @@ -283,7 +283,7 @@ fn test_distribute_zero_to_reserve() { denom: DENOM.to_string(), amount: Uint128::from(100u128) }], - msg: to_binary(&DistributeMsg::Fund {}).unwrap(), + msg: to_json_binary(&DistributeMsg::Fund {}).unwrap(), }) ); diff --git a/packages/cw-denom/src/lib.rs b/packages/cw-denom/src/lib.rs index e58adbcf..ad11e0c0 100644 --- a/packages/cw-denom/src/lib.rs +++ b/packages/cw-denom/src/lib.rs @@ -18,7 +18,7 @@ mod integration_tests; use std::fmt::{self}; use cosmwasm_std::{ - to_binary, Addr, BankMsg, Coin, CosmosMsg, CustomQuery, Deps, QuerierWrapper, StdError, + to_json_binary, Addr, BankMsg, Coin, CosmosMsg, CustomQuery, Deps, QuerierWrapper, StdError, StdResult, Uint128, WasmMsg, }; use schemars::JsonSchema; @@ -127,7 +127,7 @@ impl CheckedDenom { .into(), CheckedDenom::Cw20(address) => WasmMsg::Execute { contract_addr: address.to_string(), - msg: to_binary(&cw20::Cw20ExecuteMsg::Transfer { + msg: to_json_binary(&cw20::Cw20ExecuteMsg::Transfer { recipient: who.to_string(), amount, })?, @@ -179,7 +179,8 @@ impl fmt::Display for CheckedDenom { mod tests { use cosmwasm_std::{ testing::{mock_dependencies, MockQuerier}, - to_binary, Addr, ContractResult, QuerierResult, StdError, SystemError, Uint128, WasmQuery, + to_json_binary, Addr, ContractResult, QuerierResult, StdError, SystemError, Uint128, + WasmQuery, }; use super::*; @@ -193,7 +194,7 @@ mod tests { if *contract_addr == CW20_ADDR { if works { QuerierResult::Ok(ContractResult::Ok( - to_binary(&cw20::TokenInfoResponse { + to_json_binary(&cw20::TokenInfoResponse { name: "coin".to_string(), symbol: "symbol".to_string(), decimals: 6, diff --git a/packages/cw-paginate/README.md b/packages/cw-paginate/README.md index ecf08f35..f12d8fe1 100644 --- a/packages/cw-paginate/README.md +++ b/packages/cw-paginate/README.md @@ -21,7 +21,7 @@ pub fn query_list_items( start_after: Option, limit: Option, ) -> StdResult { - to_binary(&paginate_map( + to_json_binary(&paginate_map( deps, &ITEMS, start_after, diff --git a/packages/cw-paginate/src/lib.rs b/packages/cw-paginate/src/lib.rs index 1453c797..f4a86d4c 100644 --- a/packages/cw-paginate/src/lib.rs +++ b/packages/cw-paginate/src/lib.rs @@ -18,7 +18,7 @@ //! You can use this package to write a query to list it's contents like: // //! ```rust -//! # use cosmwasm_std::{Deps, Binary, to_binary, StdResult}; +//! # use cosmwasm_std::{Deps, Binary, to_json_binary, StdResult}; //! # use cw_storage_plus::Map; //! # use cw_paginate::paginate_map; //! @@ -29,7 +29,7 @@ //! start_after: Option, //! limit: Option, //! ) -> StdResult { -//! to_binary(&paginate_map( +//! to_json_binary(&paginate_map( //! deps, //! &ITEMS, //! start_after, diff --git a/packages/cwd-interface/src/lib.rs b/packages/cwd-interface/src/lib.rs index 0930307f..eb2add04 100644 --- a/packages/cwd-interface/src/lib.rs +++ b/packages/cwd-interface/src/lib.rs @@ -46,7 +46,7 @@ impl ModuleInstantiateInfo { #[cfg(test)] mod tests { - use cosmwasm_std::{to_binary, Addr, WasmMsg}; + use cosmwasm_std::{to_json_binary, Addr, WasmMsg}; use crate::{Admin, ModuleInstantiateInfo}; @@ -54,7 +54,7 @@ mod tests { fn test_module_instantiate_admin_none() { let no_admin = ModuleInstantiateInfo { code_id: 42, - msg: to_binary("foo").unwrap(), + msg: to_json_binary("foo").unwrap(), admin: None, label: "bar".to_string(), }; @@ -63,7 +63,7 @@ mod tests { WasmMsg::Instantiate { admin: None, code_id: 42, - msg: to_binary("foo").unwrap(), + msg: to_json_binary("foo").unwrap(), funds: vec![], label: "bar".to_string() } @@ -74,7 +74,7 @@ mod tests { fn test_module_instantiate_admin_addr() { let no_admin = ModuleInstantiateInfo { code_id: 42, - msg: to_binary("foo").unwrap(), + msg: to_json_binary("foo").unwrap(), admin: Some(Admin::Address { addr: "core".to_string(), }), @@ -85,7 +85,7 @@ mod tests { WasmMsg::Instantiate { admin: Some("core".to_string()), code_id: 42, - msg: to_binary("foo").unwrap(), + msg: to_json_binary("foo").unwrap(), funds: vec![], label: "bar".to_string() } @@ -96,7 +96,7 @@ mod tests { fn test_module_instantiate_instantiator_addr() { let no_admin = ModuleInstantiateInfo { code_id: 42, - msg: to_binary("foo").unwrap(), + msg: to_json_binary("foo").unwrap(), admin: Some(Admin::CoreModule {}), label: "bar".to_string(), }; @@ -105,7 +105,7 @@ mod tests { WasmMsg::Instantiate { admin: Some("ekez".to_string()), code_id: 42, - msg: to_binary("foo").unwrap(), + msg: to_json_binary("foo").unwrap(), funds: vec![], label: "bar".to_string() } diff --git a/packages/cwd-pre-propose-base/src/execute.rs b/packages/cwd-pre-propose-base/src/execute.rs index e3a5ebf1..e6882845 100644 --- a/packages/cwd-pre-propose-base/src/execute.rs +++ b/packages/cwd-pre-propose-base/src/execute.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{ - to_binary, Addr, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult, WasmMsg, + to_json_binary, Addr, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult, WasmMsg, }; use std::fmt::Debug; @@ -103,12 +103,14 @@ where pub fn query(&self, deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { match msg { - QueryMsg::ProposalModule {} => to_binary(&self.proposal_module.load(deps.storage)?), - QueryMsg::Dao {} => to_binary(&self.dao.load(deps.storage)?), - QueryMsg::Config {} => to_binary(&self.config.load(deps.storage)?), + QueryMsg::ProposalModule {} => { + to_json_binary(&self.proposal_module.load(deps.storage)?) + } + QueryMsg::Dao {} => to_json_binary(&self.dao.load(deps.storage)?), + QueryMsg::Config {} => to_json_binary(&self.config.load(deps.storage)?), QueryMsg::DepositInfo { proposal_id } => { let (deposit_info, proposer) = self.deposits.load(deps.storage, proposal_id)?; - to_binary(&DepositInfoResponse { + to_json_binary(&DepositInfoResponse { deposit_info, proposer, }) @@ -150,14 +152,17 @@ where let proposal_module = self.proposal_module.load(deps.storage)?; let propose_messsage = WasmMsg::Execute { contract_addr: proposal_module.into_string(), - msg: to_binary(&msg)?, + msg: to_json_binary(&msg)?, funds: vec![], }; Ok(Response::default() .add_attribute("method", "execute_propose") .add_attribute("sender", info.sender) - .add_attribute("deposit_info", to_binary(&config.deposit_info)?.to_string()) + .add_attribute( + "deposit_info", + to_json_binary(&config.deposit_info)?.to_string(), + ) .add_messages(deposit_messages) .add_message(propose_messsage)) } @@ -269,7 +274,7 @@ where Ok(Response::default() .add_attribute("method", "execute_proposal_completed_hook") .add_attribute("proposal", id.to_string()) - .add_attribute("deposit_info", to_binary(&deposit_info)?.to_string()) + .add_attribute("deposit_info", to_json_binary(&deposit_info)?.to_string()) .add_messages(messages)) } diff --git a/packages/cwd-proposal-hooks/src/lib.rs b/packages/cwd-proposal-hooks/src/lib.rs index 980277a0..e7fae30d 100644 --- a/packages/cwd-proposal-hooks/src/lib.rs +++ b/packages/cwd-proposal-hooks/src/lib.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{to_binary, StdResult, Storage, SubMsg, WasmMsg}; +use cosmwasm_std::{to_json_binary, StdResult, Storage, SubMsg, WasmMsg}; use cwd_hooks::Hooks; use cwd_voting::reply::mask_proposal_hook_index; use schemars::JsonSchema; @@ -34,7 +34,7 @@ pub fn new_proposal_hooks( id: u64, proposer: &str, ) -> StdResult> { - let msg = to_binary(&ProposalHookExecuteMsg::ProposalHook( + let msg = to_json_binary(&ProposalHookExecuteMsg::ProposalHook( ProposalHookMsg::NewProposal { id, proposer: proposer.to_string(), @@ -71,7 +71,7 @@ pub fn proposal_status_changed_hooks( return Ok(vec![]); } - let msg = to_binary(&ProposalHookExecuteMsg::ProposalHook( + let msg = to_json_binary(&ProposalHookExecuteMsg::ProposalHook( ProposalHookMsg::ProposalStatusChanged { id, old_status, diff --git a/packages/cwd-vote-hooks/src/lib.rs b/packages/cwd-vote-hooks/src/lib.rs index d7c56421..5317d5f8 100644 --- a/packages/cwd-vote-hooks/src/lib.rs +++ b/packages/cwd-vote-hooks/src/lib.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{to_binary, StdResult, Storage, SubMsg, WasmMsg}; +use cosmwasm_std::{to_json_binary, StdResult, Storage, SubMsg, WasmMsg}; use cwd_hooks::Hooks; use cwd_voting::reply::mask_vote_hook_index; use schemars::JsonSchema; @@ -31,7 +31,7 @@ pub fn new_vote_hooks( voter: String, vote: String, ) -> StdResult> { - let msg = to_binary(&VoteHookExecuteMsg::VoteHook(VoteHookMsg::NewVote { + let msg = to_json_binary(&VoteHookExecuteMsg::VoteHook(VoteHookMsg::NewVote { proposal_id, voter, vote, diff --git a/packages/cwd-voting/Cargo.toml b/packages/cwd-voting/Cargo.toml index 76d5a1d8..68e47f50 100644 --- a/packages/cwd-voting/Cargo.toml +++ b/packages/cwd-voting/Cargo.toml @@ -7,7 +7,7 @@ repository = "https://github.com/DA0-DA0/dao-contracts" description = "Types and methods for CosmWasm DAO voting." [dependencies] -neutron-sdk = { package = "neutron-sdk", version = "0.7.0" } +neutron-sdk = "0.10.0" cosmwasm-std = { version = "1.3.0" } schemars = "0.8.8" serde = { version = "1.0.175", default-features = false, features = ["derive"] } diff --git a/packages/cwd-voting/src/deposit.rs b/packages/cwd-voting/src/deposit.rs index e9ee3b1f..c1a0f9ee 100644 --- a/packages/cwd-voting/src/deposit.rs +++ b/packages/cwd-voting/src/deposit.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{ - to_binary, Addr, CosmosMsg, Deps, MessageInfo, StdError, StdResult, Uint128, WasmMsg, + to_json_binary, Addr, CosmosMsg, Deps, MessageInfo, StdError, StdResult, Uint128, WasmMsg, }; use cw_utils::{must_pay, PaymentError}; use schemars::JsonSchema; @@ -179,7 +179,7 @@ impl CheckedDepositInfo { vec![WasmMsg::Execute { contract_addr: address.to_string(), funds: vec![], - msg: to_binary(&cw20::Cw20ExecuteMsg::TransferFrom { + msg: to_json_binary(&cw20::Cw20ExecuteMsg::TransferFrom { owner: depositor.to_string(), recipient: contract.to_string(), amount: *amount, @@ -321,7 +321,7 @@ pub mod tests { messages, vec![CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: CW20.to_string(), - msg: to_binary(&cw20::Cw20ExecuteMsg::TransferFrom { + msg: to_json_binary(&cw20::Cw20ExecuteMsg::TransferFrom { owner: "ekez".to_string(), recipient: "contract".to_string(), amount: Uint128::new(10) @@ -380,7 +380,7 @@ pub mod tests { messages, vec![CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: CW20.to_string(), - msg: to_binary(&cw20::Cw20ExecuteMsg::Transfer { + msg: to_json_binary(&cw20::Cw20ExecuteMsg::Transfer { recipient: "ekez".to_string(), amount: Uint128::new(10) }) diff --git a/packages/cwd-voting/src/pre_propose.rs b/packages/cwd-voting/src/pre_propose.rs index e2b9376d..63cfc49a 100644 --- a/packages/cwd-voting/src/pre_propose.rs +++ b/packages/cwd-voting/src/pre_propose.rs @@ -61,7 +61,7 @@ impl PreProposeInfo { #[cfg(test)] mod tests { - use cosmwasm_std::{to_binary, WasmMsg}; + use cosmwasm_std::{to_json_binary, WasmMsg}; use super::*; @@ -115,7 +115,7 @@ mod tests { let info = PreProposeInfo::ModuleMayPropose { info: ModuleInstantiateInfo { code_id: 42, - msg: to_binary("foo").unwrap(), + msg: to_json_binary("foo").unwrap(), admin: None, label: "pre-propose-9000".to_string(), }, @@ -136,7 +136,7 @@ mod tests { WasmMsg::Instantiate { admin: None, code_id: 42, - msg: to_binary("foo").unwrap(), + msg: to_json_binary("foo").unwrap(), funds: vec![], label: "pre-propose-9000".to_string() }, diff --git a/packages/neutron-security-subdao-pre-propose/Cargo.toml b/packages/neutron-security-subdao-pre-propose/Cargo.toml index 8b9330a6..8b185040 100644 --- a/packages/neutron-security-subdao-pre-propose/Cargo.toml +++ b/packages/neutron-security-subdao-pre-propose/Cargo.toml @@ -14,6 +14,6 @@ cw-utils = { version = "1.0.1" } schemars = "0.8.8" serde = { version = "1.0.175", default-features = false, features = ["derive"] } cosmwasm-std = { version = "1.3.0" } -neutron-sdk = { package = "neutron-sdk", version = "0.7.0" } +neutron-sdk = "0.10.0" cwd-voting = { path = "../cwd-voting" } cwd-interface = { path = "../cwd-interface" } diff --git a/packages/neutron-subdao-core/Cargo.toml b/packages/neutron-subdao-core/Cargo.toml index 6fd9cda0..e1bb8acf 100644 --- a/packages/neutron-subdao-core/Cargo.toml +++ b/packages/neutron-subdao-core/Cargo.toml @@ -9,15 +9,15 @@ version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cosmwasm-schema = {version = "1.3.0"} -cosmwasm-std = {version = "1.3.0"} -cw-utils = {version = "1.0.1"} +cosmwasm-schema = { version = "1.3.0" } +cosmwasm-std = { version = "1.3.0" } +cw-utils = { version = "1.0.1" } cw2 = "1.1.0" -cwd-interface = {path = "../cwd-interface"} -cwd-macros = {path = "../cwd-macros"} -cwd-voting = {path = "../cwd-voting"} -exec-control = {path = "../exec-control"} -neutron-sdk = {package = "neutron-sdk", version = "0.7.0"} +cwd-interface = { path = "../cwd-interface" } +cwd-macros = { path = "../cwd-macros" } +cwd-voting = { path = "../cwd-voting" } +exec-control = { path = "../exec-control" } +neutron-sdk = "0.10.0" schemars = "0.8.8" -serde = {version = "1.0.175", default-features = false, features = ["derive"]} -thiserror = {version = "1.0"} +serde = { version = "1.0.175", default-features = false, features = ["derive"] } +thiserror = { version = "1.0" } diff --git a/packages/neutron-subdao-pre-propose-single/Cargo.toml b/packages/neutron-subdao-pre-propose-single/Cargo.toml index 76a1ee5b..aff40ad7 100644 --- a/packages/neutron-subdao-pre-propose-single/Cargo.toml +++ b/packages/neutron-subdao-pre-propose-single/Cargo.toml @@ -13,6 +13,6 @@ cwd-pre-propose-base = { version = "*", path = "../cwd-pre-propose-base" } schemars = "0.8.8" serde = { version = "1.0.175", default-features = false, features = ["derive"] } cosmwasm-std = { version = "1.3.0" } -neutron-sdk = { package = "neutron-sdk", version = "0.7.0" } +neutron-sdk = "0.10.0" cwd-voting = { path = "../cwd-voting" } cwd-interface = { path = "../cwd-interface" } diff --git a/packages/neutron-subdao-proposal-single/Cargo.toml b/packages/neutron-subdao-proposal-single/Cargo.toml index 72db55e9..54057c67 100644 --- a/packages/neutron-subdao-proposal-single/Cargo.toml +++ b/packages/neutron-subdao-proposal-single/Cargo.toml @@ -9,14 +9,14 @@ version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cosmwasm-schema = {version = "1.3.0"} -cosmwasm-std = {version = "1.3.0"} -cw-utils = {version = "1.0.1"} -cwd-hooks = {path = "../cwd-hooks"} -cwd-interface = {path = "../cwd-interface"} -cwd-macros = {path = "../cwd-macros"} -cwd-voting = {path = "../cwd-voting"} +cosmwasm-schema = { version = "1.3.0" } +cosmwasm-std = { version = "1.3.0" } +cw-utils = { version = "1.0.1" } +cwd-hooks = { path = "../cwd-hooks" } +cwd-interface = { path = "../cwd-interface" } +cwd-macros = { path = "../cwd-macros" } +cwd-voting = { path = "../cwd-voting" } -neutron-sdk = {package = "neutron-sdk", version = "0.7.0"} +neutron-sdk = "0.10.0" schemars = "0.8.8" -serde = {version = "1.0.175", default-features = false, features = ["derive"]} +serde = { version = "1.0.175", default-features = false, features = ["derive"] } diff --git a/packages/neutron-subdao-timelock-single/Cargo.toml b/packages/neutron-subdao-timelock-single/Cargo.toml index 7575e464..ce216f7b 100644 --- a/packages/neutron-subdao-timelock-single/Cargo.toml +++ b/packages/neutron-subdao-timelock-single/Cargo.toml @@ -6,8 +6,8 @@ version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cosmwasm-schema = {version = "1.3.0"} -cosmwasm-std = {version = "1.3.0"} -neutron-sdk = {package = "neutron-sdk", version = "0.7.0"} +cosmwasm-schema = { version = "1.3.0" } +cosmwasm-std = { version = "1.3.0" } +neutron-sdk = "0.10.0" schemars = "0.8.8" -serde = {version = "1.0.175", default-features = false, features = ["derive"]} +serde = { version = "1.0.175", default-features = false, features = ["derive"] } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index aa464261..8142c301 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.71.0" +channel = "1.73.0"