Contract FungibleTokenSwitchboard
The contract that allows an account to receive payments in multiple fungible
tokens using a single {FungibleToken.Receiver}
capability.
This capability should ideally be stored at the
FungibleTokenSwitchboard.ReceiverPublicPath = /public/GenericFTReceiver
but it can be stored anywhere.
Interfaces
resource interface SwitchboardPublic
The interface that enforces the method to allow anyone to check on the available capabilities of a switchboard resource and also exposes the deposit methods to deposit funds on it.
Structs & Resources
resource Switchboard
The resource that stores the multiple fungible token receiver capabilities, allowing the owner to add and remove them and anyone to deposit any fungible token among the available types.
Functions
fun createSwitchboard()
Function that allows to create a new blank switchboard. A user must call this function and store the returned resource in their storage.
Events
event VaultCapabilityAdded
The event that is emitted when a new vault capability is added to a switchboard resource.
event VaultCapabilityRemoved
The event that is emitted when a vault capability is removed from a switchboard resource.
event NotCompletedDeposit
The event that is emitted when a deposit can not be completed.