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 |
---|---|
wallet
address
Token wallet address
sendGasTo
address
Address where to send spent gas
spent gas
tokenRoot
address
Token root address
amount
uint128
Amount of tokens in transfer
sender
address
Address of the sender
senderWallet
address
Wallet address of the sender
remainingGasTo
address
Address where the remaining gas will be transferred
payload
TvmCell
Deposit payload data encoded to Cell
_deposit_nonce
uint64
Id of the deposit which should be reverted
_deposit_nonce
uint64
Id of the deposit which should be finalized
amount
uint128
Amount to withdraw
sendGasTo
address
Address where to send remaining gas
user
address
User address who initiates withdraw
withdraw_amount
uint128
Amount to withdraw
sendGasTo
address
Address where to send remaining gas
sendGasTo
address
Address where to send remaining gas
user
address
Address of the user that claims a reward
rewards
uint128[]
List of rewards
sendGasTo
address
Address where to send remaining gas
user_token_balance
uint256
Balance of user’s tokens
user_reward_data
IUserData.RewardRoundData[]
List of all synced user rewards
address
Address where to send remaining gas
user_data_owner
address
Address of the deployer of user data
address
Address of the deployed UserData contract
proposal_id
uint32
Id of the proposal
support
bool
True if voted for, false if voted against
proposal_id
uint32
Id of the proposal
support
bool
True if voted for, false if voted against
reason
string
Reason for voting
amount
uint128
Amount of tons to withdraw
receiver
address
Receiver address where tons will be sent
all
bool
True if all tons should be withdrawn, false if not
sendGasTo
address
Address where to send remaining gas
amount
uint128
Amount of tokens to withdraw
receiver
address
Receiver address where tokens will be sent
all
bool
True if all tokens should be withdrawn, false if not
sendGasTo
address
Address where to send spent gas
ton_pubkey
uint256
Public key of the ton account
eth_address
uint160
Address of the ethereum account
eventData
IEthereumEvent.EthereumEventInitData
EthereumEvent data
gasBackAddress
address
Address where to send remaining gas
staker_addr
address
Address of the staker
eth_address
uint160
Ethereum account address
sendGasTo
address
Address where to send remaining gas
relay_staker_addr
address
Address of the relayer which will be slashed
sendGasTo
address
Address where to send remaining gas
user_rewards
uint128[]
List of all user rewards
user_debts
uint128[]
List of all user debts
ban_token_balance
uint128
Used for calculating new user reward that is not already synced
uint128[]
Synced user rewards list
user
address
Address of the slashed user
user_rewards
uint128[]
Rewards list of the slashed user
user_debts
uint128[]
Debts list of the slashed user
ban_token_balance
uint128
Balance of banned tokens
sendGasTo
address
Address where to send remaining gas
staker_addrs
address[]
List of stakers in the round
ton_pubkeys
uint256[]
List of ton accounts’ public keys
eth_addrs
uint160[]
List of ethereum’s accounts
staked_tokens
uint128[]
List of staked tokens
ton_deposit
uint128
Amount of tons deposited
sendGasTo
address
Address where to send remaining gas
remaining gas
user
address
Address of the user that will be processed for a next round’s relayer
user
address
Address of the user that should get a reward
round_num
uint32
Number of the round for which he will be awarded
round_num
uint32
Round number in which election has started
round_num
uint32
Round number in which election has ended
relay_requests_count
uint32
Number of relayer’s requests (used to check whether there were enough of them for election to be valid)
uint8
Number of relayers packs
round_num
uint32
Round number
duplicate
bool
True if yes, false if not
round_num
uint32
Round number
round_start_time
uint32
Time when the round will start
round_end_time
uint32
End of the round
relays_count
uint32
Number of relayers
round_reward
uint128
Reward for the round
reward_round_num
uint32
Number of reward round (index for base_details.rewardRounds array)
(index for base_details.rewardRounds array)
duplicate
bool
True if yes, false if not
eth_keys
uint160[]
List of ethereum accounts
round_num
uint32
Round number
address
Deployed election address
round_num
uint32
Round number
start_time
uint32
Round start time
end_time
uint32
Round end time
duplicate
bool
True if yes, false if not
packs_num
uint8
Number of relayer packs
election_addr
address
Address of the election
prev_relay_round_addr
address
Previous relayer round address
msg_flag
uint16
Flag used for building new RelayRound platform
address
Address of deployed relayer round
code
TvmCell
Platform code encoded to cell
sendGasTo
address
Address where to send remaining gas
code
TvmCell
User data code in cell format
sendGasTo
address
Address where to send remaining gas
code
TvmCell
Election code in cell format
sendGasTo
address
Address where to send remaining gas
code
TvmCell
relayer round code in cell format
sendGasTo
address
Address where to send remaining gas
sendGasTo
address
Address where to send remaining gas
user
address
User address
sendGasTo
address
Address where to send remaining gas
user
address
User address
gas_value
uint128
Gas value spent for upgrade
sendGasTo
address
Address where to send remaining gas
round_num
uint32
Round number
sendGasTo
address
Address where to send remaining gas
round_num
uint32
Round number
sendGasTo
address
Address where to send remaining gas
round_num
uint32
Round number
TvmCell
Election parameters data encoded to cell
round_num
uint32
Round number
TvmCell
Relayer round params encoded to cell