diff --git a/soroban-contract/contracts/hello-world/Cargo.toml b/soroban-contract/contracts/hello-world/Cargo.toml deleted file mode 100644 index c3e84a9..0000000 --- a/soroban-contract/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"] } diff --git a/soroban-contract/contracts/hello-world/Makefile b/soroban-contract/contracts/hello-world/Makefile deleted file mode 100644 index b971934..0000000 --- a/soroban-contract/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 diff --git a/soroban-contract/contracts/hello-world/src/lib.rs b/soroban-contract/contracts/hello-world/src/lib.rs deleted file mode 100644 index f812004..0000000 --- a/soroban-contract/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/soroban-contract/contracts/hello-world/src/test.rs b/soroban-contract/contracts/hello-world/src/test.rs deleted file mode 100644 index 0bdcba0..0000000 --- a/soroban-contract/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"), - ] - ); -}