You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
968 B

7 months ago
  1. ### 質押合約API
  2. ```
  3. NFT nftContract; // NFT合約
  4. Pool poolContract; // 池子合約
  5. ProductInfo[] public productInfo; //產品信息
  6. uint256 nextTokenId = 1; //生成NFT ID
  7. mapping(uint256 => PledgeType) pledges; // 質押信息,可變
  8. mapping(address => RecommendObjType) public recommendObj; // 用戶綁定記錄
  9. mapping(address => uint256[]) public invitationTokens; // 所有貢獻收益的tokenID
  10. mapping(address => address[]) public invitationAddress; // 所有貢獻收益的地址
  11. mapping(address => PledgeType[]) public pledgeRecords; //質押記錄 不可變
  12. <!-- 獲取該地址的所有質押信息 -->
  13. function getOwnerAllPledgeInfo( address _ownerAddress ) public view returns (PledgeType[] memory result)
  14. <!-- 獲取質押產品信息 -->
  15. function getProductInfo() public view returns (ProductInfo[] memory)
  16. <!-- // 獲取該地址的所有質押信息 -->
  17. ```