Solidity API โ
๐๏ธ spSignWithMiner
โ
Service provider signature (needs to change the node's owner to a smart contract through the service provider's signature, otherwise the signature fails)
function spSignWithMiner() public onlySp
function spSignWithMiner() public onlySp
๐ฐ payOpsSecurityFund
โ
Service provider pays operation security deposit
Parameters:
id
: Asset package ID
function payOpsSecurityFund(uint256 id) public payable onlySp
function payOpsSecurityFund(uint256 id) public payable onlySp
๐ฐ withdrawOpsSecurityFund
โ
Service provider withdraws operation security deposit
Parameters:
id: Asset package ID
function withdrawOpsSecurityFund(uint256 id) public onlySp
function withdrawOpsSecurityFund(uint256 id) public onlySp
๐ฐ spWithdraw
โ
Service provider withdraws earnings
Parameters:
id: Asset package ID
function spWithdraw(uint256 id) public onlySp
function spWithdraw(uint256 id) public onlySp
๐ ๏ธ setMinerBackOwner โ
Set the owner address that takes over the node after the fundraising plan expires
Parameters:
minerOwner: The address to which the smart contract transfers the owner's authority of the node
function setMinerBackOwner(bytes minerOwner) public
function setMinerBackOwner(bytes minerOwner) public
๐ฐ opsFundReward
โ
Returns the reward amount of the SP under the asset package
Parameters:
id
: Asset package ID
Function returns:
Type | Description |
---|---|
uint256 | SP's reward amount |
function opsFundReward(uint256 id) public view returns (uint256)
function opsFundReward(uint256 id) public view returns (uint256)
๐ฐ spWillReleaseReward
โ
Get the number of unreleased earnings of the SP in the asset package
Parameters:
id
: Asset package ID
Function returns:
Type | Description |
---|---|
uint256 | Number of SP's unreleased earnings |
function spWillReleaseReward(uint256 id) public view returns (uint256)
function spWillReleaseReward(uint256 id) public view returns (uint256)
๐ฐ spRewardAvailableLeft
โ
Get the number of SP's currently available earnings in the asset package
Parameters:
id
: Asset package ID
Function returns:
Type | Description |
---|---|
uint256 | Number of SP's available earnings |
function spRewardAvailableLeft(uint256 id) public view returns (uint256 amountReturn)
function spRewardAvailableLeft(uint256 id) public view returns (uint256 amountReturn)
๐ spFine
โ
Get the total fine generated during the operation of the SP under the asset package
Parameters:
key
: Asset package ID
Function returns:
Type | Description |
---|---|
uint256 | Total fine amount |
function spFine(uint256 key) public view returns (uint256)
function spFine(uint256 key) public view returns (uint256)
๐ spRewardLock
โ
Get the number of locked rewards of the SP under the asset package
Parameters:
key
: Asset package ID
Function returns:
Type | Description |
---|---|
uint256 | Number of SP's locked rewards |
function spRewardLock(uint256 key) public view returns (uint256)
function spRewardLock(uint256 key) public view returns (uint256)
๐ gotSpReward
โ
Get the number of rewards received by the SP under the asset package
Parameters:
key
: Asset package ID
Function returns:
Type | Description |
---|---|
uint256 | Number of SP's received rewards |
function gotSpReward(uint256 key) public view returns (uint256)
function gotSpReward(uint256 key) public view returns (uint256)
๐ opsCalcFund
โ
Get the number of security deposits of the SP under the asset package
Parameters:
key
: Asset package ID
Function returns:
Type | Description |
---|---|
uint256 | Number of SP's security deposits |
function opsCalcFund(uint256 key) public view returns (uint256)
function opsCalcFund(uint256 key) public view returns (uint256)
๐ opsSecurityFundRemain
โ
Get the remaining number of security deposits of the SP under the asset package
Parameters:
key
: Asset package ID
Function returns:
Type | Description |
---|---|
uint256 | Remaining number of SP's security deposits |
function opsSecurityFundRemain(uint256 key) public view returns (uint256)
function opsSecurityFundRemain(uint256 key) public view returns (uint256)