# snft **Repository Path**: eostech/snft ## Basic Information - **Project Name**: snft - **Description**: simple NFT for demo - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-08-10 - **Last Updated**: 2022-08-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 数据结构与ACTION ``` -------------nftowner.hpp-------------------------------------------- 插入好不可修改。 //nftowner表 TABLE nftowner_t { int64_t id; //id<0: 自动生成id; //id不存在:使用此id //id存在:报错。不允许修改。 : string owner; uint64_t worksid; uint32_t amount; string meta; //field uint64_t primary_key() const {return id;} uint64_t by_worksid() const {return worksid;} }; typedef eosio::multi_index data) { -------------nftworks.hpp-------------------------------------------- //nftworks表 TABLE nftworks_t { int64_t id; id string owner; string meta; string description; #可修改 uint32_t createdat; string status; #可修改 uint32_t total; #可修改 uint32_t remainning; //field uint64_t primary_key() const {return id;} }; typedef eosio::multi_index nftworkss_t; ACTION createworks( name account, std::vector data) { ACTION modifyworks( name account, nftworks_t data) { ``` # 测试环境 contract name: snft2 permission: active rpc api: http://achain.hpe.net.cn:3921 wallet-url: http://achain.hpe.net.cn:3923