tokentable_v2
Fully qualified path: tokentable_v2
Modules
Modules
Modules
components
Fully qualified path: tokentable_v2::components
Modules
Modules
Modules
structs
Fully qualified path: tokentable_v2::components::structs
Modules
| actual | SPDX-License-Identifier: Apache 2.0 TokenTable Unlocker Structs: Actual |
| preset | SPDX-License-Identifier: Apache 2.0 TokenTable Unlocker Structs: Preset |
| ttsuite | SPDX-License-Identifier: Apache 2.0 TokenTable Deployer Structs: TTSuite |
Modules
Modules
| actual | SPDX-License-Identifier: Apache 2.0 TokenTable Unlocker Structs: Actual |
| preset | SPDX-License-Identifier: Apache 2.0 TokenTable Unlocker Structs: Preset |
| ttsuite | SPDX-License-Identifier: Apache 2.0 TokenTable Deployer Structs: TTSuite |
actual
SPDX-License-Identifier: Apache 2.0
TokenTable Unlocker Structs: Actual
Fully qualified path: tokentable_v2::components::structs::actual
Structs
| Actual | An Actual is an unlocking schedule for a single recipient and builds on top of an existing Preset . An actual contains information that is different from one stakeholder to the next…. |
Structs
Structs
| Actual | An Actual is an unlocking schedule for a single recipient and builds on top of an existing Preset . An actual contains information that is different from one stakeholder to the next…. |
Actual
An Actual is an unlocking schedule for a single recipient and builds on top of an existing
Preset.
An actual contains information that is different from one stakeholder to the next.
Members
preset_id: The ID of thePresetthat thisActualreferences.start_timestamp_absolute: The timestamp of when this unlocking schedule actually starts.amount_claimed: The amount of tokens that have already been claimed by the recipient.total_amount: The maximum amount of tokens that the recipient can claim throughout the entire schedule.
Fully qualified path: tokentable_v2::components::structs::actual::Actual
[derive(PartialEq, Drop, Serde, Copy, starknet::Store)]
pub struct Actual {
pub preset_id: felt252,
pub start_timestamp_absolute: u64,
pub amount_claimed: u256,
pub total_amount: u256,
}
Members
preset_id
Fully qualified path: tokentable_v2::components::structs::actual::Actual::preset_id
pub preset_id: felt252
start_timestamp_absolute
Fully qualified path: tokentable_v2::components::structs::actual::Actual::start_timestamp_absolute
pub start_timestamp_absolute: u64
amount_claimed
Fully qualified path: tokentable_v2::components::structs::actual::Actual::amount_claimed
pub amount_claimed: u256
total_amount
Fully qualified path: tokentable_v2::components::structs::actual::Actual::total_amount
pub total_amount: u256
preset
SPDX-License-Identifier: Apache 2.0
TokenTable Unlocker Structs: Preset
Fully qualified path: tokentable_v2::components::structs::preset
Structs
| Preset | A Preset is an unlocking schedule template that contains information that’s shared across all recipients within a single round…. |
Structs
Structs
| Preset | A Preset is an unlocking schedule template that contains information that’s shared across all recipients within a single round…. |
Preset
A Preset is an unlocking schedule template that contains information that’s shared across all
recipients within a single round.
In this system, cliff unlocks are considered linear as well. This enables us to mix and match
cliffs and linears at will, providing full customizability.
Cliff waiting periods have a linear bip of 0 and cliff unlocking moments have a duration of 1
second.
The data here is fairly complex and should be generated by our frontend instead of by hand.
Members
linear_start_timestamps_relative: An array of start timestamps for each linear segment.linear_end_timestamp_relative: The timestamp that marks the end of the final linear segment.linear_bips: The basis point that is unlocked for each linear segment. Must add up to 10000.num_of_unlocks_for_each_linear: The number of unlocks within each respective linear segment.stream: If the tokens should unlock as a stream instead of a cliff at the end of a linear segment subdivision.
Fully qualified path: tokentable_v2::components::structs::preset::Preset
[derive(PartialEq, Drop, Serde, Copy, starknet::Store)]
pub struct Preset {
pub linear_start_timestamps_relative: Span<u64>,
pub linear_end_timestamp_relative: u64,
pub linear_bips: Span<u64>,
pub num_of_unlocks_for_each_linear: Span<u64>,
pub stream: bool,
}
Members
linear_start_timestamps_relative
Fully qualified path: tokentable_v2::components::structs::preset::Preset::linear_start_timestamps_relative
pub linear_start_timestamps_relative: Span<u64>
linear_end_timestamp_relative
Fully qualified path: tokentable_v2::components::structs::preset::Preset::linear_end_timestamp_relative
pub linear_end_timestamp_relative: u64
linear_bips
Fully qualified path: tokentable_v2::components::structs::preset::Preset::linear_bips
pub linear_bips: Span<u64>
num_of_unlocks_for_each_linear
Fully qualified path: tokentable_v2::components::structs::preset::Preset::num_of_unlocks_for_each_linear
pub num_of_unlocks_for_each_linear: Span<u64>
stream
Fully qualified path: tokentable_v2::components::structs::preset::Preset::stream
pub stream: bool
ttsuite
SPDX-License-Identifier: Apache 2.0
TokenTable Deployer Structs: TTSuite
Fully qualified path: tokentable_v2::components::structs::ttsuite
Structs
| TTSuite | TTSuite bundles the address of an Unlocker instance and FutureToken instance. |
Structs
Structs
| TTSuite | TTSuite bundles the address of an Unlocker instance and FutureToken instance. |
TTSuite
TTSuite bundles the address of an Unlocker instance and FutureToken instance.
Fully qualified path: tokentable_v2::components::structs::ttsuite::TTSuite
[derive(PartialEq, Drop, Serde, Copy, starknet::Store)]
pub struct TTSuite {
pub unlocker_instance: ContractAddress,
pub futuretoken_instance: ContractAddress,
}
Members
unlocker_instance
Fully qualified path: tokentable_v2::components::structs::ttsuite::TTSuite::unlocker_instance
pub unlocker_instance: ContractAddress
futuretoken_instance
Fully qualified path: tokentable_v2::components::structs::ttsuite::TTSuite::futuretoken_instance
pub futuretoken_instance: ContractAddress
interfaces
Fully qualified path: tokentable_v2::components::interfaces
Modules
| deployer | SPDX-License-Identifier: Apache 2.0 TokenTable Deployer Interface This is the deployer for all TokenTable core and proxy contracts. All initial setup and configuration is automatically done here…. |
| feecollector | SPDX-License-Identifier: Apache 2.0 TokenTable Fee Collector Interface This interface handles TokenTable service fee calculation. |
| futuretoken | SPDX-License-Identifier: Apache 2.0 TokenTable FutureToken Interface The lightweight interface for TTFutureTokenV2(.5.x), which handles unlocking schedule ownership for TokenTable. |
| hook | SPDX-License-Identifier: Apache 2.0 TokenTable Hook Interface You must implement this interface to become a valid hook for TokenTable Unlocker. |
| mockerc20 | — |
| unlocker | SPDX-License-Identifier: Apache 2.0 TokenTable Unlocker Interface The lightweight interface for TokenTableUnlockerV2(.5.x), which handles token unlocking and distribution for TokenTable. |
| versionable | SPDX-License-Identifier: Apache 2.0 TokenTable Versioning Interface This interface is implemented by all major TokenTable contracts to keep track of their versioning for upgrade compatibility checks. |
Modules
Modules
| deployer | SPDX-License-Identifier: Apache 2.0 TokenTable Deployer Interface This is the deployer for all TokenTable core and proxy contracts. All initial setup and configuration is automatically done here…. |
| feecollector | SPDX-License-Identifier: Apache 2.0 TokenTable Fee Collector Interface This interface handles TokenTable service fee calculation. |
| futuretoken | SPDX-License-Identifier: Apache 2.0 TokenTable FutureToken Interface The lightweight interface for TTFutureTokenV2(.5.x), which handles unlocking schedule ownership for TokenTable. |
| hook | SPDX-License-Identifier: Apache 2.0 TokenTable Hook Interface You must implement this interface to become a valid hook for TokenTable Unlocker. |
| mockerc20 | — |
| unlocker | SPDX-License-Identifier: Apache 2.0 TokenTable Unlocker Interface The lightweight interface for TokenTableUnlockerV2(.5.x), which handles token unlocking and distribution for TokenTable. |
| versionable | SPDX-License-Identifier: Apache 2.0 TokenTable Versioning Interface This interface is implemented by all major TokenTable contracts to keep track of their versioning for upgrade compatibility checks. |
deployer
SPDX-License-Identifier: Apache 2.0
TokenTable Deployer Interface
This is the deployer for all TokenTable core and proxy contracts. All initial setup and configuration is automatically done here. You should avoid deploying TokenTable contracts individually unless you know what you’re doing.
Fully qualified path: tokentable_v2::components::interfaces::deployer
Modules
| TTDeployerEvents | — |
| TTDeployerErrors | — |
| __external_ITTDeployerForwardImpl | — |
| __l1_handler_ITTDeployerForwardImpl | — |
| __constructor_ITTDeployerForwardImpl | — |
Traits
Groups:
dispatchers
| ITTDeployerDispatcher | — |
| ITTDeployerLibraryDispatcher | — |
| ITTDeployerSafeLibraryDispatcher | — |
| ITTDeployerSafeDispatcher | — |
Modules
Modules
| TTDeployerEvents | — |
| TTDeployerErrors | — |
| __external_ITTDeployerForwardImpl | — |
| __l1_handler_ITTDeployerForwardImpl | — |
| __constructor_ITTDeployerForwardImpl | — |
TTDeployerEvents
Fully qualified path: tokentable_v2::components::interfaces::deployer::TTDeployerEvents
Structs
Structs
Structs
TokenTableSuiteDeployed
Fully qualified path: tokentable_v2::components::interfaces::deployer::TTDeployerEvents::TokenTableSuiteDeployed
[derive(Drop, starknet::Event)]
pub struct TokenTableSuiteDeployed {
pub by: ContractAddress,
pub project_id: felt252,
pub project_token: ContractAddress,
pub unlocker_instance: ContractAddress,
pub futuretoken_instance: ContractAddress,
}
Members
by
Fully qualified path: tokentable_v2::components::interfaces::deployer::TTDeployerEvents::TokenTableSuiteDeployed::by
pub by: ContractAddress
project_id
Fully qualified path: tokentable_v2::components::interfaces::deployer::TTDeployerEvents::TokenTableSuiteDeployed::project_id
pub project_id: felt252
project_token
Fully qualified path: tokentable_v2::components::interfaces::deployer::TTDeployerEvents::TokenTableSuiteDeployed::project_token
pub project_token: ContractAddress
unlocker_instance
Fully qualified path: tokentable_v2::components::interfaces::deployer::TTDeployerEvents::TokenTableSuiteDeployed::unlocker_instance
pub unlocker_instance: ContractAddress
futuretoken_instance
Fully qualified path: tokentable_v2::components::interfaces::deployer::TTDeployerEvents::TokenTableSuiteDeployed::futuretoken_instance
pub futuretoken_instance: ContractAddress
ClassHashChanged
Fully qualified path: tokentable_v2::components::interfaces::deployer::TTDeployerEvents::ClassHashChanged
[derive(Drop, starknet::Event)]
pub struct ClassHashChanged {
pub unlocker_classhash: ClassHash,
pub futuretoken_classhash: ClassHash,
}
Members
unlocker_classhash
Fully qualified path: tokentable_v2::components::interfaces::deployer::TTDeployerEvents::ClassHashChanged::unlocker_classhash
pub unlocker_classhash: ClassHash
futuretoken_classhash
Fully qualified path: tokentable_v2::components::interfaces::deployer::TTDeployerEvents::ClassHashChanged::futuretoken_classhash
pub futuretoken_classhash: ClassHash
TTDeployerErrors
Fully qualified path: tokentable_v2::components::interfaces::deployer::TTDeployerErrors
Constants
Constants
Constants
ALREADY_DEPLOYED
Fully qualified path: tokentable_v2::components::interfaces::deployer::TTDeployerErrors::ALREADY_DEPLOYED
pub const ALREADY_DEPLOYED: felt252 = 86796102931798046201828147376854484292;
EMPTY_CLASSHASH
Fully qualified path: tokentable_v2::components::interfaces::deployer::TTDeployerErrors::EMPTY_CLASSHASH
pub const EMPTY_CLASSHASH: felt252 = 359836593136170515319433630375301960;
__external_ITTDeployerForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::deployer::__external_ITTDeployerForwardImpl
__l1_handler_ITTDeployerForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::deployer::__l1_handler_ITTDeployerForwardImpl
__constructor_ITTDeployerForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::deployer::__constructor_ITTDeployerForwardImpl
Traits
Traits
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: 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::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
UnsafeNewContractStateTraitForITTDeployerForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::deployer::UnsafeNewContractStateTraitForITTDeployerForwardImpl
pub trait UnsafeNewContractStateTraitForITTDeployerForwardImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::components::interfaces::deployer::UnsafeNewContractStateTraitForITTDeployerForwardImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
feecollector
SPDX-License-Identifier: Apache 2.0
TokenTable Fee Collector Interface
This interface handles TokenTable service fee calculation.
Fully qualified path: tokentable_v2::components::interfaces::feecollector
Modules
| TTFeeCollectorEvents | — |
| TTFeeCollectorErrors | — |
| __external_ITTFeeCollectorForwardImpl | — |
| __l1_handler_ITTFeeCollectorForwardImpl | — |
| __constructor_ITTFeeCollectorForwardImpl | — |
Traits
Groups:
dispatchers
| ITTFeeCollectorDispatcher | — |
| ITTFeeCollectorLibraryDispatcher | — |
| ITTFeeCollectorSafeLibraryDispatcher | — |
| ITTFeeCollectorSafeDispatcher | — |
Modules
Modules
| TTFeeCollectorEvents | — |
| TTFeeCollectorErrors | — |
| __external_ITTFeeCollectorForwardImpl | — |
| __l1_handler_ITTFeeCollectorForwardImpl | — |
| __constructor_ITTFeeCollectorForwardImpl | — |
TTFeeCollectorEvents
Fully qualified path: tokentable_v2::components::interfaces::feecollector::TTFeeCollectorEvents
Structs
Structs
Structs
DefaultFeeSet
Fully qualified path: tokentable_v2::components::interfaces::feecollector::TTFeeCollectorEvents::DefaultFeeSet
[derive(Drop, starknet::Event)]
pub struct DefaultFeeSet {
pub bips: u256,
}
Members
bips
Fully qualified path: tokentable_v2::components::interfaces::feecollector::TTFeeCollectorEvents::DefaultFeeSet::bips
pub bips: u256
CustomFeeSet
Fully qualified path: tokentable_v2::components::interfaces::feecollector::TTFeeCollectorEvents::CustomFeeSet
[derive(Drop, starknet::Event)]
pub struct CustomFeeSet {
pub unlocker_instance: ContractAddress,
pub bips: u256,
}
Members
unlocker_instance
Fully qualified path: tokentable_v2::components::interfaces::feecollector::TTFeeCollectorEvents::CustomFeeSet::unlocker_instance
pub unlocker_instance: ContractAddress
bips
Fully qualified path: tokentable_v2::components::interfaces::feecollector::TTFeeCollectorEvents::CustomFeeSet::bips
pub bips: u256
TTFeeCollectorErrors
Fully qualified path: tokentable_v2::components::interfaces::feecollector::TTFeeCollectorErrors
Constants
Constants
Constants
FEES_TOO_HIGH
Fully qualified path: tokentable_v2::components::interfaces::feecollector::TTFeeCollectorErrors::FEES_TOO_HIGH
pub const FEES_TOO_HIGH: felt252 = 5567409651272663777579100620616;
__external_ITTFeeCollectorForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::feecollector::__external_ITTFeeCollectorForwardImpl
__l1_handler_ITTFeeCollectorForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::feecollector::__l1_handler_ITTFeeCollectorForwardImpl
__constructor_ITTFeeCollectorForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::feecollector::__constructor_ITTFeeCollectorForwardImpl
Traits
Traits
ITTFeeCollector
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollector
pub trait ITTFeeCollector<TContractState>
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::ITTFeeCollector::withdraw_fee
fn withdraw_fee(ref self: TContractState, token: ContractAddress, amount: u256)
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::ITTFeeCollector::set_default_fee
fn set_default_fee(ref self: TContractState, bips: u256)
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::ITTFeeCollector::set_custom_fee
fn set_custom_fee(ref self: TContractState, unlocker_instance: ContractAddress, bips: u256)
get_default_fee
Returns the default fee in basis points.
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollector::get_default_fee
fn get_default_fee(self: @TContractState) -> u256
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::ITTFeeCollector::get_fee
fn get_fee(
self: @TContractState, unlocker_instance: ContractAddress, tokens_transferred: u256,
) -> u256
UnsafeNewContractStateTraitForITTFeeCollectorForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::feecollector::UnsafeNewContractStateTraitForITTFeeCollectorForwardImpl
pub trait UnsafeNewContractStateTraitForITTFeeCollectorForwardImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::components::interfaces::feecollector::UnsafeNewContractStateTraitForITTFeeCollectorForwardImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
futuretoken
SPDX-License-Identifier: Apache 2.0
TokenTable FutureToken Interface
The lightweight interface for TTFutureTokenV2(.5.x), which handles unlocking schedule ownership for TokenTable.
Fully qualified path: tokentable_v2::components::interfaces::futuretoken
Modules
| TTFutureTokenErrors | — |
| __external_ITTFutureTokenForwardImpl | — |
| __l1_handler_ITTFutureTokenForwardImpl | — |
| __constructor_ITTFutureTokenForwardImpl | — |
Traits
Groups:
dispatchers
| ITTFutureTokenDispatcher | — |
| ITTFutureTokenLibraryDispatcher | — |
| ITTFutureTokenSafeLibraryDispatcher | — |
| ITTFutureTokenSafeDispatcher | — |
Modules
Modules
| TTFutureTokenErrors | — |
| __external_ITTFutureTokenForwardImpl | — |
| __l1_handler_ITTFutureTokenForwardImpl | — |
| __constructor_ITTFutureTokenForwardImpl | — |
TTFutureTokenErrors
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::TTFutureTokenErrors
Constants
Constants
Constants
NOT_PERMISSIONED
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::TTFutureTokenErrors::NOT_PERMISSIONED
pub const NOT_PERMISSIONED: felt252 = 104091686396972440391574105127402751300;
__external_ITTFutureTokenForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::__external_ITTFutureTokenForwardImpl
__l1_handler_ITTFutureTokenForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::__l1_handler_ITTFutureTokenForwardImpl
__constructor_ITTFutureTokenForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::__constructor_ITTFutureTokenForwardImpl
Traits
Traits
ITTFutureToken
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureToken
pub trait ITTFutureToken<TContractState>
Trait functions
set_authorized_minter_single_use
Permanently sets the authorized FutureToken minter. This function can only be called once.
Arguments
authorized_minter: The authorized minter, typically an Unlocker contract.
Panics
NOT_PERMISSIONED: If this function has already been called before.
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureToken::set_authorized_minter_single_use
fn set_authorized_minter_single_use(ref self: TContractState, authorized_minter: ContractAddress)
mint
Mints a new FutureToken.
Arguments
to: The owner of the minted FutureToken.unsafe_mint: Usemint(...)instead ofsafe_mint(...).
Panics
NOT_PERMISSIONED: If the caller isn’t the authorized minter.
Returns
u256: The token ID, akaactual_id, of the minted FutureToken.
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureToken::mint
fn mint(ref self: TContractState, to: ContractAddress, unsafe_mint: bool) -> u256
set_token_base_uri
Sets the base token URI.
Arguments
uri: The new URI.
Panics
NOT_PERMISSIONED: If the caller isn’t the owner of the authorized minter.
Events
DidSetBaseURI
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureToken::set_token_base_uri
fn set_token_base_uri(ref self: TContractState, uri: ByteArray)
get_claim_info
Returns information regarding the unlocking schedule attached to a FutureToken.
Arguments
token_id: The FutureToken we are querying. This is also theactual_id.
Returns
u256: The claimable amount of tokens this time.u256: The updated total amount of tokens claimed after this claim action.bool: If the schedule attached to said FutureToken is cancelable.
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureToken::get_claim_info
fn get_claim_info(self: @TContractState, token_id: u256) -> (u256, u256, bool)
UnsafeNewContractStateTraitForITTFutureTokenForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::UnsafeNewContractStateTraitForITTFutureTokenForwardImpl
pub trait UnsafeNewContractStateTraitForITTFutureTokenForwardImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::UnsafeNewContractStateTraitForITTFutureTokenForwardImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
hook
SPDX-License-Identifier: Apache 2.0
TokenTable Hook Interface
You must implement this interface to become a valid hook for TokenTable Unlocker.
Fully qualified path: tokentable_v2::components::interfaces::hook
Modules
Traits
Groups:
dispatchers
Modules
Modules
__external_ITTHookForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::hook::__external_ITTHookForwardImpl
__l1_handler_ITTHookForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::hook::__l1_handler_ITTHookForwardImpl
__constructor_ITTHookForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::hook::__constructor_ITTHookForwardImpl
Traits
Traits
ITTHook
Fully qualified path: tokentable_v2::components::interfaces::hook::ITTHook
pub trait ITTHook<TContractState>
Trait functions
did_call
A callback function that’s called by the Unlocker.
Arguments
function_name: The name of the Unlocker function called.context: The encoded felt252 array of relevant call data.caller: The caller of the Unlocker function.
Fully qualified path: tokentable_v2::components::interfaces::hook::ITTHook::did_call
fn did_call(
ref self: TContractState,
function_name: felt252,
context: Span<felt252>,
caller: ContractAddress,
)
UnsafeNewContractStateTraitForITTHookForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::hook::UnsafeNewContractStateTraitForITTHookForwardImpl
pub trait UnsafeNewContractStateTraitForITTHookForwardImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::components::interfaces::hook::UnsafeNewContractStateTraitForITTHookForwardImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
mockerc20
Fully qualified path: tokentable_v2::components::interfaces::mockerc20
Modules
| __external_IMockERC20ForwardImpl | — |
| __l1_handler_IMockERC20ForwardImpl | — |
| __constructor_IMockERC20ForwardImpl | — |
Traits
Groups:
dispatchers
| IMockERC20Dispatcher | — |
| IMockERC20LibraryDispatcher | — |
| IMockERC20SafeLibraryDispatcher | — |
| IMockERC20SafeDispatcher | — |
Modules
Modules
| __external_IMockERC20ForwardImpl | — |
| __l1_handler_IMockERC20ForwardImpl | — |
| __constructor_IMockERC20ForwardImpl | — |
__external_IMockERC20ForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::__external_IMockERC20ForwardImpl
__l1_handler_IMockERC20ForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::__l1_handler_IMockERC20ForwardImpl
__constructor_IMockERC20ForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::__constructor_IMockERC20ForwardImpl
Traits
Traits
IMockERC20
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::IMockERC20
pub trait IMockERC20<TContractState>
Trait functions
mint
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::IMockERC20::mint
fn mint(ref self: TContractState, to: ContractAddress, amount: u256)
UnsafeNewContractStateTraitForIMockERC20ForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::UnsafeNewContractStateTraitForIMockERC20ForwardImpl
pub trait UnsafeNewContractStateTraitForIMockERC20ForwardImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::UnsafeNewContractStateTraitForIMockERC20ForwardImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
unlocker
SPDX-License-Identifier: Apache 2.0
TokenTable Unlocker Interface
The lightweight interface for TokenTableUnlockerV2(.5.x), which handles token unlocking and distribution for TokenTable.
Fully qualified path: tokentable_v2::components::interfaces::unlocker
Modules
| TTUnlockerEvents | — |
| TTUnlockerErrors | — |
| __external_ITTUnlockerForwardImpl | — |
| __l1_handler_ITTUnlockerForwardImpl | — |
| __constructor_ITTUnlockerForwardImpl | — |
Traits
Groups:
dispatchers
| ITTUnlockerDispatcher | — |
| ITTUnlockerLibraryDispatcher | — |
| ITTUnlockerSafeLibraryDispatcher | — |
| ITTUnlockerSafeDispatcher | — |
Modules
Modules
| TTUnlockerEvents | — |
| TTUnlockerErrors | — |
| __external_ITTUnlockerForwardImpl | — |
| __l1_handler_ITTUnlockerForwardImpl | — |
| __constructor_ITTUnlockerForwardImpl | — |
TTUnlockerEvents
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents
Structs
| Initialized | — |
| PresetCreated | — |
| ActualCreated | — |
| TokensClaimed | — |
| TokensWithdrawn | — |
| ActualCancelled | — |
| CancelDisabled | — |
| HookDisabled | — |
| WithdrawDisabled | — |
| CreateDisabled | — |
| ClaimingDelegateSet | — |
Structs
Structs
| Initialized | — |
| PresetCreated | — |
| ActualCreated | — |
| TokensClaimed | — |
| TokensWithdrawn | — |
| ActualCancelled | — |
| CancelDisabled | — |
| HookDisabled | — |
| WithdrawDisabled | — |
| CreateDisabled | — |
| ClaimingDelegateSet | — |
Initialized
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::Initialized
[derive(Drop, starknet::Event)]
pub struct Initialized {
pub project_id: felt252,
}
Members
project_id
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::Initialized::project_id
pub project_id: felt252
PresetCreated
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::PresetCreated
[derive(Drop, starknet::Event)]
pub struct PresetCreated {
pub from: ContractAddress,
pub preset_id: felt252,
pub recipient_id: u64,
}
Members
from
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::PresetCreated::from
pub from: ContractAddress
preset_id
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::PresetCreated::preset_id
pub preset_id: felt252
recipient_id
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::PresetCreated::recipient_id
pub recipient_id: u64
ActualCreated
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCreated
[derive(Drop, starknet::Event)]
pub struct ActualCreated {
pub from: ContractAddress,
pub preset_id: felt252,
pub actual_id: u256,
pub recipient: ContractAddress,
pub start_timestamp_absolute: u64,
pub amount_skipped: u256,
pub total_amount: u256,
pub recipient_id: u64,
pub batch_id: u64,
}
Members
from
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCreated::from
pub from: ContractAddress
preset_id
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCreated::preset_id
pub preset_id: felt252
actual_id
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCreated::actual_id
pub actual_id: u256
recipient
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCreated::recipient
pub recipient: ContractAddress
start_timestamp_absolute
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCreated::start_timestamp_absolute
pub start_timestamp_absolute: u64
amount_skipped
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCreated::amount_skipped
pub amount_skipped: u256
total_amount
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCreated::total_amount
pub total_amount: u256
recipient_id
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCreated::recipient_id
pub recipient_id: u64
batch_id
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCreated::batch_id
pub batch_id: u64
TokensClaimed
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::TokensClaimed
[derive(Drop, starknet::Event)]
pub struct TokensClaimed {
pub actual_id: u256,
pub caller: ContractAddress,
pub to: ContractAddress,
pub amount: u256,
pub fees_charged: u256,
pub recipient_id: u64,
}
Members
actual_id
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::TokensClaimed::actual_id
pub actual_id: u256
caller
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::TokensClaimed::caller
pub caller: ContractAddress
to
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::TokensClaimed::to
pub to: ContractAddress
amount
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::TokensClaimed::amount
pub amount: u256
fees_charged
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::TokensClaimed::fees_charged
pub fees_charged: u256
recipient_id
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::TokensClaimed::recipient_id
pub recipient_id: u64
TokensWithdrawn
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::TokensWithdrawn
[derive(Drop, starknet::Event)]
pub struct TokensWithdrawn {
pub by: ContractAddress,
pub amount: u256,
}
Members
by
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::TokensWithdrawn::by
pub by: ContractAddress
amount
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::TokensWithdrawn::amount
pub amount: u256
ActualCancelled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCancelled
[derive(Drop, starknet::Event)]
pub struct ActualCancelled {
pub from: ContractAddress,
pub actual_id: u256,
pub pending_amount_claimable: u256,
pub did_wipe_claimable_balance: bool,
pub recipient_id: u64,
}
Members
from
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCancelled::from
pub from: ContractAddress
actual_id
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCancelled::actual_id
pub actual_id: u256
pending_amount_claimable
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCancelled::pending_amount_claimable
pub pending_amount_claimable: u256
did_wipe_claimable_balance
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCancelled::did_wipe_claimable_balance
pub did_wipe_claimable_balance: bool
recipient_id
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ActualCancelled::recipient_id
pub recipient_id: u64
CancelDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::CancelDisabled
[derive(Drop, starknet::Event)]
pub struct CancelDisabled {
pub from: ContractAddress,
}
Members
from
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::CancelDisabled::from
pub from: ContractAddress
HookDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::HookDisabled
[derive(Drop, starknet::Event)]
pub struct HookDisabled {
pub from: ContractAddress,
}
Members
from
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::HookDisabled::from
pub from: ContractAddress
WithdrawDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::WithdrawDisabled
[derive(Drop, starknet::Event)]
pub struct WithdrawDisabled {
pub from: ContractAddress,
}
Members
from
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::WithdrawDisabled::from
pub from: ContractAddress
CreateDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::CreateDisabled
[derive(Drop, starknet::Event)]
pub struct CreateDisabled {
pub from: ContractAddress,
}
Members
from
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::CreateDisabled::from
pub from: ContractAddress
ClaimingDelegateSet
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ClaimingDelegateSet
[derive(Drop, starknet::Event)]
pub struct ClaimingDelegateSet {
pub from: ContractAddress,
pub delegate: ContractAddress,
}
Members
from
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ClaimingDelegateSet::from
pub from: ContractAddress
delegate
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerEvents::ClaimingDelegateSet::delegate
pub delegate: ContractAddress
TTUnlockerErrors
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerErrors
Constants
| INVALID_PRESET_FORMAT | — |
| PRESET_EXISTS | — |
| PRESET_DOES_NOT_EXIST | — |
| INVALID_SKIP_AMOUNT | — |
| NOT_PERMISSIONED | — |
| GENERIC_ERC20_TRANSFER_ERROR | — |
| ACTUAL_DOES_NOT_EXIST | — |
Constants
Constants
| INVALID_PRESET_FORMAT | — |
| PRESET_EXISTS | — |
| PRESET_DOES_NOT_EXIST | — |
| INVALID_SKIP_AMOUNT | — |
| NOT_PERMISSIONED | — |
| GENERIC_ERC20_TRANSFER_ERROR | — |
| ACTUAL_DOES_NOT_EXIST | — |
INVALID_PRESET_FORMAT
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerErrors::INVALID_PRESET_FORMAT
pub const INVALID_PRESET_FORMAT: felt252 = 107136844357624680248828011491271070557228139102548;
PRESET_EXISTS
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerErrors::PRESET_EXISTS
pub const PRESET_EXISTS: felt252 = 6363714581063373786065977693267;
PRESET_DOES_NOT_EXIST
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerErrors::PRESET_DOES_NOT_EXIST
pub const PRESET_DOES_NOT_EXIST: felt252 = 117389814235009852369255722914078576058580534383444;
INVALID_SKIP_AMOUNT
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerErrors::INVALID_SKIP_AMOUNT
pub const INVALID_SKIP_AMOUNT: felt252 = 1634778508874888309464470434658196019888868948;
NOT_PERMISSIONED
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerErrors::NOT_PERMISSIONED
pub const NOT_PERMISSIONED: felt252 = 104091686396972440391574105127402751300;
GENERIC_ERC20_TRANSFER_ERROR
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerErrors::GENERIC_ERC20_TRANSFER_ERROR
pub const GENERIC_ERC20_TRANSFER_ERROR: felt252 =
7505683438386474370137558885712127454241077574283995097394146594642;
ACTUAL_DOES_NOT_EXIST
Fully qualified path: tokentable_v2::components::interfaces::unlocker::TTUnlockerErrors::ACTUAL_DOES_NOT_EXIST
pub const ACTUAL_DOES_NOT_EXIST: felt252 = 95381989497514737534554536413352520899837179810644;
__external_ITTUnlockerForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::unlocker::__external_ITTUnlockerForwardImpl
__l1_handler_ITTUnlockerForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::unlocker::__l1_handler_ITTUnlockerForwardImpl
__constructor_ITTUnlockerForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::unlocker::__constructor_ITTUnlockerForwardImpl
Traits
Traits
ITTUnlocker
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker
pub trait ITTUnlocker<TContractState>
Trait functions
create_preset
Creates an unlocking schedule Preset.
Arguments
preset_id: Refer toPreset.linear_start_timestamps_relative: Refer toPreset.linear_start_timestamps_relative: Refer toPreset.linear_bips: Refer toPreset.num_of_unlocks_for_each_linear: Refer toPreset.stream: Refer toPreset.recipient_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.
Panics
INVALID_PRESET_FORMAT: If the preset is not formatted correctly (e.g.linear_bipsfails to add up toBIPS_PRECISION)PRESET_EXISTS: If the inputpreset_idhas already been created.OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
PresetCreated
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::create_preset
fn create_preset(
ref self: TContractState,
preset_id: felt252,
linear_start_timestamps_relative: Span<u64>,
linear_end_timestamp_relative: u64,
linear_bips: Span<u64>,
num_of_unlocks_for_each_linear: Span<u64>,
stream: bool,
recipient_id: u64,
extraData: felt252,
)
create_actual
Creates an unlocking schedule Actual.
Arguments
recipient: The initial recipient of the unlocked tokens.preset_id: The unlocking schedule preset that thisActualbuilds on top of.start_timestamp_absolute: Refer toActual.amount_skipped: Refer toActual.total_amount: Refer toActual.unsafe_mint: Usemint(...)instead ofsafe_mint(...).recipient_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.batch_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.
Panics
PRESET_DOES_NOT_EXIST: Ifpreset_iddoes not exist.INVALID_SKIP_AMOUNT: If the amount of tokens skipped is greater than or equal to the total unlocked amount.OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
ActualCreated
Returns
u256: The createdactual_id, aka the unlocking schedule ID.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::create_actual
fn create_actual(
ref self: TContractState,
recipient: ContractAddress,
preset_id: felt252,
start_timestamp_absolute: u64,
amount_skipped: u256,
total_amount: u256,
unsafe_mint: bool,
recipient_id: u64,
batch_id: u64,
extraData: felt252,
) -> u256
withdraw_deposit
Withdraws any unclaimed deposit held by the Unlocker.
Arguments
amount: The amount of tokens to withdraw.
Panics
NOT_PERMISSIONED: If withdrawing has been disabled.GENERIC_ERC20_TRANSFER_ERROR: If for any reason the token transfer returnsfalse.OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
TokensWithdrawn
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::withdraw_deposit
fn withdraw_deposit(ref self: TContractState, amount: u256, extraData: felt252)
claim
Claims your unlocked tokens as a recipient. Any fees charged are not taken from the claimed amount.
Arguments
actual_id: The schedule ID assigned to you.claim_to: The destination address for the claimed tokens. Use Zeroable::zero() to claim to your current address.recipient_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.
Panics
NOT_PERMISSIONED: If the caller isn’t the recipient of saidactual_id.GENERIC_ERC20_TRANSFER_ERROR: If for any reason the token transfer returnsfalse.ReentrancyGuardComponent::Errors::REENTRANT_CALL: If a reentrant call is detected.
Events
TokensClaimed
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::claim
fn claim(
ref self: TContractState,
actual_id: u256,
claim_to: ContractAddress,
recipient_id: u64,
extraData: felt252,
)
delegate_claim
Claims someone else’s unlocked tokens as an authorized claiming delegate.
Arguments
actual_id: The schedule ID assigned to you.recipient_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.
Panics
NOT_PERMISSIONED: If the caller isn’t an authorized claiming delegate.GENERIC_ERC20_TRANSFER_ERROR: If for any reason the token transfer returnsfalse.ReentrancyGuardComponent::Errors::REENTRANT_CALL: If a reentrant call is detected.
Events
TokensClaimed
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::delegate_claim
fn delegate_claim(ref self: TContractState, actual_id: u256, recipient_id: u64, extraData: felt252)
cancel
Cancels an existing schedule.
Arguments
actual_id: The schedule ID to cancel.wipe_claimable_balance: Normally when canceling a schedule, calculation is performed to ensure the recipient will receive unlocked tokens until the moment of cancellation. This option prevents such calculation.recipient_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.
Panics
NOT_PERMISSIONED: If cancellation is disabled.OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
ActualCancelled
Returns
u256: The amount claimable by the recipient from the cancelled schedule.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::cancel
fn cancel(
ref self: TContractState,
actual_id: u256,
wipe_claimable_balance: bool,
recipient_id: u64,
extraData: felt252,
) -> u256
set_hook
Sets the external hook contract.
Arguments
hook: The address of an external contract that implements ITTHook.
Panics
NOT_PERMISSIONED: If hooking is disabled.OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::set_hook
fn set_hook(ref self: TContractState, hook: ContractAddress)
set_claiming_delegate
Sets the claiming delegate, who can trigger claim on behalf of recipients.
Arguments
delegate: The address of the claiming delegate.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::set_claiming_delegate
fn set_claiming_delegate(ref self: TContractState, delegate: ContractAddress)
disable_cancel
Permanently disables the ability for the owner to cancel schedules.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
CancelDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::disable_cancel
fn disable_cancel(ref self: TContractState)
disable_hook
Permanently disables the ability for the owner to set external hooks. Also clears the current hook.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
HookDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::disable_hook
fn disable_hook(ref self: TContractState)
disable_withdraw
Permanently disables the ability for the owner to withdraw deposit.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
WithdrawDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::disable_withdraw
fn disable_withdraw(ref self: TContractState)
disable_create
Permanently disables the ability for the owner to create new schedules.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
CreateDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::disable_create
fn disable_create(ref self: TContractState)
deployer
Returns the address of the TokenTable Deployer.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::deployer
fn deployer(self: @TContractState) -> ContractAddress
futuretoken
Returns the address of the FutureToken NFT created alongside this Unlocker instance.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::futuretoken
fn futuretoken(self: @TContractState) -> ContractAddress
hook
Returns the address of the external hook set by the owner.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::hook
fn hook(self: @TContractState) -> ContractAddress
claiming_delegate
Returns the address of the claiming delegate set by the owner.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::claiming_delegate
fn claiming_delegate(self: @TContractState) -> ContractAddress
is_cancelable
Returns if schedules are cancelable.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::is_cancelable
fn is_cancelable(self: @TContractState) -> bool
is_hookable
Returns if external hooks are allowed to be set.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::is_hookable
fn is_hookable(self: @TContractState) -> bool
is_withdrawable
Returns if the owner can withdraw deposited tokens.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::is_withdrawable
fn is_withdrawable(self: @TContractState) -> bool
is_createable
Returns if the owner can create new schedules.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::is_createable
fn is_createable(self: @TContractState) -> bool
get_project_token
Returns the project token that’s being unlocked.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::get_project_token
fn get_project_token(self: @TContractState) -> ContractAddress
get_preset
Returns the requested Preset struct.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::get_preset
fn get_preset(self: @TContractState, preset_id: felt252) -> Preset
get_actual
Returns the requested Actual struct.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::get_actual
fn get_actual(self: @TContractState, actual_id: u256) -> Actual
get_cancelled_amount_claimable
Returns the amount of claimable tokens for a cancelled schedule.
Arguments
actual_id: The cancenlled schedule ID that we are querying.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::get_cancelled_amount_claimable
fn get_cancelled_amount_claimable(self: @TContractState, actual_id: u256) -> u256
calculate_amount_claimable
Calculates the amount of claimable tokens for an ongoing schedule. Internally calls simulate_amount_claimable().
Arguments
actual_id: The ongoing schedule ID that we are querying.
Returns
u256: The claimable amount of tokens this time.u256: The updated total amount of tokens claimed after this claim action.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::calculate_amount_claimable
fn calculate_amount_claimable(self: @TContractState, actual_id: u256) -> (u256, u256)
simulate_amount_claimable
Simulates the amount of claimable tokens for an ongoing schedule. This function exposes more parameters to make testing the calculation logic easier.
Arguments
actual_start_timestamp_absolute: Refer toActual.start_timestamp_absolute.preset_linear_end_timestamp_relative: Refer toPreset.linear_end_timestamp_relative.preset_linear_start_timestamps_relative: Refer toPreset.linear_start_timestamps_relative.claim_timestamp_absolute: The timestamp of when claim() is called. Must be in the future.preset_linear_bips: Refer toPreset.linear_bips.preset_num_of_unlocks_for_each_linear: Refer toPreset.num_of_unlocks_for_each_linear.preset_stream: Refer toPreset.stream.preset_bips_precision: The decimal precision of calculation. Hardcoded to 10000.actual_total_amount: Refer toActual.total_amount.
Returns
u256: The claimable amount of tokens this time.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlocker::simulate_amount_claimable
fn simulate_amount_claimable(
self: @TContractState,
actual_start_timestamp_absolute: u64,
preset_linear_end_timestamp_relative: u64,
preset_linear_start_timestamps_relative: Span<u64>,
claim_timestamp_absolute: u64,
preset_linear_bips: Span<u64>,
preset_num_of_unlocks_for_each_linear: Span<u64>,
preset_stream: bool,
preset_bips_precision: u64,
actual_total_amount: u256,
) -> u256
UnsafeNewContractStateTraitForITTUnlockerForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::unlocker::UnsafeNewContractStateTraitForITTUnlockerForwardImpl
pub trait UnsafeNewContractStateTraitForITTUnlockerForwardImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::components::interfaces::unlocker::UnsafeNewContractStateTraitForITTUnlockerForwardImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
versionable
SPDX-License-Identifier: Apache 2.0
TokenTable Versioning Interface
This interface is implemented by all major TokenTable contracts to keep track of their versioning for upgrade compatibility checks.
Fully qualified path: tokentable_v2::components::interfaces::versionable
Modules
| __external_IVersionableForwardImpl | — |
| __l1_handler_IVersionableForwardImpl | — |
| __constructor_IVersionableForwardImpl | — |
Traits
Groups:
dispatchers
| IVersionableDispatcher | — |
| IVersionableLibraryDispatcher | — |
| IVersionableSafeLibraryDispatcher | — |
| IVersionableSafeDispatcher | — |
Modules
Modules
| __external_IVersionableForwardImpl | — |
| __l1_handler_IVersionableForwardImpl | — |
| __constructor_IVersionableForwardImpl | — |
__external_IVersionableForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::versionable::__external_IVersionableForwardImpl
__l1_handler_IVersionableForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::versionable::__l1_handler_IVersionableForwardImpl
__constructor_IVersionableForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::versionable::__constructor_IVersionableForwardImpl
Traits
Traits
IVersionable
Fully qualified path: tokentable_v2::components::interfaces::versionable::IVersionable
pub trait IVersionable<TContractState>
Trait functions
version
Fully qualified path: tokentable_v2::components::interfaces::versionable::IVersionable::version
fn version(self: @TContractState) -> felt252
UnsafeNewContractStateTraitForIVersionableForwardImpl
Fully qualified path: tokentable_v2::components::interfaces::versionable::UnsafeNewContractStateTraitForIVersionableForwardImpl
pub trait UnsafeNewContractStateTraitForIVersionableForwardImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::components::interfaces::versionable::UnsafeNewContractStateTraitForIVersionableForwardImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
span_impl
Fully qualified path: tokentable_v2::components::span_impl
Impls
Impls
Impls
StoreU64Span
Fully qualified path: tokentable_v2::components::span_impl::StoreU64Span
pub impl StoreU64Span of Store<Span<u64>>;
Impl functions
read
Fully qualified path: tokentable_v2::components::span_impl::StoreU64Span::read
fn read(address_domain: u32, base: StorageBaseAddress) -> Result<Span<u64>, Array<felt252>>
write
Fully qualified path: tokentable_v2::components::span_impl::StoreU64Span::write
fn write(
address_domain: u32, base: StorageBaseAddress, value: Span<u64>,
) -> Result<(), Array<felt252>>
read_at_offset
Fully qualified path: tokentable_v2::components::span_impl::StoreU64Span::read_at_offset
fn read_at_offset(
address_domain: u32, base: StorageBaseAddress, mut offset: u8,
) -> Result<Span<u64>, Array<felt252>>
write_at_offset
Fully qualified path: tokentable_v2::components::span_impl::StoreU64Span::write_at_offset
fn write_at_offset(
address_domain: u32, base: StorageBaseAddress, mut offset: u8, mut value: Span<u64>,
) -> Result<(), Array<felt252>>
size
Fully qualified path: tokentable_v2::components::span_impl::StoreU64Span::size
fn size() -> u8
custom_erc721
Fully qualified path: tokentable_v2::components::custom_erc721
Modules
| ERC721Component | … |
| __external_IERC721TTCustomForwardImpl | — |
| __l1_handler_IERC721TTCustomForwardImpl | — |
| __constructor_IERC721TTCustomForwardImpl | — |
Traits
| IERC721TTCustom | SPDX-License-Identifier: MIT OpenZeppelin Contracts for Cairo v0.17.0 (token/erc721/erc721.cairo) Modified by Jack Xu @ EthSign |
| UnsafeNewContractStateTraitForIERC721TTCustomForwardImpl | — |
Groups:
dispatchers
| IERC721TTCustomDispatcher | — |
| IERC721TTCustomLibraryDispatcher | — |
| IERC721TTCustomSafeLibraryDispatcher | — |
| IERC721TTCustomSafeDispatcher | — |
Modules
Modules
| ERC721Component | … |
| __external_IERC721TTCustomForwardImpl | — |
| __l1_handler_IERC721TTCustomForwardImpl | — |
| __constructor_IERC721TTCustomForwardImpl | — |
ERC721Component
ERC721 Component
The ERC721 component provides implementations for both the IERC721 interface and the IERC721Metadata interface.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component
Modules
Free functions
Structs
| Storage | — |
| Transfer | Emitted when token_id token is transferred from from to to . |
| Approval | Emitted when owner enables approved to manage the token_id token. |
| ApprovalForAll | Emitted when owner enables or disables ( approved ) operator to manage all of its assets. |
| ComponentState | — |
Enums
Traits
Modules
Modules
Errors
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Errors
Constants
| INVALID_TOKEN_ID | — |
| INVALID_ACCOUNT | — |
| INVALID_OPERATOR | — |
| UNAUTHORIZED | — |
| INVALID_RECEIVER | — |
| ALREADY_MINTED | — |
| INVALID_SENDER | — |
| SAFE_MINT_FAILED | — |
| SAFE_TRANSFER_FAILED | — |
| TRANSFER_NOT_ALLOWED | — |
Constants
Constants
| INVALID_TOKEN_ID | — |
| INVALID_ACCOUNT | — |
| INVALID_OPERATOR | — |
| UNAUTHORIZED | — |
| INVALID_RECEIVER | — |
| ALREADY_MINTED | — |
| INVALID_SENDER | — |
| SAFE_MINT_FAILED | — |
| SAFE_TRANSFER_FAILED | — |
| TRANSFER_NOT_ALLOWED | — |
INVALID_TOKEN_ID
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Errors::INVALID_TOKEN_ID
pub const INVALID_TOKEN_ID: felt252 = 1699754265108099871470897430857803785044358442022594431300;
INVALID_ACCOUNT
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Errors::INVALID_ACCOUNT
pub const INVALID_ACCOUNT: felt252 = 6639665098078515122933193089288296035324163911262236276;
INVALID_OPERATOR
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Errors::INVALID_OPERATOR
pub const INVALID_OPERATOR: felt252 = 1699754265108099871470897430857803785043998428985933721458;
UNAUTHORIZED
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Errors::UNAUTHORIZED
pub const UNAUTHORIZED: felt252 = 28517144452639854893507085734425180430328771592574685650394834290;
INVALID_RECEIVER
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Errors::INVALID_RECEIVER
pub const INVALID_RECEIVER: felt252 = 1699754265108099871470897430857803785044211503288580203890;
ALREADY_MINTED
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Errors::ALREADY_MINTED
pub const ALREADY_MINTED: felt252 =
7300388979875802852732128123657212830355657500092055048969713378660;
INVALID_SENDER
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Errors::INVALID_SENDER
pub const INVALID_SENDER: felt252 = 25936191789369199698957785505032406388004815261427058;
SAFE_MINT_FAILED
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Errors::SAFE_MINT_FAILED
pub const SAFE_MINT_FAILED: felt252 = 1699754265108099871484121886731334982652068626744482751844;
SAFE_TRANSFER_FAILED
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Errors::SAFE_TRANSFER_FAILED
pub const SAFE_TRANSFER_FAILED: felt252 =
7300388979875802852726106486788936616499335593446695555330055365988;
TRANSFER_NOT_ALLOWED
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Errors::TRANSFER_NOT_ALLOWED
pub const TRANSFER_NOT_ALLOWED: felt252 =
7300388979875802852732194157839500089249724395097943397307266852196;
__external_ERC721TTCustomImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__external_ERC721TTCustomImpl
__l1_handler_ERC721TTCustomImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__l1_handler_ERC721TTCustomImpl
__constructor_ERC721TTCustomImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__constructor_ERC721TTCustomImpl
__external_ERC721Impl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__external_ERC721Impl
__l1_handler_ERC721Impl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__l1_handler_ERC721Impl
__constructor_ERC721Impl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__constructor_ERC721Impl
__external_ERC721MetadataImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__external_ERC721MetadataImpl
__l1_handler_ERC721MetadataImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__l1_handler_ERC721MetadataImpl
__constructor_ERC721MetadataImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__constructor_ERC721MetadataImpl
__external_ERC721CamelOnlyImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__external_ERC721CamelOnlyImpl
__l1_handler_ERC721CamelOnlyImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__l1_handler_ERC721CamelOnlyImpl
__constructor_ERC721CamelOnlyImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__constructor_ERC721CamelOnlyImpl
__external_ERC721MetadataCamelOnlyImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__external_ERC721MetadataCamelOnlyImpl
__l1_handler_ERC721MetadataCamelOnlyImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__l1_handler_ERC721MetadataCamelOnlyImpl
__constructor_ERC721MetadataCamelOnlyImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__constructor_ERC721MetadataCamelOnlyImpl
__external_ERC721MixinImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__external_ERC721MixinImpl
__l1_handler_ERC721MixinImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__l1_handler_ERC721MixinImpl
__constructor_ERC721MixinImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::__constructor_ERC721MixinImpl
Free functions
Free functions
unsafe_new_component_state
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::unsafe_new_component_state
pub fn unsafe_new_component_state<TContractState>() -> ComponentState<TContractState>
Structs
Structs
| Storage | — |
| Transfer | Emitted when token_id token is transferred from from to to . |
| Approval | Emitted when owner enables approved to manage the token_id token. |
| ApprovalForAll | Emitted when owner enables or disables ( approved ) operator to manage all of its assets. |
| ComponentState | — |
Storage
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Storage
[storage]
pub struct Storage {
pub ERC721_name: ByteArray,
pub ERC721_symbol: ByteArray,
pub ERC721_owners: Map<u256, ContractAddress>,
pub ERC721_balances: Map<ContractAddress, u256>,
pub ERC721_token_approvals: Map<u256, ContractAddress>,
pub ERC721_operator_approvals: Map<(ContractAddress, ContractAddress), bool>,
pub ERC721_base_uri: ByteArray,
pub ERC721_allow_transfer: bool,
}
Members
ERC721_name
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Storage::ERC721_name
pub ERC721_name: ByteArray
ERC721_symbol
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Storage::ERC721_symbol
pub ERC721_symbol: ByteArray
ERC721_owners
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Storage::ERC721_owners
pub ERC721_owners: Map<u256, ContractAddress>
ERC721_balances
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Storage::ERC721_balances
pub ERC721_balances: Map<ContractAddress, u256>
ERC721_token_approvals
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Storage::ERC721_token_approvals
pub ERC721_token_approvals: Map<u256, ContractAddress>
ERC721_operator_approvals
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Storage::ERC721_operator_approvals
pub ERC721_operator_approvals: Map<(ContractAddress, ContractAddress), bool>
ERC721_base_uri
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Storage::ERC721_base_uri
pub ERC721_base_uri: ByteArray
ERC721_allow_transfer
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Storage::ERC721_allow_transfer
pub ERC721_allow_transfer: bool
Transfer
Emitted when token_id token is transferred from from to to.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Transfer
[derive(Drop, PartialEq, starknet::Event)]
pub struct Transfer {
pub from: ContractAddress,
pub to: ContractAddress,
pub token_id: u256,
}
Members
from
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Transfer::from
pub from: ContractAddress
to
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Transfer::to
pub to: ContractAddress
token_id
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Transfer::token_id
pub token_id: u256
Approval
Emitted when owner enables approved to manage the token_id token.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Approval
[derive(Drop, PartialEq, starknet::Event)]
pub struct Approval {
pub owner: ContractAddress,
pub approved: ContractAddress,
pub token_id: u256,
}
Members
owner
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Approval::owner
pub owner: ContractAddress
approved
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Approval::approved
pub approved: ContractAddress
token_id
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Approval::token_id
pub token_id: u256
ApprovalForAll
Emitted when owner enables or disables (approved) operator to manage
all of its assets.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::ApprovalForAll
[derive(Drop, PartialEq, starknet::Event)]
pub struct ApprovalForAll {
pub owner: ContractAddress,
pub operator: ContractAddress,
pub approved: bool,
}
Members
owner
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::ApprovalForAll::owner
pub owner: ContractAddress
operator
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::ApprovalForAll::operator
pub operator: ContractAddress
approved
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::ApprovalForAll::approved
pub approved: bool
ComponentState
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::ComponentState
pub struct ComponentState<TContractState> {}
Enums
Enums
Event
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Event
pub enum Event {
Transfer: Transfer,
Approval: Approval,
ApprovalForAll: ApprovalForAll,
}
Variants
Transfer
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Event::Transfer
Transfer: Transfer
Approval
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Event::Approval
Approval: Approval
ApprovalForAll
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::Event::ApprovalForAll
ApprovalForAll: ApprovalForAll
Traits
Traits
ERC721HooksTrait
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::ERC721HooksTrait
pub trait ERC721HooksTrait<TContractState>
Trait functions
before_update
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::ERC721HooksTrait::before_update
fn before_update(
ref self: ComponentState<TContractState>,
to: ContractAddress,
token_id: u256,
auth: ContractAddress,
)
after_update
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::ERC721HooksTrait::after_update
fn after_update(
ref self: ComponentState<TContractState>,
to: ContractAddress,
token_id: u256,
auth: ContractAddress,
)
HasComponent
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::HasComponent
pub trait HasComponent<TContractState>
Trait functions
get_component
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::HasComponent::get_component
fn get_component(self: @TContractState) -> @ComponentState<TContractState>
get_component_mut
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::HasComponent::get_component_mut
fn get_component_mut(ref self: TContractState) -> ComponentState<TContractState>
get_contract
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::HasComponent::get_contract
fn get_contract(self: @ComponentState<TContractState>) -> @TContractState
get_contract_mut
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::HasComponent::get_contract_mut
fn get_contract_mut(ref self: ComponentState<TContractState>) -> TContractState
emit
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::HasComponent::emit
fn emit<S, impl IntoImp: Into<S, tokentable_v2::components::custom_erc721::ERC721Component::Event>>(
ref self: ComponentState<TContractState>, event: S,
)
InternalTrait
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait
pub trait InternalTrait<
TContractState,
+HasComponent<TContractState>,
impl SRC5: HasComponent<TContractState>,
impl Hooks: ERC721HooksTrait<TContractState>,
+Drop<TContractState>,
>
Trait functions
initializer
Initializes the contract by setting the token name, symbol, and base URI. This should only be used inside the contract’s constructor.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::initializer
fn initializer(
ref self: ComponentState<TContractState>,
name: ByteArray,
symbol: ByteArray,
base_uri: ByteArray,
)
exists
Returns whether token_id exists.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::exists
fn exists(self: @ComponentState<TContractState>, token_id: u256) -> bool
transfer
Transfers token_id from from to to.
Internal function without access restriction.
WARNING: This method may lead to the loss of tokens if to is not aware of the ERC721
protocol.
Requirements:
tois not the zero address.fromis the token owner.token_idexists.
Emits a Transfer event.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::transfer
fn transfer(
ref self: ComponentState<TContractState>,
from: ContractAddress,
to: ContractAddress,
token_id: u256,
)
mint
Mints token_id and transfers it to to.
Internal function without access restriction.
WARNING: This method may lead to the loss of tokens if to is not aware of the ERC721
protocol.
Requirements:
tois not the zero address.token_iddoes not exist.
Emits a Transfer event.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::mint
fn mint(ref self: ComponentState<TContractState>, to: ContractAddress, token_id: u256)
safe_transfer
Transfers ownership of token_id from from if to is either an account or
IERC721Receiver.
data is additional data, it has no specified format and it is sent in call to to.
WARNING: This method makes an external call to the recipient contract, which can lead to reentrancy vulnerabilities.
Requirements:
tocannot be the zero address.frommust be the token owner.token_idexists.tois either an account contract or supports theIERC721Receiverinterface.
Emits a Transfer event.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::safe_transfer
fn safe_transfer(
ref self: ComponentState<TContractState>,
from: ContractAddress,
to: ContractAddress,
token_id: u256,
data: Span<felt252>,
)
safe_mint
Mints token_id if to is either an account or IERC721Receiver.
data is additional data, it has no specified format and it is sent in call to to.
WARNING: This method makes an external call to the recipient contract, which can lead to reentrancy vulnerabilities.
Requirements:
token_iddoes not exist.tois either an account contract or supports theIERC721Receiverinterface.
Emits a Transfer event.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::safe_mint
fn safe_mint(
ref self: ComponentState<TContractState>,
to: ContractAddress,
token_id: u256,
data: Span<felt252>,
)
burn
Destroys token_id. The approval is cleared when the token is burned.
This internal function does not check if the caller is authorized to operate on the token.
Requirements:
token_idexists.
Emits a Transfer event.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::burn
fn burn(ref self: ComponentState<TContractState>, token_id: u256)
update
Transfers token_id from its current owner to to, or alternatively mints (or burns)
if the current owner (or to) is the zero address. Returns the owner of the token_id
before the update.
The auth argument is optional. If the value passed is non-zero, then this function
will check that auth is either the owner of the token, or approved to operate on the
token (by the owner).
Emits a Transfer event.
NOTE: This function can be extended using the ERC721HooksTrait, to add
functionality before and/or after the transfer, mint, or burn.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::update
fn update(
ref self: ComponentState<TContractState>,
to: ContractAddress,
token_id: u256,
auth: ContractAddress,
) -> ContractAddress
_owner_of
Returns the owner address of token_id.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::_owner_of
fn _owner_of(self: @ComponentState<TContractState>, token_id: u256) -> ContractAddress
_require_owned
Returns the owner address of token_id.
Requirements:
token_idexists.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::_require_owned
fn _require_owned(self: @ComponentState<TContractState>, token_id: u256) -> ContractAddress
_approve
Approve to to operate on token_id
The auth argument is optional. If the value passed is non-zero, then this function
will check that auth is either the owner of the token, or approved to operate on all
tokens held by this owner.
Emits an Approval event.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::_approve
fn _approve(
ref self: ComponentState<TContractState>,
to: ContractAddress,
token_id: u256,
auth: ContractAddress,
)
_approve_with_optional_event
Variant of _approve with an optional flag to enable or disable the Approval event.
The event is not emitted in the context of transfers.
WARNING: If auth is zero and emit_event is false, this function will not check that
the token exists.
Requirements:
- If
authis non-zero, it must be either the owner of the token or approved to operate on all of its tokens.
May emit an Approval event.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::_approve_with_optional_event
fn _approve_with_optional_event(
ref self: ComponentState<TContractState>,
to: ContractAddress,
token_id: u256,
auth: ContractAddress,
emit_event: bool,
)
_set_approval_for_all
Enables or disables approval for operator to manage
all of the owner assets.
Requirements:
operatoris not the zero address.
Emits an Approval event.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::_set_approval_for_all
fn _set_approval_for_all(
ref self: ComponentState<TContractState>,
owner: ContractAddress,
operator: ContractAddress,
approved: bool,
)
_set_base_uri
Sets the base URI.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::_set_base_uri
fn _set_base_uri(ref self: ComponentState<TContractState>, base_uri: ByteArray)
_set_allow_transfer
Custom Sets if transfer is enabled
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::_set_allow_transfer
fn _set_allow_transfer(ref self: ComponentState<TContractState>, allow_transfer: bool)
_base_uri
Base URI for computing token_uri.
If set, the resulting URI for each token will be the concatenation of the base URI and
the token ID.
Returns an empty ByteArray if not set.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::_base_uri
fn _base_uri(self: @ComponentState<TContractState>) -> ByteArray
_is_authorized
Returns whether spender is allowed to manage owner’s tokens, or token_id in
particular (ignoring whether it is owned by owner).
WARNING: This function assumes that owner is the actual owner of token_id and does
not verify this assumption.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::_is_authorized
fn _is_authorized(
self: @ComponentState<TContractState>,
owner: ContractAddress,
spender: ContractAddress,
token_id: u256,
) -> bool
_check_authorized
Checks if spender can operate on token_id, assuming the provided owner is the
actual owner.
Requirements:
ownercannot be the zero address.spendercannot be the zero address.spendermust be the owner oftoken_idor be approved to operate on it.
WARNING: This function assumes that owner is the actual owner of token_id and does
not verify this assumption.
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::InternalTrait::_check_authorized
fn _check_authorized(
self: @ComponentState<TContractState>,
owner: ContractAddress,
spender: ContractAddress,
token_id: u256,
)
UnsafeNewContractStateTraitForERC721TTCustomImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::UnsafeNewContractStateTraitForERC721TTCustomImpl
pub trait UnsafeNewContractStateTraitForERC721TTCustomImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::UnsafeNewContractStateTraitForERC721TTCustomImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
UnsafeNewContractStateTraitForERC721Impl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::UnsafeNewContractStateTraitForERC721Impl
pub trait UnsafeNewContractStateTraitForERC721Impl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::UnsafeNewContractStateTraitForERC721Impl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
UnsafeNewContractStateTraitForERC721MetadataImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::UnsafeNewContractStateTraitForERC721MetadataImpl
pub trait UnsafeNewContractStateTraitForERC721MetadataImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::UnsafeNewContractStateTraitForERC721MetadataImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
UnsafeNewContractStateTraitForERC721CamelOnlyImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::UnsafeNewContractStateTraitForERC721CamelOnlyImpl
pub trait UnsafeNewContractStateTraitForERC721CamelOnlyImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::UnsafeNewContractStateTraitForERC721CamelOnlyImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
UnsafeNewContractStateTraitForERC721MetadataCamelOnlyImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::UnsafeNewContractStateTraitForERC721MetadataCamelOnlyImpl
pub trait UnsafeNewContractStateTraitForERC721MetadataCamelOnlyImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::UnsafeNewContractStateTraitForERC721MetadataCamelOnlyImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
UnsafeNewContractStateTraitForERC721MixinImpl
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::UnsafeNewContractStateTraitForERC721MixinImpl
pub trait UnsafeNewContractStateTraitForERC721MixinImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::components::custom_erc721::ERC721Component::UnsafeNewContractStateTraitForERC721MixinImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
__external_IERC721TTCustomForwardImpl
Fully qualified path: tokentable_v2::components::custom_erc721::__external_IERC721TTCustomForwardImpl
__l1_handler_IERC721TTCustomForwardImpl
Fully qualified path: tokentable_v2::components::custom_erc721::__l1_handler_IERC721TTCustomForwardImpl
__constructor_IERC721TTCustomForwardImpl
Fully qualified path: tokentable_v2::components::custom_erc721::__constructor_IERC721TTCustomForwardImpl
Traits
Traits
| IERC721TTCustom | SPDX-License-Identifier: MIT OpenZeppelin Contracts for Cairo v0.17.0 (token/erc721/erc721.cairo) Modified by Jack Xu @ EthSign |
| UnsafeNewContractStateTraitForIERC721TTCustomForwardImpl | — |
IERC721TTCustom
SPDX-License-Identifier: MIT OpenZeppelin Contracts for Cairo v0.17.0 (token/erc721/erc721.cairo) Modified by Jack Xu @ EthSign
Fully qualified path: tokentable_v2::components::custom_erc721::IERC721TTCustom
pub trait IERC721TTCustom<TState>
Trait functions
get_allow_transfer
Fully qualified path: tokentable_v2::components::custom_erc721::IERC721TTCustom::get_allow_transfer
fn get_allow_transfer(self: @TState) -> bool
UnsafeNewContractStateTraitForIERC721TTCustomForwardImpl
Fully qualified path: tokentable_v2::components::custom_erc721::UnsafeNewContractStateTraitForIERC721TTCustomForwardImpl
pub trait UnsafeNewContractStateTraitForIERC721TTCustomForwardImpl<TContractState>
Trait functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::components::custom_erc721::UnsafeNewContractStateTraitForIERC721TTCustomForwardImpl::unsafe_new_contract_state
fn unsafe_new_contract_state() -> TContractState
deployer
Fully qualified path: tokentable_v2::deployer
Modules
Modules
Modules
TTDeployer
Fully qualified path: tokentable_v2::deployer::TTDeployer
Free functions
Structs
Free functions
Free functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::deployer::TTDeployer::unsafe_new_contract_state
pub fn unsafe_new_contract_state() -> ContractState
Structs
Structs
ContractState
Fully qualified path: tokentable_v2::deployer::TTDeployer::ContractState
pub struct ContractState { /* private fields */ }
feecollector
Fully qualified path: tokentable_v2::feecollector
Modules
Modules
Modules
TTFeeCollector
Fully qualified path: tokentable_v2::feecollector::TTFeeCollector
Free functions
Structs
Free functions
Free functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::feecollector::TTFeeCollector::unsafe_new_contract_state
pub fn unsafe_new_contract_state() -> ContractState
Structs
Structs
ContractState
Fully qualified path: tokentable_v2::feecollector::TTFeeCollector::ContractState
pub struct ContractState { /* private fields */ }
futuretoken
Fully qualified path: tokentable_v2::futuretoken
mockerc20
Fully qualified path: tokentable_v2::mockerc20
Modules
Modules
Modules
MockERC20
Fully qualified path: tokentable_v2::mockerc20::MockERC20
Free functions
Structs
Free functions
Free functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::mockerc20::MockERC20::unsafe_new_contract_state
pub fn unsafe_new_contract_state() -> ContractState
Structs
Structs
ContractState
Fully qualified path: tokentable_v2::mockerc20::MockERC20::ContractState
pub struct ContractState { /* private fields */ }
unlocker
Fully qualified path: tokentable_v2::unlocker
Modules
Modules
Modules
TTUnlocker
Fully qualified path: tokentable_v2::unlocker::TTUnlocker
Free functions
Structs
Free functions
Free functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::unlocker::TTUnlocker::unsafe_new_contract_state
pub fn unsafe_new_contract_state() -> ContractState
Structs
Structs
ContractState
Fully qualified path: tokentable_v2::unlocker::TTUnlocker::ContractState
pub struct ContractState { /* private fields */ }
mockerc721receiver
Fully qualified path: tokentable_v2::mockerc721receiver
Modules
Modules
Modules
MockERC721Receiver
Fully qualified path: tokentable_v2::mockerc721receiver::MockERC721Receiver
Free functions
Structs
Free functions
Free functions
unsafe_new_contract_state
Fully qualified path: tokentable_v2::mockerc721receiver::MockERC721Receiver::unsafe_new_contract_state
pub fn unsafe_new_contract_state() -> ContractState
Structs
Structs
ContractState
Fully qualified path: tokentable_v2::mockerc721receiver::MockERC721Receiver::ContractState
pub struct ContractState { /* private fields */ }
dispatchers
Structs
Structs
ITTDeployerDispatcher
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTDeployerDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerDispatcher::contract_address
pub contract_address: ContractAddress
ITTDeployerLibraryDispatcher
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTDeployerLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerLibraryDispatcher::class_hash
pub class_hash: ClassHash
ITTDeployerSafeLibraryDispatcher
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerSafeLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTDeployerSafeLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerSafeLibraryDispatcher::class_hash
pub class_hash: ClassHash
ITTDeployerSafeDispatcher
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerSafeDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTDeployerSafeDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::interfaces::deployer::ITTDeployerSafeDispatcher::contract_address
pub contract_address: ContractAddress
ITTFeeCollectorDispatcher
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTFeeCollectorDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorDispatcher::contract_address
pub contract_address: ContractAddress
ITTFeeCollectorLibraryDispatcher
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTFeeCollectorLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorLibraryDispatcher::class_hash
pub class_hash: ClassHash
ITTFeeCollectorSafeLibraryDispatcher
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorSafeLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTFeeCollectorSafeLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorSafeLibraryDispatcher::class_hash
pub class_hash: ClassHash
ITTFeeCollectorSafeDispatcher
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorSafeDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTFeeCollectorSafeDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorSafeDispatcher::contract_address
pub contract_address: ContractAddress
ITTFutureTokenDispatcher
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTFutureTokenDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenDispatcher::contract_address
pub contract_address: ContractAddress
ITTFutureTokenLibraryDispatcher
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTFutureTokenLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenLibraryDispatcher::class_hash
pub class_hash: ClassHash
ITTFutureTokenSafeLibraryDispatcher
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenSafeLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTFutureTokenSafeLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenSafeLibraryDispatcher::class_hash
pub class_hash: ClassHash
ITTFutureTokenSafeDispatcher
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenSafeDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTFutureTokenSafeDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenSafeDispatcher::contract_address
pub contract_address: ContractAddress
ITTHookDispatcher
Fully qualified path: tokentable_v2::components::interfaces::hook::ITTHookDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTHookDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::interfaces::hook::ITTHookDispatcher::contract_address
pub contract_address: ContractAddress
ITTHookLibraryDispatcher
Fully qualified path: tokentable_v2::components::interfaces::hook::ITTHookLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTHookLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::interfaces::hook::ITTHookLibraryDispatcher::class_hash
pub class_hash: ClassHash
ITTHookSafeLibraryDispatcher
Fully qualified path: tokentable_v2::components::interfaces::hook::ITTHookSafeLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTHookSafeLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::interfaces::hook::ITTHookSafeLibraryDispatcher::class_hash
pub class_hash: ClassHash
ITTHookSafeDispatcher
Fully qualified path: tokentable_v2::components::interfaces::hook::ITTHookSafeDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTHookSafeDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::interfaces::hook::ITTHookSafeDispatcher::contract_address
pub contract_address: ContractAddress
IMockERC20Dispatcher
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::IMockERC20Dispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IMockERC20Dispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::IMockERC20Dispatcher::contract_address
pub contract_address: ContractAddress
IMockERC20LibraryDispatcher
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::IMockERC20LibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IMockERC20LibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::IMockERC20LibraryDispatcher::class_hash
pub class_hash: ClassHash
IMockERC20SafeLibraryDispatcher
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::IMockERC20SafeLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IMockERC20SafeLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::IMockERC20SafeLibraryDispatcher::class_hash
pub class_hash: ClassHash
IMockERC20SafeDispatcher
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::IMockERC20SafeDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IMockERC20SafeDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::IMockERC20SafeDispatcher::contract_address
pub contract_address: ContractAddress
ITTUnlockerDispatcher
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTUnlockerDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcher::contract_address
pub contract_address: ContractAddress
ITTUnlockerLibraryDispatcher
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTUnlockerLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerLibraryDispatcher::class_hash
pub class_hash: ClassHash
ITTUnlockerSafeLibraryDispatcher
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTUnlockerSafeLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeLibraryDispatcher::class_hash
pub class_hash: ClassHash
ITTUnlockerSafeDispatcher
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct ITTUnlockerSafeDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcher::contract_address
pub contract_address: ContractAddress
IVersionableDispatcher
Fully qualified path: tokentable_v2::components::interfaces::versionable::IVersionableDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IVersionableDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::interfaces::versionable::IVersionableDispatcher::contract_address
pub contract_address: ContractAddress
IVersionableLibraryDispatcher
Fully qualified path: tokentable_v2::components::interfaces::versionable::IVersionableLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IVersionableLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::interfaces::versionable::IVersionableLibraryDispatcher::class_hash
pub class_hash: ClassHash
IVersionableSafeLibraryDispatcher
Fully qualified path: tokentable_v2::components::interfaces::versionable::IVersionableSafeLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IVersionableSafeLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::interfaces::versionable::IVersionableSafeLibraryDispatcher::class_hash
pub class_hash: ClassHash
IVersionableSafeDispatcher
Fully qualified path: tokentable_v2::components::interfaces::versionable::IVersionableSafeDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IVersionableSafeDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::interfaces::versionable::IVersionableSafeDispatcher::contract_address
pub contract_address: ContractAddress
IERC721TTCustomDispatcher
Fully qualified path: tokentable_v2::components::custom_erc721::IERC721TTCustomDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IERC721TTCustomDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::custom_erc721::IERC721TTCustomDispatcher::contract_address
pub contract_address: ContractAddress
IERC721TTCustomLibraryDispatcher
Fully qualified path: tokentable_v2::components::custom_erc721::IERC721TTCustomLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IERC721TTCustomLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::custom_erc721::IERC721TTCustomLibraryDispatcher::class_hash
pub class_hash: ClassHash
IERC721TTCustomSafeLibraryDispatcher
Fully qualified path: tokentable_v2::components::custom_erc721::IERC721TTCustomSafeLibraryDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IERC721TTCustomSafeLibraryDispatcher {
pub class_hash: ClassHash,
}
Members
class_hash
Fully qualified path: tokentable_v2::components::custom_erc721::IERC721TTCustomSafeLibraryDispatcher::class_hash
pub class_hash: ClassHash
IERC721TTCustomSafeDispatcher
Fully qualified path: tokentable_v2::components::custom_erc721::IERC721TTCustomSafeDispatcher
Part of the group: dispatchers
[doc(group: "dispatchers")]
[derive(Copy, Drop, starknet::Store, Serde)]
pub struct IERC721TTCustomSafeDispatcher {
pub contract_address: ContractAddress,
}
Members
contract_address
Fully qualified path: tokentable_v2::components::custom_erc721::IERC721TTCustomSafeDispatcher::contract_address
pub contract_address: ContractAddress
Traits
Traits
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
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>>
ITTFeeCollectorDispatcherTrait
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorDispatcherTrait
Part of the group: dispatchers
pub trait ITTFeeCollectorDispatcherTrait<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::ITTFeeCollectorDispatcherTrait::withdraw_fee
fn withdraw_fee(self: T, token: ContractAddress, amount: u256)
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::ITTFeeCollectorDispatcherTrait::set_default_fee
fn set_default_fee(self: T, bips: u256)
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::ITTFeeCollectorDispatcherTrait::set_custom_fee
fn set_custom_fee(self: T, unlocker_instance: ContractAddress, bips: u256)
get_default_fee
Returns the default fee in basis points.
Fully qualified path: tokentable_v2::components::interfaces::feecollector::ITTFeeCollectorDispatcherTrait::get_default_fee
fn get_default_fee(self: T) -> u256
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::ITTFeeCollectorDispatcherTrait::get_fee
fn get_fee(self: T, unlocker_instance: ContractAddress, tokens_transferred: u256) -> u256
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>>
ITTFutureTokenDispatcherTrait
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenDispatcherTrait
Part of the group: dispatchers
pub trait ITTFutureTokenDispatcherTrait<T>
Trait functions
set_authorized_minter_single_use
Permanently sets the authorized FutureToken minter. This function can only be called once.
Arguments
authorized_minter: The authorized minter, typically an Unlocker contract.
Panics
NOT_PERMISSIONED: If this function has already been called before.
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenDispatcherTrait::set_authorized_minter_single_use
fn set_authorized_minter_single_use(self: T, authorized_minter: ContractAddress)
mint
Mints a new FutureToken.
Arguments
to: The owner of the minted FutureToken.unsafe_mint: Usemint(...)instead ofsafe_mint(...).
Panics
NOT_PERMISSIONED: If the caller isn’t the authorized minter.
Returns
u256: The token ID, akaactual_id, of the minted FutureToken.
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenDispatcherTrait::mint
fn mint(self: T, to: ContractAddress, unsafe_mint: bool) -> u256
set_token_base_uri
Sets the base token URI.
Arguments
uri: The new URI.
Panics
NOT_PERMISSIONED: If the caller isn’t the owner of the authorized minter.
Events
DidSetBaseURI
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenDispatcherTrait::set_token_base_uri
fn set_token_base_uri(self: T, uri: ByteArray)
get_claim_info
Returns information regarding the unlocking schedule attached to a FutureToken.
Arguments
token_id: The FutureToken we are querying. This is also theactual_id.
Returns
u256: The claimable amount of tokens this time.u256: The updated total amount of tokens claimed after this claim action.bool: If the schedule attached to said FutureToken is cancelable.
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenDispatcherTrait::get_claim_info
fn get_claim_info(self: T, token_id: u256) -> (u256, u256, bool)
ITTFutureTokenSafeDispatcherTrait
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenSafeDispatcherTrait
Part of the group: dispatchers
pub trait ITTFutureTokenSafeDispatcherTrait<T>
Trait functions
set_authorized_minter_single_use
Permanently sets the authorized FutureToken minter. This function can only be called once.
Arguments
authorized_minter: The authorized minter, typically an Unlocker contract.
Panics
NOT_PERMISSIONED: If this function has already been called before.
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenSafeDispatcherTrait::set_authorized_minter_single_use
fn set_authorized_minter_single_use(
self: T, authorized_minter: ContractAddress,
) -> Result<(), Array<felt252>>
mint
Mints a new FutureToken.
Arguments
to: The owner of the minted FutureToken.unsafe_mint: Usemint(...)instead ofsafe_mint(...).
Panics
NOT_PERMISSIONED: If the caller isn’t the authorized minter.
Returns
u256: The token ID, akaactual_id, of the minted FutureToken.
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenSafeDispatcherTrait::mint
fn mint(self: T, to: ContractAddress, unsafe_mint: bool) -> Result<u256, Array<felt252>>
set_token_base_uri
Sets the base token URI.
Arguments
uri: The new URI.
Panics
NOT_PERMISSIONED: If the caller isn’t the owner of the authorized minter.
Events
DidSetBaseURI
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenSafeDispatcherTrait::set_token_base_uri
fn set_token_base_uri(self: T, uri: ByteArray) -> Result<(), Array<felt252>>
get_claim_info
Returns information regarding the unlocking schedule attached to a FutureToken.
Arguments
token_id: The FutureToken we are querying. This is also theactual_id.
Returns
u256: The claimable amount of tokens this time.u256: The updated total amount of tokens claimed after this claim action.bool: If the schedule attached to said FutureToken is cancelable.
Fully qualified path: tokentable_v2::components::interfaces::futuretoken::ITTFutureTokenSafeDispatcherTrait::get_claim_info
fn get_claim_info(self: T, token_id: u256) -> Result<(u256, u256, bool), Array<felt252>>
ITTHookDispatcherTrait
Fully qualified path: tokentable_v2::components::interfaces::hook::ITTHookDispatcherTrait
Part of the group: dispatchers
pub trait ITTHookDispatcherTrait<T>
Trait functions
did_call
A callback function that’s called by the Unlocker.
Arguments
function_name: The name of the Unlocker function called.context: The encoded felt252 array of relevant call data.caller: The caller of the Unlocker function.
Fully qualified path: tokentable_v2::components::interfaces::hook::ITTHookDispatcherTrait::did_call
fn did_call(self: T, function_name: felt252, context: Span<felt252>, caller: ContractAddress)
ITTHookSafeDispatcherTrait
Fully qualified path: tokentable_v2::components::interfaces::hook::ITTHookSafeDispatcherTrait
Part of the group: dispatchers
pub trait ITTHookSafeDispatcherTrait<T>
Trait functions
did_call
A callback function that’s called by the Unlocker.
Arguments
function_name: The name of the Unlocker function called.context: The encoded felt252 array of relevant call data.caller: The caller of the Unlocker function.
Fully qualified path: tokentable_v2::components::interfaces::hook::ITTHookSafeDispatcherTrait::did_call
fn did_call(
self: T, function_name: felt252, context: Span<felt252>, caller: ContractAddress,
) -> Result<(), Array<felt252>>
IMockERC20DispatcherTrait
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::IMockERC20DispatcherTrait
Part of the group: dispatchers
pub trait IMockERC20DispatcherTrait<T>
Trait functions
mint
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::IMockERC20DispatcherTrait::mint
fn mint(self: T, to: ContractAddress, amount: u256)
IMockERC20SafeDispatcherTrait
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::IMockERC20SafeDispatcherTrait
Part of the group: dispatchers
pub trait IMockERC20SafeDispatcherTrait<T>
Trait functions
mint
Fully qualified path: tokentable_v2::components::interfaces::mockerc20::IMockERC20SafeDispatcherTrait::mint
fn mint(self: T, to: ContractAddress, amount: u256) -> Result<(), Array<felt252>>
ITTUnlockerDispatcherTrait
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait
Part of the group: dispatchers
pub trait ITTUnlockerDispatcherTrait<T>
Trait functions
create_preset
Creates an unlocking schedule Preset.
Arguments
preset_id: Refer toPreset.linear_start_timestamps_relative: Refer toPreset.linear_start_timestamps_relative: Refer toPreset.linear_bips: Refer toPreset.num_of_unlocks_for_each_linear: Refer toPreset.stream: Refer toPreset.recipient_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.
Panics
INVALID_PRESET_FORMAT: If the preset is not formatted correctly (e.g.linear_bipsfails to add up toBIPS_PRECISION)PRESET_EXISTS: If the inputpreset_idhas already been created.OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
PresetCreated
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::create_preset
fn create_preset(
self: T,
preset_id: felt252,
linear_start_timestamps_relative: Span<u64>,
linear_end_timestamp_relative: u64,
linear_bips: Span<u64>,
num_of_unlocks_for_each_linear: Span<u64>,
stream: bool,
recipient_id: u64,
extraData: felt252,
)
create_actual
Creates an unlocking schedule Actual.
Arguments
recipient: The initial recipient of the unlocked tokens.preset_id: The unlocking schedule preset that thisActualbuilds on top of.start_timestamp_absolute: Refer toActual.amount_skipped: Refer toActual.total_amount: Refer toActual.unsafe_mint: Usemint(...)instead ofsafe_mint(...).recipient_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.batch_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.
Panics
PRESET_DOES_NOT_EXIST: Ifpreset_iddoes not exist.INVALID_SKIP_AMOUNT: If the amount of tokens skipped is greater than or equal to the total unlocked amount.OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
ActualCreated
Returns
u256: The createdactual_id, aka the unlocking schedule ID.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::create_actual
fn create_actual(
self: T,
recipient: ContractAddress,
preset_id: felt252,
start_timestamp_absolute: u64,
amount_skipped: u256,
total_amount: u256,
unsafe_mint: bool,
recipient_id: u64,
batch_id: u64,
extraData: felt252,
) -> u256
withdraw_deposit
Withdraws any unclaimed deposit held by the Unlocker.
Arguments
amount: The amount of tokens to withdraw.
Panics
NOT_PERMISSIONED: If withdrawing has been disabled.GENERIC_ERC20_TRANSFER_ERROR: If for any reason the token transfer returnsfalse.OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
TokensWithdrawn
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::withdraw_deposit
fn withdraw_deposit(self: T, amount: u256, extraData: felt252)
claim
Claims your unlocked tokens as a recipient. Any fees charged are not taken from the claimed amount.
Arguments
actual_id: The schedule ID assigned to you.claim_to: The destination address for the claimed tokens. Use Zeroable::zero() to claim to your current address.recipient_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.
Panics
NOT_PERMISSIONED: If the caller isn’t the recipient of saidactual_id.GENERIC_ERC20_TRANSFER_ERROR: If for any reason the token transfer returnsfalse.ReentrancyGuardComponent::Errors::REENTRANT_CALL: If a reentrant call is detected.
Events
TokensClaimed
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::claim
fn claim(self: T, actual_id: u256, claim_to: ContractAddress, recipient_id: u64, extraData: felt252)
delegate_claim
Claims someone else’s unlocked tokens as an authorized claiming delegate.
Arguments
actual_id: The schedule ID assigned to you.recipient_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.
Panics
NOT_PERMISSIONED: If the caller isn’t an authorized claiming delegate.GENERIC_ERC20_TRANSFER_ERROR: If for any reason the token transfer returnsfalse.ReentrancyGuardComponent::Errors::REENTRANT_CALL: If a reentrant call is detected.
Events
TokensClaimed
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::delegate_claim
fn delegate_claim(self: T, actual_id: u256, recipient_id: u64, extraData: felt252)
cancel
Cancels an existing schedule.
Arguments
actual_id: The schedule ID to cancel.wipe_claimable_balance: Normally when canceling a schedule, calculation is performed to ensure the recipient will receive unlocked tokens until the moment of cancellation. This option prevents such calculation.recipient_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.
Panics
NOT_PERMISSIONED: If cancellation is disabled.OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
ActualCancelled
Returns
u256: The amount claimable by the recipient from the cancelled schedule.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::cancel
fn cancel(
self: T, actual_id: u256, wipe_claimable_balance: bool, recipient_id: u64, extraData: felt252,
) -> u256
set_hook
Sets the external hook contract.
Arguments
hook: The address of an external contract that implements ITTHook.
Panics
NOT_PERMISSIONED: If hooking is disabled.OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::set_hook
fn set_hook(self: T, hook: ContractAddress)
set_claiming_delegate
Sets the claiming delegate, who can trigger claim on behalf of recipients.
Arguments
delegate: The address of the claiming delegate.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::set_claiming_delegate
fn set_claiming_delegate(self: T, delegate: ContractAddress)
disable_cancel
Permanently disables the ability for the owner to cancel schedules.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
CancelDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::disable_cancel
fn disable_cancel(self: T)
disable_hook
Permanently disables the ability for the owner to set external hooks. Also clears the current hook.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
HookDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::disable_hook
fn disable_hook(self: T)
disable_withdraw
Permanently disables the ability for the owner to withdraw deposit.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
WithdrawDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::disable_withdraw
fn disable_withdraw(self: T)
disable_create
Permanently disables the ability for the owner to create new schedules.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
CreateDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::disable_create
fn disable_create(self: T)
deployer
Returns the address of the TokenTable Deployer.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::deployer
fn deployer(self: T) -> ContractAddress
futuretoken
Returns the address of the FutureToken NFT created alongside this Unlocker instance.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::futuretoken
fn futuretoken(self: T) -> ContractAddress
hook
Returns the address of the external hook set by the owner.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::hook
fn hook(self: T) -> ContractAddress
claiming_delegate
Returns the address of the claiming delegate set by the owner.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::claiming_delegate
fn claiming_delegate(self: T) -> ContractAddress
is_cancelable
Returns if schedules are cancelable.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::is_cancelable
fn is_cancelable(self: T) -> bool
is_hookable
Returns if external hooks are allowed to be set.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::is_hookable
fn is_hookable(self: T) -> bool
is_withdrawable
Returns if the owner can withdraw deposited tokens.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::is_withdrawable
fn is_withdrawable(self: T) -> bool
is_createable
Returns if the owner can create new schedules.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::is_createable
fn is_createable(self: T) -> bool
get_project_token
Returns the project token that’s being unlocked.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::get_project_token
fn get_project_token(self: T) -> ContractAddress
get_preset
Returns the requested Preset struct.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::get_preset
fn get_preset(self: T, preset_id: felt252) -> Preset
get_actual
Returns the requested Actual struct.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::get_actual
fn get_actual(self: T, actual_id: u256) -> Actual
get_cancelled_amount_claimable
Returns the amount of claimable tokens for a cancelled schedule.
Arguments
actual_id: The cancenlled schedule ID that we are querying.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::get_cancelled_amount_claimable
fn get_cancelled_amount_claimable(self: T, actual_id: u256) -> u256
calculate_amount_claimable
Calculates the amount of claimable tokens for an ongoing schedule. Internally calls simulate_amount_claimable().
Arguments
actual_id: The ongoing schedule ID that we are querying.
Returns
u256: The claimable amount of tokens this time.u256: The updated total amount of tokens claimed after this claim action.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::calculate_amount_claimable
fn calculate_amount_claimable(self: T, actual_id: u256) -> (u256, u256)
simulate_amount_claimable
Simulates the amount of claimable tokens for an ongoing schedule. This function exposes more parameters to make testing the calculation logic easier.
Arguments
actual_start_timestamp_absolute: Refer toActual.start_timestamp_absolute.preset_linear_end_timestamp_relative: Refer toPreset.linear_end_timestamp_relative.preset_linear_start_timestamps_relative: Refer toPreset.linear_start_timestamps_relative.claim_timestamp_absolute: The timestamp of when claim() is called. Must be in the future.preset_linear_bips: Refer toPreset.linear_bips.preset_num_of_unlocks_for_each_linear: Refer toPreset.num_of_unlocks_for_each_linear.preset_stream: Refer toPreset.stream.preset_bips_precision: The decimal precision of calculation. Hardcoded to 10000.actual_total_amount: Refer toActual.total_amount.
Returns
u256: The claimable amount of tokens this time.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerDispatcherTrait::simulate_amount_claimable
fn simulate_amount_claimable(
self: T,
actual_start_timestamp_absolute: u64,
preset_linear_end_timestamp_relative: u64,
preset_linear_start_timestamps_relative: Span<u64>,
claim_timestamp_absolute: u64,
preset_linear_bips: Span<u64>,
preset_num_of_unlocks_for_each_linear: Span<u64>,
preset_stream: bool,
preset_bips_precision: u64,
actual_total_amount: u256,
) -> u256
ITTUnlockerSafeDispatcherTrait
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait
Part of the group: dispatchers
pub trait ITTUnlockerSafeDispatcherTrait<T>
Trait functions
create_preset
Creates an unlocking schedule Preset.
Arguments
preset_id: Refer toPreset.linear_start_timestamps_relative: Refer toPreset.linear_start_timestamps_relative: Refer toPreset.linear_bips: Refer toPreset.num_of_unlocks_for_each_linear: Refer toPreset.stream: Refer toPreset.recipient_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.
Panics
INVALID_PRESET_FORMAT: If the preset is not formatted correctly (e.g.linear_bipsfails to add up toBIPS_PRECISION)PRESET_EXISTS: If the inputpreset_idhas already been created.OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
PresetCreated
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::create_preset
fn create_preset(
self: T,
preset_id: felt252,
linear_start_timestamps_relative: Span<u64>,
linear_end_timestamp_relative: u64,
linear_bips: Span<u64>,
num_of_unlocks_for_each_linear: Span<u64>,
stream: bool,
recipient_id: u64,
extraData: felt252,
) -> Result<(), Array<felt252>>
create_actual
Creates an unlocking schedule Actual.
Arguments
recipient: The initial recipient of the unlocked tokens.preset_id: The unlocking schedule preset that thisActualbuilds on top of.start_timestamp_absolute: Refer toActual.amount_skipped: Refer toActual.total_amount: Refer toActual.unsafe_mint: Usemint(...)instead ofsafe_mint(...).recipient_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.batch_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.
Panics
PRESET_DOES_NOT_EXIST: Ifpreset_iddoes not exist.INVALID_SKIP_AMOUNT: If the amount of tokens skipped is greater than or equal to the total unlocked amount.OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
ActualCreated
Returns
u256: The createdactual_id, aka the unlocking schedule ID.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::create_actual
fn create_actual(
self: T,
recipient: ContractAddress,
preset_id: felt252,
start_timestamp_absolute: u64,
amount_skipped: u256,
total_amount: u256,
unsafe_mint: bool,
recipient_id: u64,
batch_id: u64,
extraData: felt252,
) -> Result<u256, Array<felt252>>
withdraw_deposit
Withdraws any unclaimed deposit held by the Unlocker.
Arguments
amount: The amount of tokens to withdraw.
Panics
NOT_PERMISSIONED: If withdrawing has been disabled.GENERIC_ERC20_TRANSFER_ERROR: If for any reason the token transfer returnsfalse.OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
TokensWithdrawn
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::withdraw_deposit
fn withdraw_deposit(self: T, amount: u256, extraData: felt252) -> Result<(), Array<felt252>>
claim
Claims your unlocked tokens as a recipient. Any fees charged are not taken from the claimed amount.
Arguments
actual_id: The schedule ID assigned to you.claim_to: The destination address for the claimed tokens. Use Zeroable::zero() to claim to your current address.recipient_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.
Panics
NOT_PERMISSIONED: If the caller isn’t the recipient of saidactual_id.GENERIC_ERC20_TRANSFER_ERROR: If for any reason the token transfer returnsfalse.ReentrancyGuardComponent::Errors::REENTRANT_CALL: If a reentrant call is detected.
Events
TokensClaimed
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::claim
fn claim(
self: T, actual_id: u256, claim_to: ContractAddress, recipient_id: u64, extraData: felt252,
) -> Result<(), Array<felt252>>
delegate_claim
Claims someone else’s unlocked tokens as an authorized claiming delegate.
Arguments
actual_id: The schedule ID assigned to you.recipient_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.
Panics
NOT_PERMISSIONED: If the caller isn’t an authorized claiming delegate.GENERIC_ERC20_TRANSFER_ERROR: If for any reason the token transfer returnsfalse.ReentrancyGuardComponent::Errors::REENTRANT_CALL: If a reentrant call is detected.
Events
TokensClaimed
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::delegate_claim
fn delegate_claim(
self: T, actual_id: u256, recipient_id: u64, extraData: felt252,
) -> Result<(), Array<felt252>>
cancel
Cancels an existing schedule.
Arguments
actual_id: The schedule ID to cancel.wipe_claimable_balance: Normally when canceling a schedule, calculation is performed to ensure the recipient will receive unlocked tokens until the moment of cancellation. This option prevents such calculation.recipient_id: Emitted as an event reserved for EthSign frontend use. This parameter has no effect on contract execution.
Panics
NOT_PERMISSIONED: If cancellation is disabled.OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
ActualCancelled
Returns
u256: The amount claimable by the recipient from the cancelled schedule.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::cancel
fn cancel(
self: T, actual_id: u256, wipe_claimable_balance: bool, recipient_id: u64, extraData: felt252,
) -> Result<u256, Array<felt252>>
set_hook
Sets the external hook contract.
Arguments
hook: The address of an external contract that implements ITTHook.
Panics
NOT_PERMISSIONED: If hooking is disabled.OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::set_hook
fn set_hook(self: T, hook: ContractAddress) -> Result<(), Array<felt252>>
set_claiming_delegate
Sets the claiming delegate, who can trigger claim on behalf of recipients.
Arguments
delegate: The address of the claiming delegate.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::set_claiming_delegate
fn set_claiming_delegate(self: T, delegate: ContractAddress) -> Result<(), Array<felt252>>
disable_cancel
Permanently disables the ability for the owner to cancel schedules.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
CancelDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::disable_cancel
fn disable_cancel(self: T) -> Result<(), Array<felt252>>
disable_hook
Permanently disables the ability for the owner to set external hooks. Also clears the current hook.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
HookDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::disable_hook
fn disable_hook(self: T) -> Result<(), Array<felt252>>
disable_withdraw
Permanently disables the ability for the owner to withdraw deposit.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
WithdrawDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::disable_withdraw
fn disable_withdraw(self: T) -> Result<(), Array<felt252>>
disable_create
Permanently disables the ability for the owner to create new schedules.
Panics
OwnableComponent::Errors::NOT_OWNER: If the caller is not the owner.
Events
CreateDisabled
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::disable_create
fn disable_create(self: T) -> Result<(), Array<felt252>>
deployer
Returns the address of the TokenTable Deployer.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::deployer
fn deployer(self: T) -> Result<ContractAddress, Array<felt252>>
futuretoken
Returns the address of the FutureToken NFT created alongside this Unlocker instance.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::futuretoken
fn futuretoken(self: T) -> Result<ContractAddress, Array<felt252>>
hook
Returns the address of the external hook set by the owner.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::hook
fn hook(self: T) -> Result<ContractAddress, Array<felt252>>
claiming_delegate
Returns the address of the claiming delegate set by the owner.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::claiming_delegate
fn claiming_delegate(self: T) -> Result<ContractAddress, Array<felt252>>
is_cancelable
Returns if schedules are cancelable.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::is_cancelable
fn is_cancelable(self: T) -> Result<bool, Array<felt252>>
is_hookable
Returns if external hooks are allowed to be set.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::is_hookable
fn is_hookable(self: T) -> Result<bool, Array<felt252>>
is_withdrawable
Returns if the owner can withdraw deposited tokens.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::is_withdrawable
fn is_withdrawable(self: T) -> Result<bool, Array<felt252>>
is_createable
Returns if the owner can create new schedules.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::is_createable
fn is_createable(self: T) -> Result<bool, Array<felt252>>
get_project_token
Returns the project token that’s being unlocked.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::get_project_token
fn get_project_token(self: T) -> Result<ContractAddress, Array<felt252>>
get_preset
Returns the requested Preset struct.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::get_preset
fn get_preset(self: T, preset_id: felt252) -> Result<Preset, Array<felt252>>
get_actual
Returns the requested Actual struct.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::get_actual
fn get_actual(self: T, actual_id: u256) -> Result<Actual, Array<felt252>>
get_cancelled_amount_claimable
Returns the amount of claimable tokens for a cancelled schedule.
Arguments
actual_id: The cancenlled schedule ID that we are querying.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::get_cancelled_amount_claimable
fn get_cancelled_amount_claimable(self: T, actual_id: u256) -> Result<u256, Array<felt252>>
calculate_amount_claimable
Calculates the amount of claimable tokens for an ongoing schedule. Internally calls simulate_amount_claimable().
Arguments
actual_id: The ongoing schedule ID that we are querying.
Returns
u256: The claimable amount of tokens this time.u256: The updated total amount of tokens claimed after this claim action.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::calculate_amount_claimable
fn calculate_amount_claimable(self: T, actual_id: u256) -> Result<(u256, u256), Array<felt252>>
simulate_amount_claimable
Simulates the amount of claimable tokens for an ongoing schedule. This function exposes more parameters to make testing the calculation logic easier.
Arguments
actual_start_timestamp_absolute: Refer toActual.start_timestamp_absolute.preset_linear_end_timestamp_relative: Refer toPreset.linear_end_timestamp_relative.preset_linear_start_timestamps_relative: Refer toPreset.linear_start_timestamps_relative.claim_timestamp_absolute: The timestamp of when claim() is called. Must be in the future.preset_linear_bips: Refer toPreset.linear_bips.preset_num_of_unlocks_for_each_linear: Refer toPreset.num_of_unlocks_for_each_linear.preset_stream: Refer toPreset.stream.preset_bips_precision: The decimal precision of calculation. Hardcoded to 10000.actual_total_amount: Refer toActual.total_amount.
Returns
u256: The claimable amount of tokens this time.
Fully qualified path: tokentable_v2::components::interfaces::unlocker::ITTUnlockerSafeDispatcherTrait::simulate_amount_claimable
fn simulate_amount_claimable(
self: T,
actual_start_timestamp_absolute: u64,
preset_linear_end_timestamp_relative: u64,
preset_linear_start_timestamps_relative: Span<u64>,
claim_timestamp_absolute: u64,
preset_linear_bips: Span<u64>,
preset_num_of_unlocks_for_each_linear: Span<u64>,
preset_stream: bool,
preset_bips_precision: u64,
actual_total_amount: u256,
) -> Result<u256, Array<felt252>>
IVersionableDispatcherTrait
Fully qualified path: tokentable_v2::components::interfaces::versionable::IVersionableDispatcherTrait
Part of the group: dispatchers
pub trait IVersionableDispatcherTrait<T>
Trait functions
version
Fully qualified path: tokentable_v2::components::interfaces::versionable::IVersionableDispatcherTrait::version
fn version(self: T) -> felt252
IVersionableSafeDispatcherTrait
Fully qualified path: tokentable_v2::components::interfaces::versionable::IVersionableSafeDispatcherTrait
Part of the group: dispatchers
pub trait IVersionableSafeDispatcherTrait<T>
Trait functions
version
Fully qualified path: tokentable_v2::components::interfaces::versionable::IVersionableSafeDispatcherTrait::version
fn version(self: T) -> Result<felt252, Array<felt252>>
IERC721TTCustomDispatcherTrait
Fully qualified path: tokentable_v2::components::custom_erc721::IERC721TTCustomDispatcherTrait
Part of the group: dispatchers
pub trait IERC721TTCustomDispatcherTrait<T>
Trait functions
get_allow_transfer
Fully qualified path: tokentable_v2::components::custom_erc721::IERC721TTCustomDispatcherTrait::get_allow_transfer
fn get_allow_transfer(self: T) -> bool
IERC721TTCustomSafeDispatcherTrait
Fully qualified path: tokentable_v2::components::custom_erc721::IERC721TTCustomSafeDispatcherTrait
Part of the group: dispatchers
pub trait IERC721TTCustomSafeDispatcherTrait<T>
Trait functions
get_allow_transfer
Fully qualified path: tokentable_v2::components::custom_erc721::IERC721TTCustomSafeDispatcherTrait::get_allow_transfer
fn get_allow_transfer(self: T) -> Result<bool, Array<felt252>>