Skip to main content

Token Manager

Token Manager

Constructor

Function NameParameter(s)Description
constructorref self: ContractState, pooling_manager: ContractAddress, l1_strategy: EthAddress, underlying: ContractAddress, performance_fees: u256, min_deposit: u256, max_deposit: u256, min_withdrawal: u256, max_withdrawal: u256, withdrawal_epoch_delay: u256, dust_limit: u256Initializes the contract with the specified parameters, setting up the initial state including the pooling manager, L1 strategy, underlying asset, performance fees, deposit limits, withdrawal limits, withdrawal epoch delay, and dust limit. Ensures the L1 strategy address is non-zero.

Get Methods

Method NameParameter(s)Return TypeDescription
pooling_managerself: @TContractStateContractAddressReturns the pooling manager address.
l1_strategyself: @TContractStateEthAddressReturns the L1 strategy address.
underlyingself: @TContractStateContractAddressReturns the underlying asset address.
tokenself: @TContractStateContractAddressReturns the token address.
performance_feesself: @TContractStateu256Returns the performance fees.
deposit_limit_lowself: @TContractStateu256Returns the lower limit of deposit.
deposit_limit_highself: @TContractStateu256Returns the upper limit of deposit.
withdrawal_limit_lowself: @TContractStateu256Returns the lower limit of withdrawal.
withdrawal_limit_highself: @TContractStateu256Returns the upper limit of withdrawal.
withdrawal_epoch_delayself: @TContractStateu256Returns the withdrawal epoch delay.
handled_epoch_withdrawal_lenself: @TContractStateu256Returns the length of handled epoch withdrawals.
epochself: @TContractStateu256Returns the current epoch.
l1_net_asset_valueself: @TContractStateu256Returns the L1 net asset value.
underlying_transitself: @TContractStateu256Returns the underlying in transit.
bufferself: @TContractStateu256Returns the buffer amount.
withdrawal_infoself: @TContractState, user: ContractAddress, id: u256WithdrawalInfoReturns withdrawal information for a user and ID.
user_withdrawal_lenself: @TContractState, user: ContractAddressu256Returns the length of withdrawals for a user.
dust_limitself: @TContractStateu256Returns the dust limit.
total_assetsself: @TContractStateu256Returns the total assets.
total_underlying_dueself: @TContractStateu256Returns the total underlying due.
withdrawal_exchange_rateself: @TContractState, epoch: u256u256Returns the withdrawal exchange rate for an epoch.
withdrawal_poolself: @TContractState, epoch: u256u256Returns the withdrawal pool for an epoch.
withdrawal_shareself: @TContractState, epoch: u256u256Returns the withdrawal share for an epoch.

Set and operation methods

Method NameParameter(s)Description
initialiserref self: TContractState, token: ContractAddressInitialises the token manager with a token address.
set_performance_feesref self: TContractState, new_performance_fees: u256Sets the new performance fees.
set_deposit_limitref self: TContractState, new_deposit_limit_low: u256, new_deposit_limit_high: u256Sets the new deposit limits.
set_withdrawal_limitref self: TContractState, new_withdrawal_limit_low: u256, new_withdrawal_limit_high: u256Sets the new withdrawal limits.
set_withdrawal_epoch_delayref self: TContractState, new_withdrawal_epoch_delay: u256Sets the new withdrawal epoch delay.
set_dust_limitref self: TContractState, new_dust_limit: u256Sets the new dust limit.
depositref self: TContractState, assets: u256, receiver: ContractAddress, referal: ContractAddressHandles deposit operations.
request_withdrawalref self: TContractState, shares: u256Handles withdrawal requests.
claim_withdrawalref self: TContractState, id: u256Processes withdrawal claims.
handle_reportref self: TContractState, new_l1_net_asset_value: u256, underlying_bridged_amount: u256Handles strategy reports and updates state accordingly. Returns a StrategyReportL2.