diff --git a/Cargo.toml b/Cargo.toml index bce416e6..fa322759 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,62 +1,4 @@ -[package] -name = "app" -version = "0.0.1" -authors = [ - "CyberHoward ", - "Adair ", - "Abstract Money ", -] -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 diff --git a/contracts/savings-app/Cargo.toml b/contracts/savings-app/Cargo.toml new file mode 100644 index 00000000..bce416e6 --- /dev/null +++ b/contracts/savings-app/Cargo.toml @@ -0,0 +1,62 @@ +[package] +name = "app" +version = "0.0.1" +authors = [ + "CyberHoward ", + "Adair ", + "Abstract Money ", +] +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"] } diff --git a/artifacts/app.wasm b/contracts/savings-app/artifacts/app.wasm similarity index 100% rename from artifacts/app.wasm rename to contracts/savings-app/artifacts/app.wasm diff --git a/artifacts/checksums.txt b/contracts/savings-app/artifacts/checksums.txt similarity index 100% rename from artifacts/checksums.txt rename to contracts/savings-app/artifacts/checksums.txt diff --git a/artifacts/checksums_intermediate.txt b/contracts/savings-app/artifacts/checksums_intermediate.txt similarity index 100% rename from artifacts/checksums_intermediate.txt rename to contracts/savings-app/artifacts/checksums_intermediate.txt diff --git a/example.env b/contracts/savings-app/example.env similarity index 100% rename from example.env rename to contracts/savings-app/example.env diff --git a/examples/deploy.rs b/contracts/savings-app/examples/deploy.rs similarity index 100% rename from examples/deploy.rs rename to contracts/savings-app/examples/deploy.rs diff --git a/examples/schema.rs b/contracts/savings-app/examples/schema.rs similarity index 100% rename from examples/schema.rs rename to contracts/savings-app/examples/schema.rs diff --git a/examples/test-local.rs b/contracts/savings-app/examples/test-local.rs similarity index 100% rename from examples/test-local.rs rename to contracts/savings-app/examples/test-local.rs diff --git a/metadata.json b/contracts/savings-app/metadata.json similarity index 100% rename from metadata.json rename to contracts/savings-app/metadata.json diff --git a/packages/typescript/.gitattributes b/contracts/savings-app/packages/typescript/.gitattributes similarity index 100% rename from packages/typescript/.gitattributes rename to contracts/savings-app/packages/typescript/.gitattributes diff --git a/packages/typescript/.gitignore b/contracts/savings-app/packages/typescript/.gitignore similarity index 100% rename from packages/typescript/.gitignore rename to contracts/savings-app/packages/typescript/.gitignore diff --git a/packages/typescript/LICENSE b/contracts/savings-app/packages/typescript/LICENSE similarity index 100% rename from packages/typescript/LICENSE rename to contracts/savings-app/packages/typescript/LICENSE diff --git a/packages/typescript/README.md b/contracts/savings-app/packages/typescript/README.md similarity index 100% rename from packages/typescript/README.md rename to contracts/savings-app/packages/typescript/README.md diff --git a/packages/typescript/jest.config.js b/contracts/savings-app/packages/typescript/jest.config.js similarity index 100% rename from packages/typescript/jest.config.js rename to contracts/savings-app/packages/typescript/jest.config.js diff --git a/packages/typescript/package-lock.json b/contracts/savings-app/packages/typescript/package-lock.json similarity index 100% rename from packages/typescript/package-lock.json rename to contracts/savings-app/packages/typescript/package-lock.json diff --git a/packages/typescript/package.json b/contracts/savings-app/packages/typescript/package.json similarity index 100% rename from packages/typescript/package.json rename to contracts/savings-app/packages/typescript/package.json diff --git a/packages/typescript/rollup.config.js b/contracts/savings-app/packages/typescript/rollup.config.js similarity index 100% rename from packages/typescript/rollup.config.js rename to contracts/savings-app/packages/typescript/rollup.config.js diff --git a/packages/typescript/scripts/codegen.js b/contracts/savings-app/packages/typescript/scripts/codegen.js similarity index 100% rename from packages/typescript/scripts/codegen.js rename to contracts/savings-app/packages/typescript/scripts/codegen.js diff --git a/packages/typescript/src/contracts/Template.client.ts b/contracts/savings-app/packages/typescript/src/contracts/Template.client.ts similarity index 100% rename from packages/typescript/src/contracts/Template.client.ts rename to contracts/savings-app/packages/typescript/src/contracts/Template.client.ts diff --git a/packages/typescript/src/contracts/Template.message-composer.ts b/contracts/savings-app/packages/typescript/src/contracts/Template.message-composer.ts similarity index 100% rename from packages/typescript/src/contracts/Template.message-composer.ts rename to contracts/savings-app/packages/typescript/src/contracts/Template.message-composer.ts diff --git a/packages/typescript/src/contracts/Template.msg-builder.ts b/contracts/savings-app/packages/typescript/src/contracts/Template.msg-builder.ts similarity index 100% rename from packages/typescript/src/contracts/Template.msg-builder.ts rename to contracts/savings-app/packages/typescript/src/contracts/Template.msg-builder.ts diff --git a/packages/typescript/src/contracts/Template.types.ts b/contracts/savings-app/packages/typescript/src/contracts/Template.types.ts similarity index 100% rename from packages/typescript/src/contracts/Template.types.ts rename to contracts/savings-app/packages/typescript/src/contracts/Template.types.ts diff --git a/packages/typescript/src/contracts/index.ts b/contracts/savings-app/packages/typescript/src/contracts/index.ts similarity index 100% rename from packages/typescript/src/contracts/index.ts rename to contracts/savings-app/packages/typescript/src/contracts/index.ts diff --git a/packages/typescript/tsconfig.bundle.json b/contracts/savings-app/packages/typescript/tsconfig.bundle.json similarity index 100% rename from packages/typescript/tsconfig.bundle.json rename to contracts/savings-app/packages/typescript/tsconfig.bundle.json diff --git a/packages/typescript/tsconfig.json b/contracts/savings-app/packages/typescript/tsconfig.json similarity index 100% rename from packages/typescript/tsconfig.json rename to contracts/savings-app/packages/typescript/tsconfig.json diff --git a/packages/typescript/typedoc.json b/contracts/savings-app/packages/typescript/typedoc.json similarity index 100% rename from packages/typescript/typedoc.json rename to contracts/savings-app/packages/typescript/typedoc.json diff --git a/schema/execute_msg.json b/contracts/savings-app/schema/execute_msg.json similarity index 100% rename from schema/execute_msg.json rename to contracts/savings-app/schema/execute_msg.json diff --git a/schema/instantiate_msg.json b/contracts/savings-app/schema/instantiate_msg.json similarity index 100% rename from schema/instantiate_msg.json rename to contracts/savings-app/schema/instantiate_msg.json diff --git a/schema/migrate_msg.json b/contracts/savings-app/schema/migrate_msg.json similarity index 100% rename from schema/migrate_msg.json rename to contracts/savings-app/schema/migrate_msg.json diff --git a/schema/module-schema.json b/contracts/savings-app/schema/module-schema.json similarity index 100% rename from schema/module-schema.json rename to contracts/savings-app/schema/module-schema.json diff --git a/schema/query_msg.json b/contracts/savings-app/schema/query_msg.json similarity index 100% rename from schema/query_msg.json rename to contracts/savings-app/schema/query_msg.json diff --git a/schema/raw/execute.json b/contracts/savings-app/schema/raw/execute.json similarity index 100% rename from schema/raw/execute.json rename to contracts/savings-app/schema/raw/execute.json diff --git a/schema/raw/instantiate.json b/contracts/savings-app/schema/raw/instantiate.json similarity index 100% rename from schema/raw/instantiate.json rename to contracts/savings-app/schema/raw/instantiate.json diff --git a/schema/raw/migrate.json b/contracts/savings-app/schema/raw/migrate.json similarity index 100% rename from schema/raw/migrate.json rename to contracts/savings-app/schema/raw/migrate.json diff --git a/schema/raw/query.json b/contracts/savings-app/schema/raw/query.json similarity index 100% rename from schema/raw/query.json rename to contracts/savings-app/schema/raw/query.json diff --git a/schema/raw/response_to_base_admin.json b/contracts/savings-app/schema/raw/response_to_base_admin.json similarity index 100% rename from schema/raw/response_to_base_admin.json rename to contracts/savings-app/schema/raw/response_to_base_admin.json diff --git a/schema/raw/response_to_base_config.json b/contracts/savings-app/schema/raw/response_to_base_config.json similarity index 100% rename from schema/raw/response_to_base_config.json rename to contracts/savings-app/schema/raw/response_to_base_config.json diff --git a/schema/raw/response_to_config.json b/contracts/savings-app/schema/raw/response_to_config.json similarity index 100% rename from schema/raw/response_to_config.json rename to contracts/savings-app/schema/raw/response_to_config.json diff --git a/schema/raw/response_to_module_data.json b/contracts/savings-app/schema/raw/response_to_module_data.json similarity index 100% rename from schema/raw/response_to_module_data.json rename to contracts/savings-app/schema/raw/response_to_module_data.json diff --git a/src/contract.rs b/contracts/savings-app/src/contract.rs similarity index 100% rename from src/contract.rs rename to contracts/savings-app/src/contract.rs diff --git a/src/error.rs b/contracts/savings-app/src/error.rs similarity index 100% rename from src/error.rs rename to contracts/savings-app/src/error.rs diff --git a/src/handlers/execute.rs b/contracts/savings-app/src/handlers/execute.rs similarity index 100% rename from src/handlers/execute.rs rename to contracts/savings-app/src/handlers/execute.rs diff --git a/src/handlers/instantiate.rs b/contracts/savings-app/src/handlers/instantiate.rs similarity index 100% rename from src/handlers/instantiate.rs rename to contracts/savings-app/src/handlers/instantiate.rs diff --git a/src/handlers/migrate.rs b/contracts/savings-app/src/handlers/migrate.rs similarity index 100% rename from src/handlers/migrate.rs rename to contracts/savings-app/src/handlers/migrate.rs diff --git a/src/handlers/mod.rs b/contracts/savings-app/src/handlers/mod.rs similarity index 100% rename from src/handlers/mod.rs rename to contracts/savings-app/src/handlers/mod.rs diff --git a/src/handlers/query.rs b/contracts/savings-app/src/handlers/query.rs similarity index 100% rename from src/handlers/query.rs rename to contracts/savings-app/src/handlers/query.rs diff --git a/src/lib.rs b/contracts/savings-app/src/lib.rs similarity index 100% rename from src/lib.rs rename to contracts/savings-app/src/lib.rs diff --git a/src/msg.rs b/contracts/savings-app/src/msg.rs similarity index 100% rename from src/msg.rs rename to contracts/savings-app/src/msg.rs diff --git a/src/replies/instantiate.rs b/contracts/savings-app/src/replies/instantiate.rs similarity index 100% rename from src/replies/instantiate.rs rename to contracts/savings-app/src/replies/instantiate.rs diff --git a/src/replies/mod.rs b/contracts/savings-app/src/replies/mod.rs similarity index 100% rename from src/replies/mod.rs rename to contracts/savings-app/src/replies/mod.rs diff --git a/src/state.rs b/contracts/savings-app/src/state.rs similarity index 100% rename from src/state.rs rename to contracts/savings-app/src/state.rs diff --git a/tests/integration.rs b/contracts/savings-app/tests/integration.rs similarity index 98% rename from tests/integration.rs rename to contracts/savings-app/tests/integration.rs index 311bec1a..d7344aa1 100644 --- a/tests/integration.rs +++ b/contracts/savings-app/tests/integration.rs @@ -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(()) } diff --git a/tests/wasm.rs b/contracts/savings-app/tests/wasm.rs similarity index 100% rename from tests/wasm.rs rename to contracts/savings-app/tests/wasm.rs diff --git a/savings-bot/Cargo.toml b/savings-bot/Cargo.toml new file mode 100644 index 00000000..ee15b16e --- /dev/null +++ b/savings-bot/Cargo.toml @@ -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" } diff --git a/savings-bot/src/main.rs b/savings-bot/src/main.rs new file mode 100644 index 00000000..e7a11a96 --- /dev/null +++ b/savings-bot/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}