RelayRound
hasUnclaimedReward
hasUnclaimedRewardChecks if user has unclaimed rewards.
function hasUnclaimedReward(address _relay_staker_addr) external view responsible returns (bool has_reward)Parameters:
_relay_staker_addr
address
Address of staker
Return value:
has_reward
bool
True if it has unclaimed rewards, false if not
getRewardForRound
getRewardForRoundCalculates reward for certain round and sends it to user.
function getRelayByStakerAddress(
address _relay_staker_addr
) external view responsible returns (uint256 _ton_key, uint160 _eth_addr, address _staker_addr, uint128 _staked_tokens)Parameters:
_relay_staker_addr
address
Staker address
Return value:
_ton_key
uint256
Ton account’s public key
_eth_addr
uint160
Ethereum account’s address
_staker_addr
address
Staker address
_staked_tokens
uint128
Amount of tokens staked
sendRelaysToRelayRound
sendRelaysToRelayRoundSets relayers to the specific round.
function sendRelaysToRelayRound(address relay_round_addr, uint32 count) external override onlyRootParameters:
relay_round_addr
address
Address of relayer round
count
uint32
Number of relayers to send to relayer round
_checkRelaysInstalled
_checkRelaysInstalledChecks whether there are enough relayers installed.
function _checkRelaysInstalled() internaldestroy
destroyDestroy round if ended.
function destroy() external override onlyRootonCodeUpgrade
onCodeUpgradeSets relayer round data based on the upgraded data.
function onCodeUpgrade(TvmCell upgrade_data) privateParameters:
upgrade_data
TvmCell
Upgraded election data in cell format
count
uint32
Number of relayers to send to relayer round
upgrade
upgradeUpgrades relayer round data and code.
function upgrade(TvmCell code, uint32 new_version, address send_gas_to) external onlyRootParameters:
code
TvmCell
relayer round’s platform code
new_version
uint32
New version of relayer round’s platform
send_gas_to
address
Address where to send remaining gas
Events emitted:
RelayRoundCodeUpgraded
Last updated
Was this helpful?