Skip to content

Solidity API โ€‹

โณ timedPlanState โ€‹

Get the status of the fundraising plan

Parameters:

  • id: Asset package ID

Function Returns:

TypeDescription
uint256Current status of the fundraising plan: 0: Waiting to start 1: Fundraising 2: Fundraising plan closed 3: Fundraising successful 4: Fundraising failed 9: Destroyed
solidity
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

solidity
function backOwner() public
function backOwner() public

๐Ÿ’ฐ staking โ€‹

Builder's pledge

Parameters:

  • id: Asset package ID
solidity
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
solidity
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:

TypeDescription
uint256Number of returned pledge coins
uint256Interest gained
solidity
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
solidity
function unStaking(uint256 id) public
function unStaking(uint256 id) public

๐Ÿ’ฐ investorWithdraw โ€‹

Builder withdraws earnings

Parameters:

  • id: Asset package ID
solidity
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 ID
  • addr: Query address

Function Returns:

TypeDescription
uint256Amount of earnings that can be withdrawn
solidity
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 ID
  • addr: Query address

Function Returns:

TypeDescription
uint256Total earnings amount
solidity
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 ID
  • addr: Query address

Function Returns:

TypeDescription
uint256Amount of earnings to be released
solidity
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:

TypeDescription
addressTool contract address
addressContract address interacting with Miner
addressLogic contract address
addressExtended logic contract address
solidity
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:

TypeDescription
uint256Total earnings amount of the asset package
solidity
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:

TypeDescription
uint256Total released earnings amount of the asset package
solidity
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:

TypeDescription
uint256Total amount of fundraising for the asset package
solidity
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:

TypeDescription
uint256Number of rewards received by the platform
solidity
function gotFilFiReward(uint256 key) public view returns (uint256)
function gotFilFiReward(uint256 key) public view returns (uint256)

footer message