Skip to content

Commit

Permalink
move sudo msg Height to proper location
Browse files Browse the repository at this point in the history
  • Loading branch information
NeverHappened committed Oct 18, 2024
1 parent b5fa043 commit c0fdaa1
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 352 deletions.
3 changes: 1 addition & 2 deletions contracts/neutron_interchain_queries/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ use neutron_sdk::interchain_queries::{
types::{COSMOS_SDK_TRANSFER_MSG_URL, RECIPIENT_FIELD},
},
};
use neutron_sdk::sudo::msg::SudoMsg;
use neutron_sdk::sudo::msg::{Height, SudoMsg};
use neutron_sdk::{NeutronError, NeutronResult};

use neutron_sdk::interchain_queries::sudo::Height;
use neutron_sdk::interchain_queries::types::{
QueryType, TransactionFilterItem, TransactionFilterOp, TransactionFilterValue,
};
Expand Down
2 changes: 1 addition & 1 deletion contracts/neutron_interchain_queries/src/testing/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use cosmwasm_std::{
from_json, Addr, Binary, Coin, Decimal, Env, MessageInfo, OwnedDeps, StdError, Uint128,
};
use neutron_sdk::interchain_queries::helpers::{decode_and_convert, kv_key_from_string};
use neutron_sdk::interchain_queries::sudo::Height as SudoHeight;
use neutron_sdk::interchain_queries::types::{
QueryType, TransactionFilterItem, TransactionFilterOp, TransactionFilterValue,
};
Expand All @@ -32,6 +31,7 @@ use neutron_sdk::interchain_queries::v047::types::{
Balances, FeePool, GovernmentProposal, Proposal, SigningInfo, StakingValidator, StdDelegation,
TallyResult, TotalSupply, Validator, ValidatorSigningInfo, RECIPIENT_FIELD, STAKING_PARAMS_KEY,
};
use neutron_sdk::sudo::msg::Height as SudoHeight;
use neutron_std::types::cosmos::base::v1beta1::Coin as StdCoin;
use neutron_std::types::ibc::core::client::v1::Height;
use neutron_std::types::neutron::interchainqueries::{
Expand Down
10 changes: 4 additions & 6 deletions contracts/neutron_interchain_txs/schema/sudo_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,21 +167,19 @@
"type": "string"
},
"Height": {
"description": "Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients\n\nNormally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset",
"description": "Height is used for sudo call for `TxQueryResult` enum variant type",
"type": "object",
"required": [
"revision_height",
"revision_number"
],
"properties": {
"revision_height": {
"description": "the height within the given revision",
"description": "*height** is a height of remote chain",
"default": 0,
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"revision_number": {
"description": "the revision that the client is currently on",
"default": 0,
"type": "integer",
"format": "uint64",
"minimum": 0.0
Expand Down
1 change: 0 additions & 1 deletion packages/neutron-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ tendermint-proto = { workspace = true }
speedate = { workspace = true }
chrono = { version = "0.4.22", default-features = false }
neutron-std = { workspace = true }
neutron-std-derive = { version = "0.20.1", path = "../neutron-std-derive" }

[dev-dependencies]
base64 = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion packages/neutron-sdk/src/bindings/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

#[deprecated(
note = "Please use neutron-std autogenerated messages instead of wasmbindings",
note = "Please use neutron-std grpc messages instead of wasmbindings",
since = "0.12.0"
)]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
Expand Down
1 change: 0 additions & 1 deletion packages/neutron-sdk/src/interchain_queries/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pub mod helpers;
pub mod hex;
pub mod queries;
pub mod sudo;
pub mod types;
pub mod v045;
pub mod v047;
Expand Down
13 changes: 0 additions & 13 deletions packages/neutron-sdk/src/interchain_queries/sudo.rs

This file was deleted.

13 changes: 12 additions & 1 deletion packages/neutron-sdk/src/sudo/msg.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crate::interchain_queries::sudo::Height;
use cosmwasm_std::Binary;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -70,3 +69,15 @@ pub enum TransferSudoMsg {
request: RequestPacket,
},
}

/// Height is used for sudo call for `TxQueryResult` enum variant type
#[derive(Default, Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub struct Height {
/// the revision that the client is currently on
#[serde(default)]
pub revision_number: u64,
/// **height** is a height of remote chain
#[serde(default)]
pub revision_height: u64,
}
24 changes: 0 additions & 24 deletions packages/neutron-std-derive/Cargo.toml

This file was deleted.

227 changes: 0 additions & 227 deletions packages/neutron-std-derive/src/lib.rs

This file was deleted.

6 changes: 0 additions & 6 deletions packages/neutron-std-derive/tests/main.rs

This file was deleted.

Loading

0 comments on commit c0fdaa1

Please sign in to comment.