Payable

The payable annotation is used to allow a contract function to accept an asset forwarded via a call.

Usage

To allow a contract to accept assets we use the payable keyword.

    #[payable]
    fn deposit();