Skip to content

Commit

Permalink
rename contract
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Nov 6, 2024
1 parent 74f9214 commit ef1b8fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions soroban-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ See [_migrating] for a summary of how to migrate from one major version to anoth
use soroban_sdk::{contract, contractimpl, vec, symbol_short, BytesN, Env, Symbol, Vec};

#[contract]
pub struct HelloContract;
pub struct Contract;

#[contractimpl]
impl HelloContract {
impl Contract {
pub fn hello(env: Env, to: Symbol) -> Vec<Symbol> {
vec![&env, symbol_short!("Hello"), to]
}
Expand All @@ -34,8 +34,8 @@ fn test() {
# #[cfg(feature = "testutils")]
# fn main() {
let env = Env::default();
let contract_id = env.register(HelloContract, ());
let client = HelloContractClient::new(&env, &contract_id);
let contract_id = env.register(Contract, ());
let client = ContractClient::new(&env, &contract_id);

let words = client.hello(&symbol_short!("Dev"));

Expand Down
8 changes: 4 additions & 4 deletions soroban-sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
//! use soroban_sdk::{contract, contractimpl, vec, symbol_short, BytesN, Env, Symbol, Vec};
//!
//! #[contract]
//! pub struct HelloContract;
//! pub struct Contract;
//!
//! #[contractimpl]
//! impl HelloContract {
//! impl Contract {
//! pub fn hello(env: Env, to: Symbol) -> Vec<Symbol> {
//! vec![&env, symbol_short!("Hello"), to]
//! }
Expand All @@ -34,8 +34,8 @@
//! # #[cfg(feature = "testutils")]
//! # fn main() {
//! let env = Env::default();
//! let contract_id = env.register(HelloContract, ());
//! let client = HelloContractClient::new(&env, &contract_id);
//! let contract_id = env.register(Contract, ());
//! let client = ContractClient::new(&env, &contract_id);
//!
//! let words = client.hello(&symbol_short!("Dev"));
//!
Expand Down

0 comments on commit ef1b8fa

Please sign in to comment.