September 2019
Beginner to intermediate
540 pages
13h 3m
English
When a user makes a deal for an art trade, the transaction records are stored in the artTxns mapping storage. By reading this value, we will get all of the transaction history for the digital art trade. Here is the code implementation:
function getArtAllTxn(uint256 _tokenId) public view returns (uint256[] memory _id, uint256[] memory _price,address[] memory seller,address[] memory buyer, uint[] memory _txnDate ){ ArtTxn[] memory artTxnList = artTxns[_tokenId]; uint256 arrLength = artTxnList.length; uint256[] memory ids = new uint256[](arrLength); uint256[] memory prices = new uint256[](arrLength); address[] memory sellers = new address[](arrLength); address[] memory buyers = new address[](arrLength); ...Read now
Unlock full access