-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9918d0f
commit 100af21
Showing
13 changed files
with
1,196 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
contracts/docs/interchainqueries/howto/register_tx_icq/.cargo/config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[alias] | ||
wasm = "build --release --target wasm32-unknown-unknown" | ||
wasm-debug = "build --target wasm32-unknown-unknown" | ||
unit-test = "test --lib" | ||
integration-test = "test --test integration" | ||
schema = "run --example contracts/docs/interchainqueries/howto/register_kv_icq-schema" |
34 changes: 34 additions & 0 deletions
34
contracts/docs/interchainqueries/howto/register_tx_icq/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[package] | ||
name = "howto_register_tx_icq" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
exclude = [ | ||
# Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. | ||
"contract.wasm", | ||
"hash.txt", | ||
] | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[lib] | ||
crate-type = ["cdylib", "rlib"] | ||
|
||
[features] | ||
library = [] | ||
|
||
[dependencies] | ||
cosmwasm-std = { workspace = true, features = ["stargate", "staking"] } | ||
cw2 = { workspace = true } | ||
schemars = { workspace = true } | ||
serde = { workspace = true } | ||
neutron-sdk = { workspace = true } | ||
neutron-std = { workspace = true } | ||
cosmos-sdk-proto = { workspace = true } | ||
cw-storage-plus = { workspace = true } | ||
prost = { workspace = true } | ||
serde-json-wasm = { workspace = true } | ||
|
||
[dev-dependencies] | ||
base64 = { workspace = true } | ||
cosmwasm-schema = { workspace = true } |
11 changes: 11 additions & 0 deletions
11
contracts/docs/interchainqueries/howto/register_tx_icq/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Validators Registry | ||
|
||
CURRENT_DIR = $(shell pwd) | ||
CURRENT_DIR_RELATIVE = $(notdir $(shell pwd)) | ||
|
||
clippy: | ||
rustup component add clippy || true | ||
cargo clippy --all-targets --all-features --workspace -- -D warnings | ||
|
||
test: clippy | ||
cargo unit-test |
3 changes: 3 additions & 0 deletions
3
contracts/docs/interchainqueries/howto/register_tx_icq/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# HowTo register a TX Interchain Query contract | ||
|
||
A simple contract that implements the flow described in the [How to register a TX Interchain Query](https://docs.neutron.org/neutron/modules/interchain-queries/how-to#how-to-register-a-tx-interchain-query) documentation section. |
30 changes: 30 additions & 0 deletions
30
...ocs/interchainqueries/howto/register_tx_icq/examples/neutron_interchain_queries-schema.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2022 Neutron | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
use std::env::current_dir; | ||
use std::fs::create_dir_all; | ||
|
||
use cosmwasm_schema::{export_schema, remove_schemas, schema_for}; | ||
use howto_register_kv_icq::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; | ||
|
||
fn main() { | ||
let mut out_dir = current_dir().unwrap(); | ||
out_dir.push("schema"); | ||
create_dir_all(&out_dir).unwrap(); | ||
remove_schemas(&out_dir).unwrap(); | ||
|
||
export_schema(&schema_for!(InstantiateMsg), &out_dir); | ||
export_schema(&schema_for!(ExecuteMsg), &out_dir); | ||
export_schema(&schema_for!(QueryMsg), &out_dir); | ||
} |
Oops, something went wrong.