diff --git a/cmd/soroban-cli/src/utils/contract-template/src/lib.rs b/cmd/soroban-cli/src/utils/contract-template/src/lib.rs index f8120043a0..018b895138 100644 --- a/cmd/soroban-cli/src/utils/contract-template/src/lib.rs +++ b/cmd/soroban-cli/src/utils/contract-template/src/lib.rs @@ -2,7 +2,7 @@ use soroban_sdk::{contract, contractimpl, vec, Env, String, Vec}; #[contract] -pub struct Contract; +pub struct HelloContract; // This is a sample contract. Replace this placeholder with your own contract logic. // A corresponding test example is available in `test.rs`. @@ -14,10 +14,10 @@ pub struct Contract; // Refer to the official documentation: // . #[contractimpl] -impl Contract { +impl HelloContract { pub fn hello(env: Env, to: String) -> Vec { vec![&env, String::from_str(&env, "Hello"), to] } } -mod test; +mod test; \ No newline at end of file diff --git a/cmd/soroban-cli/src/utils/contract-template/src/test.rs b/cmd/soroban-cli/src/utils/contract-template/src/test.rs index 0bdcba0824..72ed9056d4 100644 --- a/cmd/soroban-cli/src/utils/contract-template/src/test.rs +++ b/cmd/soroban-cli/src/utils/contract-template/src/test.rs @@ -6,8 +6,8 @@ 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 contract_id = env.register(HelloContract, ()); + let client = HelloContractClient::new(&env, &contract_id); let words = client.hello(&String::from_str(&env, "Dev")); assert_eq!( @@ -18,4 +18,4 @@ fn test() { String::from_str(&env, "Dev"), ] ); -} +} \ No newline at end of file