Skip to content

Commit

Permalink
fix make schema
Browse files Browse the repository at this point in the history
  • Loading branch information
NeverHappened committed Oct 16, 2024
1 parent 599d9ad commit 741b978
Show file tree
Hide file tree
Showing 7 changed files with 636 additions and 53 deletions.
36 changes: 14 additions & 22 deletions contracts/neutron_interchain_queries/schema/execute_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -364,16 +364,15 @@
"update_interchain_query": {
"type": "object",
"required": [
"new_keys",
"new_update_period",
"query_id"
],
"properties": {
"new_keys": {
"type": [
"array",
"null"
],
"type": "array",
"items": {
"$ref": "#/definitions/KVKey"
"$ref": "#/definitions/KvKey"
}
},
"new_recipient": {
Expand All @@ -383,10 +382,7 @@
]
},
"new_update_period": {
"type": [
"integer",
"null"
],
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
Expand Down Expand Up @@ -426,28 +422,24 @@
}
],
"definitions": {
"Binary": {
"description": "Binary is a wrapper around Vec<u8> to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec<u8>. See also <https://github.com/CosmWasm/cosmwasm/blob/main/docs/MESSAGE_TYPES.md>.",
"type": "string"
},
"KVKey": {
"description": "Describes a KV key for which you want to get value from the storage on remote chain",
"KvKey": {
"type": "object",
"required": [
"key",
"path"
],
"properties": {
"key": {
"description": "*key** is a key you want to read from the storage",
"allOf": [
{
"$ref": "#/definitions/Binary"
}
]
"description": "Key you want to read from the storage",
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
},
"path": {
"description": "*path** is a path to the storage (storage prefix) where you want to read value by key (usually name of cosmos-packages module: 'staking', 'bank', etc.)",
"description": "Path (storage prefix) to the storage where you want to read value by key (usually name of cosmos-sdk module: 'staking', 'bank', etc.)",
"type": "string"
}
},
Expand Down
40 changes: 28 additions & 12 deletions contracts/neutron_interchain_txs/schema/execute_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"ordering": {
"anyOf": [
{
"$ref": "#/definitions/ChannelOrdering"
"$ref": "#/definitions/Order"
},
{
"type": "null"
Expand Down Expand Up @@ -132,32 +132,48 @@
}
],
"definitions": {
"ChannelOrdering": {
"type": "string",
"enum": [
"ORDER_ORDERED",
"ORDER_UNORDERED"
]
},
"Coin": {
"description": "Coin defines a token with a denomination and an amount.\n\nNOTE: The amount field is an Int which implements the custom method signatures required by gogoproto.",
"type": "object",
"required": [
"amount",
"denom"
],
"properties": {
"amount": {
"$ref": "#/definitions/Uint128"
"type": "string"
},
"denom": {
"type": "string"
}
},
"additionalProperties": false
},
"Uint128": {
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
"type": "string"
"Order": {
"description": "Order defines if a channel is ORDERED or UNORDERED",
"oneOf": [
{
"description": "zero-value for channel ordering",
"type": "string",
"enum": [
"NoneUnspecified"
]
},
{
"description": "packets can be delivered in any order, which may differ from the order in which they were sent.",
"type": "string",
"enum": [
"Unordered"
]
},
{
"description": "packets are delivered exactly in the order which they were sent",
"type": "string",
"enum": [
"Ordered"
]
}
]
}
}
}

This file was deleted.

9 changes: 6 additions & 3 deletions contracts/neutron_interchain_txs/schema/sudo_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,21 @@
"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",
"type": "object",
"required": [
"revision_height",
"revision_number"
],
"properties": {
"revision_height": {
"description": "*height** is a height of remote chain",
"default": 0,
"description": "the height within the given revision",
"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
2 changes: 1 addition & 1 deletion packages/neutron-sdk/.cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
wasm = "build --release --target wasm32-unknown-unknown"
wasm-debug = "build --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --bin neutron-sdk-schema"
schema = "run --bin neutron_sdk_schema"
Loading

0 comments on commit 741b978

Please sign in to comment.