ITTDeployerSafeDispatcherTrait
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerSafeDispatcherTrait
Part of the group: dispatchers
pub trait ITTDeployerSafeDispatcherTrait<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::ITTDeployerSafeDispatcherTrait::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,
) -> Result<(ContractAddress, ContractAddress), Array<felt252>>
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::ITTDeployerSafeDispatcherTrait::set_class_hash
fn set_class_hash(
self: T, unlocker_classhash: ClassHash, futuretoken_classhash: ClassHash,
) -> Result<(), Array<felt252>>
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::ITTDeployerSafeDispatcherTrait::set_fee_collector
fn set_fee_collector(self: T, fee_collector: ContractAddress) -> Result<(), Array<felt252>>
get_class_hash
Returns the class hashes of Unlocker and FutureToken respectively.
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerSafeDispatcherTrait::get_class_hash
fn get_class_hash(self: T) -> Result<(ClassHash, ClassHash), Array<felt252>>
get_fee_collector
Returns the address of the fee collector.
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerSafeDispatcherTrait::get_fee_collector
fn get_fee_collector(self: T) -> Result<ContractAddress, Array<felt252>>
get_ttsuite
Returns the addresses of Unlocker and FutureToken given a project_id.
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerSafeDispatcherTrait::get_ttsuite
fn get_ttsuite(self: T, project_id: felt252) -> Result<TTSuite, Array<felt252>>