File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -469,4 +469,23 @@ pub trait StellarAssetInterface {
469469 /// Emits an event with topics `["clawback", admin: Address, to: Address],
470470 /// data = amount: i128`
471471 fn clawback ( env : Env , from : Address , amount : i128 ) ;
472+
473+ /// Creates this contract asset's unlimited trustline for the provided
474+ /// address.
475+ ///
476+ /// This is a no-op if the input address is a C-address, or if the
477+ /// provided G-address already has the respective trustline.
478+ ///
479+ /// If the trustline is actually created, this will require authorization
480+ /// from `addr` (i.e. `addr.require_auth` will be called).
481+ ///
482+ /// # Arguments
483+ ///
484+ /// * `addr` - The address for which a trustline will be created.
485+ ///
486+ /// # Panics
487+ ///
488+ /// Panics during trustline creation if the asset issuer does not exist,
489+ /// or when a new trustline cannot be created.
490+ fn trust ( env : Env , addr : Address ) ;
472491}
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ pub(crate) const XDR_INPUT: &[&[u8]] = &[
3838 & soroban_sdk:: token:: StellarAssetFnSpec :: spec_xdr_symbol ( ) ,
3939 & soroban_sdk:: token:: StellarAssetFnSpec :: spec_xdr_transfer ( ) ,
4040 & soroban_sdk:: token:: StellarAssetFnSpec :: spec_xdr_transfer_from ( ) ,
41+ & soroban_sdk:: token:: StellarAssetFnSpec :: spec_xdr_trust ( ) ,
4142 & soroban_token_sdk:: events:: Approve :: spec_xdr ( ) ,
4243 & soroban_token_sdk:: events:: TransferWithAmountOnly :: spec_xdr ( ) ,
4344 & soroban_token_sdk:: events:: Transfer :: spec_xdr ( ) ,
@@ -53,7 +54,7 @@ pub(crate) const XDR_INPUT: &[&[u8]] = &[
5354 & SetAuthorized :: spec_xdr ( ) ,
5455] ;
5556
56- pub ( crate ) const XDR_LEN : usize = 8560 ;
57+ pub ( crate ) const XDR_LEN : usize = 9128 ;
5758
5859/// Returns the contract spec for Stellar Asset contract.
5960pub const fn xdr ( ) -> & ' static [ u8 ] {
You can’t perform that action at this time.
0 commit comments