Skip to content

Commit

Permalink
fixes wip
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Nov 5, 2024
1 parent b637971 commit 1896429
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 7 deletions.
23 changes: 23 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions soroban-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ hex = "0.4.3"
arbitrary = { version = "1.3.0", features = ["derive"] }
proptest = "1.2.0"
proptest-arbitrary-interop = "0.1.0"
libfuzzer-sys = "0.4.7"

[features]
alloc = []
Expand Down
17 changes: 11 additions & 6 deletions soroban-sdk/src/_migrating.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
//! contracts constructor. Pass `()` if the contract has no constructor.
//!
//! ```
//! use soroban_sdk::{contract, contractimpl, Env, testutils::Address as _};
//! use soroban_sdk::{contract, contractimpl, Env, Address, testutils::Address as _};
//!
//! #[contract]
//! pub struct Contract;
//!
//! #[contractimpl]
//! impl Contract {
//! pub __constructor(x: u32) { }
//! pub fn __constructor(x: u32) { }
//! }
//!
//! #[test]
Expand All @@ -59,7 +59,7 @@
//! let env = Env::default();
//! let address = Address::generate(&env);
//! env.register_at(
//! address, // 👈 👀 The address to register the contract at.
//! &address, // 👈 👀 The address to register the contract at.
//! Contract, // 👈 👀 The contract being registered, or a Wasm `&[u8]`.
//! (), // 👈 👀 The constructor arguments, or ().
//! );
Expand Down Expand Up @@ -108,7 +108,7 @@
//! contract.exec(&wasm_hash);
//! }
//! # #[cfg(not(feature = "testutils"))]
//! # fn main() { }ga
//! # fn main() { }
//! ```
//!
//! 2. Deprecated [`fuzz_catch_panic`]. Use [`Env::try_invoke_contract`] and the `try_` client functions instead.
Expand Down Expand Up @@ -196,15 +196,20 @@
//! Current implementations of the interface will see a build error, and should change [`BytesN<32>`] to [`Hash<32>`].
//!
//! ```
//! use soroban_sdk::auth::CustomAccountInterface;
//! use soroban_sdk::{auth::{Context, CustomAccountInterface}, contract, contracterror, contractimpl, crypto::Hash, Env};
//!
//! #[contract]
//! pub struct Contract;
//!
//! #[contracterror]
//! pub enum Error {
//! // ...
//! }
//!
//! #[contractimpl]
//! impl CustomAccountInterface for Contract {
//! type Signature = ();
//! type Error: Into<Error> = u32;
//! type Error = Error;
//!
//! fn __check_auth(
//! env: Env,
Expand Down
1 change: 0 additions & 1 deletion soroban-sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#![cfg_attr(feature = "docs", feature(doc_cfg))]
#![allow(dead_code)]

#[cfg(feature = "docs")]
pub mod _migrating;

#[cfg(all(target_family = "wasm", feature = "testutils"))]
Expand Down

0 comments on commit 1896429

Please sign in to comment.