Contract 15950242d8b569491c09d2880ddb2aface570c921c122a487c6c5b351c40fbe5

← Back to Index 📥 Download WASM

Meta

rssdkver 22.0.7#211569aa49c8d896877dfca1f2eb4fe9071121c8
rsver 1.81.0

Instances

  • CDP63Y57PHE75APEGOTFAXHSF4BT7VIXT3AJHIIIOAS7IU2JBO32D345

Interface

Extends the TTL for the contract instance

fn extend_instance_ttl(env: soroban_sdk::Env)

Extends the TTL for persistent storage

fn extend_persistent_ttl(env: soroban_sdk::Env, key: soroban_sdk::Symbol)

Initialization function.

fn init(
    env: soroban_sdk::Env,
    factory_caller: soroban_sdk::Address,
    token_address: soroban_sdk::Address,
)

Adds a new admin or remove an existing one for the Token Vesting Manager contract.

fn set_admin(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    admin: soroban_sdk::Address,
    is_enabled: bool,
)

Returns the number of admins for the Token Vesting Manager contract.

fn get_admins_count(env: soroban_sdk::Env) -> u32

Returns true if the given address is an admin, false otherwise.

fn is_admin(env: soroban_sdk::Env, address: soroban_sdk::Address) -> bool

Creates a vesting schedule for a recipient and returns a vesting ID.

fn create_vesting(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    recipient: soroban_sdk::Address,
    start_timestamp: u64,
    end_timestamp: u64,
    timelock: u64,
    initial_unlock: i128,
    cliff_release_timestamp: u64,
    cliff_amount: i128,
    release_interval_secs: u64,
    linear_vest_amount: i128,
) -> u64

Creates vesting schedules in batch for multiple recipients.

fn create_vesting_batch(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    create_vesting_batch_params: CreateVestingBatchParams,
) -> soroban_sdk::Vec

Allows a recipient to claim their vested tokens.

fn claim(env: soroban_sdk::Env, caller: soroban_sdk::Address, vesting_id: u64)

Revokes a vesting arrangement before it has been fully claimed.

fn revoke_vesting(env: soroban_sdk::Env, caller: soroban_sdk::Address, vesting_id: u64)

Calculates the vested amount for a given Vesting, at a given timestamp.

fn calculate_vested_amount(
    env: soroban_sdk::Env,
    vesting: Vesting,
    reference_timestamp: u64,
) -> i128

Allows the admin to withdraw ERC20 tokens not locked in vesting.

fn withdraw_admin(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    amount_requested: i128,
)

Withdraws other ERC20 tokens accidentally sent to the contract's address.

fn withdraw_other_token(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    other_token_address: soroban_sdk::Address,
)

Returns the amount of tokens that are available for the admin to withdraw.

fn amount_to_withdraw_by_admin(env: soroban_sdk::Env) -> i128

Retrieves information about a specific vesting arrangement.

fn get_vesting_info(env: soroban_sdk::Env, vesting_id: u64) -> Vesting

Returns all recipient addresses which have at least one vesting schedule set.

fn get_all_recipients(env: soroban_sdk::Env) -> soroban_sdk::Vec

Returns the list of recipients in a specific range, from being inclusive and to being exclusive.

fn get_all_recipients_sliced(
    env: soroban_sdk::Env,
    from: u32,
    to: u32,
) -> soroban_sdk::Vec

Returns the number of recipients.

fn get_all_recipients_len(env: soroban_sdk::Env) -> u32

Returns the list of vestings for the recipient.

fn get_all_recipient_vestings(
    env: soroban_sdk::Env,
    recipient: soroban_sdk::Address,
) -> soroban_sdk::Vec

Returns the list of vestings for the recipient in a specific range, from being inclusive and to being exclusive.

fn get_all_recipient_vesting_sliced(
    env: soroban_sdk::Env,
    from: u32,
    to: u32,
    recipient: soroban_sdk::Address,
) -> soroban_sdk::Vec

Returns the length of all vestings for the recipient.

fn get_all_recipient_vestings_len(
    env: soroban_sdk::Env,
    recipient: soroban_sdk::Address,
) -> u32

Checks if a given address is a recipient of any vesting schedule.

fn is_recipient(env: soroban_sdk::Env, recipient: soroban_sdk::Address) -> bool

Returns the address of the token used in the vesting contract.

fn get_token_address(env: soroban_sdk::Env) -> soroban_sdk::Address

Returns the amount of token reserved for vesting in the contract.

fn get_tokens_reserved_for_vesting(env: soroban_sdk::Env) -> i128

Imports

WebAssembly Text (WAT) ▶