Skip to content

Commit 7970920

Browse files
authored
Revert "Update transfer for MuxedAddress (#1481)" (#1483)
This reverts commit 767c718. Undoing this for now so we can figure out a better interface.
1 parent 45ee1cd commit 7970920

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

soroban-sdk/src/token.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! Use [`TokenClient`] for calling token contracts such as the Stellar Asset
88
//! Contract.
99
10-
use crate::{contractclient, contractspecfn, Address, Env, MuxedAddress, String};
10+
use crate::{contractclient, contractspecfn, Address, Env, String};
1111

1212
// The interface below was copied from
1313
// https://github.com/stellar/rs-soroban-env/blob/main/soroban-env-host/src/native_contract/token/contract.rs
@@ -140,9 +140,8 @@ pub trait TokenInterface {
140140
/// # Events
141141
///
142142
/// Emits an event with topics `["transfer", from: Address, to: Address],
143-
/// data = amount: i128 or data: { amount: i128, to_muxed_id:u64 }` depending on whether `to`
144-
/// contains a muxed ID.
145-
fn transfer(env: Env, from: Address, to: MuxedAddress, amount: i128);
143+
/// data = amount: i128`
144+
fn transfer(env: Env, from: Address, to: Address, amount: i128);
146145

147146
/// Transfer `amount` from `from` to `to`, consuming the allowance that
148147
/// `spender` has on `from`'s balance. Authorized by spender
@@ -248,7 +247,7 @@ pub(crate) const TOKEN_SPEC_XDR_INPUT: &[&[u8]] = &[
248247
&TokenSpec::spec_xdr_transfer_from(),
249248
];
250249

251-
pub(crate) const TOKEN_SPEC_XDR_LEN: usize = 4804;
250+
pub(crate) const TOKEN_SPEC_XDR_LEN: usize = 4716;
252251

253252
impl TokenSpec {
254253
/// Returns the XDR spec for the Token contract.
@@ -341,9 +340,8 @@ pub trait StellarAssetInterface {
341340
/// # Events
342341
///
343342
/// Emits an event with topics `["transfer", from: Address, to: Address],
344-
/// data = amount: i128 or data: { amount: i128, to_muxed_id:u64 }` depending on whether `to`
345-
/// contains a muxed ID.
346-
fn transfer(env: Env, from: Address, to: MuxedAddress, amount: i128);
343+
/// data = amount: i128`
344+
fn transfer(env: Env, from: Address, to: Address, amount: i128);
347345

348346
/// Transfer `amount` from `from` to `to`, consuming the allowance that
349347
/// `spender` has on `from`'s balance. Authorized by spender
@@ -526,7 +524,7 @@ pub(crate) const STELLAR_ASSET_SPEC_XDR_INPUT: &[&[u8]] = &[
526524
&StellarAssetSpec::spec_xdr_transfer_from(),
527525
];
528526

529-
pub(crate) const STELLAR_ASSET_SPEC_XDR_LEN: usize = 6544;
527+
pub(crate) const STELLAR_ASSET_SPEC_XDR_LEN: usize = 6456;
530528

531529
impl StellarAssetSpec {
532530
/// Returns the XDR spec for the Token contract.

0 commit comments

Comments
 (0)