DAPP流動性質(zhì)押模式挖礦系統(tǒng)開發(fā)(穩(wěn)定版)及源碼功能
智能合約在區(qū)塊鏈上的可執(zhí)行代碼是一種類似匯編語言的指令集,這些指令集通過EVM的解釋和執(zhí)行,對區(qū)塊鏈的狀態(tài)進行讀寫,實現(xiàn)合約規(guī)定的業(yè)務(wù)邏輯。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.
一套完整的區(qū)塊鏈DAPP,除智能合約這些可以查詢和改變區(qū)塊鏈狀態(tài)的代碼外,還需要用戶操作界面及連接用戶操作與智能合約代碼的接口。
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,此函數(shù)返回_owner擁有的NFT列表中對應(yīng)索引的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.
*通過索引返回對應(yīng)的tokenId
*/
function tokenByIndex(uint256 index)external view returns(uint256);
}