Resource Vault
_10resource Vault {_10_10 balance: UFix64_10}
The resource that contains the functions to send and receive tokens.
The declaration of a concrete type in a contract interface means that
every Fungible Token contract that implements the FungibleToken interface
must define a concrete Vault
resource that conforms to the Provider
, Receiver
,
and Balance
interfaces, and declares their required fields and functions
Implemented Interfaces:
Provider
Receiver
Balance
Initializer
_10func init(balance UFix64)
Functions
fun withdraw()
_10func withdraw(amount UFix64): Vault
fun deposit()
_10func deposit(from Vault)
Takes a Vault and deposits it into the implementing resource type
Parameters:
- from : The Vault resource containing the funds that will be deposited