/////////////////////
///
/// Sample token with allowlist
///
/// This token uses the base sample token but adds functions to handle the final authorization
/// of transfers, approves, and transfers_from. The same effect could be accomplished by blocking
/// in the public functions, but we wanted to demonstrate the ability to intercept these calls
/// as well as to update the values of the transaction. In this instance, since everyone must be on an
/// allow list we choose to override the fee to 0 if the user is on the allowlist. Again we could do this
/// via configuration by setting the fee to #Fixed(0) in the ICRC1 config, but we wanted to demonstrate the
/// update pattern.
///
/// New valid principals can be added by calling the admin_update_allowlist(Principal, Bool) function. The
/// token owner is added durning initialization.
///
/// The only changes to the base code are the configuration of the can_transfer that is passed to transfer,
/// and can_approve and can_transfer_from passed to the respective functions. Those functions and supporting infrastructure
/// can be found at the end of the actor file.
///
/////////////////////
This file has been truncated. show original