ITTFeeCollectorSafeDispatcherTrait
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorSafeDispatcherTrait
Part of the group: dispatchers
pub trait ITTFeeCollectorSafeDispatcherTrait<T>
Trait functions
withdraw_fee
Withdraws collected fees.
Arguments
token: The type of SNIP-2 token we are trying to withdraw.amount: The amount of tokens we are trying to withdraw.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorSafeDispatcherTrait::withdraw_fee
fn withdraw_fee(self: T, token: ContractAddress, amount: u256) -> Result<(), Array<felt252>>
set_default_fee
Sets the default fee.
Arguments
bips: The proportion of fees to take in basis points.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorSafeDispatcherTrait::set_default_fee
fn set_default_fee(self: T, bips: u256) -> Result<(), Array<felt252>>
set_custom_fee
Sets a custom fee for a specific Unlocker.
Arguments
unlocker_instance: The specific Unlocker we are trying to configure.bips: The proportion of fees to take in basis points.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorSafeDispatcherTrait::set_custom_fee
fn set_custom_fee(
self: T, unlocker_instance: ContractAddress, bips: u256,
) -> Result<(), Array<felt252>>
get_default_fee
Returns the default fee in basis points.
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorSafeDispatcherTrait::get_default_fee
fn get_default_fee(self: T) -> Result<u256, Array<felt252>>
get_fee
Returns the fees incurred by transacting a certain amount of tokens within a specific Unlocker.
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorSafeDispatcherTrait::get_fee
fn get_fee(
self: T, unlocker_instance: ContractAddress, tokens_transferred: u256,
) -> Result<u256, Array<felt252>>