You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Massa we allow native coin transfers (transfer_coins):
from:
any User account on which the current context has write access
any Smart Contract account on which the current context has write access
towards:
any User account
any Smart Contract account on which the current context has write access
Not allowing foreign Smart Contract accounts to receive native tokens without going through the coins parameter of call is deliberate: it allows Smart Contracts to filter and refuse incoming coin transfers.
This document defines an interface that is exposed by all Smart Contract accounts that need to receive native coins.
User flow
To transfer native coins towards a foreign Smart Contract account, one can call the coin reception function that account exposes if it implements this proposal. If the Smart Contract does not implement this proposal, it means that it is not meant to receive native coins directly.
Technical details
Prefix to all exposed methods: cr1 ("Coin Receiver V1")
Expose a single, parameter-less function named cr1_receive_coins that does not return anything.
QA testing
Try sending coins to a Smart Contract implementing this.
The text was updated successfully, but these errors were encountered:
Context
In Massa we allow native coin transfers (
transfer_coins
):Not allowing foreign Smart Contract accounts to receive native tokens without going through the
coins
parameter ofcall
is deliberate: it allows Smart Contracts to filter and refuse incoming coin transfers.This document defines an interface that is exposed by all Smart Contract accounts that need to receive native coins.
User flow
To transfer native coins towards a foreign Smart Contract account, one can call the coin reception function that account exposes if it implements this proposal. If the Smart Contract does not implement this proposal, it means that it is not meant to receive native coins directly.
Technical details
Prefix to all exposed methods:
cr1
("Coin Receiver V1")Expose a single, parameter-less function named
cr1_receive_coins
that does not return anything.QA testing
Try sending coins to a Smart Contract implementing this.
The text was updated successfully, but these errors were encountered: