September 2019
Beginner to intermediate
540 pages
13h 3m
English
When artists sell their art, they need to enter basic art information. When the buy and sell functions of DigitalArtERC721Token are invoked, we are able to trace all of the arts-related transactions. In the following code, we are defining the Art and ArtTxn structs in the smart contract:
struct Art {
uint256 id;
string title;
string description;
uint256 price;
string date;
string authorName;
address payable author;
address payable owner;
uint status;
string image;
}
struct ArtTxn {
uint256 id;
uint256 price;
address seller;
address buyer;
uint txnDate;
uint status;
}
Each art has its own token ID, title, description, price, author name, author address, owner address, and URL that's linked to the ...
Read now
Unlock full access