Elections
applyForMembership
applyForMembership
Adds new relayer to the list of request nodes and accepts request.
Parameters:
staker_addr
address
Address of the staker applying
ton_pubkey
uint256
Public key of ton account
eth_addr
uint160
Address of ethereum account
tokens
uint128
Number of stakerβs tokens
lock_time
uint32
Duration of locking the tokens
code_version
uint32
Code version
destroy
destroy
Should be called after transfer of relayer data to next relayer round.
finish
finish
Ends election if not yet ended and sends gas back to root.
Parameters:
code_version
uint32
Electionβs version code
sendRelaysToRelayRound
sendRelaysToRelayRound
Sets relayers to the relayer round.
Parameters:
relay_round_addr
address
Address of the relayer round
relays_count
uint32
Number of relayers in the round
upgrade
upgrade
Upgrades election data and sets new code.
Parameters:
code
TvmCell
Electionβs platform code
new_version
uint32
New version of electionβs platform
sendGasTo
address
Address where to send remaining gas
Events emitted:
ElectionCodeUpgraded
onCodeUpgrade
onCodeUpgrade
Takes current version info and creates origin node after contract initialization.
Parameters:
upgrade_data
TvmCell
Upgraded election data in cell format
_buildUserDataParams
_buildUserDataParams
Builds user data params.
Parameters:
user
address
User data address
Return value:
TvmCell
User Data params in cell format
_buildPlatformInitData
_buildPlatformInitData
Sets initial platform data.
Parameters:
platform_root
address
Address of the platform
platform_type
uint8
Type of the platform
initial_data
TvmCell
Initial platform data in cell format
Return value:
TvmCell
Platform initial state in cell format
Last updated