欢迎光临散文网 会员登陆 & 注册

DAPP流动性质押模式挖矿系统开发(稳定版)及源码功能

2023-07-08 11:06 作者:bili_36625761919  | 我要投稿

  智能合约在区块链上的可执行代码是一种类似汇编语言的指令集,这些指令集通过EVM的解释和执行,对区块链的状态进行读写,实现合约规定的业务逻辑。Therefore,through Solidity,a high-level programming language,and Solidity compiler,you can compile High-level programming language into assembly instruction set code,and then deploy it to the blockchain for execution.


  一套完整的区块链DAPP,除智能合约这些可以查询和改变区块链状态的代码外,还需要用户操作界面及连接用户操作与智能合约代码的接口。


  pragma solidity^0.8.0;


  import"../IERC721.sol";


  /**


  *title ERC-721 Non-Fungible Token Standard,optional enumeration extension


  *dev See https://eips.ethereum.org/EIPS/eip-721


  */


  interface IERC721Enumerable is IERC721{


  /**


  *dev Returns the total amount of tokens stored by the contract.


  *返回NFT总量


  */


  function totalSupply()external view returns(uint256);


  /**


  *dev Returns a token ID owned by`owner`at a given`index`of its token list.


  *Use along with{balanceOf}to enumerate all of``owner``'s tokens.


  *所有者可以一次拥有多个的NFT,此函数返回_owner拥有的NFT列表中对应索引的tokenId


  */


  function tokenOfOwnerByIndex(address owner,uint256 index)external view returns(uint256 tokenId);


  /**


  *dev Returns a token ID at a given`index`of all the tokens stored by the contract.


  *Use along with{totalSupply}to enumerate all tokens.


  *通过索引返回对应的tokenId


  */


  function tokenByIndex(uint256 index)external view returns(uint256);


  }


DAPP流动性质押模式挖矿系统开发(稳定版)及源码功能的评论 (共 条)

分享到微博请遵守国家法律