Solidity API โ
โณ timedPlanState
โ
Get the status of the fundraising plan
Parameters:
id
: Asset package ID
Function Returns:
Type | Description |
---|---|
uint256 | Current status of the fundraising plan: 0: Waiting to start 1: Fundraising 2: Fundraising plan closed 3: Fundraising successful 4: Fundraising failed 9: Destroyed |
function timedPlanState(uint256 id) public view returns (uint256)
function timedPlanState(uint256 id) public view returns (uint256)
๐ backOwner
โ
Return the node owner authority to the owner address set by the service provider
function backOwner() public
function backOwner() public
๐ฐ staking
โ
Builder's pledge
Parameters:
id
: Asset package ID
function staking(uint256 id) public payable
function staking(uint256 id) public payable
๐ฆ startPreSeal
โ
Enter the sealing period in advance. It will only be executed when the fundraising reaches the minimum fundraising target. After execution, the FIL of the fundraising will be transferred to the miner, and the SP can start sealing.
Parameters:
id
: Asset package ID
function startPreSeal(uint256 id) public
function startPreSeal(uint256 id) public
๐ฐ getBack
โ
If the minimum target of the fundraising plan is not reached and the fundraising fails, this interface returns the number of returned pledge coins and interest.
Parameters:
id
: Asset package ID
Function Returns:
Type | Description |
---|---|
uint256 | Number of returned pledge coins |
uint256 | Interest gained |
function getBack(uint256 id, address account) public view returns (uint256, uint256)
function getBack(uint256 id, address account) public view returns (uint256, uint256)
๐ฐ unStaking
โ
After the fundraising plan fails, retrieve the pledge coins and interest
Parameters:
id
: Asset package ID
function unStaking(uint256 id) public
function unStaking(uint256 id) public
๐ฐ investorWithdraw
โ
Builder withdraws earnings
Parameters:
id
: Asset package ID
function investorWithdraw(uint256 id) public
function investorWithdraw(uint256 id) public
๐ฐ availableRewardOf
โ
Get the earnings that can be withdrawn under the asset package for a certain address
Parameters:
id
: Asset package IDaddr
: Query address
Function Returns:
Type | Description |
---|---|
uint256 | Amount of earnings that can be withdrawn |
function availableRewardOf(uint256 id, address addr) public view returns (uint256)
function availableRewardOf(uint256 id, address addr) public view returns (uint256)
๐ฐ totalRewardOf
โ
Get the total earnings of a certain address under the asset package
Parameters:
id
: Asset package IDaddr
: Query address
Function Returns:
Type | Description |
---|---|
uint256 | Total earnings amount |
function totalRewardOf(uint256 id, address addr) public view returns (uint256)
function totalRewardOf(uint256 id, address addr) public view returns (uint256)
๐ฐ willReleaseOf
โ
Get the earnings to be released under the asset package for a certain address
Parameters:
id
: Asset package IDaddr
: Query address
Function Returns:
Type | Description |
---|---|
uint256 | Amount of earnings to be released |
function willReleaseOf(uint256 id, address addr) public view returns (uint256)
function willReleaseOf(uint256 id, address addr) public view returns (uint256)
๐ getToolAddr
โ
Get the relevant contract address
Function Returns:
Type | Description |
---|---|
address | Tool contract address |
address | Contract address interacting with Miner |
address | Logic contract address |
address | Extended logic contract address |
function getToolAddr() public pure returns (address tool, address miner, address process, address processSecond)
function getToolAddr() public pure returns (address tool, address miner, address process, address processSecond)
๐ totalRewardAmount
โ
Get the total earnings of the current asset package
Parameters:
key
: Asset package ID
Function Returns:
Type | Description |
---|---|
uint256 | Total earnings amount of the asset package |
function totalRewardAmount(uint256 key) public view returns (uint256)
function totalRewardAmount(uint256 key) public view returns (uint256)
๐ totalReleasedRewardAmount
โ
Get the total released earnings of the current asset package
Parameters:
key
: Asset package ID
Function Returns:
Type | Description |
---|---|
uint256 | Total released earnings amount of the asset package |
function totalReleasedRewardAmount(uint256 key) public view returns (uint256)
function totalReleasedRewardAmount(uint256 key) public view returns (uint256)
๐ pledgeTotalAmount
โ
Get the total amount of fundraising for the asset package
Parameters:
key
: Asset package ID
Function Returns:
Type | Description |
---|---|
uint256 | Total amount of fundraising for the asset package |
function pledgeTotalAmount(uint256 key) public view returns (uint256)
function pledgeTotalAmount(uint256 key) public view returns (uint256)
๐ gotFilFiReward
โ
Get the number of rewards received by the filfi platform under the current asset package
Parameters:
key
: Asset package ID
Function Returns:
Type | Description |
---|---|
uint256 | Number of rewards received by the platform |
function gotFilFiReward(uint256 key) public view returns (uint256)
function gotFilFiReward(uint256 key) public view returns (uint256)