Base
Last updated
Last updated
receiveTokenWalletAddress
Store vault's token wallet address. Only root can call with correct params.
Parameters:
Name | Type | Description |
---|---|---|
startNewRewardRound
Checks whether there are any rounds if so, sets last round to previous, updates pool about it, adds new round to the list and transfers remaining gas to the address from params.
Parameters:
Name | Type | Description |
---|---|---|
Events emitted:
NewRewardRound
onAcceptTokensTransfer
Deposit occurs here.
Parameters:
Events emitted:
RewardDeposit
revertDeposit
Reverts the action of depositing.
Parameters:
Events emitted:
DepositReverted
finishDeposit
Finishes the depositing with incrementing token balance for deposit amount.
Parameters:
Events emitted:
Deposit
withdraw
Withdraw action
Parameters:
finishWithdraw
Finishes the withdrawal with decrementing token balance for deposit amount.
Parameters:
Events emitted:
Withdraw
claimReward
Claiming reward for user.
Parameters:
finishClaimReward
Finishes the reward claiming with incrementing user token reward and decrementing reward token balance
Parameters:
Events emitted:
RewardClaimed
pendingReward
Synchronizes rewards, updates pool info if not empty, gets rewards for old user rounds, synchronizes new user rounds, calculates user reward tokens and returns them.
Parameters:
Returns value:
updatePoolInfo Updates pool information about last reward time and total reward
function updatePoolInfo() internal
deployUserData
Deploys Platform contract with the user data
Parameters:
Returns value:
castVoteWithReason
Casts user's vote.
Parameters:
castVoteWithReason
Casts user's vote with specified reason
Parameters:
withdrawTonsUserEmergency
User withdraws tons in case of emergency
withdrawTonsEmergency
Checks all the necessary requirements regarding the balance and amount, and does the transfer to the receiver address
Parameters:
withdrawTokensEmergency
Tokens withdraw in case of emergency.
Parameters:
linkRelayAccounts
Gets user data and processes linking of relayer eth and ton accounts.
Parameters:
onEventConfirmed
Confirms transaction from everscale to ethereum.
Parameters:
confirmEthAccount
Processes confirmation of ethereum account.
Parameters:
slashRelay
Slashes specified relayer.
Parameters:
_syncUserRewardData
Calculates user's reward based on params.
Parameters:
Returns value:
confirmSlash
Confirms slashing by burning gas of slashed user and recalculates round's balance.
function confirmSlash( address user, uint128[] user_rewards, uint128[] user_debts, uint128 ban_token_balance, address send_gas_to ) external override onlyUserData(user)
Parameters:
Events emitted:
RelaySlashed
createOriginRelayRound
Creates and deploys new relayer round and sets relayers for that round.
Parameters:
processBecomeRelayNextRound
Processes new relayers for the next relayer round.
Parameters:
processGetRewardForRelayRound
Processes rewards for current relayer round.
Parameters:
startElectionOnNewRound
Deploys election for a new round.
endElection
Based on election's address finishes the current election.
onElectionStarted
Sets start time of the election.
Parameters:
Events emitted:
ElectionStarted
onElectionEnded
Sets round details and deploys new relayer round.
Parameters:
Events emitted:
ElectionEnded
_relaysPacksCount
Returns number of relayer packs.
Return value:
onRelayRoundDeployed
Sends relayers to relayer round.
Parameters:
onRelayRoundInitialized
Sets round details, deploys new event and destroys previous round.
Parameters:
Events emitted:
RelayRoundInitialized
deployElection
Creates new platform for the new election.
Parameters:
Return value:
deployRelayRound
Creates platform for the new relayer round.
Parameters:
Return value:
installPlatformOnce
Installs updated platform.
Parameters:
installOrUpdateUserDataCode
Upgrades user data version.
Parameters:
Events emitted:
UserDataCodeUpgraded
installOrUpdateElectionCode
Upgrades election version.
Parameters:
Events emitted:
ElectionCodeUpgraded
installOrUpdateRelayRoundCode
Upgrades relayer round version.
Parameters:
Events emitted:
RelayRoundCodeUpgraded
upgradeUserData
*Upgrades user data.
Parameters:
forceUpgradeUserData
Upgrades user data.
Parameters:
_upgradeUserData
Upgrades user data code and version by request.
Parameters:
Events emitted:
RequestedUserDataUpgrade
upgradeElection
Upgrades election code and version by request.
Parameters:
Events emitted:
RequestedElectionUpgrade
upgradeRelayRound
Upgrades relayer round code and version by request.
Parameters:
Events emitted:
RequestedRelayRoundUpgrade
_buildElectionParams
Returns election params in cell format based on the round number.
Parameters:
Return value:
_buildRelayRoundParams
Returns relayer round params in cell format based on the round number.
Parameters:
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|