ITTDeployerDispatcherTrait
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerDispatcherTrait
Part of the group: dispatchers
pub trait ITTDeployerDispatcherTrait<T>
Trait functions
deploy_ttsuite
Deploys and configures a new suite of TokenTable contracts.
Arguments
project_token: The project SNIP-2 token address.project_id: A unique projectId.is_transferable: Allow FutureToken to be transferable.is_cancelable: Allow unlocking schedules to be cancelled in the Unlocker.is_hookable: Allow Unlocker to call an external hook.is_withdrawable: Allow the founder to withdraw deposited project tokens.
Panics
ALREADY_DEPLOYED: Ifproject_idalready exists.EMPTY_CLASSHASH: If the class hashes for Unlocker and FutureToken have not been set.
Events
TokenTableSuiteDeployed
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerDispatcherTrait::deploy_ttsuite
fn deploy_ttsuite(
self: T,
project_token: ContractAddress,
project_id: felt252,
is_transferable: bool,
is_cancelable: bool,
is_hookable: bool,
is_withdrawable: bool,
) -> (ContractAddress, ContractAddress)
set_class_hash
Sets the class hash for Unlocker and FutureToken.
Arguments
unlocker_classhash: The Unlocker class hash.futuretoken_classhash: The FutureToken class hash.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
ClassHashChanged
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerDispatcherTrait::set_class_hash
fn set_class_hash(self: T, unlocker_classhash: ClassHash, futuretoken_classhash: ClassHash)
set_fee_collector
Sets the address for a fee collector.
Arguments
fee_collector: The address of the fee collector.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerDispatcherTrait::set_fee_collector
fn set_fee_collector(self: T, fee_collector: ContractAddress)
get_class_hash
Returns the class hashes of Unlocker and FutureToken respectively.
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerDispatcherTrait::get_class_hash
fn get_class_hash(self: T) -> (ClassHash, ClassHash)
get_fee_collector
Returns the address of the fee collector.
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerDispatcherTrait::get_fee_collector
fn get_fee_collector(self: T) -> ContractAddress
get_ttsuite
Returns the addresses of Unlocker and FutureToken given a project_id.
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerDispatcherTrait::get_ttsuite
fn get_ttsuite(self: T, project_id: felt252) -> TTSuite