Skip to content

Commit

Permalink
Split into bot and app
Browse files Browse the repository at this point in the history
  • Loading branch information
Buckram123 committed Jan 16, 2024
1 parent b17c6f3 commit cab5783
Show file tree
Hide file tree
Showing 56 changed files with 78 additions and 62 deletions.
64 changes: 3 additions & 61 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,62 +1,4 @@
[package]
name = "app"
version = "0.0.1"
authors = [
"CyberHoward <[email protected]>",
"Adair <[email protected]>",
"Abstract Money <[email protected]>",
]
edition = "2021"
homepage = ""
documentation = ""
repository = ""
license = "GPL-3.0-or-later"
keywords = ["cosmos", "cosmwasm", "abstractsdk"]
[workspace]
members = ["contracts/*", "savings-bot"]
resolver = "2"

exclude = ["contract.wasm", "hash.txt"]

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

[[example]]
name = "schema"
required-features = ["schema"]

[features]
default = ["export"]
export = []
# enable node-backed tests (ensure Docker is running)
# run with `cargo test --jobs 1 --features node-tests`
node-tests = ["interface"]
interface = ["export", "dep:abstract-interface", "dep:cw-orch"]
schema = ["abstract-app/schema"]

[dependencies]
cosmwasm-std = { version = "1.2" }
cosmwasm-schema = { version = "1.2" }
cw-controllers = { version = "1.0.1" }
cw-storage-plus = "1.1.0"
thiserror = { version = "1.0.50" }
schemars = "0.8"
cw-asset = { version = "3.0" }

abstract-core = { version = "0.19.2" }
abstract-app = { version = "0.19.2" }
abstract-sdk = { version = "0.19.2" }

# Dependencies for interface
abstract-interface = { version = "0.19.2", optional = true }
cw-orch = { version = "0.16.4", optional = true }

[dev-dependencies]
app = { path = ".", features = ["interface"] }
abstract-interface = { version = "0.19.2", features = ["daemon"] }
abstract-testing = { version = "0.19.2" }
abstract-sdk = { version = "0.19.2", features = ["test-utils"] }
speculoos = "0.11.0"
semver = "1.0"
dotenv = "0.15.0"
env_logger = "0.10.0"
cw-orch = { version = "0.16.3", features = ["daemon"] }
clap = { version = "4.3.7", features = ["derive"] }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
62 changes: 62 additions & 0 deletions contracts/savings-app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[package]
name = "app"
version = "0.0.1"
authors = [
"CyberHoward <[email protected]>",
"Adair <[email protected]>",
"Abstract Money <[email protected]>",
]
edition = "2021"
homepage = ""
documentation = ""
repository = ""
license = "GPL-3.0-or-later"
keywords = ["cosmos", "cosmwasm", "abstractsdk"]
resolver = "2"

exclude = ["contract.wasm", "hash.txt"]

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

[[example]]
name = "schema"
required-features = ["schema"]

[features]
default = ["export"]
export = []
# enable node-backed tests (ensure Docker is running)
# run with `cargo test --jobs 1 --features node-tests`
node-tests = ["interface"]
interface = ["export", "dep:abstract-interface", "dep:cw-orch"]
schema = ["abstract-app/schema"]

[dependencies]
cosmwasm-std = { version = "1.2" }
cosmwasm-schema = { version = "1.2" }
cw-controllers = { version = "1.0.1" }
cw-storage-plus = "1.1.0"
thiserror = { version = "1.0.50" }
schemars = "0.8"
cw-asset = { version = "3.0" }

abstract-core = { version = "0.19.2" }
abstract-app = { version = "0.19.2" }
abstract-sdk = { version = "0.19.2" }

# Dependencies for interface
abstract-interface = { version = "0.19.2", optional = true }
cw-orch = { version = "0.16.4", optional = true }

[dev-dependencies]
app = { path = ".", features = ["interface"] }
abstract-interface = { version = "0.19.2", features = ["daemon"] }
abstract-testing = { version = "0.19.2" }
abstract-sdk = { version = "0.19.2", features = ["test-utils"] }
speculoos = "0.11.0"
semver = "1.0"
dotenv = "0.15.0"
env_logger = "0.10.0"
cw-orch = { version = "0.16.3", features = ["daemon"] }
clap = { version = "4.3.7", features = ["derive"] }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fn successful_reset() -> anyhow::Result<()> {

app.call_as(&account.manager.address()?).reset(42)?;
let count: CountResponse = app.count()?;
assert_eq!(count.count, 6);
assert_eq!(count.count, 42);
Ok(())
}

Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions savings-bot/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "savings-bot"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
cw-orch = { version = "0.19" }
3 changes: 3 additions & 0 deletions savings-bot/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

0 comments on commit cab5783

Please sign in to comment.