near-daos / sputnik-dao-contract

Smart contracts for https://app.astrodao.com
https://astrodao.com/
MIT License
108 stars 80 forks source link

Support FT #7

Closed ilblackdragon closed 3 years ago

ilblackdragon commented 3 years ago

To add support for FT, Sputnik contracts must be implementing FT Receiver pattern to keep track of the received balance.

The received balance is then can be used internally to identify which tokens this DAO have and how much value.

E.g.

   /// Keeps track of balances per FT account.
   ft_balances: LookupMap<AccountId, Balance>,

Payout proposal then can select asset_account_id. Empty asset name is considered base token.