Function ink_env::transfer [−][src]
pub fn transfer<T>(destination: T::AccountId, value: T::Balance) -> Result<()> where
T: Environment,
Transfers value from the contract to the destination account ID.
Note
This is more efficient and simpler than the alternative to make a no-op contract call or invoke a runtime function that performs the transaction.
Errors
- If the contract doesn’t have sufficient funds.
- If the transfer would have brought the sender’s total balance below the subsistence threshold.