UserData
propose
propose
If user has enough gas and it's not slashed, deploys new proposal to the dao root, if not notifies user that proposal is not created.
Parameters:
onProposalDeployed
onProposalDeployed
Adds proposal to the created proposals, deletes pending proposal and notifies user that the proposal has been created.
Parameters:
castVote
castVote
If there was an error notifies user that vote is rejected, if not adds vote to the casted votes and casts vote to the proposal with given id.
Parameters:
Events emitted:
VoteCast
voteCasted
voteCasted
Notifies user that the vote is casted.
Parameters:
rejectVote
rejectVote
Deletes vote from casted votes and notifies user about rejection.
Parameters:
tryUnlockVoteTokens
tryUnlockVoteTokens
Unlocks tokens used for voting.
Parameters:
unlockVoteTokens
unlockVoteTokens
Deletes created proposal and unlocks user votes.
Parameters:
Events emitted:
UnlockVotes
tryUnlockCastedVotes
tryUnlockCastedVotes
Unlocks casted votes from proposal and transfers remaining gas to user.
Parameters:
unlockCastedVote
unlockCastedVote
Deletes casted votes from list and notifies user that votes are unlocked.
Parameters:
Events emitted:
UnlockCastedVotes
_lockedTokens
_lockedTokens
Returns the total amount of userβs locked tokens used in proposals
Return value:
syncRewards
syncRewards
Synchronize all data linked to reward rounds list when adding new reward round.
Parameters:
slash
slash
Synchronizes rewards, sets banned rewards, reward debts and token balance and confirms slashing using that data.
Parameters:
processDeposit
processDeposit
Synchronizes rewards, adds deposited tokens to token balance and finishes deposit.
Parameters:
Events emitted:
DepositProcessed
processClaimReward
processClaimReward
Synchronizes rewards, creates new list of rewards whose data is reward balance from each reward round and finishes claiming rewards.
Parameters:
getRewardForRelayRound
getRewardForRelayRound
Does all the necessary checks and processes getting the reward for finished relayer round.
Parameters:
processGetRewardForRelayRound2
processGetRewardForRelayRound2
Synchronizes rewards and based on the relayer round address found using round number gets reward for the specified round.
Parameters:
receiveRewardForRelayRound
receiveRewardForRelayRound
Increases reward balance for the specified round.
Parameters:
Events emitted:
RelayRoundRewardClaimed
processLinkRelayAccounts
processLinkRelayAccounts
Links relayer accounts by setting the relay_ton_pubkey and relay_eth_address
Parameters:
Events emitted:
RelayKeysUpdated
TonPubkeyConfirmed
EthAddressConfirmed
confirmTonAccount
confirmTonAccount
Sets ton_pubkey_confirmed to true.
Events emitted:
TonPubkeyConfirmed
processConfirmEthAccount
processConfirmEthAccount
Sets eth_address_confirmed to true and transfers remaining gas to the send_gas_to.
Parameters:
Events emitted:
EthAddressConfirmed
becomeRelayNextRound
becomeRelayNextRound
Processes relayer for next round in the staking pool.
processBecomeRelayNextRound2
processBecomeRelayNextRound2
Based on election address apply for membership.
Parameters:
relayMembershipRequestAccepted
relayMembershipRequestAccepted
Locks relayer for 30 days.
Parameters:
Events emitted:
RelayMembershipRequested
processWithdraw
processWithdraw
Synchronizes rewards, decreases from token balance number of tokens to withdraw and finishes withdraw in the staking pool.
Parameters:
withdrawTons
withdrawTons
Transfers to user all the tons left.
Last updated