Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ concurrency:

env:
ARTIFACT_RETENTION_DAYS_FOR_TEST_WASMS: 7
SOROBAN_SDK_BUILD_SYSTEM_SUPPORTS_SPEC_SHAKING_V2: 1

defaults:
run:
Expand Down
7 changes: 7 additions & 0 deletions soroban-token-sdk/src/_migrating.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//! # Migrating from v23 to v26
//!
//! 1. Remove the deprecated event format. For details, see the [migration guide for v23 contract events].
//! And for an example using the `soroban_token_sdk` directly, see the [migration guide for v23 token transfer][v23_token_transfer].
//!
//! [migration guide for v23 contract events]: soroban_sdk::_migrating::v23_contractevent
//!
//! # Migrating from v22 to v23
//!
//! 1. [`MuxedAddress` replaces `Address` as the `to` of the `TokenInterface::transfer`][v23_token_transfer]
Expand Down
10 changes: 7 additions & 3 deletions soroban-token-sdk/src/_migrating/v23_token_transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
//! the exchange deposits for the token contracts, but is necessary for that.
//!
//! The necessary token modification is very minimal. Consider the following
//! `transfer` implementation that still uses `Address` destination:
//! `transfer` implementation that still uses `Address` destination. Note that
//! this example will only compile pre-v26 because the old event publishing
//! helper used below is no longer available. If you are using v26 or later,
//! use the updated implementation shown in the next code snippet.
//!
//! ```
//! ```compile_fail
//! use soroban_sdk::{Env, Address};
//! use soroban_token_sdk::TokenUtils;
//! // ... inside some token contract ...
Expand All @@ -27,7 +30,8 @@
//! from.require_auth();
//! // Token-specific implementation of balance movement.
//! token_impl::move_balance(&env, &from, &to, amount);
//! // Publish the event.
//! // Publish the event using the pre-v26 helper API.
//! // In v26+, use the event type from `soroban_token_sdk::events` instead.
//! TokenUtils::new(&env).events().transfer(from, to, amount);
//! }
//!
Expand Down
71 changes: 0 additions & 71 deletions soroban-token-sdk/src/event.rs

This file was deleted.

6 changes: 0 additions & 6 deletions soroban-token-sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
#![cfg_attr(feature = "docs", feature(doc_cfg))]
pub mod _migrating;

use crate::event::Events;
use crate::metadata::Metadata;
use soroban_sdk::Env;

pub mod event;
pub mod events;
pub mod metadata;
mod tests;
Expand All @@ -23,8 +21,4 @@ impl TokenUtils {
pub fn metadata(&self) -> Metadata {
Metadata::new(&self.0)
}

pub fn events(&self) -> Events {
Events::new(&self.0)
}
}
Loading