Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

ITTDeployer

Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployer

pub trait ITTDeployer<TContractState>

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: If project_id already 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::ITTDeployer::deploy_ttsuite

fn deploy_ttsuite(
    ref self: TContractState,
    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::ITTDeployer::set_class_hash

fn set_class_hash(
    ref self: TContractState, 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::ITTDeployer::set_fee_collector

fn set_fee_collector(ref self: TContractState, fee_collector: ContractAddress)

get_class_hash

Returns the class hashes of Unlocker and FutureToken respectively.

Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployer::get_class_hash

fn get_class_hash(self: @TContractState) -> (ClassHash, ClassHash)

get_fee_collector

Returns the address of the fee collector.

Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployer::get_fee_collector

fn get_fee_collector(self: @TContractState) -> ContractAddress

get_ttsuite

Returns the addresses of Unlocker and FutureToken given a project_id.

Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployer::get_ttsuite

fn get_ttsuite(self: @TContractState, project_id: felt252) -> TTSuite