|
1 |
| -//! Soroban SDK supports writing programs for the Soroban smart contract |
2 |
| -//! platform. |
| 1 | +//! Soroban SDK supports writing smart contracts for the Wasm-powered [Soroban] smart contract |
| 2 | +//! runtime, deployed on [Stellar]. |
3 | 3 | //!
|
4 | 4 | //! ### Docs
|
5 | 5 | //!
|
6 |
| -//! See [soroban.stellar.org](https://soroban.stellar.org) for documentation. |
| 6 | +//! See [developers.stellar.org] for documentation about building smart contracts for [Stellar]. |
| 7 | +//! |
| 8 | +//! [developers.stellar.org]: https://developers.stellar.org |
| 9 | +//! [Stellar]: https://stellar.org |
| 10 | +//! [Soroban]: https://stellar.org/soroban |
| 11 | +//! |
| 12 | +//! ### Migrating Major Versions |
| 13 | +//! |
| 14 | +//! See [_migrating] for a summary of how to migrate from one major version to another. |
7 | 15 | //!
|
8 | 16 | //! ### Examples
|
9 | 17 | //!
|
10 | 18 | //! ```rust
|
11 | 19 | //! use soroban_sdk::{contract, contractimpl, vec, symbol_short, BytesN, Env, Symbol, Vec};
|
12 | 20 | //!
|
13 | 21 | //! #[contract]
|
14 |
| -//! pub struct HelloContract; |
| 22 | +//! pub struct Contract; |
15 | 23 | //!
|
16 | 24 | //! #[contractimpl]
|
17 |
| -//! impl HelloContract { |
| 25 | +//! impl Contract { |
18 | 26 | //! pub fn hello(env: Env, to: Symbol) -> Vec<Symbol> {
|
19 | 27 | //! vec![&env, symbol_short!("Hello"), to]
|
20 | 28 | //! }
|
|
26 | 34 | //! # #[cfg(feature = "testutils")]
|
27 | 35 | //! # fn main() {
|
28 | 36 | //! let env = Env::default();
|
29 |
| -//! let contract_id = env.register(HelloContract, ()); |
30 |
| -//! let client = HelloContractClient::new(&env, &contract_id); |
| 37 | +//! let contract_id = env.register(Contract, ()); |
| 38 | +//! let client = ContractClient::new(&env, &contract_id); |
31 | 39 | //!
|
32 | 40 | //! let words = client.hello(&symbol_short!("Dev"));
|
33 | 41 | //!
|
|
37 | 45 | //! # fn main() { }
|
38 | 46 | //! ```
|
39 | 47 | //!
|
40 |
| -//! More examples are available at <https://soroban.stellar.org/docs/category/basic-tutorials> |
41 |
| -//! and <https://soroban.stellar.org/docs/category/advanced-tutorials>. |
| 48 | +//! More examples are available at: |
| 49 | +//! - <https://developers.stellar.org/docs/build/smart-contracts/example-contracts> |
| 50 | +//! - <https://developers.stellar.org/docs/build/guides> |
42 | 51 |
|
43 | 52 | #![cfg_attr(target_family = "wasm", no_std)]
|
44 | 53 | #![cfg_attr(feature = "docs", feature(doc_cfg))]
|
|
0 commit comments