diff --git a/contracts/Cargo.lock b/contracts/Cargo.lock index 5727d0b..640aa08 100644 --- a/contracts/Cargo.lock +++ b/contracts/Cargo.lock @@ -151,7 +151,7 @@ dependencies = [ ] [[package]] -name = "assetsup_contract" +name = "assetsup" version = "0.1.0" dependencies = [ "soroban-sdk", @@ -639,13 +639,6 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" -[[package]] -name = "hello-world" -version = "0.0.0" -dependencies = [ - "soroban-sdk", -] - [[package]] name = "hex" version = "0.4.3" diff --git a/contracts/Cargo.toml b/contracts/Cargo.toml index 818c67f..1c0a924 100644 --- a/contracts/Cargo.toml +++ b/contracts/Cargo.toml @@ -1,7 +1,7 @@ [workspace] resolver = "2" members = [ - "./hello-world", "assetsup_contract", + "assetsup" ] [workspace.dependencies] diff --git a/contracts/assetsup_contract/Cargo.toml b/contracts/assetsup/Cargo.toml similarity index 89% rename from contracts/assetsup_contract/Cargo.toml rename to contracts/assetsup/Cargo.toml index 1684d38..f72cf29 100644 --- a/contracts/assetsup_contract/Cargo.toml +++ b/contracts/assetsup/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "assetsup_contract" +name = "assetsup" version = "0.1.0" edition = "2024" diff --git a/contracts/assetsup_contract/src/lib.rs b/contracts/assetsup/src/lib.rs similarity index 100% rename from contracts/assetsup_contract/src/lib.rs rename to contracts/assetsup/src/lib.rs diff --git a/contracts/assetsup_contract/src/tests/initialize.rs b/contracts/assetsup/src/tests/initialize.rs similarity index 100% rename from contracts/assetsup_contract/src/tests/initialize.rs rename to contracts/assetsup/src/tests/initialize.rs diff --git a/contracts/assetsup_contract/src/tests/mod.rs b/contracts/assetsup/src/tests/mod.rs similarity index 100% rename from contracts/assetsup_contract/src/tests/mod.rs rename to contracts/assetsup/src/tests/mod.rs diff --git a/contracts/assetsup_contract/test_snapshots/tests/initialize/test_initialize.1.json b/contracts/assetsup/test_snapshots/tests/initialize/test_initialize.1.json similarity index 100% rename from contracts/assetsup_contract/test_snapshots/tests/initialize/test_initialize.1.json rename to contracts/assetsup/test_snapshots/tests/initialize/test_initialize.1.json diff --git a/contracts/assetsup_contract/test_snapshots/tests/initialize/test_initialize_panic.1.json b/contracts/assetsup/test_snapshots/tests/initialize/test_initialize_panic.1.json similarity index 100% rename from contracts/assetsup_contract/test_snapshots/tests/initialize/test_initialize_panic.1.json rename to contracts/assetsup/test_snapshots/tests/initialize/test_initialize_panic.1.json diff --git a/contracts/hello-world/Cargo.toml b/contracts/hello-world/Cargo.toml deleted file mode 100644 index 2e8bb84..0000000 --- a/contracts/hello-world/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "hello-world" -version = "0.0.0" -edition = "2021" -publish = false - -[lib] -crate-type = ["lib", "cdylib"] -doctest = false - -[dependencies] -soroban-sdk = { workspace = true } - -[dev-dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } \ No newline at end of file diff --git a/contracts/hello-world/Makefile b/contracts/hello-world/Makefile deleted file mode 100644 index bf6ed07..0000000 --- a/contracts/hello-world/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -default: build - -all: test - -test: build - cargo test - -build: - stellar contract build - @ls -l target/wasm32v1-none/release/*.wasm - -fmt: - cargo fmt --all - -clean: - cargo clean \ No newline at end of file diff --git a/contracts/hello-world/src/lib.rs b/contracts/hello-world/src/lib.rs deleted file mode 100644 index f812004..0000000 --- a/contracts/hello-world/src/lib.rs +++ /dev/null @@ -1,23 +0,0 @@ -#![no_std] -use soroban_sdk::{contract, contractimpl, vec, Env, String, Vec}; - -#[contract] -pub struct Contract; - -// This is a sample contract. Replace this placeholder with your own contract logic. -// A corresponding test example is available in `test.rs`. -// -// For comprehensive examples, visit . -// The repository includes use cases for the Stellar ecosystem, such as data storage on -// the blockchain, token swaps, liquidity pools, and more. -// -// Refer to the official documentation: -// . -#[contractimpl] -impl Contract { - pub fn hello(env: Env, to: String) -> Vec { - vec![&env, String::from_str(&env, "Hello"), to] - } -} - -mod test; diff --git a/contracts/hello-world/src/test.rs b/contracts/hello-world/src/test.rs deleted file mode 100644 index 0bdcba0..0000000 --- a/contracts/hello-world/src/test.rs +++ /dev/null @@ -1,21 +0,0 @@ -#![cfg(test)] - -use super::*; -use soroban_sdk::{vec, Env, String}; - -#[test] -fn test() { - let env = Env::default(); - let contract_id = env.register(Contract, ()); - let client = ContractClient::new(&env, &contract_id); - - let words = client.hello(&String::from_str(&env, "Dev")); - assert_eq!( - words, - vec![ - &env, - String::from_str(&env, "Hello"), - String::from_str(&env, "Dev"), - ] - ); -} diff --git a/contracts/hello-world/test_snapshots/test/test.1.json b/contracts/hello-world/test_snapshots/test/test.1.json deleted file mode 100644 index a90f00a..0000000 --- a/contracts/hello-world/test_snapshots/test/test.1.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "generators": { - "address": 1, - "nonce": 0 - }, - "auth": [ - [], - [] - ], - "ledger": { - "protocol_version": 22, - "sequence_number": 0, - "timestamp": 0, - "network_id": "0000000000000000000000000000000000000000000000000000000000000000", - "base_reserve": 0, - "min_persistent_entry_ttl": 4096, - "min_temp_entry_ttl": 16, - "max_entry_ttl": 6312000, - "ledger_entries": [ - [ - { - "contract_data": { - "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "key": "ledger_key_contract_instance", - "durability": "persistent" - } - }, - [ - { - "last_modified_ledger_seq": 0, - "data": { - "contract_data": { - "ext": "v0", - "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM", - "key": "ledger_key_contract_instance", - "durability": "persistent", - "val": { - "contract_instance": { - "executable": { - "wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - }, - "storage": null - } - } - } - }, - "ext": "v0" - }, - 4095 - ] - ], - [ - { - "contract_code": { - "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - } - }, - [ - { - "last_modified_ledger_seq": 0, - "data": { - "contract_code": { - "ext": "v0", - "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "code": "" - } - }, - "ext": "v0" - }, - 4095 - ] - ] - ] - }, - "events": [] -} \ No newline at end of file