Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix event comment #1315

Merged
merged 4 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions soroban-sdk/src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ pub trait TokenInterface {
/// # Events
///
/// Emits an event with topics `["transfer", from: Address, to: Address],
/// data = [amount: i128]`
/// data = amount: i128`
fn transfer(env: Env, from: Address, to: Address, amount: i128);

/// Transfer `amount` from `from` to `to`, consuming the allowance that
Expand All @@ -164,7 +164,7 @@ pub trait TokenInterface {
/// # Events
///
/// Emits an event with topics `["transfer", from: Address, to: Address],
/// data = [amount: i128]`
/// data = amount: i128`
fn transfer_from(env: Env, spender: Address, from: Address, to: Address, amount: i128);

/// Burn `amount` from `from`.
Expand All @@ -180,8 +180,8 @@ pub trait TokenInterface {
///
/// # Events
///
/// Emits an event with topics `["burn", from: Address], data = [amount:
/// i128]`
/// Emits an event with topics `["burn", from: Address], data = amount:
/// i128`
fn burn(env: Env, from: Address, amount: i128);

/// Burn `amount` from `from`, consuming the allowance of `spender`.
Expand All @@ -204,8 +204,8 @@ pub trait TokenInterface {
///
/// # Events
///
/// Emits an event with topics `["burn", from: Address], data = [amount:
/// i128]`
/// Emits an event with topics `["burn", from: Address], data = amount:
/// i128`
fn burn_from(env: Env, spender: Address, from: Address, amount: i128);

/// Returns the number of decimals used to represent amounts of this token.
Expand Down Expand Up @@ -286,7 +286,7 @@ pub trait StellarAssetInterface {
/// # Events
///
/// Emits an event with topics `["mint", admin: Address, to: Address], data
/// = [amount: i128]`
/// = amount: i128`
fn mint(env: Env, to: Address, amount: i128);

/// Clawback `amount` from `from` account. `amount` is burned in the
Expand All @@ -301,7 +301,7 @@ pub trait StellarAssetInterface {
/// # Events
///
/// Emits an event with topics `["clawback", admin: Address, to: Address],
/// data = [amount: i128]`
/// data = amount: i128`
fn clawback(env: Env, from: Address, amount: i128);
}

Expand Down Expand Up @@ -330,7 +330,7 @@ pub(crate) const SPEC_XDR_INPUT: &[&[u8]] = &[
&StellarAssetSpec::spec_xdr_transfer_from(),
];

pub(crate) const SPEC_XDR_LEN: usize = 6460;
pub(crate) const SPEC_XDR_LEN: usize = 6456;

impl StellarAssetSpec {
/// Returns the XDR spec for the Token contract.
Expand Down
3 changes: 3 additions & 0 deletions soroban-sdk/src/unwrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ impl<T> UnwrapInfallible for Result<T, Infallible> {
// destructuring the `never` variable into an empty set of cases is
// the most honest since it's statically checked to _be_ infallible,
// not just an assertion of our hopes.)

// This allow and the Err can be removed once 1.82 becomes stable
#[allow(unreachable_patterns)]
Err(never) => match never {},
}
}
Expand Down
58 changes: 34 additions & 24 deletions tests/fuzz/fuzz/Cargo.lock

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

Loading