donation-v3.0.0
lachlanglen
released this
19 Mar 13:52
·
27 commits
to main
since this release
Motivation: Allow FT donations on Donation contract, and reduce storage costs for donations while making storage more predictable.
- Adds a very basic implementation of storage standard to facilitate FT donations, where deposit to store donation is required before
ft_transfer_call
is called. - Adds
ft_on_transfer
method to facilitate FT donations - Handles success/failure of donation & fees transfers, rolling back donation if necessary (uses
next_donation_id
to avoid overwrites) - Stores amounts as integers internally instead of strings, making donation storage lower and more predictable
- Introduces ephemeral
DonationExternal
struct to convert amount integers to strings for return values / view methods.