Skip to content

Commit

Permalink
Add osmosis implementation (#3)
Browse files Browse the repository at this point in the history
* Add osmosis implementation

* Working instantiation

* Update instantiation test

* Add deposit test

* Set rust version to 1.69

CosmWasm/cosmwasm#1727

* Revert "Set rust version to 1.69"

This reverts commit 96871d4.

* Set toolchain version to 1.69.0

* Add additional deposit test

* Add failing test

* Fix fmt errors

* commit

* Add rewards test

* Remove summary

* Add further tests

---------

Co-authored-by: Max <[email protected]>
  • Loading branch information
shapeshed and maxrobot authored Jun 23, 2023
1 parent 28e1797 commit 0577eb0
Show file tree
Hide file tree
Showing 79 changed files with 4,872 additions and 4,058 deletions.
1,321 changes: 1,169 additions & 152 deletions Cargo.lock

Large diffs are not rendered by default.

46 changes: 24 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[workspace]
members = [
"contracts/vault",
"contracts/vault/*",
"integration-tests",
"packages/base-vault",
"packages/simple-vault",
]

[workspace.package]
version = "0.0.1"
version = "1.0.0"
authors = [
"George Ornbo <[email protected]>",
"Friedrich Grabner <[email protected]>",
Expand All @@ -18,30 +20,30 @@ documentation = "https://docs.foo.bar/"
keywords = ["cosmos", "cosmwasm"]

[workspace.dependencies]
anyhow = "1.0.68"
bech32 = "0.9.1"
cw2 = "1.0.1"
cosmwasm-schema = "1.1.9"
cosmwasm-std = "1.1.9"
cw-multi-test = "0.16.1"
cw-storage-plus = "1.0.1"
cw-utils = "1.0.1"
osmosis-std = "0.14.0"
osmosis-test-tube = "15.1.0"
prost = { version = "0.11.5", default-features = false, features = ["prost-derive"] }
schemars = "0.8.11"
serde = { version = "1.0.152", default-features = false, features = ["derive"] }
thiserror = "1.0.38"
anyhow = "1.0.68"
bech32 = "0.9.1"
cw2 = "1.0.1"
cosmwasm-schema = "1.1.9"
cosmwasm-std = "1.1.9"
cw-multi-test = "0.16.1"
cw-storage-plus = "1.0.1"
cw-utils = "1.0.1"
osmosis-std = "0.14.0"
osmosis-test-tube = "15.1.0"
cosmrs = {version = "0.9.0", features = ["cosmwasm"]}
prost = { version = "0.11.5", default-features = false, features = ["prost-derive"] }
schemars = "0.8.11"
serde = { version = "1.0.152", default-features = false, features = ["derive"] }
thiserror = "1.0.38"
apollo-cw-asset = "0.1.0"

# packages
# mars-health = { version = "1.0.0", path = "./packages/health" }
# mars-osmosis = { version = "1.0.0", path = "./packages/chains/osmosis" }
pablo-vault-types = { version = "0.0.1", path = "./packages/types" }
# mars-testing = { version = "1.0.0", path = "./packages/testing" }
# mars-utils = { version = "1.0.0", path = "./packages/utils" }
pablo-vault-types = { version = "1.0.0", path = "./packages/types" }
base-vault = { version = "1.0.0", path = "./packages/base-vault" }
simple-vault = { version = "1.0.0", path = "./packages/simple-vault" }

# contracts
vault = { version = "1.0.0", path = "./contracts/vault" }
osmosis-vault = { version = "1.0.0", path = "./contracts/vault/osmosis-vault" }

[profile.release]
codegen-units = 1
Expand Down
6 changes: 4 additions & 2 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ default_to_workspace = false
ARTIFACTS_DIR_PATH = "target/wasm32-unknown-unknown/release"

[tasks.build]
toolchain = "stable"
# toolchain = "stable"
toolchain = "1.69.0"
command = "cargo"
args = ["build", "--release", "--target", "wasm32-unknown-unknown", "--locked"]

Expand Down Expand Up @@ -39,7 +40,8 @@ command = "cargo"
args = ["test", "--locked", "--workspace", "--exclude", "integration-tests"]

[tasks.integration-test]
toolchain = "stable"
# toolchain = "stable"
toolchain = "1.69.0"
command = "cargo"
args = ["test", "--locked", "--package", "integration-tests"]

Expand Down
49 changes: 49 additions & 0 deletions contracts/vault/osmosis-vault/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[package]
name = "osmosis-vault"
description = "Vault targeting osmosis"
version = { workspace = true }
authors = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
documentation = { workspace = true }
keywords = { workspace = true }

[lib]
crate-type = ["cdylib", "rlib"]
doctest = false

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

[dependencies]
simple-vault = {path = "../../../packages/simple-vault", features = ["lockup", "force-unlock"], default-features = false }

osmosis-std = { git = "https://github.com/osmosis-labs/osmosis-rust.git", rev = "7c1d418" }
cw-vault-standard = { version = "0.2.0", features = ["lockup", "force-unlock"] }
semver = "1"
cosmwasm-schema = { workspace = true }
cosmwasm-std = { workspace = true }
bech32 = { workspace = true }
cw2 = { workspace = true }
cw-storage-plus = { workspace = true }
cw-dex = { version = "0.1.1", features = ["osmosis"] }
pablo-vault-types = { workspace = true }
base-vault = { workspace = true }
thiserror = { workspace = true }
cw-vault-token = "0.1.0"
apollo-cw-asset = "0.1.0"

[dev-dependencies]
cosmwasm-schema = { workspace = true }
serde = { workspace = true }
osmosis-testing = { git = "https://github.com/apollodao/osmosis-rust.git", rev = "430236bd63f26d618e11e59709a56c808c4d427c" }
# cw-it = { git = "https://github.com/apollodao/cw-it.git", rev = "10e6ed7", features = ["osmosis"] }
cw-it = { git = "https://github.com/apollodao/cw-it.git", rev = "efd1763", features = ["osmosis"] }
test-case = "2.2.2"
liquidity-helper = "0.1.0"
cw-dex-router = { version = "0.1.0", features = ["library","osmosis"] }
proptest = "1.0.0"
cw-utils = "1.0.1"
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Mars Utils

Contains helpers for all Mars smart contracts.
# Vault contract

## License

Expand Down
File renamed without changes.
Loading

0 comments on commit 0577eb0

Please sign in to comment.