TP錢包/ImToken/MetaMask小狐貍/Dapp錢包系統(tǒng)開發(fā)案例詳細(方案設計)/源碼功能
區(qū)塊鏈技術,也被稱之為分布式賬本技術,是一種互聯(lián)網(wǎng)數(shù)據(jù)庫技術,其特點是去中心化、公開透明,讓每個人均可參與數(shù)據(jù)庫記錄。區(qū)塊鏈技術不是一個單項的技術,而是一個集成了多方面研究成果基礎之上的綜合性技術系統(tǒng)。There are three indispensable core technologies:consensus mechanism,Cryptography principle and distributed data storage
區(qū)塊鏈技術可以構建一個高效可靠的價值傳輸系統(tǒng),推動互聯(lián)網(wǎng)成為構建社會信任的網(wǎng)絡基礎設施,實現(xiàn)價值的有效傳遞,并將此稱為價值互聯(lián)網(wǎng)。Blockchain provides a new type of social trust mechanism,laying a new foundation for the development of the digital economy.The innovation of"blockchain+"application indicates a new direction for industrial innovation and public services.
區(qū)塊鏈是什么?一句話,它是一種特殊的分布式數(shù)據(jù)庫。首先,區(qū)塊鏈的主要作用是儲存信息。任何需要保存的信息,都可以寫入?yún)^(qū)塊鏈,也可以從里面讀取,所以它是數(shù)據(jù)庫。
contract MyNFT{
function name()constant returns(string name){
return"My Non-FungibleToken";
}
}
contract MyNFT{
function symbol()constant returns(string symbol){
return"MNFT";
}
}
contract ERC721{
function name()external view returns(string _name);
function symbol()external view returns(string _symbol);
function tokenURI(uint256 _tokenId)external view returns(string);
function totalSupply()external view returns(uint256);
function tokenByIndex(uint256 _index)external view returns(uint256);
function tokenOfOwnerByIndex(address _owner,uint256 _index)external view returns(uint256);
//基本函數(shù)-查詢
function balanceOf(address _owner)constant returns(uint balance);
function ownerOf(uint256 _tokenId)constant returns(address owner);
//基本函數(shù)-操作
function approve(address _to,uint256 _tokenId);(setApprovalForAll/getApproved/isApprovedForAll/)
function transfer(address _to,uint256 _tokenId);(safeTransferFrom/transferFrom)
//基本函數(shù)-獲取元數(shù)據(jù)
function tokenMetadata(uint256 _tokenId)constant returns(string infoUrl);
//事件
event Transfer(address indexed _from,address indexed _to,uint256 _tokenId);
event Approval(address indexed _owner,address indexed _approved,uint256 _tokenId);
}
event ApprovalForAll(address indexed _owner,address indexed _operator,bool _approved);