GET Method Interfaces
Pool
var get_pool_full_data() - returns full Pool Jetton data (note, method depends on network configs and may not work via Liteserver)
state-uint8- internal state of the pool. Normal ones is0.halted-bool- whether the operation of the pool is stopped.0means the pool is working normallytotal_balance-uint- a sum of all TON accounted by Poolsupply-uint- number of issued Pool Jettonsinterest_rate-uint- interest rate per round encoded as 24-bit number. In other words, after borrowing X TON validator need to returnX*(2**24+ interest_rate) /2**24TONoptimistic_deposit_withdrawals-bool- whether the optimistic (instantaneous) mode of deposit/withdrawals is on or is offdeposits_open?-bool- whether deposits are opensaved_validator_set_hash-uint- last accounted validator set hashprev_round_borrowers-[cell, int, int, int, int, int, int]- data of previous lending roundborrowers_dict-dict{controller_address_hash -> (Coins, Coins)}- list of Controllers that borrowed funds, body of credit and interest paymentround_id-intactive_borrowers-int- number of active borrowersborrowed-int- the total amount of TON borrowed in roundexpected-int- the total amount of TON expected to be returned in the round endreturned-int- the total amount of TON already returned in roundprofit-int- total profit already received in roundcurrent_round_borrowers-[cell, int, int, int, int, int, int]- data of current lending roundmin_loan_per_validator-int- minimal amount of TON that can be borrowed by a Controllermax_loan_per_validator-int- maximal amount of TON that can be borrowed by a Controllergovernance_fee-int- Share of pool profit which is sent to governance encoded as 24-bit numberjetton_minter-slice- address of Pool Jetton rootsupply-int- the amount of issues Pool Jettonsdeposit_payout-slice | null- address of deployed Deposit Payout (collection or minter) of current round (nullif not deployed)requested_for_deposit-int- amount of TON requested for postponed (till the end of the round) deposit in this roundwithdrawal_payout-slice | null- address of deployed Withdrawal Payout (collection or minter) of current round (nullif not deployed)requested_for_withdrawal-int- the amount of Pool Jettons requested for postponed (till the end of the round) deposit in this roundsudoer-slice | addr_none- address of sudoer role (addr_noneby default)sudoer_set_at-int- timestamp when sudoer was set (quarantine is counted from this date)governor-slice- address of Governor rolegovernance_update_after-int- timestamp after which Governor can be updatedinterest_manager-slice- address of interest manager rolehalter-slice- address of Halter roleapprover-slice- address of Approver rolecontroller_code-cell- code of Controllerpool_jetton_wallet_code-cell- code of Pool Jetton walletpayout_minter_code-cell- code of Payoutprojected_total_balance-int- the amount of TON expected to be accounted by the Pool at the end of the roundprojected_supply-int- number of expected issued pool jettons at the end of the round
The current pool jetton/TON ratio is equal to total_balance/supply. This ratio is used for immediate withdrawals in optimistic mode.
The projected pool jetton/TON ratio is equal to projected_total_balance/projected_supply. This ratio is used for immediate deposits in optimistic mode.
(slice) get_controller_address(int controller_id, slice validator) - returns address of the validator controller with the given id and validator address. Note controller maybe not yet deployed.
(int, int) get_controller_address_legacy(int controller_id, int wc, int addr_hash) - the same as previous but accepts parsed validator address and returns parsed controller address
(int, int) get_loan(int controller_id, slice validator_address, int prev?) - return loan body and load interest for a given controller
(int, int) get_controller_loan_position(int controller_addr_hash, int prev?) - We order all loans by controller address hash, put them in line and find a position of median of the given controller loan. This data can be used for deterministic voting: if stakers decide to vote in some proportion, we can check that controllers voted in the same proportion. Returns numerator and denominator.
Controller
var get_validator_controller_data() - return full TON data
state-uint8- internal state of the controller:0- REST,1- SENT_BORROWING_REQUEST,2- SENT_STAKE_REQUEST,3- FUNDS_STAKEN,4- SENT_RECOVER_REQUEST,5- INSOLVENThalted-bool- whether the operation of the controller is stopped or not.0means the pool is working normallyapproved-bool- whether controller is approved and can send loan requestsstake_amount_sent-int- the volume of last sent stake to the Electorstake_at-int- time of last sent stake to the Electorsaved_validator_set_hash-int- latest known validator hashvalidator_set_changes_count-int- number of validators set updates since stake was sentvalidator_set_change_time-int- time of the last validator set updatesstake_held_for-int- period of stake unlock after the round endborrowed_amount-int- the amount of TON that should be returned to Poolborrowed_time-int- timestamp of when funds were borrowedvalidator-slice- address of validator walletpool-slice- address of pool walletsudoer-slice- address of the sudoer wallet
Last updated