Skip to content

Commit

Permalink
dev contract to test dex bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
swelf19 committed Nov 14, 2023
1 parent 7a0c226 commit 31c80cc
Show file tree
Hide file tree
Showing 14 changed files with 1,403 additions and 28 deletions.
45 changes: 44 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 13 additions & 16 deletions artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
c0190cf28da64b4058da71a9083c187d45f84ee7b9db11a0830025ecb0a687dc client_updater.wasm
4ee0b1e8a1c39e7a440f236778e76935f29506f354b6a59712d267181da77678 echo.wasm
ce5e308994094fbf5b339fd4ae761d9ff38db7dfa7fe17c10c86f942ec050509 ibc_transfer-x86_64.wasm
cf4b2b555032cffa472b98122dee6d6c8f53d07be31c2565d651b4941584f4f1 ibc_transfer.wasm
af52c56fb25355afa04d86c7d9e867f9db9295a455fb8a89f9cfdbd6374dd1ff msg_receiver.wasm
5e10902809cdff421e1fa33aa390f085f7f378fd767c929fb30db581c6a6a4ef neutron_interchain_queries-x86_64.wasm
05e49fb2d0295c9a9e27a0077da856126f8285c2e949cb1f927f08fa8a867c8e neutron_interchain_queries.wasm
867c5235f0dc7fa15b1e175173ffeab24776cfe2c79ff0a62962ef17b10669c8 neutron_interchain_txs-x86_64.wasm
e80d5b9b68d9a1a7d00fd8f13cf52157c8fb50989b6e28e3ea5c69211b384b06 neutron_interchain_txs.wasm
344ec19c522cc5e6135a77a181345f02a0f65ef19ad919d5236dc16f53d33e76 neutron_price_feed_mock.wasm
2dac4d3a4bf9239291205a2d4840aac3664a24faecd143d66ad9ef690beffbd7 neutron_validators_test-x86_64.wasm
4678704ef3ffd9f1240b719991dc629623929fa75499fd6ed9f76eda4c8a556a neutron_validators_test.wasm
68ab8e8f880300ec82912a1b686e0e0535ad06f8d5c3050bf2f815eb5fe8d4d3 reflect-x86_64.wasm
c24970beb5a08bfc73dc422e63207342343802a329f28d527b4accaaf66209f8 reflect.wasm
d4f2b08d01566df34a150e7a48b7b143efaa2787de2a1245d7c1cb9276662fb7 stargate_querier.wasm
a9ee139212dca756adbde1e86723154b1fd79dc96cbc7e4885a851d8c978e946 tokenfactory.wasm
0087fdbcf7ee06a49fbda882ce83c75a0001edbb801e26500b894c8e6627010a before_send_hook_test-x86_64.wasm
37038e0be3b11d0d9995623cabdc1ff4631fe51de0255582bd5034a8b87439d0 client_updater-x86_64.wasm
3b8eba37d63f3177b9ea8ccee67ed4d8cf5a5abc53f56d578508a1188fbc99d1 dex-x86_64.wasm
d72be13a225ce00c97392784f0b6f3b505cb8133a83808b53a95c5e9ed98b3ed echo-x86_64.wasm
f65741a936b596696a29fc9bdf9ec4567cad3722a15f75a0d659f2b3a9ab1d64 ibc_transfer-x86_64.wasm
fac774830d6242494b8fd530052d8ed4365498220541e137284aefbf64337b24 msg_receiver-x86_64.wasm
a645a35fecaa37edc5aed9540f8b4e322b0d1f4d875e79e378a03a04f976eb1a neutron_price_feed_mock-x86_64.wasm
80629b4e1d82cdfa3a88cd04eeecc366eb8795b4a194c9a961d9fc11541188ff neutron_interchain_queries-x86_64.wasm
cdc6a338ac32812e7fd5a5ee8e2fc72c332a1557e1560ac1e0e1cf7d914c85e1 neutron_interchain_txs-x86_64.wasm
4631c30073448d1fc59035a62706d5107f2ad56933668a41d988ff52d218cbf0 neutron_validators_test-x86_64.wasm
4fdfd01aae515dce4bade05be8b59c2f0b2e8c8da6852eb3d3d1c0ea728dd099 reflect-x86_64.wasm
1bc336fd5a827019c87264cf15abb3f284f8da2c551597e3f59ca3a840bb9faf stargate_querier-x86_64.wasm
ff592f20c448e37f7697f17de5c86e4b1ce60414d763efb704f71b32ad61e7bf tokenfactory-x86_64.wasm
24 changes: 13 additions & 11 deletions artifacts/checksums_intermediate.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
b388b89207c69e9e243f5acf64b761e1cf1116adcc2d79e4eb59bf8cb6c9b99a target/wasm32-unknown-unknown/release/ibc_transfer.wasm
d89ba235e130977d1f79ac4d7f9252f6f6bed3002dfc1d08227ba138acec70b1 target/wasm32-unknown-unknown/release/client_updater.wasm
a67c60c5853497b890d67dd2bfed1caf0984a03af01ec67c877e63688970814e target/wasm32-unknown-unknown/release/echo.wasm
f1ec0aa2f9c84a8b0d63d877fb6dcaf2d25c30023740f3ef53072496124c7dce target/wasm32-unknown-unknown/release/msg_receiver.wasm
b09e4f513e19e78b5ea08e10d26dc4d61056a4c6f534e783039f32494c39021b target/wasm32-unknown-unknown/release/neutron_interchain_queries.wasm
87924a496ac48e2581587f17a234e409f266b5deacc063a506bdeb43766e621e target/wasm32-unknown-unknown/release/neutron_interchain_txs.wasm
e947d71ddeb4f6e61d756b48981bedae6973e0b25a9d873c3bba5e9878079d8b target/wasm32-unknown-unknown/release/neutron_price_feed_mock.wasm
8893279611c69a5ca55628f0476e943ca60b8900cb0ae17fefc2f38c4e472215 target/wasm32-unknown-unknown/release/neutron_validators_test.wasm
b260fdda36208b9017f0f142821fa3bb47f3d3dea86901d687cf3d3da00946e0 target/wasm32-unknown-unknown/release/reflect.wasm
8b02c1c4e8536bb8a5be00b45993dd45ac9f9f996df2b66f0ca72e71d9598e69 target/wasm32-unknown-unknown/release/stargate_querier.wasm
fc80abbf059bafa21b25162af22ddb963a1ea1c6ab4dd671855adb3e1f8a8a84 target/wasm32-unknown-unknown/release/tokenfactory.wasm
8c7004b7d8d23d9ec193b4f603bb0370a2962fd362a2c06f6ef634f5f86c4f3a before_send_hook_test.wasm
82e05994b5ccfb6d06d29ccc2e2965b8c6c4805b6a2699eb857096608a2eec0a client_updater.wasm
77a84e60ff062eb4131310d59882b76f1381e66c36311fa8e2cb0bef3edbb09d dex.wasm
f39a345f49d72c01ef99afff01fa259085f2301f0643b27721446633b462e16e echo.wasm
9940322a86da6f2512d526dd28c5f4057eae77119153763853e211082f76f750 ibc_transfer.wasm
43bdbfcd7c6015b557e1798e93f13fdc15cd4e662faffc714d2e78e5e0a8e3e5 msg_receiver.wasm
068691ad69d62c89173ef12fa209c2ddbb64a368d2c7fe4c284bed3ae84436ba neutron_price_feed_mock.wasm
7dc6f43e470458732faab4a92f9170f8971628f2756f85dea9f975329b8d3b73 neutron_interchain_queries.wasm
eb7667972cbdb94b4fe86351ca9ce0b0afb53a9e3a8578e9feb1e5329725f469 neutron_interchain_txs.wasm
cf5ca0fe134843c2e5837ad533bbc5e879404e693cee035810e108b9e67add82 neutron_validators_test.wasm
536842f6cfe2eaeac3b3f9eb62d9adf16ada54e4815abd2bb6ab4c6735ddcad5 reflect.wasm
03d5bdc03c9621d136671182c98d393307217f1bacd26da0f97667eff2bbac89 stargate_querier.wasm
e8029e711ba381ba851b45bf5053e52244ee8c5978c799ba1f38b6a743144dcd tokenfactory.wasm
6 changes: 6 additions & 0 deletions contracts/dex/.cargo/config
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 --features backtraces"
integration-test = "test --test integration"
schema = "run --example schema"
43 changes: 43 additions & 0 deletions contracts/dex/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[package]
name = "dex"
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"]

[profile.release]
opt-level = 3
debug = false
rpath = false
lto = true
debug-assertions = false
codegen-units = 1
panic = 'abort'
incremental = false
overflow-checks = true

[features]
# for quicker tests, cargo test --lib
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
library = []

[dependencies]
cosmwasm-std = "1.3.1"
cw2 = "1.1.0"
schemars = "0.8.10"
serde = { version = "1.0.180", default-features = false, features = ["derive"] }
neutron-sdk = { package = "neutron-sdk", path = "../../../neutron-sdk/packages/neutron-sdk/" }

[dev-dependencies]
cosmwasm-schema = { version = "1.3.1", default-features = false }
3 changes: 3 additions & 0 deletions contracts/dex/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Dex

This contract is used for tests in the main neutron repository.
31 changes: 31 additions & 0 deletions contracts/dex/examples/schema.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// 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 dex::contract::InstantiateMsg;
use neutron_sdk::bindings::{msg::DexMsg, query::DexQuery};

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!(DexMsg), &out_dir);
export_schema(&schema_for!(DexQuery), &out_dir);
}
Loading

0 comments on commit 31c80cc

Please sign in to comment.