Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

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: Use mint(...) instead of safe_mint(...).

Panics

  • NOT_PERMISSIONED: If the caller isn’t the authorized minter.

Returns

  • u256: The token ID, aka actual_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 the actual_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>>