|
7 | 7 | //! Use [`TokenClient`] for calling token contracts such as the Stellar Asset |
8 | 8 | //! Contract. |
9 | 9 |
|
10 | | -use crate::{contractclient, contractspecfn, Address, Env, String}; |
| 10 | +use crate::{contractclient, contractspecfn, Address, Env, MuxedAddress, String}; |
11 | 11 |
|
12 | 12 | // The interface below was copied from |
13 | 13 | // https://github.com/stellar/rs-soroban-env/blob/main/soroban-env-host/src/native_contract/token/contract.rs |
@@ -140,8 +140,9 @@ pub trait TokenInterface { |
140 | 140 | /// # Events |
141 | 141 | /// |
142 | 142 | /// Emits an event with topics `["transfer", from: Address, to: Address], |
143 | | - /// data = amount: i128` |
144 | | - fn transfer(env: Env, from: Address, to: Address, amount: i128); |
| 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); |
145 | 146 |
|
146 | 147 | /// Transfer `amount` from `from` to `to`, consuming the allowance that |
147 | 148 | /// `spender` has on `from`'s balance. Authorized by spender |
@@ -247,7 +248,7 @@ pub(crate) const TOKEN_SPEC_XDR_INPUT: &[&[u8]] = &[ |
247 | 248 | &TokenSpec::spec_xdr_transfer_from(), |
248 | 249 | ]; |
249 | 250 |
|
250 | | -pub(crate) const TOKEN_SPEC_XDR_LEN: usize = 4716; |
| 251 | +pub(crate) const TOKEN_SPEC_XDR_LEN: usize = 4804; |
251 | 252 |
|
252 | 253 | impl TokenSpec { |
253 | 254 | /// Returns the XDR spec for the Token contract. |
@@ -340,8 +341,9 @@ pub trait StellarAssetInterface { |
340 | 341 | /// # Events |
341 | 342 | /// |
342 | 343 | /// Emits an event with topics `["transfer", from: Address, to: Address], |
343 | | - /// data = amount: i128` |
344 | | - fn transfer(env: Env, from: Address, to: Address, amount: i128); |
| 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); |
345 | 347 |
|
346 | 348 | /// Transfer `amount` from `from` to `to`, consuming the allowance that |
347 | 349 | /// `spender` has on `from`'s balance. Authorized by spender |
@@ -524,7 +526,7 @@ pub(crate) const STELLAR_ASSET_SPEC_XDR_INPUT: &[&[u8]] = &[ |
524 | 526 | &StellarAssetSpec::spec_xdr_transfer_from(), |
525 | 527 | ]; |
526 | 528 |
|
527 | | -pub(crate) const STELLAR_ASSET_SPEC_XDR_LEN: usize = 6456; |
| 529 | +pub(crate) const STELLAR_ASSET_SPEC_XDR_LEN: usize = 6544; |
528 | 530 |
|
529 | 531 | impl StellarAssetSpec { |
530 | 532 | /// Returns the XDR spec for the Token contract. |
|
0 commit comments