diff --git a/README.md b/README.md index 2dc7a73..2172285 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Each symbol in imdata and mdata is +1 byte. 1. [Contract actions](#contract-actions) 2. [Data Structures](#data-structures) 3. [EXAMPLES: how to use Simple Assets in smart contracts](#examples-how-to-use-simple-assets-in-smart-contracts) -4. [ChangeLog](#change-log-v111) +4. [ChangeLog](#change-log-v112) --------------------------- # Contract actions @@ -71,8 +71,8 @@ https://github.com/CryptoLions/SimpleAssets/blob/master/include/SimpleAssets.hpp canceloffer (owner, [assetid1,..,assetidn]) claim (claimer, [assetid1,..,assetidn]) - regauthor (name author, data, stemplate) - authorupdate (author, data, stemplate) + regauthor (name author, data, stemplate, string imgpriorit) + authorupdate (author, data, stemplate, string imgpriorit) delegate (owner, to, [assetid1,..,assetidn], period, memo) undelegate (owner, from, [assetid1,..,assetidn]) @@ -137,6 +137,7 @@ authors { string stemplate; // data (json) schema for third-party markets. // key: state values, where key is the key from mdata or idata; // recommended values: txt, img, url, hide, webgl, mp3, video, timestamp; + string imgpriority; // Image priority to use for by 3d-party tools for better displaying assets. } ``` @@ -420,6 +421,10 @@ saRes1.send(); ----------------- +## Change Log v1.1.2 +- added `string imgpriorit`field in sauthor table and to `regauthor` and `authorupdate` actions + + ## Change Log v1.1.1 - optimized claim/transfer/burn functionality - Memo field added to delegates table. (This allows lenders/games to create different classes of borrowed assets - eg. high risk / low risk.) On delegete action, the memo from action parmeter is stored to this new field. max 64 chars length. @@ -535,1165 +540,6 @@ Batch Processing -======== -# 中文翻译 -简单资产(Simple Assets) -========================= - -一款EOSIO区块链上的数字资产(可替代和不可替代代币——NFTs)标准,由CryptoLions开发创建。 - -web: [http://simpleassets.io](http://simpleassets.io/ -Git:  -Telegram:  - -EOS 主网帐户:**simpleassets** -MEETONE 主网帐户: **smplassets.m** -TELOS 主网帐户:**simpleassets** - -简介和演示:https://medium.com/\@cryptolions/introducing-simple-assets-b4e17caafaa4 - -作者的事件接收器示例:https://github.com/CryptoLions/SimpleAssets-EventReceiverExample - ------- -警告!!!CDT目前有一个不被允许在v1.6.x版本上编译漏洞。 1.5.0版本上也有一个漏洞"Segmentation fault (core dumped)",但仅基于abi可生成。 建议:使用1.5.0版本合约和我们的abi编译. 问题: https://github.com/EOSIO/eosio.cdt/issues/527 - -通过调用简单资产(Simple Assets)合约来使用Simple Assets。这就像是Dapps的Dapp。 - -丛林测试网: simpleassets - -EOS 主网: simpleassets -MEETONE 主网: smplassets.m -TELOS 主网: simpleassets - - 简单资产(Simple Assets)是一个独立的合约,其他Dapps可以直接调用它来管理自己的数字资产。这为Dapp用户提供了额外的保证,即资产的所有权由信誉良好的外部机构管理,并且一旦创建,Dapp只能管理资产的mdata部分。 所有与所有权相关的功能都存在于游戏之外。 - -我们正在创建一个DAC,它将在部署至EOSIO主网后对简单资产(Simple Assets)策划更新。 - -相关信息:理解所有权。 - -运用regauthor操作发送自己的NFTs信息至第三方商城。 - -或者,dapps可以自行部署简单资产(Simple Assets)副本并进行修改以更好地控制其功能。 部署前,应修改简单资产(Simple Assets)以防止任何人创建资产。 ------- -## RAM使用情况 - -NFT的RAM使用量取决于idata和mdata字段中存储的数据量。 -如果它们都为空,则每个NFT占用276个字节。 - -imdata和mdata中的每个符号都是+1字节。 - ----- -## 目录 - -1. [合约操作](https://github.com/CryptoLions/SimpleAssets#contract-actions) - -2. [数据结构](https://github.com/CryptoLions/SimpleAssets#data-structures) - -3. [示例:如何在智能合约中使用简单资产](https://github.com/CryptoLions/SimpleAssets#examples-how-to-use-simple-assets-in-smart-contracts) - -4. [更新日志](https://github.com/CryptoLions/SimpleAssets#change-log-v101) ---- - -合约操作 -======== - -可在此处找到每个参数的说明: - -[https](https://github.com/CryptoLions/SimpleAssets/blob/master/include/SimpleAssets.hpp)*:*[//github.com/CryptoLions/SimpleAssets/blob/master/include/SimpleAssets.hpp](https://github.com/CryptoLions/SimpleAssets/blob/master/include/SimpleAssets.hpp) - -``` -\# -- For Non-Fungible Tokens --- - -create (author, category, owner, idata, mdata, requireсlaim) -update (author, owner, assetid, mdata) -transfer (from, to , [assetid1,..,assetidn], memo) -burn (owner, [assetid1,..,assetidn], memo) - -offer (owner, newowner, [assetid1,..,assetidn], memo) -canceloffer (owner, [assetid1,..,assetidn]) -claim (claimer, [assetid1,..,assetidn]) - -regauthor (name author, data, stemplate) -authorupdate (author, data, stemplate) - -delegate (owner, to, [assetid1,..,assetidn], period, memo) -undelegate (owner, from, [assetid1,..,assetidn]) -delegatemore (owner, assetid, period) - -attach (owner, assetidc, [assetid1,..,assetidn]) -detach (owner, assetidc, [assetid1,..,assetidn]) -attachf (owner, author, quantity, assetidc) -detachf (owner, author, quantity, assetidc) - -\# -- For Fungible Tokens --- - -createf (author, maximum_supply, authorctrl, data) -updatef (author, sym, data) -issuef (to, author, quantity, memo) -transferf (from, to, author, quantity, memo) -burnf (from, author, quantity, memo) - -offerf (owner, newowner, author, quantity, memo) -cancelofferf (owner, [ftofferid1,...,ftofferidn]) -claimf (claimer, [ftofferid1,...,ftofferidn]) - -openf (owner, author, symbol, ram_payer) -closef (owner, author, symbol) -``` ---- -数据结构 -======== - -## 资产 - -``` -sasset { - -uint64_t id; // 用于转移和搜索的资产ID -name owner; // 资产所有者(可变更 — 由所有者决定!!!) -name author; // 资产创建者(游戏合约,不可变更) -name category; // 资产类别,由创建者选择,不可变更 -string idata; // 不可变更资产数据。 它可以是字符串化“JSON”或只是字符串“sha256” -string mdata; // 可变资产数据,由创建者在创建或资产更新时添加。 它可以是字符串化“JSON”或只是字符串“sha256” -sasset[] container; // 其它NFTs(可替代和不可替代代币)附加到此资产 -account[] containerf; // FTs(可替代代币)附加到此资产 - -} - -//请包含有关资产名称img desc的idata或mdata信息,这些信息将由Markets使用。 -``` ----- -## 报价 - -``` -offers { - -uint64_t assetid; // 提供 claim 的资产ID -name owner; // 资产所有者 -name offeredto; // 可以 claim 此资产的人 -uint64_t cdate; // 创建日期 - -} -``` ---- -## 创建者 -``` -authors { - -name author; // 资产创建者,将能够创建和更新资产 - -string data; // 创建者的数据(json)将被商城用于更好的展示 - // 建议:形象徽标(logo),信息,网址; - -string stemplate; // 商城的数据(json)模式。 key:状态值,其中 key 是 idata 或 mdata 的字段名 - // 对非文本字段的建议格式:txt,img,url,hide,webgl,mp3,video,timestamp - -} -``` ----- -## 委托 -``` -delegates{ - -uint64_t assetid; // asset id offered for claim; -name owner; // asset owner; -name delegatedto; // who can claim this asset; -uint64_t cdate; // offer create date; -uint64_t period; // Time in seconds that the asset will be lent. Lender cannot -undelegate until - -// the period expires, however the receiver can transfer back at any time. - -} -``` ---- -## 货币统计(可替代代币) -``` -stat { - -asset supply; // 提供代币 -asset max_supply; // 提供最大量代币 -name issuer; // 可替代代币(Fungible token)创建者 -uint64_t id; // 此代币的唯一ID -bool authorctrl; // 如果 true(1)允许代币创建者(而不仅仅是所有者)进行烧录和传输 -string data; // 字符串化的json。 建议的keys包括: img,name - -} -``` ---- -## 账户(可替代代币) -``` -accounts { - -uint64_t id; // 代币ID,来自 stat 表 -name author; // 代币创建者 -asset balance; // 代币余额 - -} - -sofferf { - -uint64_t id; // claim 此 offer 的ID(自动递增) - -name author; // 可替代代币(fungible token)创建者 -name owner; // 可替代代币(fungible token)所有者 -asset quantity; // 资产数量 -name offeredto; // 可以 claim 此 offer 的帐户 -uint64_t cdate; // offer创建日期 - -} -``` ---- -示例:如何在智能合约中使用简单资产 -================================== - -## 创建资产并转移到所有者帐户ownerowner22: -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; -name author = get_self(); -name category = "weapon"_n; -name owner = "ownerowner22"_n; - -string idata = "{\\"power\\": 10, \\"speed\\": 2.2, \\"name\\": \\"Magic -Sword\\" }"; - -string mdata = "{\\"color\\": \\"bluegold\\", \\"level\\": 3, \\"stamina\\": 5, -\\"img\\": \\"https://bit.ly/2MYh8EA\\" }"; - -action createAsset = action( -permission_level{author, "active"_n}, -SIMPLEASSETSCONTRACT, -"create"_n, -std::make_tuple( author, category, owner, idata, mdata, 0 ) - -); - -createAsset.send(); -``` ---- -## 使用ownerowner22的requireclaim选项创建资产: -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; -name author = get_self(); -name category = "balls"_n; -name owner = "ownerowner22"_n; - -string idata = "{\\"radius\\": 2, \\"weigh\\": 5, \\"material\\": \\"rubber\\", -\\"name\\": \\"Baseball\\" }"; - -string mdata = "{\\"color\\": \\"white\\", \\"decay\\": 99, \\"img\\": -\\"https://i.imgur.com/QoTcosp.png\\" }"; - -action createAsset = action( -permission_level{author, "active"_n}, -SIMPLEASSETSCONTRACT, -"create"_n, -std::make_tuple( author, category, owner, idata, mdata, 1 ) - -); - -createAsset.send(); -``` ---- -## 搜索资产并获取资产信息 - -1. 请添加有关资产结构的hpp文件信息。 - -**警告! CDT目前有一个不允许编译的漏洞(v1.6.1)。1.5.0也有一个漏洞“Segmentation fault(core -dumped)”,但只有abi可生成(包括self对象数组:std :: vector container;)** - -``` -TABLE account { - -uint64_t id; -name author; -asset balance; -uint64_t primary_key()const { -return id; - -} - -}; - -typedef eosio::multi_index\< "accounts"_n, account \> accounts; - -TABLE sasset { - -uint64_t id; -name owner; -name author; -name category; -string idata; -string mdata; -std::vector\ container; -std::vector\ containerf; -auto primary_key() const { -return id; - -} - -uint64_t by_author() const { - -return author.value; - -} - -}; - -typedef eosio::multi_index\< "sassets"_n, sasset, - -eosio::indexed_by\< "author"_n, eosio::const_mem_fun\ \> - -\> sassets; -``` - -2. 搜索和使用信息 -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; -name author = get_self(); -name owner = "lioninjungle"_n; -uint64_t assetid = 100000000000187 -sassets assets(SIMPLEASSETSCONTRACT, owner.value); -auto idx = assets.find(assetid); -check(idx != assets.end(), "Asset not found or not yours"); -check (idx-\>author == author, "Asset is not from this author"); -auto idata = json::parse(idx-\>idata); // for parsing json here is used nlohmann -lib -auto mdata = json::parse(idx-\>mdata); // https://github.com/nlohmann/json -check(mdata["cd"] \< now(), "Not ready yet for usage"); -``` ---- -## 更新资产 -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; -auto mdata = json::parse(idxp-\>mdata); -mdata["cd"] = now() + 84600; -name author = get_self(); -name owner = "ownerowner22"_n; -uint64_t assetid = 100000000000187; -action saUpdate = action( -permission_level{author, "active"_n}, -SIMPLEASSETSCONTRACT, -"update"_n, -std::make_tuple(author, owner, assetid, mdata.dump()) - -); - -saUpdate.send(); -``` ---- -## 转移一个资产 -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; -name author = get_self(); -name from = "lioninjungle"_n; -name to = "ohtigertiger"_n; -std::vector\ assetids; -assetids.push_back(assetid); -string memo = "Transfer one asset"; -action saUpdate = action( -permission_level{author, "active"_n}, - -SIMPLEASSETSCONTRACT, -"transfer"_n, -std::make_tuple(from, to, assetids, memo) -); - -saUpdate.send(); -``` ---- -## 将两个资产转移到具有相同备忘录的同一接收器 -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; -name author = get_self(); -name from = "lioninjungle"_n; -name to = "ohtigertiger"_n; -std::vector\ assetids; -assetids.push_back(assetid1); -assetids.push_back(assetid2); -string memo = "Transfer two asset" -action saUpdate = action( -permission_level{author, "active"_n}, -SIMPLEASSETSCONTRACT, -"transfer"_n, -std::make_tuple(from, to, assetids, memo) -); - -saUpdate.send(); -``` ---- -## issuef创建代币问题(可替代代币) -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; -asset wood; -wood.amount = 100; -wood.symbol = symbol("WOOD", 0); -name author = get_self(); -name to = "lioninjungle"_n; -std::string memo = "WOOD faucet"; -action saRes1 = action( -permission_level{author, "active"_n}, - -SIMPLEASSETSCONTRACT, -"issuef"_n, -std::make_tuple(to, author, wood, memo) -); - -saRes1.send(); -``` ---- - -## 如果启用了authorctrl,则由创建者转让代币(可替代) - -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; - -asset wood; -wood.amount = 20; -wood.symbol = symbol("WOOD", 0); -name from = "lioninjungle"_n; -name to = get_self(); -name author = get_self(); -std::string memo = "best WOOD"; -action saRes1 = action( -permission_level{author, "active"_n}, -SIMPLEASSETSCONTRACT, -"transferf"_n, -std::make_tuple(from, to, author, wood, memo) - -); - -saRes1.send(); -``` ----- -## 如果启用了authorctrl,则由创建者烧录代币(可替代) -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; -asset wood; -wood.amount = 20; -wood.symbol = symbol("WOOD", 0); -name author = get_self(); -name from = "lioninjungle"_n; -std::string memo = "WOOD for oven"; -action saRes1 = action( -permission_level{author, "active"_n}, -SIMPLEASSETSCONTRACT, -"burnf"_n, -std::make_tuple(from, author, wood, memo) - -); - -saRes1.send(); - -``` ------- - -更新日志v1.1.0 - -*代码重构 -*修复了为委托和转让的NFTs的分离批量处理功能 -*新合约允许延长借用NFT的委托期限 -*增加了外部(bash)单元测试 ---- -## 更改日志v1.0.1 - -- `createlog` 操作中的新参数 `requireclaim`,用于 `create` 操作历史记录日志。 - ---- -## 更改日志v1.0.0 - -- 阻止所有者向自己提供资产 ---- -## 更改日志v0.4.2 - -- `saeclaim` 事项的格式已更改:由map \替换asseti数组 ---- -## 更改日志v0.4.1 - -- 添加了require_recipient(所有者)来执行`create`操作 ---- -## 更改日志v0.4.0 - -**轻松找到可替代代币的信息(可替换代币有创建者范围):** - -- FT的 `account` 表中的新字段 `author`。 (更容易找到可替代代币信息) - -**更多可替代代币信息** - -- 新领域 `data` 中 `currency_stats` 的表-字符串化JSON其中可能包括键 `img`,`name`(建议最好通过市场显示) - -- 新参数`data`在 `createf` 操作中 - -- updatef改变FT的新举措data - -**提供/声明可替代的代币** - - - -======== -# 한국어 - -# 심플에셋 (SimpleAssets) - -EOSIO 블록체인 상의 (대체 가능 코인과 불가능 코인—NFT를 모두 포함한) 디지털 자산을 위해, [Cryptolions](https://cryptolions.io/)가 고안해 낸 간편 표준 - -Web: [http://simpleassets.io](http://simpleassets.io) -Git: [https://github.com/CryptoLions/SimpleAssets](https://github.com/CryptoLions/SimpleAssets) -Telegram: [https://t.me/simpleassets](https://t.me/simpleassets) - -EOS 메인넷 계정: **simpleassets** -MEETONE 메인넷 계정: **smplassets.m** -TELOS 메인넷 계정: **simpleassets** - -소개 & 데모: [https://medium.com/@cryptolions/introducing-simple-assets-b4e17caafaa4](https://medium.com/@cryptolions/introducing-simple-assets-b4e17caafaa4) - -작성자들을 위한 이벤트 리시버 예시: [https://github.com/CryptoLions/SimpleAssets-EventReceiverExample](https://github.com/CryptoLions/SimpleAssets-EventReceiverExample) - -**주의! 현재 CDT는 v1.6.1에서는 컴파일이 되지 않는 버그가 있습니다. v1.5.0 역시 abi generation 시 "Segmentation fault (core dumped)" 버그가 발생합니다. 컨트랙트 컴파일 시 v1.5.0와 저희가 제공하는 abi를 사용하실 것을 추천합니다.** - ---------------------------- - -심플에셋을 사용하는 데에는 두 가지 방법이 있습니다. - -1. 외부 [소유권 권한자(ownership authority)](https://medium.com/@cryptolions/digital-assets-we-need-to-think-about-ownership-authority-a2b0465c17f6)로 사용합니다. EOS 체인에 배포됨과 함께, 심플에셋은 다른 Dapp들이 자신들의 디지털 자산을 관리하기 위해 호출할 수 있는 별개의 컨트랙트가 됩니다. 이는 자산의 소유권이 신뢰할 수 있는 외부 권한자에 의해 관리될 수 있도록, 그리고 생성과 동시에 해당 Dapp이 자산의 mdata만을 관리할 수 있도록 하는 추가적인 보장책을 해당 Dapp 사용자들에게 제공합니다. 소유권과 관련한 모든 기능들은 외부에 존재하게 됩니다. - - EOS 메인넷 계정: **simpleassets** - -2. 각 Dapp은 자신만의 심플에셋 사본을 배포할 수 있으며, 각 기능에 대해 더 큰 통제권을 가질 수 있도록 수정을 적용할 수 있습니다. 우리는 이를, Dapp이 그 자신의 "ownership authority"로서 작동하는 사례로 보고 있습니다. 배포에 앞서, 심플에셋은 누군가가 자산을 생성하는 것을 막도록 수정되어야 합니다. - ---------------------------- - -## RAM 사용량 - -NFT의 RAM 사용량은 idata와 mdata 필드에 얼마나 많은 데이터가 있는지에 의해 정해집니다. 두 영역 모두가 비어있다면, 각 NFT는 `276byte`를 차지합니다. - -imdata와 mdata의 각 기호들은 1 byte 씩을 차지합니다. - ---------------------------- - -## 목차: -1. [컨트랙트 액션](#컨트랙트-액션) -2. [데이터 구조](#데이터-구조) -3. [예시: 스마트 컨트랙트에서 심플에셋 사용하기](#예시:-스마트-컨트랙트에서-심플에셋-사용하기) -4. [변경 로그](#변경-로그) - ---------------------------- - -# 컨트랙트 액션 - -각 파라미터에 대한 설명은 다음 링크에서 찾아볼 수 있습니다. -[https://github.com/CryptoLions/SimpleAssets/blob/master/include/SimpleAssets.hpp](https://github.com/CryptoLions/SimpleAssets/blob/master/include/SimpleAssets.hpp) - -``` -# -- For Non-Fungible Tokens --- - -create (author, category, owner, idata, mdata, requireсlaim) -update (author, owner, assetid, mdata) -transfer (from, to , [assetid1,..,assetidn], memo) -burn (owner, [assetid1,..,assetidn], memo) - -offer (owner, newowner, [assetid1,..,assetidn], memo) -canceloffer (owner, [assetid1,..,assetidn]) -claim (claimer, [assetid1,..,assetidn]) - -regauthor (name author, data, stemplate) -authorupdate (author, data, stemplate) - -delegate (owner, to, [assetid1,..,assetidn], period, memo) -undelegate (owner, from, [assetid1,..,assetidn]) -delegatemore (owner, assetid, period) - -attach (owner, assetidc, [assetid1,..,assetidn]) -detach (owner, assetidc, [assetid1,..,assetidn]) - -attachf (owner, author, quantity, assetidc) -detachf (owner, author, quantity, assetidc) - -# -- For Fungible Tokens --- - -createf (author, maximum_supply, authorctrl, data) -updatef (author, sym, data) -issuef (to, author, quantity, memo) -transferf (from, to, author, quantity, memo) -burnf (from, author, quantity, memo) - -offerf (owner, newowner, author, quantity, memo) -cancelofferf (owner, [ftofferid1,...,ftofferidn]) -claimf (claimer, [ftofferid1,...,ftofferidn]) - -openf (owner, author, symbol, ram_payer) -closef (owner, author, symbol) -``` - -# 데이터 구조 - -## 자산 - -``` -sasset { - uint64_t id; // asset id used for transfer and search; - name owner; // asset owner (mutable - by owner!!!); - name author; // asset author (game contract, immutable); - name category; // asset category, chosen by author, immutable; - string idata; // immutable assets data. Can be stringified JSON or just sha256 string; - string mdata; // mutable assets data, added on creation or asset update by author. Can be - // stringified JSON or just sha256 string; - sasset[] container; // other NFTs attached to this asset - account[] containerf; // FTs attached to this asset -} -``` - -// Markets에서 사용될 자산 이름 img desc에 대한 idata 혹은 mdata 정보를 포함시켜 주세요. - -## 오퍼 - -``` -offers { - uint64_t assetid; // asset id offered for claim ; - name owner; // asset owner; - name offeredto; // who can claim this asset ; - uint64_t cdate; // offer create date; -} -``` - -## 작성자 - -``` -authors { - name author; // assets author, who will be able to create and update assets; - string data; // author’s data (json) will be used by markets for better display; - // recommendations: logo, info, url; - string stemplate; // data (json) schema for third-party markets. - // key: state values, where key is the key from mdata or idata; - // recommended values: txt, img, url, hide, webgl, mp3, video, timestamp; -} -``` - -## 위임자 - -``` -delegates{ - uint64_t assetid; // asset id offered for claim; - name owner; // asset owner; - name delegatedto;// who can claim this asset; - uint64_t cdate; // offer create date; - uint64_t period; // Time in seconds that the asset will be lent. Lender cannot undelegate until - // the period expires, however the receiver can transfer back at any time. -} -``` - -## 화폐 통계 (대체 가능 토큰) - -``` -stat { - asset supply; // Tokens supply - asset max_supply; // Max token supply - name issuer; // Fungible token author - uint64_t id; // Unique ID for this token - bool authorctrl; // if true(1) allow token author (and not just owner) to burn and transfer. - string data; // stringified json. recommended keys to include: `img`, `name` -} -``` - -## 계정 (대체 불가능 토큰) - -``` -accounts { - uint64_t id; // token id, from stat table - name author; // token author - asset balance; // token balance -} -``` - -``` -sofferf { - - uint64_t id; // id of the offer for claim (increments automatically) - name author; // ft author - name owner; // ft owner - asset quantity; // quantity - name offeredto; // account who can claim the offer - uint64_t cdate; // offer creation date -} -``` - -# 예시: 스마트 컨트랙트에서 심플에셋 사용하기 - -## 자산을 생성해 소유자 계정 ownerowner22으로 전송하기: - -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; - -name author = get_self(); -name category = "weapon"_n; -name owner = "ownerowner22"_n; -string idata = "{\"power\": 10, \"speed\": 2.2, \"name\": \"Magic Sword\" }"; -string mdata = "{\"color\": \"bluegold\", \"level\": 3, \"stamina\": 5, \"img\": \"https://bit.ly/2MYh8EA\" }"; - -action createAsset = action( - permission_level{author, "active"_n}, - SIMPLEASSETSCONTRACT, - "create"_n, - std::make_tuple( author, category, owner, idata, mdata, 0 ) -); -createAsset.send(); -``` - -## requireclaim 옵션으로 ownerowner22에 자산 생성하기: - -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; - -name author = get_self(); -name category = "balls"_n; -name owner = "ownerowner22"_n; -string idata = "{\"radius\": 2, \"weigh\": 5, \"material\": \"rubber\", \"name\": \"Baseball\" }"; -string mdata = "{\"color\": \"white\", \"decay\": 99, \"img\": \"https://i.imgur.com/QoTcosp.png\" }"; - -action createAsset = action( - permission_level{author, "active"_n}, - SIMPLEASSETSCONTRACT, - "create"_n, - std::make_tuple( author, category, owner, idata, mdata, 1 ) -); -createAsset.send(); -``` - -## 자산의 검색과 자산 정보 가져오기 - -1. 자산 구조에 관한 hpp 파일을 추가하십시오. - -**주의! 현재 CDT는 v1.6.1에서는 컴파일이 되지 않는 버그가 있습니다. -v1.5.0 역시 abi generation에 한해 (객체 자신의 배열 포함 : std::vector container;) "Segmentation fault (core dumped)" 버그가 발생합니다.** - -``` -TABLE account { - uint64_t id; - name author; - asset balance; - - uint64_t primary_key()const { - return id; - } -}; -typedef eosio::multi_index< "accounts"_n, account > accounts; - -TABLE sasset { - uint64_t id; - name owner; - name author; - name category; - string idata; - string mdata; - std::vector container; - std::vector containerf; - - auto primary_key() const { - return id; - } - - uint64_t by_author() const { - return author.value; - } -}; - -typedef eosio::multi_index< "sassets"_n, sasset, - eosio::indexed_by< "author"_n, eosio::const_mem_fun > -> sassets; -``` - -2. 정보의 검색 및 사용 - -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; -name author = get_self(); -name owner = "lioninjungle"_n; - -uint64_t assetid = 100000000000187 - -sassets assets(SIMPLEASSETSCONTRACT, owner.value); -auto idx = assets.find(assetid); - -check(idx != assets.end(), "Asset not found or not yours"); - -check (idx->author == author, "Asset is not from this author"); - -auto idata = json::parse(idx->idata); // for parsing json here is used nlohmann lib -auto mdata = json::parse(idx->mdata); // https://github.com/nlohmann/json - -check(mdata["cd"] < now(), "Not ready yet for usage"); -``` - - - -## 자산 업데이트 - -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; - -auto mdata = json::parse(idxp->mdata); -mdata["cd"] = now() + 84600; - -name author = get_self(); -name owner = "ownerowner22"_n; -uint64_t assetid = 100000000000187; - -action saUpdate = action( - permission_level{author, "active"_n}, - SIMPLEASSETSCONTRACT, - "update"_n, - std::make_tuple(author, owner, assetid, mdata.dump()) -); -saUpdate.send(); -``` - - - -## 자산 하나 전송하기 - -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; - -name author = get_self(); -name from = "lioninjungle"_n; -name to = "ohtigertiger"_n; - -std::vector assetids; -assetids.push_back(assetid); - -string memo = "Transfer one asset"; - -action saUpdate = action( - permission_level{author, "active"_n}, - SIMPLEASSETSCONTRACT, - "transfer"_n, - std::make_tuple(from, to, assetids, memo) -); -saUpdate.send(); -``` - -## 동일한 메모가 첨부된 자산 두 개를 동일한 수신자에게 전송하기 - -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; - -name author = get_self(); -name from = "lioninjungle"_n; -name to = "ohtigertiger"_n; - -std::vector assetids; -assetids.push_back(assetid1); -assetids.push_back(assetid2); - -string memo = "Transfer two asset" - -action saUpdate = action( - permission_level{author, "active"_n}, - SIMPLEASSETSCONTRACT, - "transfer"_n, - std::make_tuple(from, to, assetids, memo) -); -saUpdate.send(); -``` - -## issue로 생성된 토큰에 대한 issuef (대체 가능 토큰) - -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; - -asset wood; -wood.amount = 100; -wood.symbol = symbol("WOOD", 0); - -name author = get_self(); -name to = "lioninjungle"_n; - -std::string memo = "WOOD faucet"; -action saRes1 = action( - permission_level{author, "active"_n}, - SIMPLEASSETSCONTRACT, - "issuef"_n, - std::make_tuple(to, author, wood, memo) -); -saRes1.send(); -``` - -## authorctrl이 사용 가능한 경우의, 작성자에 의한 transferf (대체 가능 토큰) - -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; - -asset wood; -wood.amount = 20; -wood.symbol = symbol("WOOD", 0); - -name from = "lioninjungle"_n; -name to = get_self(); -name author = get_self(); - -std::string memo = "best WOOD"; -action saRes1 = action( - permission_level{author, "active"_n}, - SIMPLEASSETSCONTRACT, - "transferf"_n, - std::make_tuple(from, to, author, wood, memo) -); -saRes1.send(); -``` - -## authorctrl이 사용 가능한 경우의, 작성자에 의한 burnf (대체 가능 토큰) - -``` -name SIMPLEASSETSCONTRACT = "simpleassets"_n; - -asset wood; -wood.amount = 20; -wood.symbol = symbol("WOOD", 0); - -name author = get_self(); -name from = "lioninjungle"_n; - -std::string memo = "WOOD for oven"; -action saRes1 = action( - permission_level{author, "active"_n}, - SIMPLEASSETSCONTRACT, - "burnf"_n, - std::make_tuple(from, author, wood, memo) -); -saRes1.send(); -``` - -## 변경 로그 v1.0.1 - -- 내부적으로 `create` 액션 히스토리 로그에 이용되는 새로운 파라미터 `requireclaim`가 `createlog` 액션에 추가됨. - -## 변경 로그 v1.0.0 - -- 자기 자신에게 자산을 오퍼하는 소유자 블록 처리 - -## 변경 로그 v0.4.2 - -- `saeclaim` 이벤트의 포멧 변경: assetids 배열이 map 으로 대체됨 - -## 변경 로그 v0.4.1 - -- `create` 액션에 require_recipient(owner) 추가 - -## 변경 로그 v0.4.0 - -**대체 가능 코인 정보를 보다 쉽게 찾을 수 있게 됨 (대체 가능 코인이 scope author를 가짐):** - -- FT를 위해 `account` 테이블에 새 필드 `author`가 추가됨. (대체 가능 코인 정보를 보다 쉽게 찾을 수 있음) - -**추가된 대체 가능 코인 정보:** - -- `currency_stats` 테이블에 새로운 필드 `data`가 추가됨 - 키 `img`, `name`을 포함할 수도 있는 json을 스트링화 (시장을 통한 개선된 디스플레이를 위해 권장) -- `createf` 액션에 새로운 파라미터 `data`가 추가됨 -- FT `data`를 변경하기 위한 새로운 액션 `updatef`가 추가됨 - - - -**대체 가능 토큰 오퍼/클레임** - -- `offer`/`claim` FT에 사용되는 새로운 테이블 `sofferf`가 추가됨 -- 새로운 액션 `offerf`, `cancelofferf`, `claimf`가 추가됨 -- 개방된 오퍼가 없을 경우 (내부) `closef`에 대해 검사 - -**자산 컨테이너라이징** -**주의! 현재 CDT는 v1.6.1에서는 컴파일이 되지 않는 버그가 있습니다. - v1.5.0 역시 abi generation 시 "Segmentation fault (core dumped)" 버그가 발생합니다. 추천: 컨트랙트 컴파일 시 v1.5.0와 저희가 제공하는 abi를 사용하실 것을 추천합니다.** - -- 다른 NFT 및 FT의 어태치와 디태치를 위해 새로운 필드 `container`와 `containerf`가 NFT 자산 구조에 추가됨 -- 새로운 액션 `attach`, `detach`가 추가됨 -- 새로운 액션 `attachf`, `detachf`가 추가됨 - -**기타** - -- `global` 테이블 내 필드 이름 변경됨 `lastid` -> 'lnftid`, 'spare` -> `defid` (내부용) -- `soffer` 테이블 내 `offeredTo` 필드의 이름이 `offeredto`로 변경됨 - -## 변경 로그 v0.3.2 - -- `offer` 액션에 `memo` 파라미터 추가; -- `delegate` 액션에 `memo` 파라미터 추가; - -## 변경 로그 v0.3.1 - -- NFT를 위한 내부 액션 `createlog`를 추가함. create 액션에 의해 사용되며, assetid를 기록하여 제 3자 탐색자가 새로운 자산 id와 기타 정보를 손쉽게 얻을 수 있도록 함. -- 새로운 싱글톤 테이블 `tokenconfigs`를 추가함. 이는 외부 컨트랙트 파스 액션과 테이블을 도움 (탈중앙화 교환소, 시장, 및 다수의 토큰을 사용하는 기타 컨트랙트에 유용). -시장, 교환소, 및 기타 유관 컨트랙트는 다음 코드를 이용해 이 정보를 열람할 수 있음. - -``` -Configs configs("simpleassets"_n, "simpleassets"_n.value); -configs.get("simpleassets"_n); -``` - -- 새로운 액션 `updatever`를 추가함. 이는 제 3자 지갑, 시장 등에 대해 본 버전으로 배포된 심플에셋을 업데이트함; -- 이벤트 알림과 관련한 새로운 예시: https://github.com/CryptoLions/SimpleAssets-EventReceiverExample - -## 변경 로그 v0.3.0 - -- 유예된 거래를 이용한 이벤트 알림이 추가됨. 자산 작성자는 자산의 생성, 전송, 클레임, 소각에 대한 알림을 받게됨. 알림을 받기 위해선 작성자 컨트랙트에 다음을 입력 해야함: - -``` -ACTION saecreate ( name owner, uint64_t assetid ); -ACTION saetransfer ( name from, name to, std::vector& assetids, std::string memo ); -ACTION saeclaim ( name account, std::vector& assetids ); -ACTION saeburn ( name account, std::vector& assetids, std::string memo ); -``` - -- `delegate` 액션과 `sdelegates` 테이블에 대한 `untildate` 파라미터가 `period` (초 단위)로 변경됨 - -## 변경 로그 v0.2.0 - -### 다소 변경된 eosio.token 컨트랙트를 이용하는 로직과 대체 가능 토큰 테이블 추가 - -- 새로운 액션 및 로직 추가: `createf`, `issuef`, `transferf`, `burnf`, `openf`, `closef` -- 새로운 테이블 `stat(supply, max_supply, issuer, id)`와 `accounts (id, balance)` 추가됨. -- stats 테이블(대체 가능 토큰들에 관한 정보)을 위한 scope가 작성자로 변경됨 -- `accounts` 테이블의 기본 인덱스는 creates 액션에 생성되고 stats 테이블에 저장된 uniq id임. -- `authorctrl` 파라미터를 가진 대체 가능 코인을 위해 `stats` 테이블에 `createf` 액션이 추가됨. 이것이 참(1)인 경우, 토큰 작성자(소유자가 아님)가 burnf과 transferf를 할 수 있음. 생성 후에는 변경할 수 없음! -- 리카르디안 컨트랙트 업데이트 -- 더 많은 예시 추가 - -## 변경 로그 v0.1.1 - -기타 - -- sdelagate 테이블 구조의 이름이 sdelegate로 변경됨 (오타) -- create 액션 파라미터의 이름이 변경됨: requireClaim -> require claim -- 모든 액션에 대한 assetID 액션 파라미터의 이름이 assetid로 변경됨 - -대출 자산 - -- sdelegate 테이블 - 새 필드 추가됨: luntildate -- delegate 액션에 untildate 파라미터 추가됨. 파라미터가 올바르게 입력된 경우 (0이거나 미래에) 액션은 단순 검사를 시행함. -- undelegate는 untildate에 이르기 전까지는 작동하지 않음 (이는 자산 대출에 최소 기간을 보장함). -- 위임된 경우, untiltime 보다 일찍 자산을 재전송(반납)하는 것을 허용 (대출자는 일찍 반납할 수 있는 옵션을 가짐) - -배치 프로세싱 - -- 클레임(claim) 액션: assentid 파라미터가 assetsids의 배열로 변경됨. 복수 클레임 로직 추가됨. -- 오퍼(offer) 액션: assentid 파라미터가 assetsids의 배열로 변경됨. 복수 오퍼 로직 추가됨. -- 오퍼 취소(canceloffer) 액션: assentid 파라미터가 assetsids의 배열로 변경됨. 복수 취소 로직 추가됨. -- 전송(transfer) 액션: assentid 파라미터가 assetsids의 배열로 변경됨. 복수 전송 로직 추가됨. -- 소각(burn) 액션: assentid 파라미터가 assetsids의 배열로 변경됨. 복수 소각 로직 추가됨. -- 위임/위임취소(delegate/undelegate) 액션: assentid 파라미터가 assetsids의 배열로 변경됨. 복수 위임/위임취소 로직 추가 - -- `sofferf` 用于`offer` / `calimFT`的新表 - -- 新的操作`offer`,`cancelofferf` 和 `claimf` - -- 对 `closef` 检查如果没有公开招股(内部) - -**集装资产** - -**警告!!! CDT目前有一个不被允许在v1.6.1上编译的漏洞。 -1.5.0也有一个漏洞“Segmentation fault(core dumped)”,但只有abi生效。** - -**建议:使用1.5.0进行合约编译,并使用我们的abi。** - -- nft资产结构中用于附加和分离其他NFT或FT的新字段“container”和“containerf” - -- 新操作 `attach`,`detach` - -- 新操作 `attachf`,`detach` - -**杂项** - -- 字段重命名 `lasted`- \>` lnftid`,`spare`- \> `defid`(内部用法)在表 `global` 中 - -- 字段 `providedTo` 在 `soffer` 表中重命名为 `offersto` ---- -## 更改日志v0.3.2 - -- 为操作 `offer` 添加了 `memo` 参数; - -- 为操作 `delegate` 添加了 `memo` 参数; ---- -## 更改日志v0.3.1 - -- 增加了NFT的内部操作 `createlog` 。由创建操作用于记录资产ID,以便第三方资源管理器可以轻松获取新的资产ID和其他信息。 - -- 增加了新的单例表 `tokenconfigs`。它有助于外部合约正确解析操作和表格(对于分散交换,市场和使用多个代币的其他合约有用)。市场,交易所和其他依赖合约将能够使用以下代码查看此信息。 -``` -Configs configs("simpleassets"_n, "simpleassets"_n.value); - -configs.get("simpleassets"_n); -``` -- 增加了操作 `updatever`。它为第三方钱包,市场等更新了SimpleAstes部署的版本; - -- 事件通知的新示例: ---- -## 更改日志v0.3.0 - -- 使用延迟事务添加了事件通知。资产作者将收到有关资产创建,转移,索赔或烧录的通知。要收到它,请为您的创建者合约添加以下操作: -``` -ACTION saecreate ( name owner, uint64_t assetid ); - -ACTION saetransfer ( name from, name to, std::vector\& assetids, -std::string memo ); - -ACTION saeclaim ( name account, std::vector\& assetids ); - -ACTION saeburn ( name account, std::vector\& assetids, std::string -memo ); -``` -- `untildate` 参数更改为 `period`(以秒为单位)的操作 `delegate` 和表 `sdelegates` ---- -## 更改日志v0.2.0 - -### 使用eosio.token合约添加了可替代代币(Fungible Token)表和逻辑,但有一些更改 - -- 新的操作和逻辑:`createf`,`issuef`,`transfer`,`burnf`,`openf`,`closef` - -- 添加了新表 `stat(supply, max_supply, issuer, id)` 和 `accounts (id, balance)` 。 - -- 统计表的范围(关于可替代代币的信息)已更改为创建者 - -- `accountstable` 的主索引是在 `create` f操作上创建的 `uniq id` 并存储在 `stats` 表中。 - -- 添加 `createf` 与 `parameter` 可替代代币操作 `authorctrl` 至 `stats` 表。如果为true(1)允许代币创建者(而不仅仅是所有者)使用burnf和transferf。创建后无法更改! - -- 李嘉图合约已更新 - -- 以下有更多用法示例 ---- -## 更改日志v0.1.1 - -**杂项** - -- sdelagate 表结构重命名为 sdelegate(typo) - -- 创建操作参数重命名:requireClaim - \> requireclaim - -- assetID操作参数在所有要声明的操作中重命名 - -**借入资产** - -- sdelegate表 - 添加了新字段:untildate - -- 委托操作添加参数untildate。如果参数输入正确(零或将来),操作会进行简单检查。 - -- undelegate在不公开之前不会工作(这保证了资产贷款的最低期限)。 - -- 如果被委托,允许转移资产(返还)早于截至时间(借款人可以提前返还) - -**批量处理** - -- 声明操作(claim action):assetid参数已更改为assetsids数组。添加了多个声明逻辑。 - -- 报价操作(offer action):assetid参数已更改为assetsids数组。添加了多个提供逻辑。 - -- 取消报价操作(canceloffer action):assetid参数已更改为assetsids数组。添加了多个取消逻辑。 - -- 传输操作(transfer action):assetid参数已更改为assetsids数组。添加了多个资产转移逻辑。 - -- 烧录操作(burn action):assetid参数已更改为assetsids数组。添加了多个刻录逻辑。 - -- 委托/非委托操作(delegate / undelegated action):assetid参数已更改为assetsids数组。添加了多个委托/取消授权逻辑。 - diff --git a/README_KR.md b/README_KR.md new file mode 100644 index 0000000..4b29f87 --- /dev/null +++ b/README_KR.md @@ -0,0 +1,677 @@ +# 한국어 + +# 심플에셋 (SimpleAssets) + +EOSIO 블록체인 상의 (대체 가능 코인과 불가능 코인—NFT를 모두 포함한) 디지털 자산을 위해, [Cryptolions](https://cryptolions.io/)가 고안해 낸 간편 표준 + +Web: [http://simpleassets.io](http://simpleassets.io) +Git: [https://github.com/CryptoLions/SimpleAssets](https://github.com/CryptoLions/SimpleAssets) +Telegram: [https://t.me/simpleassets](https://t.me/simpleassets) + +EOS 메인넷 계정: **simpleassets** +MEETONE 메인넷 계정: **smplassets.m** +TELOS 메인넷 계정: **simpleassets** + +소개 & 데모: [https://medium.com/@cryptolions/introducing-simple-assets-b4e17caafaa4](https://medium.com/@cryptolions/introducing-simple-assets-b4e17caafaa4) + +작성자들을 위한 이벤트 리시버 예시: [https://github.com/CryptoLions/SimpleAssets-EventReceiverExample](https://github.com/CryptoLions/SimpleAssets-EventReceiverExample) + +주의!!! 현재 CDT는 v1.6.x에서는 컴파일이 되지 않는 버그가 있습니다. v1.5.0 역시 abi 생성 시 "세그멘테이션 오류 (core dumped)" 버그가 발생합니다. 컨트랙트 컴파일 시 v1.5.0와 저희가 제공하는 abi를 사용하실 것을 추천합니다. + +이슈: https://github.com/EOSIO/eosio.cdt/issues/527 + +--- + +심플에셋은 심플에셋 컨트렉트와 연결하여 사용합니다. 한마디로, Dapp을 위한 Dapp이라고 할 수 있겠습니다. + +정글 테스트넷: `simpleassets` +EOS 메인넷: `simpleassets` +MEETONE 메인넷: `smplassets.m` +TELOS 메인넷: `simpleassets` + +심플에셋은 다른 Dapp들이 자신의 디지털 자산을 관리하기 위해 호출할 수 있는 별개의 컨트랙트입니다. 이는 자산의 소유권이 신뢰할 수 있는 외부 권한자에 의해 관리될 수 있도록, 그리고 생성과 동시에 해당 Dapp이 자산의 mdata만을 관리할 수 있도록 하는 추가적인 보장책을 해당 Dapp 사용자들에게 제공합니다. 소유권과 관련한 모든 기능들은 외부에 존재하게 됩니다. + +현재 우리는, EOSIO 메인넷에 배포된 심플에셋의 업데이트를 큐레이팅할 DAC를 만드는 과정에 있습니다. + +관련 정보: 소유권 권한자 이해하기. + +자신의 NFT 관련 정보를 제 3자 시장에 게재하려면, regauthor 액션을 사용하세요. + +또는, 각 Dapp은 자신만의 심플에셋 사본을 배포할 수 있으며, 각 기능에 대해 더 큰 통제권을 가질 수 있도록 수정을 적용할 수 있습니다. 배포에 앞서, 심플에셋은 누군가가 자산을 생성하는 것을 막도록 수정되어야 합니다. +--------------------------- + +## RAM 사용량 + +NFT의 RAM 사용량은 idata와 mdata 필드에 얼마나 많은 데이터가 있는지에 의해 정해집니다. 두 영역 모두가 비어있다면, 각 NFT는 `276byte`를 차지합니다. + +imdata와 mdata의 각 기호들은 1 byte 씩을 차지합니다. + +--------------------------- + +## 목차: +1. [컨트랙트 액션](#컨트랙트-액션) +2. [데이터 구조](#데이터-구조) +3. [예시: 스마트 컨트랙트에서 심플에셋 사용하기](#예시:-스마트-컨트랙트에서-심플에셋-사용하기) +4. [변경 로그](#변경-로그) + +--------------------------- + +# 컨트랙트 액션 + +각 파라미터에 대한 설명은 다음 링크에서 찾아볼 수 있습니다. +[https://github.com/CryptoLions/SimpleAssets/blob/master/include/SimpleAssets.hpp](https://github.com/CryptoLions/SimpleAssets/blob/master/include/SimpleAssets.hpp) + +``` +# -- For Non-Fungible Tokens --- + +create (author, category, owner, idata, mdata, requireсlaim) +update (author, owner, assetid, mdata) +transfer (from, to , [assetid1,..,assetidn], memo) +burn (owner, [assetid1,..,assetidn], memo) + +offer (owner, newowner, [assetid1,..,assetidn], memo) +canceloffer (owner, [assetid1,..,assetidn]) +claim (claimer, [assetid1,..,assetidn]) + +regauthor (name author, data, stemplate) +authorupdate (author, data, stemplate) + +delegate (owner, to, [assetid1,..,assetidn], period, memo) +undelegate (owner, from, [assetid1,..,assetidn]) +delegatemore (owner, assetid, period) + +attach (owner, assetidc, [assetid1,..,assetidn]) +detach (owner, assetidc, [assetid1,..,assetidn]) + +attachf (owner, author, quantity, assetidc) +detachf (owner, author, quantity, assetidc) + +# -- For Fungible Tokens --- + +createf (author, maximum_supply, authorctrl, data) +updatef (author, sym, data) +issuef (to, author, quantity, memo) +transferf (from, to, author, quantity, memo) +burnf (from, author, quantity, memo) + +offerf (owner, newowner, author, quantity, memo) +cancelofferf (owner, [ftofferid1,...,ftofferidn]) +claimf (claimer, [ftofferid1,...,ftofferidn]) + +openf (owner, author, symbol, ram_payer) +closef (owner, author, symbol) +``` + +# 데이터 구조 + +## 자산 + +``` +sasset { + uint64_t id; // 양도와 검색에 이용되는 자산 ID; + name owner; // 자산 소유자 (소유자에 의해 변경 가능!!!); + name author; // 자산 생성자 (게임 컨트랙트, 변경 불가); + name category; // 자산 종류, 생성자가 선택, 변경 불가; + string idata; // 변경 불가 자산 데이터. JSON이나 sha256로 스트링화 가능; + string mdata; // 변경 가능 자산, 생성 시나 자산 업데이트 시 생성자에 의해 추가됨 + // JSON이나 sha256로 스트링화 가능; + sasset[] container; // 이 자산에 첨부된 다른 NFT + account[] containerf; // 이 자산에 첨부된 FT +} +``` + +// Markets에서 사용될 자산 이름 img desc에 대한 idata 혹은 mdata 정보를 포함시켜 주세요. + +## 오퍼 + +``` +offers { + uint64_t assetid; // 클레임을 위해 오퍼된 자산 ID; + name owner; // 자산 소유자; + name offeredto; // 이 자산을 클레임할 수 있는 사람 ; + uint64_t cdate; // 오퍼 생성일; +} +``` + +## 작성자 + +``` +authors { + name author; // 자산을 생성하고 업데이트할 수 있는 자산 샌성자; + string data; // 개선된 디스플레이를 위해 마켓에서 사용되는 생성자의 데이터(json); + // 추천: logo, info, url; + string stemplate; // 제 3자 시장을 위한 데이터(json) 스키마; + // 키: mdata, idata의 키의 상태값; + // 추천값: txt, img, url, hide, webgl, mp3, video, timestamp; +} +``` + +## 위임자 + +``` +delegates{ + uint64_t assetid; // ```claim```을 위해 오퍼된 자산 ID; + name owner; // 자산 소유자; + name delegatedto; // 이 자산을 클레임할 수 있는 사람; + uint64_t cdate; // 오퍼 생성일; + uint64_t period; // 자산이 대여될 시간(초). 대여자는 이 시간이 만료될 때까지 + // 위임을 해제할 수 없음. 하지만 대출자는 언제든 반환 가능. +} +``` + +## 화폐 통계 (대체 가능 토큰) + +``` +stat { + asset supply; // 토큰 공급 + asset max_supply; // 토큰 최대 공급 + name issuer; // 대체 가능 토큰 생성자 + uint64_t id; // 이 토큰의 고유 ID + bool authorctrl; // 이것이 참(1)이면 토큰 생성자(소유자가 아님)가 ```burn```과 ```transfer```를 할 수 있음. + string data; // 스트링화 된 json. 다음 키를 포함할 것을 추천: `img`, `name` +} +``` + +## 계정 (대체 불가능 토큰) + +``` +accounts { + uint64_t id; // ```stat``` 테이블의 토큰 ID + name author; // 토큰 생성자 + asset balance; // 토큰 잔고 +} +``` + +``` +sofferf { + uint64_t id; // ```claim```을 위한 ```offer```의 ID (자동으로 증가함) + name author; // FT 생성자 + name owner; // FT 소유자 + asset quantity; // 수량 + name offeredto; // 오퍼를 클레임할 수 있는 계정 + uint64_t cdate; // 오퍼 생성일 +} +``` + +# 예시: 스마트 컨트랙트에서 심플에셋 사용하기 + +## 자산을 생성해 소유자 계정 ownerowner22으로 전송하기: + +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; + +name author = get_self(); +name category = "weapon"_n; +name owner = "ownerowner22"_n; +string idata = "{\"power\": 10, \"speed\": 2.2, \"name\": \"Magic Sword\" }"; +string mdata = "{\"color\": \"bluegold\", \"level\": 3, \"stamina\": 5, \"img\": \"https://bit.ly/2MYh8EA\" }"; + +action createAsset = action( + permission_level{author, "active"_n}, + SIMPLEASSETSCONTRACT, + "create"_n, + std::make_tuple( author, category, owner, idata, mdata, 0 ) +); +createAsset.send(); +``` + +## requireclaim 옵션으로 ownerowner22에 자산 생성하기: + +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; + +name author = get_self(); +name category = "balls"_n; +name owner = "ownerowner22"_n; +string idata = "{\"radius\": 2, \"weigh\": 5, \"material\": \"rubber\", \"name\": \"Baseball\" }"; +string mdata = "{\"color\": \"white\", \"decay\": 99, \"img\": \"https://i.imgur.com/QoTcosp.png\" }"; + +action createAsset = action( + permission_level{author, "active"_n}, + SIMPLEASSETSCONTRACT, + "create"_n, + std::make_tuple( author, category, owner, idata, mdata, 1 ) +); +createAsset.send(); +``` + +## 자산의 검색과 자산 정보 가져오기 + +1. 자산 구조에 관한 hpp 파일을 추가하십시오. + +**주의! 현재 CDT는 v1.6.1에서는 컴파일이 되지 않는 버그가 있습니다. +v1.5.0 역시 abi generation에 한해 (객체 자신의 배열 포함 : std::vector container;) "Segmentation fault (core dumped)" 버그가 발생합니다.** + +``` +TABLE account { + uint64_t id; + name author; + asset balance; + + uint64_t primary_key()const { + return id; + } +}; +typedef eosio::multi_index< "accounts"_n, account > accounts; + +TABLE sasset { + uint64_t id; + name owner; + name author; + name category; + string idata; + string mdata; + std::vector container; + std::vector containerf; + + auto primary_key() const { + return id; + } + + uint64_t by_author() const { + return author.value; + } +}; + +typedef eosio::multi_index< "sassets"_n, sasset, + eosio::indexed_by< "author"_n, eosio::const_mem_fun > +> sassets; +``` + +2. 정보의 검색 및 사용 + +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; +name author = get_self(); +name owner = "lioninjungle"_n; + +uint64_t assetid = 100000000000187 + +sassets assets(SIMPLEASSETSCONTRACT, owner.value); +auto idx = assets.find(assetid); + +check(idx != assets.end(), "Asset not found or not yours"); + +check (idx->author == author, "Asset is not from this author"); + +auto idata = json::parse(idx->idata); // for parsing json here is used nlohmann lib +auto mdata = json::parse(idx->mdata); // https://github.com/nlohmann/json + +check(mdata["cd"] < now(), "Not ready yet for usage"); +``` + + + +## 자산 업데이트 + +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; + +auto mdata = json::parse(idxp->mdata); +mdata["cd"] = now() + 84600; + +name author = get_self(); +name owner = "ownerowner22"_n; +uint64_t assetid = 100000000000187; + +action saUpdate = action( + permission_level{author, "active"_n}, + SIMPLEASSETSCONTRACT, + "update"_n, + std::make_tuple(author, owner, assetid, mdata.dump()) +); +saUpdate.send(); +``` + + + +## 자산 하나 전송하기 + +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; + +name author = get_self(); +name from = "lioninjungle"_n; +name to = "ohtigertiger"_n; + +std::vector assetids; +assetids.push_back(assetid); + +string memo = "Transfer one asset"; + +action saUpdate = action( + permission_level{author, "active"_n}, + SIMPLEASSETSCONTRACT, + "transfer"_n, + std::make_tuple(from, to, assetids, memo) +); +saUpdate.send(); +``` + +## 동일한 메모가 첨부된 자산 두 개를 동일한 수신자에게 전송하기 + +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; + +name author = get_self(); +name from = "lioninjungle"_n; +name to = "ohtigertiger"_n; + +std::vector assetids; +assetids.push_back(assetid1); +assetids.push_back(assetid2); + +string memo = "Transfer two asset" + +action saUpdate = action( + permission_level{author, "active"_n}, + SIMPLEASSETSCONTRACT, + "transfer"_n, + std::make_tuple(from, to, assetids, memo) +); +saUpdate.send(); +``` + +## issue로 생성된 토큰에 대한 issuef (대체 가능 토큰) + +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; + +asset wood; +wood.amount = 100; +wood.symbol = symbol("WOOD", 0); + +name author = get_self(); +name to = "lioninjungle"_n; + +std::string memo = "WOOD faucet"; +action saRes1 = action( + permission_level{author, "active"_n}, + SIMPLEASSETSCONTRACT, + "issuef"_n, + std::make_tuple(to, author, wood, memo) +); +saRes1.send(); +``` + +## authorctrl이 사용 가능한 경우의, 작성자에 의한 transferf (대체 가능 토큰) + +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; + +asset wood; +wood.amount = 20; +wood.symbol = symbol("WOOD", 0); + +name from = "lioninjungle"_n; +name to = get_self(); +name author = get_self(); + +std::string memo = "best WOOD"; +action saRes1 = action( + permission_level{author, "active"_n}, + SIMPLEASSETSCONTRACT, + "transferf"_n, + std::make_tuple(from, to, author, wood, memo) +); +saRes1.send(); +``` + +## authorctrl이 사용 가능한 경우의, 작성자에 의한 burnf (대체 가능 토큰) + +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; + +asset wood; +wood.amount = 20; +wood.symbol = symbol("WOOD", 0); + +name author = get_self(); +name from = "lioninjungle"_n; + +std::string memo = "WOOD for oven"; +action saRes1 = action( + permission_level{author, "active"_n}, + SIMPLEASSETSCONTRACT, + "burnf"_n, + std::make_tuple(from, author, wood, memo) +); +saRes1.send(); +``` + +## 변경 로그 v1.1.0 + + * 코드 리펙터링 + * 위임 및 양도된 NFT를 위해 컨테이너라이징 된 NFT의 분리 수정 + * 대여한 NFT의 위임 기간을 연장할 수 있게 해주는 새로운 액션 delegatemore 추가 + * 외부(bash) 유닛 테스트 추가 + +## 변경 로그 v1.0.1 + +- 내부적으로 `create` 액션 히스토리 로그에 이용되는 새로운 파라미터 `requireclaim`가 `createlog` 액션에 추가됨. + +## 변경 로그 v1.0.0 + +- 자기 자신에게 자산을 오퍼하는 소유자 블록 처리 + +## 변경 로그 v0.4.2 + +- `saeclaim` 이벤트의 포멧 변경: assetids 배열이 map 으로 대체됨 + +## 변경 로그 v0.4.1 + +- `create` 액션에 require_recipient(owner) 추가 + +## 변경 로그 v0.4.0 + +**대체 가능 코인 정보를 보다 쉽게 찾을 수 있게 됨 (대체 가능 코인이 scope author를 가짐):** + +- FT를 위해 `account` 테이블에 새 필드 `author`가 추가됨. (대체 가능 코인 정보를 보다 쉽게 찾을 수 있음) + +**추가된 대체 가능 코인 정보:** + +- `currency_stats` 테이블에 새로운 필드 `data`가 추가됨 - 키 `img`, `name`을 포함할 수도 있는 json을 스트링화 (시장을 통한 개선된 디스플레이를 위해 권장) +- `createf` 액션에 새로운 파라미터 `data`가 추가됨 +- FT `data`를 변경하기 위한 새로운 액션 `updatef`가 추가됨 + + + +**대체 가능 토큰 오퍼/클레임** + +- `offer`/`claim` FT에 사용되는 새로운 테이블 `sofferf`가 추가됨 +- 새로운 액션 `offerf`, `cancelofferf`, `claimf`가 추가됨 +- 개방된 오퍼가 없을 경우 (내부) `closef`에 대해 검사 + +**자산 컨테이너라이징** +**주의! 현재 CDT는 v1.6.1에서는 컴파일이 되지 않는 버그가 있습니다. + v1.5.0 역시 abi generation 시 "Segmentation fault (core dumped)" 버그가 발생합니다. 추천: 컨트랙트 컴파일 시 v1.5.0와 저희가 제공하는 abi를 사용하실 것을 추천합니다.** + +- 다른 NFT 및 FT의 어태치와 디태치를 위해 새로운 필드 `container`와 `containerf`가 NFT 자산 구조에 추가됨 +- 새로운 액션 `attach`, `detach`가 추가됨 +- 새로운 액션 `attachf`, `detachf`가 추가됨 + +**기타** + +- `global` 테이블 내 필드 이름 변경됨 `lastid` -> 'lnftid`, 'spare` -> `defid` (내부용) +- `soffer` 테이블 내 `offeredTo` 필드의 이름이 `offeredto`로 변경됨 + +## 변경 로그 v0.3.2 + +- `offer` 액션에 `memo` 파라미터 추가; +- `delegate` 액션에 `memo` 파라미터 추가; + +## 변경 로그 v0.3.1 + +- NFT를 위한 내부 액션 `createlog`를 추가함. create 액션에 의해 사용되며, assetid를 기록하여 제 3자 탐색자가 새로운 자산 id와 기타 정보를 손쉽게 얻을 수 있도록 함. +- 새로운 싱글톤 테이블 `tokenconfigs`를 추가함. 이는 외부 컨트랙트 파스 액션과 테이블을 도움 (탈중앙화 교환소, 시장, 및 다수의 토큰을 사용하는 기타 컨트랙트에 유용). +시장, 교환소, 및 기타 유관 컨트랙트는 다음 코드를 이용해 이 정보를 열람할 수 있음. + +``` +Configs configs("simpleassets"_n, "simpleassets"_n.value); +configs.get("simpleassets"_n); +``` + +- 새로운 액션 `updatever`를 추가함. 이는 제 3자 지갑, 시장 등에 대해 본 버전으로 배포된 심플에셋을 업데이트함; +- 이벤트 알림과 관련한 새로운 예시: https://github.com/CryptoLions/SimpleAssets-EventReceiverExample + +## 변경 로그 v0.3.0 + +- 유예된 거래를 이용한 이벤트 알림이 추가됨. 자산 작성자는 자산의 생성, 전송, 클레임, 소각에 대한 알림을 받게됨. 알림을 받기 위해선 작성자 컨트랙트에 다음을 입력 해야함: + +``` +ACTION saecreate ( name owner, uint64_t assetid ); +ACTION saetransfer ( name from, name to, std::vector& assetids, std::string memo ); +ACTION saeclaim ( name account, std::vector& assetids ); +ACTION saeburn ( name account, std::vector& assetids, std::string memo ); +``` + +- `delegate` 액션과 `sdelegates` 테이블에 대한 `untildate` 파라미터가 `period` (초 단위)로 변경됨 + +## 변경 로그 v0.2.0 + +### 다소 변경된 eosio.token 컨트랙트를 이용하는 로직과 대체 가능 토큰 테이블 추가 + +- 새로운 액션 및 로직 추가: `createf`, `issuef`, `transferf`, `burnf`, `openf`, `closef` +- 새로운 테이블 `stat(supply, max_supply, issuer, id)`와 `accounts (id, balance)` 추가됨. +- stats 테이블(대체 가능 토큰들에 관한 정보)을 위한 scope가 작성자로 변경됨 +- `accounts` 테이블의 기본 인덱스는 creates 액션에 생성되고 stats 테이블에 저장된 uniq id임. +- `authorctrl` 파라미터를 가진 대체 가능 코인을 위해 `stats` 테이블에 `createf` 액션이 추가됨. 이것이 참(1)인 경우, 토큰 작성자(소유자가 아님)가 burnf과 transferf를 할 수 있음. 생성 후에는 변경할 수 없음! +- 리카르디안 컨트랙트 업데이트 +- 더 많은 예시 추가 + +## 변경 로그 v0.1.1 + +기타 + +- sdelagate 테이블 구조의 이름이 sdelegate로 변경됨 (오타) +- create 액션 파라미터의 이름이 변경됨: requireClaim -> require claim +- 모든 액션에 대한 assetID 액션 파라미터의 이름이 assetid로 변경됨 + +대출 자산 + +- sdelegate 테이블 - 새 필드 추가됨: luntildate +- delegate 액션에 untildate 파라미터 추가됨. 파라미터가 올바르게 입력된 경우 (0이거나 미래에) 액션은 단순 검사를 시행함. +- undelegate는 untildate에 이르기 전까지는 작동하지 않음 (이는 자산 대출에 최소 기간을 보장함). +- 위임된 경우, untiltime 보다 일찍 자산을 재전송(반납)하는 것을 허용 (대출자는 일찍 반납할 수 있는 옵션을 가짐) + +배치 프로세싱 + +- 클레임(claim) 액션: assentid 파라미터가 assetsids의 배열로 변경됨. 복수 클레임 로직 추가됨. +- 오퍼(offer) 액션: assentid 파라미터가 assetsids의 배열로 변경됨. 복수 오퍼 로직 추가됨. +- 오퍼 취소(canceloffer) 액션: assentid 파라미터가 assetsids의 배열로 변경됨. 복수 취소 로직 추가됨. +- 전송(transfer) 액션: assentid 파라미터가 assetsids의 배열로 변경됨. 복수 전송 로직 추가됨. +- 소각(burn) 액션: assentid 파라미터가 assetsids의 배열로 변경됨. 복수 소각 로직 추가됨. +- 위임/위임취소(delegate/undelegate) 액션: assentid 파라미터가 assetsids의 배열로 변경됨. 복수 위임/위임취소 로직 추가 + +- `sofferf` 用于`offer` / `calimFT`的新表 + +- 新的操作`offer`,`cancelofferf` 和 `claimf` + +- 对 `closef` 检查如果没有公开招股(内部) + +**集装资产** + +**警告!!! CDT目前有一个不被允许在v1.6.1上编译的漏洞。 +1.5.0也有一个漏洞“Segmentation fault(core dumped)”,但只有abi生效。** + +**建议:使用1.5.0进行合约编译,并使用我们的abi。** + +- nft资产结构中用于附加和分离其他NFT或FT的新字段“container”和“containerf” + +- 新操作 `attach`,`detach` + +- 新操作 `attachf`,`detach` + +**杂项** + +- 字段重命名 `lasted`- \>` lnftid`,`spare`- \> `defid`(内部用法)在表 `global` 中 + +- 字段 `providedTo` 在 `soffer` 表中重命名为 `offersto` +--- +## 更改日志v0.3.2 + +- 为操作 `offer` 添加了 `memo` 参数; + +- 为操作 `delegate` 添加了 `memo` 参数; +--- +## 更改日志v0.3.1 + +- 增加了NFT的内部操作 `createlog` 。由创建操作用于记录资产ID,以便第三方资源管理器可以轻松获取新的资产ID和其他信息。 + +- 增加了新的单例表 `tokenconfigs`。它有助于外部合约正确解析操作和表格(对于分散交换,市场和使用多个代币的其他合约有用)。市场,交易所和其他依赖合约将能够使用以下代码查看此信息。 +``` +Configs configs("simpleassets"_n, "simpleassets"_n.value); + +configs.get("simpleassets"_n); +``` +- 增加了操作 `updatever`。它为第三方钱包,市场等更新了SimpleAstes部署的版本; + +- 事件通知的新示例: +--- +## 更改日志v0.3.0 + +- 使用延迟事务添加了事件通知。资产作者将收到有关资产创建,转移,索赔或烧录的通知。要收到它,请为您的创建者合约添加以下操作: +``` +ACTION saecreate ( name owner, uint64_t assetid ); + +ACTION saetransfer ( name from, name to, std::vector\& assetids, +std::string memo ); + +ACTION saeclaim ( name account, std::vector\& assetids ); + +ACTION saeburn ( name account, std::vector\& assetids, std::string +memo ); +``` +- `untildate` 参数更改为 `period`(以秒为单位)的操作 `delegate` 和表 `sdelegates` +--- +## 更改日志v0.2.0 + +### 使用eosio.token合约添加了可替代代币(Fungible Token)表和逻辑,但有一些更改 + +- 新的操作和逻辑:`createf`,`issuef`,`transfer`,`burnf`,`openf`,`closef` + +- 添加了新表 `stat(supply, max_supply, issuer, id)` 和 `accounts (id, balance)` 。 + +- 统计表的范围(关于可替代代币的信息)已更改为创建者 + +- `accountstable` 的主索引是在 `create` f操作上创建的 `uniq id` 并存储在 `stats` 表中。 + +- 添加 `createf` 与 `parameter` 可替代代币操作 `authorctrl` 至 `stats` 表。如果为true(1)允许代币创建者(而不仅仅是所有者)使用burnf和transferf。创建后无法更改! + +- 李嘉图合约已更新 + +- 以下有更多用法示例 +--- +## 更改日志v0.1.1 + +**杂项** + +- sdelagate 表结构重命名为 sdelegate(typo) + +- 创建操作参数重命名:requireClaim - \> requireclaim + +- assetID操作参数在所有要声明的操作中重命名 + +**借入资产** + +- sdelegate表 - 添加了新字段:untildate + +- 委托操作添加参数untildate。如果参数输入正确(零或将来),操作会进行简单检查。 + +- undelegate在不公开之前不会工作(这保证了资产贷款的最低期限)。 + +- 如果被委托,允许转移资产(返还)早于截至时间(借款人可以提前返还) + +**批量处理** + +- 声明操作(claim action):assetid参数已更改为assetsids数组。添加了多个声明逻辑。 + +- 报价操作(offer action):assetid参数已更改为assetsids数组。添加了多个提供逻辑。 + +- 取消报价操作(canceloffer action):assetid参数已更改为assetsids数组。添加了多个取消逻辑。 + +- 传输操作(transfer action):assetid参数已更改为assetsids数组。添加了多个资产转移逻辑。 + +- 烧录操作(burn action):assetid参数已更改为assetsids数组。添加了多个刻录逻辑。 + +- 委托/非委托操作(delegate / undelegated action):assetid参数已更改为assetsids数组。添加了多个委托/取消授权逻辑。 diff --git a/README_ZH.md b/README_ZH.md new file mode 100644 index 0000000..f77b1d7 --- /dev/null +++ b/README_ZH.md @@ -0,0 +1,605 @@ + +# 中文翻译 +简单资产(Simple Assets) +========================= + +一款EOSIO区块链上的数字资产(可替代和不可替代代币——NFTs)标准,由CryptoLions开发创建。 + +web: [http://simpleassets.io](http://simpleassets.io/ +Git:  +Telegram:  + +简介和演示:https://medium.com/\@cryptolions/introducing-simple-assets-b4e17caafaa4 + +作者的事件接收器示例:https://github.com/CryptoLions/SimpleAssets-EventReceiverExample + +警告!!!CDT目前有一个不被允许在v1.6.x版本上编译漏洞。 1.5.0版本上也有一个漏洞"Segmentation fault (core dumped)",但仅基于abi可生成。 建议:使用1.5.0版本合约和我们的abi编译. 问题: https://github.com/EOSIO/eosio.cdt/issues/527 + +--- + +通过调用简单资产(Simple Assets)合约来使用Simple Assets。这就像是Dapps的Dapp。 + +丛林测试网: `simpleassets` + +EOS 主网: `simpleassets` +MEETONE 主网: `smplassets.m` +TELOS 主网: `simpleassets` + +简单资产(Simple Assets)是一个独立的合约,其他Dapps可以直接调用它来管理自己的数字资产。这为Dapp用户提供了额外的保证,即资产的所有权由信誉良好的外部机构管理,并且一旦创建,Dapp只能管理资产的mdata部分。 所有与所有权相关的功能都存在于游戏之外。 + +我们正在创建一个DAC,它将在部署至EOSIO主网后对简单资产(Simple Assets)策划更新。 + +[相关信息:理解所有权。](https://medium.com/@cryptolions/digital-assets-we-need-to-think-about-ownership-authority-a2b0465c17f6) + +运用regauthor操作发送自己的NFTs信息至第三方商城。 + +或者,dapps可以自行部署简单资产(Simple Assets)副本并进行修改以更好地控制其功能。 部署前,应修改简单资产(Simple Assets)以防止任何人创建资产。 + +------ + +## RAM使用情况 + +NFT的RAM使用量取决于idata和mdata字段中存储的数据量。 +如果它们都为空,则每个NFT占用276个字节。 + +imdata和mdata中的每个符号都是+1字节。 + +---- +## 目录 + +1. [合约操作](https://github.com/CryptoLions/SimpleAssets#contract-actions) + +2. [数据结构](https://github.com/CryptoLions/SimpleAssets#data-structures) + +3. [示例:如何在智能合约中使用简单资产](https://github.com/CryptoLions/SimpleAssets#examples-how-to-use-simple-assets-in-smart-contracts) + +4. [更新日志](https://github.com/CryptoLions/SimpleAssets#change-log-v101) +--- + +合约操作 +======== + +可在此处找到每个参数的说明: + +[https](https://github.com/CryptoLions/SimpleAssets/blob/master/include/SimpleAssets.hpp)*:*[//github.com/CryptoLions/SimpleAssets/blob/master/include/SimpleAssets.hpp](https://github.com/CryptoLions/SimpleAssets/blob/master/include/SimpleAssets.hpp) + +``` +\# -- For Non-Fungible Tokens --- + +create (author, category, owner, idata, mdata, requireсlaim) +update (author, owner, assetid, mdata) +transfer (from, to , [assetid1,..,assetidn], memo) +burn (owner, [assetid1,..,assetidn], memo) + +offer (owner, newowner, [assetid1,..,assetidn], memo) +canceloffer (owner, [assetid1,..,assetidn]) +claim (claimer, [assetid1,..,assetidn]) + +regauthor (name author, data, stemplate) +authorupdate (author, data, stemplate) + +delegate (owner, to, [assetid1,..,assetidn], period, memo) +undelegate (owner, from, [assetid1,..,assetidn]) +delegatemore (owner, assetid, period) + +attach (owner, assetidc, [assetid1,..,assetidn]) +detach (owner, assetidc, [assetid1,..,assetidn]) +attachf (owner, author, quantity, assetidc) +detachf (owner, author, quantity, assetidc) + +\# -- For Fungible Tokens --- + +createf (author, maximum_supply, authorctrl, data) +updatef (author, sym, data) +issuef (to, author, quantity, memo) +transferf (from, to, author, quantity, memo) +burnf (from, author, quantity, memo) + +offerf (owner, newowner, author, quantity, memo) +cancelofferf (owner, [ftofferid1,...,ftofferidn]) +claimf (claimer, [ftofferid1,...,ftofferidn]) + +openf (owner, author, symbol, ram_payer) +closef (owner, author, symbol) +``` +--- +数据结构 +======== + +## 资产 + +``` +sasset { + +uint64_t id; // 用于转移和搜索的资产ID +name owner; // 资产所有者(可变更 — 由所有者决定!!!) +name author; // 资产创建者(游戏合约,不可变更) +name category; // 资产类别,由创建者选择,不可变更 +string idata; // 不可变更资产数据。 它可以是字符串化“JSON”或只是字符串“sha256” +string mdata; // 可变资产数据,由创建者在创建或资产更新时添加。 它可以是字符串化“JSON”或只是字符串“sha256” +sasset[] container; // 其它NFTs(可替代和不可替代代币)附加到此资产 +account[] containerf; // FTs(可替代代币)附加到此资产 + +} + +//请包含有关资产名称img desc的idata或mdata信息,这些信息将由Markets使用。 +``` +---- +## 报价 + +``` +offers { + +uint64_t assetid; // 提供 claim 的资产ID +name owner; // 资产所有者 +name offeredto; // 可以 claim 此资产的人 +uint64_t cdate; // 创建日期 + +} +``` +--- +## 创建者 +``` +authors { + +name author; // 资产创建者,将能够创建和更新资产 + +string data; // 创建者的数据(json)将被商城用于更好的展示 + // 建议:形象徽标(logo),信息,网址; + +string stemplate; // 商城的数据(json)模式。 key:状态值,其中 key 是 idata 或 mdata 的字段名 + // 对非文本字段的建议格式:txt,img,url,hide,webgl,mp3,video,timestamp + +} +``` +---- +## 委托 +``` +delegates{ + +uint64_t assetid; // asset id offered for claim; +name owner; // asset owner; +name delegatedto; // who can claim this asset; +uint64_t cdate; // offer create date; +uint64_t period; // Time in seconds that the asset will be lent. Lender cannot +undelegate until + +// the period expires, however the receiver can transfer back at any time. + +} +``` +--- +## 货币统计(可替代代币) +``` +stat { + +asset supply; // 提供代币 +asset max_supply; // 提供最大量代币 +name issuer; // 可替代代币(Fungible token)创建者 +uint64_t id; // 此代币的唯一ID +bool authorctrl; // 如果 true(1)允许代币创建者(而不仅仅是所有者)进行烧录和传输 +string data; // 字符串化的json。 建议的keys包括: img,name + +} +``` +--- +## 账户(可替代代币) +``` +accounts { + +uint64_t id; // 代币ID,来自 stat 表 +name author; // 代币创建者 +asset balance; // 代币余额 + +} + +sofferf { + +uint64_t id; // claim 此 offer 的ID(自动递增) + +name author; // 可替代代币(fungible token)创建者 +name owner; // 可替代代币(fungible token)所有者 +asset quantity; // 资产数量 +name offeredto; // 可以 claim 此 offer 的帐户 +uint64_t cdate; // offer创建日期 + +} +``` +--- +示例:如何在智能合约中使用简单资产 +================================== + +## 创建资产并转移到所有者帐户ownerowner22: +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; +name author = get_self(); +name category = "weapon"_n; +name owner = "ownerowner22"_n; + +string idata = "{\\"power\\": 10, \\"speed\\": 2.2, \\"name\\": \\"Magic +Sword\\" }"; + +string mdata = "{\\"color\\": \\"bluegold\\", \\"level\\": 3, \\"stamina\\": 5, +\\"img\\": \\"https://bit.ly/2MYh8EA\\" }"; + +action createAsset = action( +permission_level{author, "active"_n}, +SIMPLEASSETSCONTRACT, +"create"_n, +std::make_tuple( author, category, owner, idata, mdata, 0 ) + +); + +createAsset.send(); +``` +--- +## 使用ownerowner22的requireclaim选项创建资产: +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; +name author = get_self(); +name category = "balls"_n; +name owner = "ownerowner22"_n; + +string idata = "{\\"radius\\": 2, \\"weigh\\": 5, \\"material\\": \\"rubber\\", +\\"name\\": \\"Baseball\\" }"; + +string mdata = "{\\"color\\": \\"white\\", \\"decay\\": 99, \\"img\\": +\\"https://i.imgur.com/QoTcosp.png\\" }"; + +action createAsset = action( +permission_level{author, "active"_n}, +SIMPLEASSETSCONTRACT, +"create"_n, +std::make_tuple( author, category, owner, idata, mdata, 1 ) + +); + +createAsset.send(); +``` +--- +## 搜索资产并获取资产信息 + +1. 请添加有关资产结构的hpp文件信息。 + +**警告! CDT目前有一个不允许编译的漏洞(v1.6.1)。1.5.0也有一个漏洞“Segmentation fault(core +dumped)”,但只有abi可生成(包括self对象数组:std :: vector container;)** + +``` +TABLE account { + +uint64_t id; +name author; +asset balance; +uint64_t primary_key()const { +return id; + +} + +}; + +typedef eosio::multi_index\< "accounts"_n, account \> accounts; + +TABLE sasset { + +uint64_t id; +name owner; +name author; +name category; +string idata; +string mdata; +std::vector\ container; +std::vector\ containerf; +auto primary_key() const { +return id; + +} + +uint64_t by_author() const { + +return author.value; + +} + +}; + +typedef eosio::multi_index\< "sassets"_n, sasset, + +eosio::indexed_by\< "author"_n, eosio::const_mem_fun\ \> + +\> sassets; +``` + +2. 搜索和使用信息 +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; +name author = get_self(); +name owner = "lioninjungle"_n; +uint64_t assetid = 100000000000187 +sassets assets(SIMPLEASSETSCONTRACT, owner.value); +auto idx = assets.find(assetid); +check(idx != assets.end(), "Asset not found or not yours"); +check (idx-\>author == author, "Asset is not from this author"); +auto idata = json::parse(idx-\>idata); // for parsing json here is used nlohmann +lib +auto mdata = json::parse(idx-\>mdata); // https://github.com/nlohmann/json +check(mdata["cd"] \< now(), "Not ready yet for usage"); +``` +--- +## 更新资产 +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; +auto mdata = json::parse(idxp-\>mdata); +mdata["cd"] = now() + 84600; +name author = get_self(); +name owner = "ownerowner22"_n; +uint64_t assetid = 100000000000187; +action saUpdate = action( +permission_level{author, "active"_n}, +SIMPLEASSETSCONTRACT, +"update"_n, +std::make_tuple(author, owner, assetid, mdata.dump()) + +); + +saUpdate.send(); +``` +--- +## 转移一个资产 +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; +name author = get_self(); +name from = "lioninjungle"_n; +name to = "ohtigertiger"_n; +std::vector\ assetids; +assetids.push_back(assetid); +string memo = "Transfer one asset"; +action saUpdate = action( +permission_level{author, "active"_n}, + +SIMPLEASSETSCONTRACT, +"transfer"_n, +std::make_tuple(from, to, assetids, memo) +); + +saUpdate.send(); +``` +--- +## 将两个资产转移到具有相同备忘录的同一接收器 +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; +name author = get_self(); +name from = "lioninjungle"_n; +name to = "ohtigertiger"_n; +std::vector\ assetids; +assetids.push_back(assetid1); +assetids.push_back(assetid2); +string memo = "Transfer two asset" +action saUpdate = action( +permission_level{author, "active"_n}, +SIMPLEASSETSCONTRACT, +"transfer"_n, +std::make_tuple(from, to, assetids, memo) +); + +saUpdate.send(); +``` +--- +## issuef创建代币问题(可替代代币) +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; +asset wood; +wood.amount = 100; +wood.symbol = symbol("WOOD", 0); +name author = get_self(); +name to = "lioninjungle"_n; +std::string memo = "WOOD faucet"; +action saRes1 = action( +permission_level{author, "active"_n}, + +SIMPLEASSETSCONTRACT, +"issuef"_n, +std::make_tuple(to, author, wood, memo) +); + +saRes1.send(); +``` +--- + +## 如果启用了authorctrl,则由创建者转让代币(可替代) + +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; + +asset wood; +wood.amount = 20; +wood.symbol = symbol("WOOD", 0); +name from = "lioninjungle"_n; +name to = get_self(); +name author = get_self(); +std::string memo = "best WOOD"; +action saRes1 = action( +permission_level{author, "active"_n}, +SIMPLEASSETSCONTRACT, +"transferf"_n, +std::make_tuple(from, to, author, wood, memo) + +); + +saRes1.send(); +``` +---- +## 如果启用了authorctrl,则由创建者烧录代币(可替代) +``` +name SIMPLEASSETSCONTRACT = "simpleassets"_n; +asset wood; +wood.amount = 20; +wood.symbol = symbol("WOOD", 0); +name author = get_self(); +name from = "lioninjungle"_n; +std::string memo = "WOOD for oven"; +action saRes1 = action( +permission_level{author, "active"_n}, +SIMPLEASSETSCONTRACT, +"burnf"_n, +std::make_tuple(from, author, wood, memo) + +); + +saRes1.send(); + +``` +------ + +## 更新日志v1.1.0 + +* 代码重构 +* 修复了为委托和转让的NFTs的分离批量处理功能 +* 新合约允许延长借用NFT的委托期限 +* 增加了外部(bash)单元测试 +--- +## 更改日志v1.0.1 + +- `createlog` 操作中的新参数 `requireclaim`,用于 `create` 操作历史记录日志。 + +--- +## 更改日志v1.0.0 + +- 阻止所有者向自己提供资产 +--- +## 更改日志v0.4.2 + +- `saeclaim` 事项的格式已更改:由map \替换asseti数组 +--- +## 更改日志v0.4.1 + +- 添加了require_recipient(所有者)来执行`create`操作 +--- +## 更改日志v0.4.0 + +**轻松找到可替代代币的信息(可替换代币有创建者范围):** + +- FT的 `account` 表中的新字段 `author`。 (更容易找到可替代代币信息) + +**更多可替代代币信息** + +- 新领域 `data` 中 `currency_stats` 的表-字符串化JSON其中可能包括键 `img`,`name`(建议最好通过市场显示) + +- 新参数`data`在 `createf` 操作中 + +- updatef改变FT的新举措data + +**提供/声明可替代的代币** + +- `sofferf` 用于`offer` / `calimFT`的新表 + +- 新的操作`offer`,`cancelofferf` 和 `claimf` + +- 对 `closef` 检查如果没有公开招股(内部) + +**集装资产** + +**警告!!! CDT目前有一个不被允许在v1.6.1上编译的漏洞。 +1.5.0也有一个漏洞“Segmentation fault(core dumped)”,但只有abi生效。** + +**建议:使用1.5.0进行合约编译,并使用我们的abi。** + +- nft资产结构中用于附加和分离其他NFT或FT的新字段“container”和“containerf” + +- 新操作 `attach`,`detach` + +- 新操作 `attachf`,`detach` + +**杂项** + +- 字段重命名 `lasted`- \>` lnftid`,`spare`- \> `defid`(内部用法)在表 `global` 中 + +- 字段 `providedTo` 在 `soffer` 表中重命名为 `offersto` +--- +## 更改日志v0.3.2 + +- 为操作 `offer` 添加了 `memo` 参数; + +- 为操作 `delegate` 添加了 `memo` 参数; +--- +## 更改日志v0.3.1 + +- 增加了NFT的内部操作 `createlog` 。由创建操作用于记录资产ID,以便第三方资源管理器可以轻松获取新的资产ID和其他信息。 + +- 增加了新的单例表 `tokenconfigs`。它有助于外部合约正确解析操作和表格(对于分散交换,市场和使用多个代币的其他合约有用)。市场,交易所和其他依赖合约将能够使用以下代码查看此信息。 +``` +Configs configs("simpleassets"_n, "simpleassets"_n.value); + +configs.get("simpleassets"_n); +``` +- 增加了操作 `updatever`。它为第三方钱包,市场等更新了SimpleAstes部署的版本; + +- 事件通知的新示例: +--- +## 更改日志v0.3.0 + +- 使用延迟事务添加了事件通知。资产作者将收到有关资产创建,转移,索赔或烧录的通知。要收到它,请为您的创建者合约添加以下操作: +``` +ACTION saecreate ( name owner, uint64_t assetid ); + +ACTION saetransfer ( name from, name to, std::vector\& assetids, +std::string memo ); + +ACTION saeclaim ( name account, std::vector\& assetids ); + +ACTION saeburn ( name account, std::vector\& assetids, std::string +memo ); +``` +- `untildate` 参数更改为 `period`(以秒为单位)的操作 `delegate` 和表 `sdelegates` +--- +## 更改日志v0.2.0 + +### 使用eosio.token合约添加了可替代代币(Fungible Token)表和逻辑,但有一些更改 + +- 新的操作和逻辑:`createf`,`issuef`,`transfer`,`burnf`,`openf`,`closef` + +- 添加了新表 `stat(supply, max_supply, issuer, id)` 和 `accounts (id, balance)` 。 + +- 统计表的范围(关于可替代代币的信息)已更改为创建者 + +- `accountstable` 的主索引是在 `create` f操作上创建的 `uniq id` 并存储在 `stats` 表中。 + +- 添加 `createf` 与 `parameter` 可替代代币操作 `authorctrl` 至 `stats` 表。如果为true(1)允许代币创建者(而不仅仅是所有者)使用burnf和transferf。创建后无法更改! + +- 李嘉图合约已更新 + +- 以下有更多用法示例 +--- +## 更改日志v0.1.1 + +**杂项** + +- sdelagate 表结构重命名为 sdelegate(typo) + +- 创建操作参数重命名:requireClaim - \> requireclaim + +- assetID操作参数在所有要声明的操作中重命名 + +**借入资产** + +- sdelegate表 - 添加了新字段:untildate + +- 委托操作添加参数untildate。如果参数输入正确(零或将来),操作会进行简单检查。 + +- undelegate在不公开之前不会工作(这保证了资产贷款的最低期限)。 + +- 如果被委托,允许转移资产(返还)早于截至时间(借款人可以提前返还) + +**批量处理** + +- 声明操作(claim action):assetid参数已更改为assetsids数组。添加了多个声明逻辑。 + +- 报价操作(offer action):assetid参数已更改为assetsids数组。添加了多个提供逻辑。 + +- 取消报价操作(canceloffer action):assetid参数已更改为assetsids数组。添加了多个取消逻辑。 + +- 传输操作(transfer action):assetid参数已更改为assetsids数组。添加了多个资产转移逻辑。 + +- 烧录操作(burn action):assetid参数已更改为assetsids数组。添加了多个刻录逻辑。 + +- 委托/非委托操作(delegate / undelegated action):assetid参数已更改为assetsids数组。添加了多个委托/取消授权逻辑。 diff --git a/SimpleAssets.abi b/SimpleAssets.abi index cd650bc..1501c8c 100644 --- a/SimpleAssets.abi +++ b/SimpleAssets.abi @@ -1,1064 +1,1076 @@ -{ - "____comment": "This file was generated with eosio-abigen. DO NOT EDIT Mon Apr 15 20:43:11 2019", - "version": "eosio::abi/1.1", - "structs": [ - { - "name": "account", - "base": "", - "fields": [ - { - "name": "id", - "type": "uint64" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "balance", - "type": "asset" - } - ] - }, - { - "name": "attach", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "assetidc", - "type": "uint64" - }, - { - "name": "assetids", - "type": "uint64[]" - } - ] - }, - { - "name": "attachf", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "assetidc", - "type": "uint64" - } - ] - }, - { - "name": "authorupdate", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "data", - "type": "string" - }, - { - "name": "stemplate", - "type": "string" - } - ] - }, - { - "name": "burn", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "assetids", - "type": "uint64[]" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "burnf", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "canceloffer", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "assetids", - "type": "uint64[]" - } - ] - }, - { - "name": "cancelofferf", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "ftofferids", - "type": "uint64[]" - } - ] - }, - { - "name": "claim", - "base": "", - "fields": [ - { - "name": "claimer", - "type": "name" - }, - { - "name": "assetids", - "type": "uint64[]" - } - ] - }, - { - "name": "claimf", - "base": "", - "fields": [ - { - "name": "claimer", - "type": "name" - }, - { - "name": "ftofferids", - "type": "uint64[]" - } - ] - }, - { - "name": "closef", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "symbol", - "type": "symbol" - } - ] - }, - { - "name": "create", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "category", - "type": "name" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "idata", - "type": "string" - }, - { - "name": "mdata", - "type": "string" - }, - { - "name": "requireclaim", - "type": "bool" - } - ] - }, - { - "name": "createf", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "maximum_supply", - "type": "asset" - }, - { - "name": "authorctrl", - "type": "bool" - }, - { - "name": "data", - "type": "string" - } - ] - }, - { - "name": "createlog", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "category", - "type": "name" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "idata", - "type": "string" - }, - { - "name": "mdata", - "type": "string" - }, - { - "name": "assetid", - "type": "uint64" - }, - { - "name": "requireclaim", - "type": "bool" - } - ] - }, - { - "name": "currency_stats", - "base": "", - "fields": [ - { - "name": "supply", - "type": "asset" - }, - { - "name": "max_supply", - "type": "asset" - }, - { - "name": "issuer", - "type": "name" - }, - { - "name": "id", - "type": "uint64" - }, - { - "name": "authorctrl", - "type": "bool" - }, - { - "name": "data", - "type": "string" - } - ] - }, - { - "name": "delegate", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "to", - "type": "name" - }, - { - "name": "assetids", - "type": "uint64[]" - }, - { - "name": "period", - "type": "uint64" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "detach", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "assetidc", - "type": "uint64" - }, - { - "name": "assetids", - "type": "uint64[]" - } - ] - }, - { - "name": "detachf", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "assetidc", - "type": "uint64" - } - ] - }, - { - "name": "global", - "base": "", - "fields": [ - { - "name": "lnftid", - "type": "uint64" - }, - { - "name": "defid", - "type": "uint64" - }, - { - "name": "spare1", - "type": "uint64" - }, - { - "name": "spare2", - "type": "uint64" - } - ] - }, - { - "name": "issuef", - "base": "", - "fields": [ - { - "name": "to", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "offer", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "newowner", - "type": "name" - }, - { - "name": "assetids", - "type": "uint64[]" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "offerf", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "newowner", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "openf", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "symbol", - "type": "symbol" - }, - { - "name": "ram_payer", - "type": "name" - } - ] - }, - { - "name": "regauthor", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "data", - "type": "string" - }, - { - "name": "stemplate", - "type": "string" - } - ] - }, - { - "name": "sasset", - "base": "", - "fields": [ - { - "name": "id", - "type": "uint64" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "category", - "type": "name" - }, - { - "name": "idata", - "type": "string" - }, - { - "name": "mdata", - "type": "string" - }, - { - "name": "container", - "type": "sasset[]" - }, - { - "name": "containerf", - "type": "account[]" - } - ] - }, - { - "name": "sauthor", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "data", - "type": "string" - }, - { - "name": "stemplate", - "type": "string" - } - ] - }, - { - "name": "sdelegate", - "base": "", - "fields": [ - { - "name": "assetid", - "type": "uint64" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "delegatedto", - "type": "name" - }, - { - "name": "cdate", - "type": "uint64" - }, - { - "name": "period", - "type": "uint64" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "soffer", - "base": "", - "fields": [ - { - "name": "assetid", - "type": "uint64" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "offeredto", - "type": "name" - }, - { - "name": "cdate", - "type": "uint64" - } - ] - }, - { - "name": "sofferf", - "base": "", - "fields": [ - { - "name": "id", - "type": "uint64" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "offeredto", - "type": "name" - }, - { - "name": "cdate", - "type": "uint64" - } - ] - }, - { - "name": "tokenconfigs", - "base": "", - "fields": [ - { - "name": "standard", - "type": "name" - }, - { - "name": "version", - "type": "string" - } - ] - }, - { - "name": "transfer", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "to", - "type": "name" - }, - { - "name": "assetids", - "type": "uint64[]" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "transferf", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "to", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "undelegate", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "from", - "type": "name" - }, - { - "name": "assetids", - "type": "uint64[]" - } - ] - }, - { - "name": "update", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "assetid", - "type": "uint64" - }, - { - "name": "mdata", - "type": "string" - } - ] - }, - { - "name": "updatef", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "sym", - "type": "symbol" - }, - { - "name": "data", - "type": "string" - } - ] - }, - { - "name": "updatever", - "base": "", - "fields": [ - { - "name": "version", - "type": "string" - } - ] - }, - { - "name": "delegatemore", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "assetidc", - "type": "uint64" - }, - { - "name": "period", - "type": "uint64" - } - ] - } - ], - "types": [], - "actions": [ - { - "name": "attach", - "type": "attach", - "ricardian_contract": "## ACTION NAME: attach\n\n\t### INTENT\n\t\tAttach other NFTs to the specified NFT. Restrictions:\n\t\t1. Only the Asset Author can do this\n\t\t2. All assets must have the same author\n\t\t3. All assets much have the same owner\n\n\t### Input parameters:\n\t\t`owner`\t - owner of NFTs\n\t\t`assetidc` - id of container NFT\n\t\t`assetids` - array of asset ids to attach\t\n\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "attachf", - "type": "attachf", - "ricardian_contract": "## ACTION NAME: attachf\n\n\t### INTENT\n\tAttach FTs to the specified NFT. Restrictions:\n\t1. Only the Asset Author can do this\n\t2. All assets must have the same author\n\t3. All assets much have the same owner\n\n\t### Input parameters:\n\t`owner`\t - owner of assets\n\t`author` - author of the assets\n\t`assetidc` - id of container NFT\n\t`quantity` - quantity to attach and token name (for example: \"10 WOOD\", \"42.00 GOLD\")\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "authorupdate", - "type": "authorupdate", - "ricardian_contract": "## ACTION NAME: authorupdate\n\n\t### INTENT\n\tAuthors info update. Used to updated author information, and asset display recommendations created with the regauthor action. This action replaces the fields data and stemplate.\n\n\tTo remove author entry, call this action with null strings for data and stemplate.\n\n\t### Input parameters:\n\t`author` - authors account who will create assets; \n\t`data` - stringified json. Recommendations to include: game, company, logo, url, desc;\n\t`stemplate` - stringified json with key:state values, where key is key from mdata or idata and \n\t\t\t\t\tstate indicates recommended way of displaying field: \n\t\t\t\t\turl, img, webgl, mp3, video, hide (ie. don't display), etc.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "burn", - "type": "burn", - "ricardian_contract": "## ACTION NAME: burn\n\n\t### INTENT\n\tBurns asset {{assetid}}. This action is only available for the asset owner. After executing, the \n\tasset will disappear forever, and RAM used for asset will be released.\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`assetids` - array of assetid's to burn;\n\t`memo` - memo for burn action;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "burnf", - "type": "burnf", - "ricardian_contract": "## ACTION NAME: burnf\n\n\t### INTENT\n\tBurns a fungible token. This action is available for the token owner and author. After executing, \n\taccounts balance and supply in stats table for this token will reduce by the specified quantity.\n\n\t### Input parameters:\n\t`from` - account who burns the token;\n\t`author` - account of fungible token author;\n\t`quantity` - amount to burn, example \"1.00 WOOD\";\n\t`memo` - memo for burnf action;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "canceloffer", - "type": "canceloffer", - "ricardian_contract": "## ACTION NAME: canceloffer\n\n\t### INTENT\n\tCancel and remove offer. Available for the asset owner.\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`assetids` - array of assetid's to cancel offer;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "cancelofferf", - "type": "cancelofferf", - "ricardian_contract": "## ACTION NAME: cancelofferf\n\n\t### INTENT\n\tCancels offer of FTs\n\n\t### Input parameters:\n\t`owner` - riginal owner of the FT\n\t`ftofferids` - id of the FT offer\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "claim", - "type": "claim", - "ricardian_contract": "## ACTION NAME: claim\n\n\t### INTENT\n\tClaim the specified asset (assuming it was offered to claimer by the asset owner).\n\n\t### Input parameters:\n\t`claimer` - account claiming the asset\n\t`assetids` - array of assetid's to claim\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "claimf", - "type": "claimf", - "ricardian_contract": "## ACTION NAME: claimf\n\n\t### INTENT\n\tClaim FTs which have been offered\n\n\t### Input parameters:\n\t`claimer` - Account claiming FTs which have been offered\n\t`ftofferids` - array of FT offer ids\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "closef", - "type": "closef", - "ricardian_contract": "## ACTION NAME: closef\n\n\t### INTENT\n\tCloses accounts table for provided fungible token and releases RAM.\n\tAction works only if balance is 0;\n\n\t### Input parameters:\n\t`owner` - account who woud like to close table with fungible token;\n\t`author` - account of fungible token author;\n\t`symbol` - token symbol, example \"WOOD\", \"ROCK\", \"GOLD\";\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "create", - "type": "create", - "ricardian_contract": "## ACTION NAME: create\n\n\t### INTENT\n\treate a new asset.\n\n\t### Input parameters:\n\t`author` - asset's author, who will able to updated asset's mdata;\n\t`category` - assets category;\n\t`owner` - assets owner;\n\t`idata` - stringified json with immutable assets data\n\t`mdata` - stringified json with mutable assets data, can be changed only by author\n\t`requireclaim` - true or false. If disabled, upon creation, the asset will be transfered to owner (but \n\t\t\t\t\t but AUTHOR'S memory will be used until the asset is transferred again). If enabled,\n\t\t\t\t\t author will remain the owner, but an offer will be created for the account specified in \n\t\t\t\t\t the owner field to claim the asset using the account's RAM.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "createf", - "type": "createf", - "ricardian_contract": "## ACTION NAME: createf\n\n\t### INTENT\n\tCreates fungible token with specified maximum supply; You can not change anything after creation.\n\n\t### Input parameters:\n\t`author` - fungible token author;\n\t`maximum_supply` - maximum token supply, example \"10000000.0000 GOLD\", \"10000000 SEED\", \"100000000.00 WOOD\". Precision is also important here;\n\t`authorctrl` - if true(1) allow token author (and not just owner) to burnf and transferf. Cannot be changed after creation!\n\t`data` - stringify json (recommend including keys `img` and `name` for better displaying by markets)\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "createlog", - "type": "createlog", - "ricardian_contract": "## ACTION NAME: createlog (internal)" - }, - { - "name": "delegate", - "type": "delegate", - "ricardian_contract": "## ACTION NAME: delegate\n\n\t### INTENT\n\tDelegates asset to {{to}}. This action changes the asset owner by calling the transfer action.\n\tIt also adds a record in the delegates table to record the asset as borrowed. This blocks\n\tthe asset from all owner actions (transfers, offers, burning by borrower).\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`to` - borrower account name;\n\t`assetids` - array of assetid's to delegate;\n\t`period` - time in seconds that the asset will be lent. Lender cannot undelegate until \n\t\t\t\t the period expires, however the receiver can transfer back at any time.\n\t`memo` - memo for delegate action\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "detach", - "type": "detach", - "ricardian_contract": "## ACTION NAME: detach\n\n\t### INTENT\n\tDetach NFTs from the specified NFT.\n\n\t### Input parameters:\n\t`owner` - owner of NFTs\n\t`assetidc` - the id of the NFT from which we are detaching\n\t`assetids` - the ids of the NFTS to be detached\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "detachf", - "type": "detachf", - "ricardian_contract": "## ACTION NAME: detachf\n\n\t### INTENT\n\tDetach FTs from the specified NFT.\n\n\t### Input parameters:\n\t`owner` - owner of NFTs\n\t`author` - author of the assets\n\t`assetidc` - id of the container NFT\n\t`quantity` - quantity to detach and token name (for example: \"10 WOOD\", \"42.00 GOLD\")\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "issuef", - "type": "issuef", - "ricardian_contract": "## ACTION NAME: issuef\n\n\t### INTENT\n\tThis action issues a fungible token.\t\t\n\n\t### Input parameters:\n\t`to` - account receiver;\n\t`author` - fungible token author;\n\t`quantity` - amount to issue, example \"1000.00 WOOD\";\n\t`memo` - transfers memo;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "offer", - "type": "offer", - "ricardian_contract": "## ACTION NAME: offer\n\n\t### INTENT\n\tOffer asset for claim. This is an alternative to the transfer action. Offer can be used by an \n\tasset owner to transfer the asset without using their RAM. After an offer is made, the account\n\tspecified in {{newowner}} is able to make a claim, and take control of the asset using their RAM.\n\tOffer action is not available if an asste is delegated (borrowed).\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`newowner` - new asset owner, who will able to claim;\n\t`assetids` - array of assetid's to offer;\n\t`memo` - memo for offer action\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "offerf", - "type": "offerf", - "ricardian_contract": "## ACTION NAME: offerf\n\n\t### INTENT\n\tOffer fungible tokens for another EOS user to claim. \n\tThis is an alternative to the transfer action. Offer can be used by a \n\tFT owner to transfer the FTs without using their RAM. After an offer is made, the account\n\tspecified in {{newowner}} is able to make a claim, and take control of the asset using their RAM.\n\tFTs will be removed from the owner's balance while the offer is open.\n\n\t### Input parameters:\n\t`owner` - original owner of the FTs\n\t`newowner` - account which will be able to claim the offer\n\t`author` - account of fungible token author;\t\n\t`quantity` - amount to transfer, example \"1.00 WOOD\";\n\t`memo` - offer's comment;\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "openf", - "type": "openf", - "ricardian_contract": "## ACTION NAME: openf\n\n\t### INTENT\n\tOpens accounts table for specified fungible token.\n\n\t### Input parameters:\n\t`owner` - account who woud like to close table with fungible token;\n\t`author` - account of fungible token author;\n\t`symbol` - token symbol, example \"WOOD\", \"ROCK\", \"GOLD\";\n\t`ram_payer` - account who will pay for ram used for table creation;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "regauthor", - "type": "regauthor", - "ricardian_contract": "## ACTION NAME: regauthor\n\n\t### INTENT\n\tNew Author registration. Action is not mandatory. Markets *may* choose to use information here \n\tto display info about the author, and to follow specifications expressed here for displaying asset fields.\n\n\t### Input parameters:\n\t`author` -\tauthors account who will create assets;\n\t`data` - stringified json. Recommendations to include: game, company, logo, url, desc;\n\t`stemplate` - stringified json with key:state values, where key is key from mdata or idata and \n\t\t\t\t\tstate indicates recommended way of displaying field: \n\t\t\t\t\turl, img, webgl, mp3, video, hide (ie. don't display), etc.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "transfer", - "type": "transfer", - "ricardian_contract": "## ACTION NAME: transfer\n\n\t### INTENT\n\tThis actions transfers an asset. On transfer owner asset's and scope asset's changes to {{to}}'s.\n\tSenders RAM will be charged to transfer asset.\n\tTransfer will fail if asset is offered for claim or is delegated.\n\n\t### Input parameters:\n\t`from` - account who sends the asset;\n\t`to` - account of receiver;\n\t`assetids` - array of assetid's to transfer;\n\t`memo` - transfers comment;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "transferf", - "type": "transferf", - "ricardian_contract": "## ACTION NAME: transferf\n\tThis actions transfers an fungible token.\n\n\t### INTENT\n\tThis actions transfers a specified quantity of fungible tokens.\n\n\t### Input parameters:\n\t`from` - account who sends the token;\n\t`to` - account of receiver;\n\t`author` - account of fungible token author;\n\t`quantity` - amount to transfer, example \"1.00 WOOD\";\n\t`memo` - transfers comment;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "undelegate", - "type": "undelegate", - "ricardian_contract": "## ACTION NAME: undelegate\n\n\t### INTENT\n\tUndelegates an asset from {{from}} account. Executing action by real owner will return asset immediately,\n\tand the entry in the delegates table recording the borrowing will be erased.\n\n\t### Input parameters:\n\t`owner` - real asset owner account;\n\t`from` - current account owner (borrower);\n\t`assetids` - array of assetid's to undelegate;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "update", - "type": "update", - "ricardian_contract": "## ACTION NAME: update\n\n\t### INTENT\n\tUpdate assets mutable data (mdata) field. Action is available only for authors.\n\n\t### Input parameters:\n\t`author` - authors account;\n\t`owner` - current assets owner;\n\t`assetid` - assetid to update;\n\t`mdata` - stringified json with mutable assets data. All mdata will be replaced;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "updatef", - "type": "updatef", - "ricardian_contract": "## ACTION NAME: updatef\n\n\t### INTENT\n\tUpdate the data field of a fungible token.\n\n\t### Input parameters:\n\t`author` - fungible token author;\n\t`sym` - fingible token symbol (\"GOLD\", \"WOOD\", etc.)\n\t`data` - stringify json (recommend including keys `img` and `name` for better displaying by markets)\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "updatever", - "type": "updatever", - "ricardian_contract": "## ACTION NAME: updatever (internal)" - }, - { - "name": "delegatemore", - "type": "delegatemore", - "ricardian_contract": "## ACTION NAME: delegatemore\n\n\t### INTENT\n\tExtend period of delegated asset. \n\n\t### Input parameters:\n\t`owner` - real asset owner account;\n\t`assetids` - assetid's to extend period;\n\t`period` - time in seconds that the asset will be lent. Lender cannot undelegate until \n\t\t\t\t the period expires, however the receiver can transfer back at any time.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - } - ], - "tables": [ - { - "name": "accounts", - "type": "account", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "authors", - "type": "sauthor", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "delegates", - "type": "sdelegate", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "global", - "type": "global", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "offerfs", - "type": "sofferf", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "offers", - "type": "soffer", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "sassets", - "type": "sasset", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "stat", - "type": "currency_stats", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "tokenconfigs", - "type": "tokenconfigs", - "index_type": "i64", - "key_names": [], - "key_types": [] - } - ], - "ricardian_clauses": [ - { - "id": "Warranty", - "body": "The invoker of the contract action shall uphold its Obligations under this Contract in a timely and workmanlike manner, using knowledge and recommendations for performing the services which meet generally acceptable standards set forth by EOS.IO Blockchain Block Producers." - }, - { - "id": "Default", - "body": "The occurrence of any of the following shall constitute a material default under this Contract:" - }, - { - "id": "Remedies", - "body": "In addition to any and all other rights a party may have available according to law, if a party defaults by failing to substantially perform any provision, term or condition of this Contract, the other party may terminate the Contract by providing written notice to the defaulting party. This notice shall describe with sufficient detail the nature of the default. The party receiving such notice shall promptly be removed from being a Block Producer and this Contract shall be automatically terminated." - }, - { - "id": "ForceMajeure", - "body": "If performance of this Contract or any obligation under this Contract is prevented, restricted, or interfered with by causes beyond either party's reasonable control (\"Force Majeure\"), and if the party unable to carry out its obligations gives the other party prompt written notice of such event, then the obligations of the party invoking this provision shall be suspended to the extent necessary by such event. The term Force Majeure shall include, without limitation, acts of God, fire, explosion, vandalism, storm or other similar occurrence, orders or acts of military or civil authority, or by national emergencies, insurrections, riots, or wars, or strikes, lock-outs, work stoppages, or supplier failures. The excused party shall use reasonable efforts under the circumstances to avoid or remove such causes of non-performance and shall proceed to perform with reasonable dispatch whenever such causes are removed or ceased. An act or omission shall be deemed within the reasonable control of a party if committed, omitted, or caused by such party, or its employees, officers, agents, or affiliates." - }, - { - "id": "DisputeResolution", - "body": "Any controversies or disputes arising out of or relating to this Contract will be resolved by binding arbitration under the default rules set forth by the EOS.IO Blockchain. The arbitrator's award will be final, and judgment may be entered upon it by any court having proper jurisdiction." - }, - { - "id": "EntireAgreement", - "body": "This Contract contains the entire agreement of the parties, and there are no other promises or conditions in any other agreement whether oral or written concerning the subject matter of this Contract. This Contract supersedes any prior written or oral agreements between the parties." - }, - { - "id": "Severability", - "body": "If any provision of this Contract will be held to be invalid or unenforceable for any reason, the remaining provisions will continue to be valid and enforceable. If a court finds that any provision of this Contract is invalid or unenforceable, but that by limiting such provision it would become valid and enforceable, then such provision will be deemed to be written, construed, and enforced as so limited." - }, - { - "id": "Amendment", - "body": "This Contract may be modified or amended in writing by mutual agreement between the parties, if the writing is signed by the party obligated under the amendment." - }, - { - "id": "GoverningLaw", - "body": "This Contract shall be construed in accordance with the Maxims of Equity." - }, - { - "id": "Notice", - "body": "Any notice or communication required or permitted under this Contract shall be sufficiently given if delivered to a verifiable email address or to such other email address as one party may have publicly furnished in writing, or published on a broadcast contract provided by this blockchain for purposes of providing notices of this type." - }, - { - "id": "WaiverOfContractualRight", - "body": "The failure of either party to enforce any provision of this Contract shall not be construed as a waiver or limitation of that party's right to subsequently enforce and compel strict compliance with every provision of this Contract." - }, - { - "id": "ArbitratorsFees_", - "body": "In any action arising hereunder or any separate action pertaining to the validity of this Agreement, both sides shall pay half the initial cost of arbitration, and the prevailing party shall be awarded reasonable arbitrator's fees and costs." - }, - { - "id": "ConstructionAndInterpretation", - "body": "The rule requiring construction or interpretation against the drafter is waived. The document shall be deemed as if it were drafted by both parties in a mutual effort." - }, - { - "id": "InWitnessWhereof", - "body": "In witness whereof, the parties hereto have caused this Agreement to be executed by themselves or their duly authorized representatives as of the date of execution, and authorized as proven by the cryptographic signature on the transaction that invokes this contract." - } - ], - "variants": [], - "abi_extensions": [] +{ + "____comment": "This file was generated with eosio-abigen. DO NOT EDIT Mon Apr 15 20:43:11 2019", + "version": "eosio::abi/1.1", + "structs": [ + { + "name": "account", + "base": "", + "fields": [ + { + "name": "id", + "type": "uint64" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "balance", + "type": "asset" + } + ] + }, + { + "name": "attach", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "assetidc", + "type": "uint64" + }, + { + "name": "assetids", + "type": "uint64[]" + } + ] + }, + { + "name": "attachf", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "quantity", + "type": "asset" + }, + { + "name": "assetidc", + "type": "uint64" + } + ] + }, + { + "name": "authorupdate", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "data", + "type": "string" + }, + { + "name": "stemplate", + "type": "string" + }, + { + "name": "imgpriority", + "type": "string" + } + ] + }, + { + "name": "burn", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "assetids", + "type": "uint64[]" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "burnf", + "base": "", + "fields": [ + { + "name": "from", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "quantity", + "type": "asset" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "canceloffer", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "assetids", + "type": "uint64[]" + } + ] + }, + { + "name": "cancelofferf", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "ftofferids", + "type": "uint64[]" + } + ] + }, + { + "name": "claim", + "base": "", + "fields": [ + { + "name": "claimer", + "type": "name" + }, + { + "name": "assetids", + "type": "uint64[]" + } + ] + }, + { + "name": "claimf", + "base": "", + "fields": [ + { + "name": "claimer", + "type": "name" + }, + { + "name": "ftofferids", + "type": "uint64[]" + } + ] + }, + { + "name": "closef", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "symbol", + "type": "symbol" + } + ] + }, + { + "name": "create", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "category", + "type": "name" + }, + { + "name": "owner", + "type": "name" + }, + { + "name": "idata", + "type": "string" + }, + { + "name": "mdata", + "type": "string" + }, + { + "name": "requireclaim", + "type": "bool" + } + ] + }, + { + "name": "createf", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "maximum_supply", + "type": "asset" + }, + { + "name": "authorctrl", + "type": "bool" + }, + { + "name": "data", + "type": "string" + } + ] + }, + { + "name": "createlog", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "category", + "type": "name" + }, + { + "name": "owner", + "type": "name" + }, + { + "name": "idata", + "type": "string" + }, + { + "name": "mdata", + "type": "string" + }, + { + "name": "assetid", + "type": "uint64" + }, + { + "name": "requireclaim", + "type": "bool" + } + ] + }, + { + "name": "currency_stats", + "base": "", + "fields": [ + { + "name": "supply", + "type": "asset" + }, + { + "name": "max_supply", + "type": "asset" + }, + { + "name": "issuer", + "type": "name" + }, + { + "name": "id", + "type": "uint64" + }, + { + "name": "authorctrl", + "type": "bool" + }, + { + "name": "data", + "type": "string" + } + ] + }, + { + "name": "delegate", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "to", + "type": "name" + }, + { + "name": "assetids", + "type": "uint64[]" + }, + { + "name": "period", + "type": "uint64" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "detach", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "assetidc", + "type": "uint64" + }, + { + "name": "assetids", + "type": "uint64[]" + } + ] + }, + { + "name": "detachf", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "quantity", + "type": "asset" + }, + { + "name": "assetidc", + "type": "uint64" + } + ] + }, + { + "name": "global", + "base": "", + "fields": [ + { + "name": "lnftid", + "type": "uint64" + }, + { + "name": "defid", + "type": "uint64" + }, + { + "name": "spare1", + "type": "uint64" + }, + { + "name": "spare2", + "type": "uint64" + } + ] + }, + { + "name": "issuef", + "base": "", + "fields": [ + { + "name": "to", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "quantity", + "type": "asset" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "offer", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "newowner", + "type": "name" + }, + { + "name": "assetids", + "type": "uint64[]" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "offerf", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "newowner", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "quantity", + "type": "asset" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "openf", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "symbol", + "type": "symbol" + }, + { + "name": "ram_payer", + "type": "name" + } + ] + }, + { + "name": "regauthor", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "data", + "type": "string" + }, + { + "name": "stemplate", + "type": "string" + }, + { + "name": "imgpriority", + "type": "string" + } + ] + }, + { + "name": "sasset", + "base": "", + "fields": [ + { + "name": "id", + "type": "uint64" + }, + { + "name": "owner", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "category", + "type": "name" + }, + { + "name": "idata", + "type": "string" + }, + { + "name": "mdata", + "type": "string" + }, + { + "name": "container", + "type": "sasset[]" + }, + { + "name": "containerf", + "type": "account[]" + } + ] + }, + { + "name": "sauthor", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "data", + "type": "string" + }, + { + "name": "stemplate", + "type": "string" + }, + { + "name": "imgpriority", + "type": "string" + } + ] + }, + { + "name": "sdelegate", + "base": "", + "fields": [ + { + "name": "assetid", + "type": "uint64" + }, + { + "name": "owner", + "type": "name" + }, + { + "name": "delegatedto", + "type": "name" + }, + { + "name": "cdate", + "type": "uint64" + }, + { + "name": "period", + "type": "uint64" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "soffer", + "base": "", + "fields": [ + { + "name": "assetid", + "type": "uint64" + }, + { + "name": "owner", + "type": "name" + }, + { + "name": "offeredto", + "type": "name" + }, + { + "name": "cdate", + "type": "uint64" + } + ] + }, + { + "name": "sofferf", + "base": "", + "fields": [ + { + "name": "id", + "type": "uint64" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "owner", + "type": "name" + }, + { + "name": "quantity", + "type": "asset" + }, + { + "name": "offeredto", + "type": "name" + }, + { + "name": "cdate", + "type": "uint64" + } + ] + }, + { + "name": "tokenconfigs", + "base": "", + "fields": [ + { + "name": "standard", + "type": "name" + }, + { + "name": "version", + "type": "string" + } + ] + }, + { + "name": "transfer", + "base": "", + "fields": [ + { + "name": "from", + "type": "name" + }, + { + "name": "to", + "type": "name" + }, + { + "name": "assetids", + "type": "uint64[]" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "transferf", + "base": "", + "fields": [ + { + "name": "from", + "type": "name" + }, + { + "name": "to", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "quantity", + "type": "asset" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "undelegate", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "from", + "type": "name" + }, + { + "name": "assetids", + "type": "uint64[]" + } + ] + }, + { + "name": "update", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "owner", + "type": "name" + }, + { + "name": "assetid", + "type": "uint64" + }, + { + "name": "mdata", + "type": "string" + } + ] + }, + { + "name": "updatef", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "sym", + "type": "symbol" + }, + { + "name": "data", + "type": "string" + } + ] + }, + { + "name": "updatever", + "base": "", + "fields": [ + { + "name": "version", + "type": "string" + } + ] + }, + { + "name": "delegatemore", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "assetidc", + "type": "uint64" + }, + { + "name": "period", + "type": "uint64" + } + ] + } + ], + "types": [], + "actions": [ + { + "name": "attach", + "type": "attach", + "ricardian_contract": "## ACTION NAME: attach\n\n\t### INTENT\n\t\tAttach other NFTs to the specified NFT. Restrictions:\n\t\t1. Only the Asset Author can do this\n\t\t2. All assets must have the same author\n\t\t3. All assets much have the same owner\n\n\t### Input parameters:\n\t\t`owner`\t - owner of NFTs\n\t\t`assetidc` - id of container NFT\n\t\t`assetids` - array of asset ids to attach\t\n\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "attachf", + "type": "attachf", + "ricardian_contract": "## ACTION NAME: attachf\n\n\t### INTENT\n\tAttach FTs to the specified NFT. Restrictions:\n\t1. Only the Asset Author can do this\n\t2. All assets must have the same author\n\t3. All assets much have the same owner\n\n\t### Input parameters:\n\t`owner`\t - owner of assets\n\t`author` - author of the assets\n\t`assetidc` - id of container NFT\n\t`quantity` - quantity to attach and token name (for example: \"10 WOOD\", \"42.00 GOLD\")\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "authorupdate", + "type": "authorupdate", + "ricardian_contract": "## ACTION NAME: authorupdate\n\n\t### INTENT\n\tAuthors info update. Used to updated author information, and asset display recommendations created with the regauthor action. This action replaces the fields data and stemplate.\n\n\tTo remove author entry, call this action with null strings for data and stemplate.\n\n\t### Input parameters:\n\t`author` - authors account who will create assets; \n\t`data` - stringified json. Recommendations to include: game, company, logo, url, desc;\n\t`stemplate` - stringified json with key:state values, where key is key from mdata or idata and \n\t\t\t\t\tstate indicates recommended way of displaying field: \n\t\t\t\t\turl, img, webgl, mp3, video, hide (ie. don't display), etc.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "burn", + "type": "burn", + "ricardian_contract": "## ACTION NAME: burn\n\n\t### INTENT\n\tBurns asset {{assetid}}. This action is only available for the asset owner. After executing, the \n\tasset will disappear forever, and RAM used for asset will be released.\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`assetids` - array of assetid's to burn;\n\t`memo` - memo for burn action;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "burnf", + "type": "burnf", + "ricardian_contract": "## ACTION NAME: burnf\n\n\t### INTENT\n\tBurns a fungible token. This action is available for the token owner and author. After executing, \n\taccounts balance and supply in stats table for this token will reduce by the specified quantity.\n\n\t### Input parameters:\n\t`from` - account who burns the token;\n\t`author` - account of fungible token author;\n\t`quantity` - amount to burn, example \"1.00 WOOD\";\n\t`memo` - memo for burnf action;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "canceloffer", + "type": "canceloffer", + "ricardian_contract": "## ACTION NAME: canceloffer\n\n\t### INTENT\n\tCancel and remove offer. Available for the asset owner.\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`assetids` - array of assetid's to cancel offer;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "cancelofferf", + "type": "cancelofferf", + "ricardian_contract": "## ACTION NAME: cancelofferf\n\n\t### INTENT\n\tCancels offer of FTs\n\n\t### Input parameters:\n\t`owner` - riginal owner of the FT\n\t`ftofferids` - id of the FT offer\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "claim", + "type": "claim", + "ricardian_contract": "## ACTION NAME: claim\n\n\t### INTENT\n\tClaim the specified asset (assuming it was offered to claimer by the asset owner).\n\n\t### Input parameters:\n\t`claimer` - account claiming the asset\n\t`assetids` - array of assetid's to claim\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "claimf", + "type": "claimf", + "ricardian_contract": "## ACTION NAME: claimf\n\n\t### INTENT\n\tClaim FTs which have been offered\n\n\t### Input parameters:\n\t`claimer` - Account claiming FTs which have been offered\n\t`ftofferids` - array of FT offer ids\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "closef", + "type": "closef", + "ricardian_contract": "## ACTION NAME: closef\n\n\t### INTENT\n\tCloses accounts table for provided fungible token and releases RAM.\n\tAction works only if balance is 0;\n\n\t### Input parameters:\n\t`owner` - account who woud like to close table with fungible token;\n\t`author` - account of fungible token author;\n\t`symbol` - token symbol, example \"WOOD\", \"ROCK\", \"GOLD\";\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "create", + "type": "create", + "ricardian_contract": "## ACTION NAME: create\n\n\t### INTENT\n\treate a new asset.\n\n\t### Input parameters:\n\t`author` - asset's author, who will able to updated asset's mdata;\n\t`category` - assets category;\n\t`owner` - assets owner;\n\t`idata` - stringified json with immutable assets data\n\t`mdata` - stringified json with mutable assets data, can be changed only by author\n\t`requireclaim` - true or false. If disabled, upon creation, the asset will be transfered to owner (but \n\t\t\t\t\t but AUTHOR'S memory will be used until the asset is transferred again). If enabled,\n\t\t\t\t\t author will remain the owner, but an offer will be created for the account specified in \n\t\t\t\t\t the owner field to claim the asset using the account's RAM.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "createf", + "type": "createf", + "ricardian_contract": "## ACTION NAME: createf\n\n\t### INTENT\n\tCreates fungible token with specified maximum supply; You can not change anything after creation.\n\n\t### Input parameters:\n\t`author` - fungible token author;\n\t`maximum_supply` - maximum token supply, example \"10000000.0000 GOLD\", \"10000000 SEED\", \"100000000.00 WOOD\". Precision is also important here;\n\t`authorctrl` - if true(1) allow token author (and not just owner) to burnf and transferf. Cannot be changed after creation!\n\t`data` - stringify json (recommend including keys `img` and `name` for better displaying by markets)\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "createlog", + "type": "createlog", + "ricardian_contract": "## ACTION NAME: createlog (internal)" + }, + { + "name": "delegate", + "type": "delegate", + "ricardian_contract": "## ACTION NAME: delegate\n\n\t### INTENT\n\tDelegates asset to {{to}}. This action changes the asset owner by calling the transfer action.\n\tIt also adds a record in the delegates table to record the asset as borrowed. This blocks\n\tthe asset from all owner actions (transfers, offers, burning by borrower).\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`to` - borrower account name;\n\t`assetids` - array of assetid's to delegate;\n\t`period` - time in seconds that the asset will be lent. Lender cannot undelegate until \n\t\t\t\t the period expires, however the receiver can transfer back at any time.\n\t`memo` - memo for delegate action\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "detach", + "type": "detach", + "ricardian_contract": "## ACTION NAME: detach\n\n\t### INTENT\n\tDetach NFTs from the specified NFT.\n\n\t### Input parameters:\n\t`owner` - owner of NFTs\n\t`assetidc` - the id of the NFT from which we are detaching\n\t`assetids` - the ids of the NFTS to be detached\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "detachf", + "type": "detachf", + "ricardian_contract": "## ACTION NAME: detachf\n\n\t### INTENT\n\tDetach FTs from the specified NFT.\n\n\t### Input parameters:\n\t`owner` - owner of NFTs\n\t`author` - author of the assets\n\t`assetidc` - id of the container NFT\n\t`quantity` - quantity to detach and token name (for example: \"10 WOOD\", \"42.00 GOLD\")\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "issuef", + "type": "issuef", + "ricardian_contract": "## ACTION NAME: issuef\n\n\t### INTENT\n\tThis action issues a fungible token.\t\t\n\n\t### Input parameters:\n\t`to` - account receiver;\n\t`author` - fungible token author;\n\t`quantity` - amount to issue, example \"1000.00 WOOD\";\n\t`memo` - transfers memo;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "offer", + "type": "offer", + "ricardian_contract": "## ACTION NAME: offer\n\n\t### INTENT\n\tOffer asset for claim. This is an alternative to the transfer action. Offer can be used by an \n\tasset owner to transfer the asset without using their RAM. After an offer is made, the account\n\tspecified in {{newowner}} is able to make a claim, and take control of the asset using their RAM.\n\tOffer action is not available if an asste is delegated (borrowed).\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`newowner` - new asset owner, who will able to claim;\n\t`assetids` - array of assetid's to offer;\n\t`memo` - memo for offer action\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "offerf", + "type": "offerf", + "ricardian_contract": "## ACTION NAME: offerf\n\n\t### INTENT\n\tOffer fungible tokens for another EOS user to claim. \n\tThis is an alternative to the transfer action. Offer can be used by a \n\tFT owner to transfer the FTs without using their RAM. After an offer is made, the account\n\tspecified in {{newowner}} is able to make a claim, and take control of the asset using their RAM.\n\tFTs will be removed from the owner's balance while the offer is open.\n\n\t### Input parameters:\n\t`owner` - original owner of the FTs\n\t`newowner` - account which will be able to claim the offer\n\t`author` - account of fungible token author;\t\n\t`quantity` - amount to transfer, example \"1.00 WOOD\";\n\t`memo` - offer's comment;\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "openf", + "type": "openf", + "ricardian_contract": "## ACTION NAME: openf\n\n\t### INTENT\n\tOpens accounts table for specified fungible token.\n\n\t### Input parameters:\n\t`owner` - account who woud like to close table with fungible token;\n\t`author` - account of fungible token author;\n\t`symbol` - token symbol, example \"WOOD\", \"ROCK\", \"GOLD\";\n\t`ram_payer` - account who will pay for ram used for table creation;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "regauthor", + "type": "regauthor", + "ricardian_contract": "## ACTION NAME: regauthor\n\n\t### INTENT\n\tNew Author registration. Action is not mandatory. Markets *may* choose to use information here \n\tto display info about the author, and to follow specifications expressed here for displaying asset fields.\n\n\t### Input parameters:\n\t`author` -\tauthors account who will create assets;\n\t`data` - stringified json. Recommendations to include: game, company, logo, url, desc;\n\t`stemplate` - stringified json with key:state values, where key is key from mdata or idata and \n\t\t\t\t\tstate indicates recommended way of displaying field: \n\t\t\t\t\turl, img, webgl, mp3, video, hide (ie. don't display), etc.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "transfer", + "type": "transfer", + "ricardian_contract": "## ACTION NAME: transfer\n\n\t### INTENT\n\tThis actions transfers an asset. On transfer owner asset's and scope asset's changes to {{to}}'s.\n\tSenders RAM will be charged to transfer asset.\n\tTransfer will fail if asset is offered for claim or is delegated.\n\n\t### Input parameters:\n\t`from` - account who sends the asset;\n\t`to` - account of receiver;\n\t`assetids` - array of assetid's to transfer;\n\t`memo` - transfers comment;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "transferf", + "type": "transferf", + "ricardian_contract": "## ACTION NAME: transferf\n\tThis actions transfers an fungible token.\n\n\t### INTENT\n\tThis actions transfers a specified quantity of fungible tokens.\n\n\t### Input parameters:\n\t`from` - account who sends the token;\n\t`to` - account of receiver;\n\t`author` - account of fungible token author;\n\t`quantity` - amount to transfer, example \"1.00 WOOD\";\n\t`memo` - transfers comment;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "undelegate", + "type": "undelegate", + "ricardian_contract": "## ACTION NAME: undelegate\n\n\t### INTENT\n\tUndelegates an asset from {{from}} account. Executing action by real owner will return asset immediately,\n\tand the entry in the delegates table recording the borrowing will be erased.\n\n\t### Input parameters:\n\t`owner` - real asset owner account;\n\t`from` - current account owner (borrower);\n\t`assetids` - array of assetid's to undelegate;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "update", + "type": "update", + "ricardian_contract": "## ACTION NAME: update\n\n\t### INTENT\n\tUpdate assets mutable data (mdata) field. Action is available only for authors.\n\n\t### Input parameters:\n\t`author` - authors account;\n\t`owner` - current assets owner;\n\t`assetid` - assetid to update;\n\t`mdata` - stringified json with mutable assets data. All mdata will be replaced;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "updatef", + "type": "updatef", + "ricardian_contract": "## ACTION NAME: updatef\n\n\t### INTENT\n\tUpdate the data field of a fungible token.\n\n\t### Input parameters:\n\t`author` - fungible token author;\n\t`sym` - fingible token symbol (\"GOLD\", \"WOOD\", etc.)\n\t`data` - stringify json (recommend including keys `img` and `name` for better displaying by markets)\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "updatever", + "type": "updatever", + "ricardian_contract": "## ACTION NAME: updatever (internal)" + }, + { + "name": "delegatemore", + "type": "delegatemore", + "ricardian_contract": "## ACTION NAME: delegatemore\n\n\t### INTENT\n\tExtend period of delegated asset. \n\n\t### Input parameters:\n\t`owner` - real asset owner account;\n\t`assetids` - assetid's to extend period;\n\t`period` - time in seconds that the asset will be lent. Lender cannot undelegate until \n\t\t\t\t the period expires, however the receiver can transfer back at any time.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + } + ], + "tables": [ + { + "name": "accounts", + "type": "account", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "authors", + "type": "sauthor", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "delegates", + "type": "sdelegate", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "global", + "type": "global", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "offerfs", + "type": "sofferf", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "offers", + "type": "soffer", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "sassets", + "type": "sasset", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "stat", + "type": "currency_stats", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "tokenconfigs", + "type": "tokenconfigs", + "index_type": "i64", + "key_names": [], + "key_types": [] + } + ], + "ricardian_clauses": [ + { + "id": "Warranty", + "body": "The invoker of the contract action shall uphold its Obligations under this Contract in a timely and workmanlike manner, using knowledge and recommendations for performing the services which meet generally acceptable standards set forth by EOS.IO Blockchain Block Producers." + }, + { + "id": "Default", + "body": "The occurrence of any of the following shall constitute a material default under this Contract:" + }, + { + "id": "Remedies", + "body": "In addition to any and all other rights a party may have available according to law, if a party defaults by failing to substantially perform any provision, term or condition of this Contract, the other party may terminate the Contract by providing written notice to the defaulting party. This notice shall describe with sufficient detail the nature of the default. The party receiving such notice shall promptly be removed from being a Block Producer and this Contract shall be automatically terminated." + }, + { + "id": "ForceMajeure", + "body": "If performance of this Contract or any obligation under this Contract is prevented, restricted, or interfered with by causes beyond either party's reasonable control (\"Force Majeure\"), and if the party unable to carry out its obligations gives the other party prompt written notice of such event, then the obligations of the party invoking this provision shall be suspended to the extent necessary by such event. The term Force Majeure shall include, without limitation, acts of God, fire, explosion, vandalism, storm or other similar occurrence, orders or acts of military or civil authority, or by national emergencies, insurrections, riots, or wars, or strikes, lock-outs, work stoppages, or supplier failures. The excused party shall use reasonable efforts under the circumstances to avoid or remove such causes of non-performance and shall proceed to perform with reasonable dispatch whenever such causes are removed or ceased. An act or omission shall be deemed within the reasonable control of a party if committed, omitted, or caused by such party, or its employees, officers, agents, or affiliates." + }, + { + "id": "DisputeResolution", + "body": "Any controversies or disputes arising out of or relating to this Contract will be resolved by binding arbitration under the default rules set forth by the EOS.IO Blockchain. The arbitrator's award will be final, and judgment may be entered upon it by any court having proper jurisdiction." + }, + { + "id": "EntireAgreement", + "body": "This Contract contains the entire agreement of the parties, and there are no other promises or conditions in any other agreement whether oral or written concerning the subject matter of this Contract. This Contract supersedes any prior written or oral agreements between the parties." + }, + { + "id": "Severability", + "body": "If any provision of this Contract will be held to be invalid or unenforceable for any reason, the remaining provisions will continue to be valid and enforceable. If a court finds that any provision of this Contract is invalid or unenforceable, but that by limiting such provision it would become valid and enforceable, then such provision will be deemed to be written, construed, and enforced as so limited." + }, + { + "id": "Amendment", + "body": "This Contract may be modified or amended in writing by mutual agreement between the parties, if the writing is signed by the party obligated under the amendment." + }, + { + "id": "GoverningLaw", + "body": "This Contract shall be construed in accordance with the Maxims of Equity." + }, + { + "id": "Notice", + "body": "Any notice or communication required or permitted under this Contract shall be sufficiently given if delivered to a verifiable email address or to such other email address as one party may have publicly furnished in writing, or published on a broadcast contract provided by this blockchain for purposes of providing notices of this type." + }, + { + "id": "WaiverOfContractualRight", + "body": "The failure of either party to enforce any provision of this Contract shall not be construed as a waiver or limitation of that party's right to subsequently enforce and compel strict compliance with every provision of this Contract." + }, + { + "id": "ArbitratorsFees_", + "body": "In any action arising hereunder or any separate action pertaining to the validity of this Agreement, both sides shall pay half the initial cost of arbitration, and the prevailing party shall be awarded reasonable arbitrator's fees and costs." + }, + { + "id": "ConstructionAndInterpretation", + "body": "The rule requiring construction or interpretation against the drafter is waived. The document shall be deemed as if it were drafted by both parties in a mutual effort." + }, + { + "id": "InWitnessWhereof", + "body": "In witness whereof, the parties hereto have caused this Agreement to be executed by themselves or their duly authorized representatives as of the date of execution, and authorized as proven by the cryptographic signature on the transaction that invokes this contract." + } + ], + "variants": [], + "abi_extensions": [] } \ No newline at end of file diff --git a/build/SimpleAssets/SimpleAssets.abi b/build/SimpleAssets/SimpleAssets.abi index cd650bc..1501c8c 100644 --- a/build/SimpleAssets/SimpleAssets.abi +++ b/build/SimpleAssets/SimpleAssets.abi @@ -1,1064 +1,1076 @@ -{ - "____comment": "This file was generated with eosio-abigen. DO NOT EDIT Mon Apr 15 20:43:11 2019", - "version": "eosio::abi/1.1", - "structs": [ - { - "name": "account", - "base": "", - "fields": [ - { - "name": "id", - "type": "uint64" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "balance", - "type": "asset" - } - ] - }, - { - "name": "attach", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "assetidc", - "type": "uint64" - }, - { - "name": "assetids", - "type": "uint64[]" - } - ] - }, - { - "name": "attachf", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "assetidc", - "type": "uint64" - } - ] - }, - { - "name": "authorupdate", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "data", - "type": "string" - }, - { - "name": "stemplate", - "type": "string" - } - ] - }, - { - "name": "burn", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "assetids", - "type": "uint64[]" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "burnf", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "canceloffer", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "assetids", - "type": "uint64[]" - } - ] - }, - { - "name": "cancelofferf", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "ftofferids", - "type": "uint64[]" - } - ] - }, - { - "name": "claim", - "base": "", - "fields": [ - { - "name": "claimer", - "type": "name" - }, - { - "name": "assetids", - "type": "uint64[]" - } - ] - }, - { - "name": "claimf", - "base": "", - "fields": [ - { - "name": "claimer", - "type": "name" - }, - { - "name": "ftofferids", - "type": "uint64[]" - } - ] - }, - { - "name": "closef", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "symbol", - "type": "symbol" - } - ] - }, - { - "name": "create", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "category", - "type": "name" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "idata", - "type": "string" - }, - { - "name": "mdata", - "type": "string" - }, - { - "name": "requireclaim", - "type": "bool" - } - ] - }, - { - "name": "createf", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "maximum_supply", - "type": "asset" - }, - { - "name": "authorctrl", - "type": "bool" - }, - { - "name": "data", - "type": "string" - } - ] - }, - { - "name": "createlog", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "category", - "type": "name" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "idata", - "type": "string" - }, - { - "name": "mdata", - "type": "string" - }, - { - "name": "assetid", - "type": "uint64" - }, - { - "name": "requireclaim", - "type": "bool" - } - ] - }, - { - "name": "currency_stats", - "base": "", - "fields": [ - { - "name": "supply", - "type": "asset" - }, - { - "name": "max_supply", - "type": "asset" - }, - { - "name": "issuer", - "type": "name" - }, - { - "name": "id", - "type": "uint64" - }, - { - "name": "authorctrl", - "type": "bool" - }, - { - "name": "data", - "type": "string" - } - ] - }, - { - "name": "delegate", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "to", - "type": "name" - }, - { - "name": "assetids", - "type": "uint64[]" - }, - { - "name": "period", - "type": "uint64" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "detach", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "assetidc", - "type": "uint64" - }, - { - "name": "assetids", - "type": "uint64[]" - } - ] - }, - { - "name": "detachf", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "assetidc", - "type": "uint64" - } - ] - }, - { - "name": "global", - "base": "", - "fields": [ - { - "name": "lnftid", - "type": "uint64" - }, - { - "name": "defid", - "type": "uint64" - }, - { - "name": "spare1", - "type": "uint64" - }, - { - "name": "spare2", - "type": "uint64" - } - ] - }, - { - "name": "issuef", - "base": "", - "fields": [ - { - "name": "to", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "offer", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "newowner", - "type": "name" - }, - { - "name": "assetids", - "type": "uint64[]" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "offerf", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "newowner", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "openf", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "symbol", - "type": "symbol" - }, - { - "name": "ram_payer", - "type": "name" - } - ] - }, - { - "name": "regauthor", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "data", - "type": "string" - }, - { - "name": "stemplate", - "type": "string" - } - ] - }, - { - "name": "sasset", - "base": "", - "fields": [ - { - "name": "id", - "type": "uint64" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "category", - "type": "name" - }, - { - "name": "idata", - "type": "string" - }, - { - "name": "mdata", - "type": "string" - }, - { - "name": "container", - "type": "sasset[]" - }, - { - "name": "containerf", - "type": "account[]" - } - ] - }, - { - "name": "sauthor", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "data", - "type": "string" - }, - { - "name": "stemplate", - "type": "string" - } - ] - }, - { - "name": "sdelegate", - "base": "", - "fields": [ - { - "name": "assetid", - "type": "uint64" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "delegatedto", - "type": "name" - }, - { - "name": "cdate", - "type": "uint64" - }, - { - "name": "period", - "type": "uint64" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "soffer", - "base": "", - "fields": [ - { - "name": "assetid", - "type": "uint64" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "offeredto", - "type": "name" - }, - { - "name": "cdate", - "type": "uint64" - } - ] - }, - { - "name": "sofferf", - "base": "", - "fields": [ - { - "name": "id", - "type": "uint64" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "offeredto", - "type": "name" - }, - { - "name": "cdate", - "type": "uint64" - } - ] - }, - { - "name": "tokenconfigs", - "base": "", - "fields": [ - { - "name": "standard", - "type": "name" - }, - { - "name": "version", - "type": "string" - } - ] - }, - { - "name": "transfer", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "to", - "type": "name" - }, - { - "name": "assetids", - "type": "uint64[]" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "transferf", - "base": "", - "fields": [ - { - "name": "from", - "type": "name" - }, - { - "name": "to", - "type": "name" - }, - { - "name": "author", - "type": "name" - }, - { - "name": "quantity", - "type": "asset" - }, - { - "name": "memo", - "type": "string" - } - ] - }, - { - "name": "undelegate", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "from", - "type": "name" - }, - { - "name": "assetids", - "type": "uint64[]" - } - ] - }, - { - "name": "update", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "owner", - "type": "name" - }, - { - "name": "assetid", - "type": "uint64" - }, - { - "name": "mdata", - "type": "string" - } - ] - }, - { - "name": "updatef", - "base": "", - "fields": [ - { - "name": "author", - "type": "name" - }, - { - "name": "sym", - "type": "symbol" - }, - { - "name": "data", - "type": "string" - } - ] - }, - { - "name": "updatever", - "base": "", - "fields": [ - { - "name": "version", - "type": "string" - } - ] - }, - { - "name": "delegatemore", - "base": "", - "fields": [ - { - "name": "owner", - "type": "name" - }, - { - "name": "assetidc", - "type": "uint64" - }, - { - "name": "period", - "type": "uint64" - } - ] - } - ], - "types": [], - "actions": [ - { - "name": "attach", - "type": "attach", - "ricardian_contract": "## ACTION NAME: attach\n\n\t### INTENT\n\t\tAttach other NFTs to the specified NFT. Restrictions:\n\t\t1. Only the Asset Author can do this\n\t\t2. All assets must have the same author\n\t\t3. All assets much have the same owner\n\n\t### Input parameters:\n\t\t`owner`\t - owner of NFTs\n\t\t`assetidc` - id of container NFT\n\t\t`assetids` - array of asset ids to attach\t\n\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "attachf", - "type": "attachf", - "ricardian_contract": "## ACTION NAME: attachf\n\n\t### INTENT\n\tAttach FTs to the specified NFT. Restrictions:\n\t1. Only the Asset Author can do this\n\t2. All assets must have the same author\n\t3. All assets much have the same owner\n\n\t### Input parameters:\n\t`owner`\t - owner of assets\n\t`author` - author of the assets\n\t`assetidc` - id of container NFT\n\t`quantity` - quantity to attach and token name (for example: \"10 WOOD\", \"42.00 GOLD\")\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "authorupdate", - "type": "authorupdate", - "ricardian_contract": "## ACTION NAME: authorupdate\n\n\t### INTENT\n\tAuthors info update. Used to updated author information, and asset display recommendations created with the regauthor action. This action replaces the fields data and stemplate.\n\n\tTo remove author entry, call this action with null strings for data and stemplate.\n\n\t### Input parameters:\n\t`author` - authors account who will create assets; \n\t`data` - stringified json. Recommendations to include: game, company, logo, url, desc;\n\t`stemplate` - stringified json with key:state values, where key is key from mdata or idata and \n\t\t\t\t\tstate indicates recommended way of displaying field: \n\t\t\t\t\turl, img, webgl, mp3, video, hide (ie. don't display), etc.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "burn", - "type": "burn", - "ricardian_contract": "## ACTION NAME: burn\n\n\t### INTENT\n\tBurns asset {{assetid}}. This action is only available for the asset owner. After executing, the \n\tasset will disappear forever, and RAM used for asset will be released.\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`assetids` - array of assetid's to burn;\n\t`memo` - memo for burn action;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "burnf", - "type": "burnf", - "ricardian_contract": "## ACTION NAME: burnf\n\n\t### INTENT\n\tBurns a fungible token. This action is available for the token owner and author. After executing, \n\taccounts balance and supply in stats table for this token will reduce by the specified quantity.\n\n\t### Input parameters:\n\t`from` - account who burns the token;\n\t`author` - account of fungible token author;\n\t`quantity` - amount to burn, example \"1.00 WOOD\";\n\t`memo` - memo for burnf action;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "canceloffer", - "type": "canceloffer", - "ricardian_contract": "## ACTION NAME: canceloffer\n\n\t### INTENT\n\tCancel and remove offer. Available for the asset owner.\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`assetids` - array of assetid's to cancel offer;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "cancelofferf", - "type": "cancelofferf", - "ricardian_contract": "## ACTION NAME: cancelofferf\n\n\t### INTENT\n\tCancels offer of FTs\n\n\t### Input parameters:\n\t`owner` - riginal owner of the FT\n\t`ftofferids` - id of the FT offer\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "claim", - "type": "claim", - "ricardian_contract": "## ACTION NAME: claim\n\n\t### INTENT\n\tClaim the specified asset (assuming it was offered to claimer by the asset owner).\n\n\t### Input parameters:\n\t`claimer` - account claiming the asset\n\t`assetids` - array of assetid's to claim\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "claimf", - "type": "claimf", - "ricardian_contract": "## ACTION NAME: claimf\n\n\t### INTENT\n\tClaim FTs which have been offered\n\n\t### Input parameters:\n\t`claimer` - Account claiming FTs which have been offered\n\t`ftofferids` - array of FT offer ids\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "closef", - "type": "closef", - "ricardian_contract": "## ACTION NAME: closef\n\n\t### INTENT\n\tCloses accounts table for provided fungible token and releases RAM.\n\tAction works only if balance is 0;\n\n\t### Input parameters:\n\t`owner` - account who woud like to close table with fungible token;\n\t`author` - account of fungible token author;\n\t`symbol` - token symbol, example \"WOOD\", \"ROCK\", \"GOLD\";\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "create", - "type": "create", - "ricardian_contract": "## ACTION NAME: create\n\n\t### INTENT\n\treate a new asset.\n\n\t### Input parameters:\n\t`author` - asset's author, who will able to updated asset's mdata;\n\t`category` - assets category;\n\t`owner` - assets owner;\n\t`idata` - stringified json with immutable assets data\n\t`mdata` - stringified json with mutable assets data, can be changed only by author\n\t`requireclaim` - true or false. If disabled, upon creation, the asset will be transfered to owner (but \n\t\t\t\t\t but AUTHOR'S memory will be used until the asset is transferred again). If enabled,\n\t\t\t\t\t author will remain the owner, but an offer will be created for the account specified in \n\t\t\t\t\t the owner field to claim the asset using the account's RAM.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "createf", - "type": "createf", - "ricardian_contract": "## ACTION NAME: createf\n\n\t### INTENT\n\tCreates fungible token with specified maximum supply; You can not change anything after creation.\n\n\t### Input parameters:\n\t`author` - fungible token author;\n\t`maximum_supply` - maximum token supply, example \"10000000.0000 GOLD\", \"10000000 SEED\", \"100000000.00 WOOD\". Precision is also important here;\n\t`authorctrl` - if true(1) allow token author (and not just owner) to burnf and transferf. Cannot be changed after creation!\n\t`data` - stringify json (recommend including keys `img` and `name` for better displaying by markets)\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "createlog", - "type": "createlog", - "ricardian_contract": "## ACTION NAME: createlog (internal)" - }, - { - "name": "delegate", - "type": "delegate", - "ricardian_contract": "## ACTION NAME: delegate\n\n\t### INTENT\n\tDelegates asset to {{to}}. This action changes the asset owner by calling the transfer action.\n\tIt also adds a record in the delegates table to record the asset as borrowed. This blocks\n\tthe asset from all owner actions (transfers, offers, burning by borrower).\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`to` - borrower account name;\n\t`assetids` - array of assetid's to delegate;\n\t`period` - time in seconds that the asset will be lent. Lender cannot undelegate until \n\t\t\t\t the period expires, however the receiver can transfer back at any time.\n\t`memo` - memo for delegate action\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "detach", - "type": "detach", - "ricardian_contract": "## ACTION NAME: detach\n\n\t### INTENT\n\tDetach NFTs from the specified NFT.\n\n\t### Input parameters:\n\t`owner` - owner of NFTs\n\t`assetidc` - the id of the NFT from which we are detaching\n\t`assetids` - the ids of the NFTS to be detached\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "detachf", - "type": "detachf", - "ricardian_contract": "## ACTION NAME: detachf\n\n\t### INTENT\n\tDetach FTs from the specified NFT.\n\n\t### Input parameters:\n\t`owner` - owner of NFTs\n\t`author` - author of the assets\n\t`assetidc` - id of the container NFT\n\t`quantity` - quantity to detach and token name (for example: \"10 WOOD\", \"42.00 GOLD\")\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "issuef", - "type": "issuef", - "ricardian_contract": "## ACTION NAME: issuef\n\n\t### INTENT\n\tThis action issues a fungible token.\t\t\n\n\t### Input parameters:\n\t`to` - account receiver;\n\t`author` - fungible token author;\n\t`quantity` - amount to issue, example \"1000.00 WOOD\";\n\t`memo` - transfers memo;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "offer", - "type": "offer", - "ricardian_contract": "## ACTION NAME: offer\n\n\t### INTENT\n\tOffer asset for claim. This is an alternative to the transfer action. Offer can be used by an \n\tasset owner to transfer the asset without using their RAM. After an offer is made, the account\n\tspecified in {{newowner}} is able to make a claim, and take control of the asset using their RAM.\n\tOffer action is not available if an asste is delegated (borrowed).\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`newowner` - new asset owner, who will able to claim;\n\t`assetids` - array of assetid's to offer;\n\t`memo` - memo for offer action\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "offerf", - "type": "offerf", - "ricardian_contract": "## ACTION NAME: offerf\n\n\t### INTENT\n\tOffer fungible tokens for another EOS user to claim. \n\tThis is an alternative to the transfer action. Offer can be used by a \n\tFT owner to transfer the FTs without using their RAM. After an offer is made, the account\n\tspecified in {{newowner}} is able to make a claim, and take control of the asset using their RAM.\n\tFTs will be removed from the owner's balance while the offer is open.\n\n\t### Input parameters:\n\t`owner` - original owner of the FTs\n\t`newowner` - account which will be able to claim the offer\n\t`author` - account of fungible token author;\t\n\t`quantity` - amount to transfer, example \"1.00 WOOD\";\n\t`memo` - offer's comment;\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "openf", - "type": "openf", - "ricardian_contract": "## ACTION NAME: openf\n\n\t### INTENT\n\tOpens accounts table for specified fungible token.\n\n\t### Input parameters:\n\t`owner` - account who woud like to close table with fungible token;\n\t`author` - account of fungible token author;\n\t`symbol` - token symbol, example \"WOOD\", \"ROCK\", \"GOLD\";\n\t`ram_payer` - account who will pay for ram used for table creation;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "regauthor", - "type": "regauthor", - "ricardian_contract": "## ACTION NAME: regauthor\n\n\t### INTENT\n\tNew Author registration. Action is not mandatory. Markets *may* choose to use information here \n\tto display info about the author, and to follow specifications expressed here for displaying asset fields.\n\n\t### Input parameters:\n\t`author` -\tauthors account who will create assets;\n\t`data` - stringified json. Recommendations to include: game, company, logo, url, desc;\n\t`stemplate` - stringified json with key:state values, where key is key from mdata or idata and \n\t\t\t\t\tstate indicates recommended way of displaying field: \n\t\t\t\t\turl, img, webgl, mp3, video, hide (ie. don't display), etc.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "transfer", - "type": "transfer", - "ricardian_contract": "## ACTION NAME: transfer\n\n\t### INTENT\n\tThis actions transfers an asset. On transfer owner asset's and scope asset's changes to {{to}}'s.\n\tSenders RAM will be charged to transfer asset.\n\tTransfer will fail if asset is offered for claim or is delegated.\n\n\t### Input parameters:\n\t`from` - account who sends the asset;\n\t`to` - account of receiver;\n\t`assetids` - array of assetid's to transfer;\n\t`memo` - transfers comment;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "transferf", - "type": "transferf", - "ricardian_contract": "## ACTION NAME: transferf\n\tThis actions transfers an fungible token.\n\n\t### INTENT\n\tThis actions transfers a specified quantity of fungible tokens.\n\n\t### Input parameters:\n\t`from` - account who sends the token;\n\t`to` - account of receiver;\n\t`author` - account of fungible token author;\n\t`quantity` - amount to transfer, example \"1.00 WOOD\";\n\t`memo` - transfers comment;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "undelegate", - "type": "undelegate", - "ricardian_contract": "## ACTION NAME: undelegate\n\n\t### INTENT\n\tUndelegates an asset from {{from}} account. Executing action by real owner will return asset immediately,\n\tand the entry in the delegates table recording the borrowing will be erased.\n\n\t### Input parameters:\n\t`owner` - real asset owner account;\n\t`from` - current account owner (borrower);\n\t`assetids` - array of assetid's to undelegate;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "update", - "type": "update", - "ricardian_contract": "## ACTION NAME: update\n\n\t### INTENT\n\tUpdate assets mutable data (mdata) field. Action is available only for authors.\n\n\t### Input parameters:\n\t`author` - authors account;\n\t`owner` - current assets owner;\n\t`assetid` - assetid to update;\n\t`mdata` - stringified json with mutable assets data. All mdata will be replaced;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "updatef", - "type": "updatef", - "ricardian_contract": "## ACTION NAME: updatef\n\n\t### INTENT\n\tUpdate the data field of a fungible token.\n\n\t### Input parameters:\n\t`author` - fungible token author;\n\t`sym` - fingible token symbol (\"GOLD\", \"WOOD\", etc.)\n\t`data` - stringify json (recommend including keys `img` and `name` for better displaying by markets)\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - }, - { - "name": "updatever", - "type": "updatever", - "ricardian_contract": "## ACTION NAME: updatever (internal)" - }, - { - "name": "delegatemore", - "type": "delegatemore", - "ricardian_contract": "## ACTION NAME: delegatemore\n\n\t### INTENT\n\tExtend period of delegated asset. \n\n\t### Input parameters:\n\t`owner` - real asset owner account;\n\t`assetids` - assetid's to extend period;\n\t`period` - time in seconds that the asset will be lent. Lender cannot undelegate until \n\t\t\t\t the period expires, however the receiver can transfer back at any time.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" - } - ], - "tables": [ - { - "name": "accounts", - "type": "account", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "authors", - "type": "sauthor", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "delegates", - "type": "sdelegate", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "global", - "type": "global", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "offerfs", - "type": "sofferf", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "offers", - "type": "soffer", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "sassets", - "type": "sasset", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "stat", - "type": "currency_stats", - "index_type": "i64", - "key_names": [], - "key_types": [] - }, - { - "name": "tokenconfigs", - "type": "tokenconfigs", - "index_type": "i64", - "key_names": [], - "key_types": [] - } - ], - "ricardian_clauses": [ - { - "id": "Warranty", - "body": "The invoker of the contract action shall uphold its Obligations under this Contract in a timely and workmanlike manner, using knowledge and recommendations for performing the services which meet generally acceptable standards set forth by EOS.IO Blockchain Block Producers." - }, - { - "id": "Default", - "body": "The occurrence of any of the following shall constitute a material default under this Contract:" - }, - { - "id": "Remedies", - "body": "In addition to any and all other rights a party may have available according to law, if a party defaults by failing to substantially perform any provision, term or condition of this Contract, the other party may terminate the Contract by providing written notice to the defaulting party. This notice shall describe with sufficient detail the nature of the default. The party receiving such notice shall promptly be removed from being a Block Producer and this Contract shall be automatically terminated." - }, - { - "id": "ForceMajeure", - "body": "If performance of this Contract or any obligation under this Contract is prevented, restricted, or interfered with by causes beyond either party's reasonable control (\"Force Majeure\"), and if the party unable to carry out its obligations gives the other party prompt written notice of such event, then the obligations of the party invoking this provision shall be suspended to the extent necessary by such event. The term Force Majeure shall include, without limitation, acts of God, fire, explosion, vandalism, storm or other similar occurrence, orders or acts of military or civil authority, or by national emergencies, insurrections, riots, or wars, or strikes, lock-outs, work stoppages, or supplier failures. The excused party shall use reasonable efforts under the circumstances to avoid or remove such causes of non-performance and shall proceed to perform with reasonable dispatch whenever such causes are removed or ceased. An act or omission shall be deemed within the reasonable control of a party if committed, omitted, or caused by such party, or its employees, officers, agents, or affiliates." - }, - { - "id": "DisputeResolution", - "body": "Any controversies or disputes arising out of or relating to this Contract will be resolved by binding arbitration under the default rules set forth by the EOS.IO Blockchain. The arbitrator's award will be final, and judgment may be entered upon it by any court having proper jurisdiction." - }, - { - "id": "EntireAgreement", - "body": "This Contract contains the entire agreement of the parties, and there are no other promises or conditions in any other agreement whether oral or written concerning the subject matter of this Contract. This Contract supersedes any prior written or oral agreements between the parties." - }, - { - "id": "Severability", - "body": "If any provision of this Contract will be held to be invalid or unenforceable for any reason, the remaining provisions will continue to be valid and enforceable. If a court finds that any provision of this Contract is invalid or unenforceable, but that by limiting such provision it would become valid and enforceable, then such provision will be deemed to be written, construed, and enforced as so limited." - }, - { - "id": "Amendment", - "body": "This Contract may be modified or amended in writing by mutual agreement between the parties, if the writing is signed by the party obligated under the amendment." - }, - { - "id": "GoverningLaw", - "body": "This Contract shall be construed in accordance with the Maxims of Equity." - }, - { - "id": "Notice", - "body": "Any notice or communication required or permitted under this Contract shall be sufficiently given if delivered to a verifiable email address or to such other email address as one party may have publicly furnished in writing, or published on a broadcast contract provided by this blockchain for purposes of providing notices of this type." - }, - { - "id": "WaiverOfContractualRight", - "body": "The failure of either party to enforce any provision of this Contract shall not be construed as a waiver or limitation of that party's right to subsequently enforce and compel strict compliance with every provision of this Contract." - }, - { - "id": "ArbitratorsFees_", - "body": "In any action arising hereunder or any separate action pertaining to the validity of this Agreement, both sides shall pay half the initial cost of arbitration, and the prevailing party shall be awarded reasonable arbitrator's fees and costs." - }, - { - "id": "ConstructionAndInterpretation", - "body": "The rule requiring construction or interpretation against the drafter is waived. The document shall be deemed as if it were drafted by both parties in a mutual effort." - }, - { - "id": "InWitnessWhereof", - "body": "In witness whereof, the parties hereto have caused this Agreement to be executed by themselves or their duly authorized representatives as of the date of execution, and authorized as proven by the cryptographic signature on the transaction that invokes this contract." - } - ], - "variants": [], - "abi_extensions": [] +{ + "____comment": "This file was generated with eosio-abigen. DO NOT EDIT Mon Apr 15 20:43:11 2019", + "version": "eosio::abi/1.1", + "structs": [ + { + "name": "account", + "base": "", + "fields": [ + { + "name": "id", + "type": "uint64" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "balance", + "type": "asset" + } + ] + }, + { + "name": "attach", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "assetidc", + "type": "uint64" + }, + { + "name": "assetids", + "type": "uint64[]" + } + ] + }, + { + "name": "attachf", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "quantity", + "type": "asset" + }, + { + "name": "assetidc", + "type": "uint64" + } + ] + }, + { + "name": "authorupdate", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "data", + "type": "string" + }, + { + "name": "stemplate", + "type": "string" + }, + { + "name": "imgpriority", + "type": "string" + } + ] + }, + { + "name": "burn", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "assetids", + "type": "uint64[]" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "burnf", + "base": "", + "fields": [ + { + "name": "from", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "quantity", + "type": "asset" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "canceloffer", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "assetids", + "type": "uint64[]" + } + ] + }, + { + "name": "cancelofferf", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "ftofferids", + "type": "uint64[]" + } + ] + }, + { + "name": "claim", + "base": "", + "fields": [ + { + "name": "claimer", + "type": "name" + }, + { + "name": "assetids", + "type": "uint64[]" + } + ] + }, + { + "name": "claimf", + "base": "", + "fields": [ + { + "name": "claimer", + "type": "name" + }, + { + "name": "ftofferids", + "type": "uint64[]" + } + ] + }, + { + "name": "closef", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "symbol", + "type": "symbol" + } + ] + }, + { + "name": "create", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "category", + "type": "name" + }, + { + "name": "owner", + "type": "name" + }, + { + "name": "idata", + "type": "string" + }, + { + "name": "mdata", + "type": "string" + }, + { + "name": "requireclaim", + "type": "bool" + } + ] + }, + { + "name": "createf", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "maximum_supply", + "type": "asset" + }, + { + "name": "authorctrl", + "type": "bool" + }, + { + "name": "data", + "type": "string" + } + ] + }, + { + "name": "createlog", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "category", + "type": "name" + }, + { + "name": "owner", + "type": "name" + }, + { + "name": "idata", + "type": "string" + }, + { + "name": "mdata", + "type": "string" + }, + { + "name": "assetid", + "type": "uint64" + }, + { + "name": "requireclaim", + "type": "bool" + } + ] + }, + { + "name": "currency_stats", + "base": "", + "fields": [ + { + "name": "supply", + "type": "asset" + }, + { + "name": "max_supply", + "type": "asset" + }, + { + "name": "issuer", + "type": "name" + }, + { + "name": "id", + "type": "uint64" + }, + { + "name": "authorctrl", + "type": "bool" + }, + { + "name": "data", + "type": "string" + } + ] + }, + { + "name": "delegate", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "to", + "type": "name" + }, + { + "name": "assetids", + "type": "uint64[]" + }, + { + "name": "period", + "type": "uint64" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "detach", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "assetidc", + "type": "uint64" + }, + { + "name": "assetids", + "type": "uint64[]" + } + ] + }, + { + "name": "detachf", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "quantity", + "type": "asset" + }, + { + "name": "assetidc", + "type": "uint64" + } + ] + }, + { + "name": "global", + "base": "", + "fields": [ + { + "name": "lnftid", + "type": "uint64" + }, + { + "name": "defid", + "type": "uint64" + }, + { + "name": "spare1", + "type": "uint64" + }, + { + "name": "spare2", + "type": "uint64" + } + ] + }, + { + "name": "issuef", + "base": "", + "fields": [ + { + "name": "to", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "quantity", + "type": "asset" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "offer", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "newowner", + "type": "name" + }, + { + "name": "assetids", + "type": "uint64[]" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "offerf", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "newowner", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "quantity", + "type": "asset" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "openf", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "symbol", + "type": "symbol" + }, + { + "name": "ram_payer", + "type": "name" + } + ] + }, + { + "name": "regauthor", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "data", + "type": "string" + }, + { + "name": "stemplate", + "type": "string" + }, + { + "name": "imgpriority", + "type": "string" + } + ] + }, + { + "name": "sasset", + "base": "", + "fields": [ + { + "name": "id", + "type": "uint64" + }, + { + "name": "owner", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "category", + "type": "name" + }, + { + "name": "idata", + "type": "string" + }, + { + "name": "mdata", + "type": "string" + }, + { + "name": "container", + "type": "sasset[]" + }, + { + "name": "containerf", + "type": "account[]" + } + ] + }, + { + "name": "sauthor", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "data", + "type": "string" + }, + { + "name": "stemplate", + "type": "string" + }, + { + "name": "imgpriority", + "type": "string" + } + ] + }, + { + "name": "sdelegate", + "base": "", + "fields": [ + { + "name": "assetid", + "type": "uint64" + }, + { + "name": "owner", + "type": "name" + }, + { + "name": "delegatedto", + "type": "name" + }, + { + "name": "cdate", + "type": "uint64" + }, + { + "name": "period", + "type": "uint64" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "soffer", + "base": "", + "fields": [ + { + "name": "assetid", + "type": "uint64" + }, + { + "name": "owner", + "type": "name" + }, + { + "name": "offeredto", + "type": "name" + }, + { + "name": "cdate", + "type": "uint64" + } + ] + }, + { + "name": "sofferf", + "base": "", + "fields": [ + { + "name": "id", + "type": "uint64" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "owner", + "type": "name" + }, + { + "name": "quantity", + "type": "asset" + }, + { + "name": "offeredto", + "type": "name" + }, + { + "name": "cdate", + "type": "uint64" + } + ] + }, + { + "name": "tokenconfigs", + "base": "", + "fields": [ + { + "name": "standard", + "type": "name" + }, + { + "name": "version", + "type": "string" + } + ] + }, + { + "name": "transfer", + "base": "", + "fields": [ + { + "name": "from", + "type": "name" + }, + { + "name": "to", + "type": "name" + }, + { + "name": "assetids", + "type": "uint64[]" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "transferf", + "base": "", + "fields": [ + { + "name": "from", + "type": "name" + }, + { + "name": "to", + "type": "name" + }, + { + "name": "author", + "type": "name" + }, + { + "name": "quantity", + "type": "asset" + }, + { + "name": "memo", + "type": "string" + } + ] + }, + { + "name": "undelegate", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "from", + "type": "name" + }, + { + "name": "assetids", + "type": "uint64[]" + } + ] + }, + { + "name": "update", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "owner", + "type": "name" + }, + { + "name": "assetid", + "type": "uint64" + }, + { + "name": "mdata", + "type": "string" + } + ] + }, + { + "name": "updatef", + "base": "", + "fields": [ + { + "name": "author", + "type": "name" + }, + { + "name": "sym", + "type": "symbol" + }, + { + "name": "data", + "type": "string" + } + ] + }, + { + "name": "updatever", + "base": "", + "fields": [ + { + "name": "version", + "type": "string" + } + ] + }, + { + "name": "delegatemore", + "base": "", + "fields": [ + { + "name": "owner", + "type": "name" + }, + { + "name": "assetidc", + "type": "uint64" + }, + { + "name": "period", + "type": "uint64" + } + ] + } + ], + "types": [], + "actions": [ + { + "name": "attach", + "type": "attach", + "ricardian_contract": "## ACTION NAME: attach\n\n\t### INTENT\n\t\tAttach other NFTs to the specified NFT. Restrictions:\n\t\t1. Only the Asset Author can do this\n\t\t2. All assets must have the same author\n\t\t3. All assets much have the same owner\n\n\t### Input parameters:\n\t\t`owner`\t - owner of NFTs\n\t\t`assetidc` - id of container NFT\n\t\t`assetids` - array of asset ids to attach\t\n\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "attachf", + "type": "attachf", + "ricardian_contract": "## ACTION NAME: attachf\n\n\t### INTENT\n\tAttach FTs to the specified NFT. Restrictions:\n\t1. Only the Asset Author can do this\n\t2. All assets must have the same author\n\t3. All assets much have the same owner\n\n\t### Input parameters:\n\t`owner`\t - owner of assets\n\t`author` - author of the assets\n\t`assetidc` - id of container NFT\n\t`quantity` - quantity to attach and token name (for example: \"10 WOOD\", \"42.00 GOLD\")\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "authorupdate", + "type": "authorupdate", + "ricardian_contract": "## ACTION NAME: authorupdate\n\n\t### INTENT\n\tAuthors info update. Used to updated author information, and asset display recommendations created with the regauthor action. This action replaces the fields data and stemplate.\n\n\tTo remove author entry, call this action with null strings for data and stemplate.\n\n\t### Input parameters:\n\t`author` - authors account who will create assets; \n\t`data` - stringified json. Recommendations to include: game, company, logo, url, desc;\n\t`stemplate` - stringified json with key:state values, where key is key from mdata or idata and \n\t\t\t\t\tstate indicates recommended way of displaying field: \n\t\t\t\t\turl, img, webgl, mp3, video, hide (ie. don't display), etc.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "burn", + "type": "burn", + "ricardian_contract": "## ACTION NAME: burn\n\n\t### INTENT\n\tBurns asset {{assetid}}. This action is only available for the asset owner. After executing, the \n\tasset will disappear forever, and RAM used for asset will be released.\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`assetids` - array of assetid's to burn;\n\t`memo` - memo for burn action;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "burnf", + "type": "burnf", + "ricardian_contract": "## ACTION NAME: burnf\n\n\t### INTENT\n\tBurns a fungible token. This action is available for the token owner and author. After executing, \n\taccounts balance and supply in stats table for this token will reduce by the specified quantity.\n\n\t### Input parameters:\n\t`from` - account who burns the token;\n\t`author` - account of fungible token author;\n\t`quantity` - amount to burn, example \"1.00 WOOD\";\n\t`memo` - memo for burnf action;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "canceloffer", + "type": "canceloffer", + "ricardian_contract": "## ACTION NAME: canceloffer\n\n\t### INTENT\n\tCancel and remove offer. Available for the asset owner.\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`assetids` - array of assetid's to cancel offer;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "cancelofferf", + "type": "cancelofferf", + "ricardian_contract": "## ACTION NAME: cancelofferf\n\n\t### INTENT\n\tCancels offer of FTs\n\n\t### Input parameters:\n\t`owner` - riginal owner of the FT\n\t`ftofferids` - id of the FT offer\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "claim", + "type": "claim", + "ricardian_contract": "## ACTION NAME: claim\n\n\t### INTENT\n\tClaim the specified asset (assuming it was offered to claimer by the asset owner).\n\n\t### Input parameters:\n\t`claimer` - account claiming the asset\n\t`assetids` - array of assetid's to claim\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "claimf", + "type": "claimf", + "ricardian_contract": "## ACTION NAME: claimf\n\n\t### INTENT\n\tClaim FTs which have been offered\n\n\t### Input parameters:\n\t`claimer` - Account claiming FTs which have been offered\n\t`ftofferids` - array of FT offer ids\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "closef", + "type": "closef", + "ricardian_contract": "## ACTION NAME: closef\n\n\t### INTENT\n\tCloses accounts table for provided fungible token and releases RAM.\n\tAction works only if balance is 0;\n\n\t### Input parameters:\n\t`owner` - account who woud like to close table with fungible token;\n\t`author` - account of fungible token author;\n\t`symbol` - token symbol, example \"WOOD\", \"ROCK\", \"GOLD\";\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "create", + "type": "create", + "ricardian_contract": "## ACTION NAME: create\n\n\t### INTENT\n\treate a new asset.\n\n\t### Input parameters:\n\t`author` - asset's author, who will able to updated asset's mdata;\n\t`category` - assets category;\n\t`owner` - assets owner;\n\t`idata` - stringified json with immutable assets data\n\t`mdata` - stringified json with mutable assets data, can be changed only by author\n\t`requireclaim` - true or false. If disabled, upon creation, the asset will be transfered to owner (but \n\t\t\t\t\t but AUTHOR'S memory will be used until the asset is transferred again). If enabled,\n\t\t\t\t\t author will remain the owner, but an offer will be created for the account specified in \n\t\t\t\t\t the owner field to claim the asset using the account's RAM.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "createf", + "type": "createf", + "ricardian_contract": "## ACTION NAME: createf\n\n\t### INTENT\n\tCreates fungible token with specified maximum supply; You can not change anything after creation.\n\n\t### Input parameters:\n\t`author` - fungible token author;\n\t`maximum_supply` - maximum token supply, example \"10000000.0000 GOLD\", \"10000000 SEED\", \"100000000.00 WOOD\". Precision is also important here;\n\t`authorctrl` - if true(1) allow token author (and not just owner) to burnf and transferf. Cannot be changed after creation!\n\t`data` - stringify json (recommend including keys `img` and `name` for better displaying by markets)\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "createlog", + "type": "createlog", + "ricardian_contract": "## ACTION NAME: createlog (internal)" + }, + { + "name": "delegate", + "type": "delegate", + "ricardian_contract": "## ACTION NAME: delegate\n\n\t### INTENT\n\tDelegates asset to {{to}}. This action changes the asset owner by calling the transfer action.\n\tIt also adds a record in the delegates table to record the asset as borrowed. This blocks\n\tthe asset from all owner actions (transfers, offers, burning by borrower).\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`to` - borrower account name;\n\t`assetids` - array of assetid's to delegate;\n\t`period` - time in seconds that the asset will be lent. Lender cannot undelegate until \n\t\t\t\t the period expires, however the receiver can transfer back at any time.\n\t`memo` - memo for delegate action\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "detach", + "type": "detach", + "ricardian_contract": "## ACTION NAME: detach\n\n\t### INTENT\n\tDetach NFTs from the specified NFT.\n\n\t### Input parameters:\n\t`owner` - owner of NFTs\n\t`assetidc` - the id of the NFT from which we are detaching\n\t`assetids` - the ids of the NFTS to be detached\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "detachf", + "type": "detachf", + "ricardian_contract": "## ACTION NAME: detachf\n\n\t### INTENT\n\tDetach FTs from the specified NFT.\n\n\t### Input parameters:\n\t`owner` - owner of NFTs\n\t`author` - author of the assets\n\t`assetidc` - id of the container NFT\n\t`quantity` - quantity to detach and token name (for example: \"10 WOOD\", \"42.00 GOLD\")\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "issuef", + "type": "issuef", + "ricardian_contract": "## ACTION NAME: issuef\n\n\t### INTENT\n\tThis action issues a fungible token.\t\t\n\n\t### Input parameters:\n\t`to` - account receiver;\n\t`author` - fungible token author;\n\t`quantity` - amount to issue, example \"1000.00 WOOD\";\n\t`memo` - transfers memo;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "offer", + "type": "offer", + "ricardian_contract": "## ACTION NAME: offer\n\n\t### INTENT\n\tOffer asset for claim. This is an alternative to the transfer action. Offer can be used by an \n\tasset owner to transfer the asset without using their RAM. After an offer is made, the account\n\tspecified in {{newowner}} is able to make a claim, and take control of the asset using their RAM.\n\tOffer action is not available if an asste is delegated (borrowed).\n\n\t### Input parameters:\n\t`owner` - current asset owner account;\n\t`newowner` - new asset owner, who will able to claim;\n\t`assetids` - array of assetid's to offer;\n\t`memo` - memo for offer action\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "offerf", + "type": "offerf", + "ricardian_contract": "## ACTION NAME: offerf\n\n\t### INTENT\n\tOffer fungible tokens for another EOS user to claim. \n\tThis is an alternative to the transfer action. Offer can be used by a \n\tFT owner to transfer the FTs without using their RAM. After an offer is made, the account\n\tspecified in {{newowner}} is able to make a claim, and take control of the asset using their RAM.\n\tFTs will be removed from the owner's balance while the offer is open.\n\n\t### Input parameters:\n\t`owner` - original owner of the FTs\n\t`newowner` - account which will be able to claim the offer\n\t`author` - account of fungible token author;\t\n\t`quantity` - amount to transfer, example \"1.00 WOOD\";\n\t`memo` - offer's comment;\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "openf", + "type": "openf", + "ricardian_contract": "## ACTION NAME: openf\n\n\t### INTENT\n\tOpens accounts table for specified fungible token.\n\n\t### Input parameters:\n\t`owner` - account who woud like to close table with fungible token;\n\t`author` - account of fungible token author;\n\t`symbol` - token symbol, example \"WOOD\", \"ROCK\", \"GOLD\";\n\t`ram_payer` - account who will pay for ram used for table creation;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "regauthor", + "type": "regauthor", + "ricardian_contract": "## ACTION NAME: regauthor\n\n\t### INTENT\n\tNew Author registration. Action is not mandatory. Markets *may* choose to use information here \n\tto display info about the author, and to follow specifications expressed here for displaying asset fields.\n\n\t### Input parameters:\n\t`author` -\tauthors account who will create assets;\n\t`data` - stringified json. Recommendations to include: game, company, logo, url, desc;\n\t`stemplate` - stringified json with key:state values, where key is key from mdata or idata and \n\t\t\t\t\tstate indicates recommended way of displaying field: \n\t\t\t\t\turl, img, webgl, mp3, video, hide (ie. don't display), etc.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "transfer", + "type": "transfer", + "ricardian_contract": "## ACTION NAME: transfer\n\n\t### INTENT\n\tThis actions transfers an asset. On transfer owner asset's and scope asset's changes to {{to}}'s.\n\tSenders RAM will be charged to transfer asset.\n\tTransfer will fail if asset is offered for claim or is delegated.\n\n\t### Input parameters:\n\t`from` - account who sends the asset;\n\t`to` - account of receiver;\n\t`assetids` - array of assetid's to transfer;\n\t`memo` - transfers comment;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "transferf", + "type": "transferf", + "ricardian_contract": "## ACTION NAME: transferf\n\tThis actions transfers an fungible token.\n\n\t### INTENT\n\tThis actions transfers a specified quantity of fungible tokens.\n\n\t### Input parameters:\n\t`from` - account who sends the token;\n\t`to` - account of receiver;\n\t`author` - account of fungible token author;\n\t`quantity` - amount to transfer, example \"1.00 WOOD\";\n\t`memo` - transfers comment;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "undelegate", + "type": "undelegate", + "ricardian_contract": "## ACTION NAME: undelegate\n\n\t### INTENT\n\tUndelegates an asset from {{from}} account. Executing action by real owner will return asset immediately,\n\tand the entry in the delegates table recording the borrowing will be erased.\n\n\t### Input parameters:\n\t`owner` - real asset owner account;\n\t`from` - current account owner (borrower);\n\t`assetids` - array of assetid's to undelegate;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "update", + "type": "update", + "ricardian_contract": "## ACTION NAME: update\n\n\t### INTENT\n\tUpdate assets mutable data (mdata) field. Action is available only for authors.\n\n\t### Input parameters:\n\t`author` - authors account;\n\t`owner` - current assets owner;\n\t`assetid` - assetid to update;\n\t`mdata` - stringified json with mutable assets data. All mdata will be replaced;\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "updatef", + "type": "updatef", + "ricardian_contract": "## ACTION NAME: updatef\n\n\t### INTENT\n\tUpdate the data field of a fungible token.\n\n\t### Input parameters:\n\t`author` - fungible token author;\n\t`sym` - fingible token symbol (\"GOLD\", \"WOOD\", etc.)\n\t`data` - stringify json (recommend including keys `img` and `name` for better displaying by markets)\n\t\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + }, + { + "name": "updatever", + "type": "updatever", + "ricardian_contract": "## ACTION NAME: updatever (internal)" + }, + { + "name": "delegatemore", + "type": "delegatemore", + "ricardian_contract": "## ACTION NAME: delegatemore\n\n\t### INTENT\n\tExtend period of delegated asset. \n\n\t### Input parameters:\n\t`owner` - real asset owner account;\n\t`assetids` - assetid's to extend period;\n\t`period` - time in seconds that the asset will be lent. Lender cannot undelegate until \n\t\t\t\t the period expires, however the receiver can transfer back at any time.\n\n\t### TERM\n\tThis Contract expires at the conclusion of code execution.\n\n\tby CryptoLions [ https://cryptolions.io ]" + } + ], + "tables": [ + { + "name": "accounts", + "type": "account", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "authors", + "type": "sauthor", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "delegates", + "type": "sdelegate", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "global", + "type": "global", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "offerfs", + "type": "sofferf", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "offers", + "type": "soffer", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "sassets", + "type": "sasset", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "stat", + "type": "currency_stats", + "index_type": "i64", + "key_names": [], + "key_types": [] + }, + { + "name": "tokenconfigs", + "type": "tokenconfigs", + "index_type": "i64", + "key_names": [], + "key_types": [] + } + ], + "ricardian_clauses": [ + { + "id": "Warranty", + "body": "The invoker of the contract action shall uphold its Obligations under this Contract in a timely and workmanlike manner, using knowledge and recommendations for performing the services which meet generally acceptable standards set forth by EOS.IO Blockchain Block Producers." + }, + { + "id": "Default", + "body": "The occurrence of any of the following shall constitute a material default under this Contract:" + }, + { + "id": "Remedies", + "body": "In addition to any and all other rights a party may have available according to law, if a party defaults by failing to substantially perform any provision, term or condition of this Contract, the other party may terminate the Contract by providing written notice to the defaulting party. This notice shall describe with sufficient detail the nature of the default. The party receiving such notice shall promptly be removed from being a Block Producer and this Contract shall be automatically terminated." + }, + { + "id": "ForceMajeure", + "body": "If performance of this Contract or any obligation under this Contract is prevented, restricted, or interfered with by causes beyond either party's reasonable control (\"Force Majeure\"), and if the party unable to carry out its obligations gives the other party prompt written notice of such event, then the obligations of the party invoking this provision shall be suspended to the extent necessary by such event. The term Force Majeure shall include, without limitation, acts of God, fire, explosion, vandalism, storm or other similar occurrence, orders or acts of military or civil authority, or by national emergencies, insurrections, riots, or wars, or strikes, lock-outs, work stoppages, or supplier failures. The excused party shall use reasonable efforts under the circumstances to avoid or remove such causes of non-performance and shall proceed to perform with reasonable dispatch whenever such causes are removed or ceased. An act or omission shall be deemed within the reasonable control of a party if committed, omitted, or caused by such party, or its employees, officers, agents, or affiliates." + }, + { + "id": "DisputeResolution", + "body": "Any controversies or disputes arising out of or relating to this Contract will be resolved by binding arbitration under the default rules set forth by the EOS.IO Blockchain. The arbitrator's award will be final, and judgment may be entered upon it by any court having proper jurisdiction." + }, + { + "id": "EntireAgreement", + "body": "This Contract contains the entire agreement of the parties, and there are no other promises or conditions in any other agreement whether oral or written concerning the subject matter of this Contract. This Contract supersedes any prior written or oral agreements between the parties." + }, + { + "id": "Severability", + "body": "If any provision of this Contract will be held to be invalid or unenforceable for any reason, the remaining provisions will continue to be valid and enforceable. If a court finds that any provision of this Contract is invalid or unenforceable, but that by limiting such provision it would become valid and enforceable, then such provision will be deemed to be written, construed, and enforced as so limited." + }, + { + "id": "Amendment", + "body": "This Contract may be modified or amended in writing by mutual agreement between the parties, if the writing is signed by the party obligated under the amendment." + }, + { + "id": "GoverningLaw", + "body": "This Contract shall be construed in accordance with the Maxims of Equity." + }, + { + "id": "Notice", + "body": "Any notice or communication required or permitted under this Contract shall be sufficiently given if delivered to a verifiable email address or to such other email address as one party may have publicly furnished in writing, or published on a broadcast contract provided by this blockchain for purposes of providing notices of this type." + }, + { + "id": "WaiverOfContractualRight", + "body": "The failure of either party to enforce any provision of this Contract shall not be construed as a waiver or limitation of that party's right to subsequently enforce and compel strict compliance with every provision of this Contract." + }, + { + "id": "ArbitratorsFees_", + "body": "In any action arising hereunder or any separate action pertaining to the validity of this Agreement, both sides shall pay half the initial cost of arbitration, and the prevailing party shall be awarded reasonable arbitrator's fees and costs." + }, + { + "id": "ConstructionAndInterpretation", + "body": "The rule requiring construction or interpretation against the drafter is waived. The document shall be deemed as if it were drafted by both parties in a mutual effort." + }, + { + "id": "InWitnessWhereof", + "body": "In witness whereof, the parties hereto have caused this Agreement to be executed by themselves or their duly authorized representatives as of the date of execution, and authorized as proven by the cryptographic signature on the transaction that invokes this contract." + } + ], + "variants": [], + "abi_extensions": [] } \ No newline at end of file diff --git a/build/SimpleAssets/SimpleAssets.wasm b/build/SimpleAssets/SimpleAssets.wasm index ae37579..5269595 100755 Binary files a/build/SimpleAssets/SimpleAssets.wasm and b/build/SimpleAssets/SimpleAssets.wasm differ diff --git a/include/SimpleAssets.hpp b/include/SimpleAssets.hpp index 63014db..014bbf6 100644 --- a/include/SimpleAssets.hpp +++ b/include/SimpleAssets.hpp @@ -59,9 +59,24 @@ CONTRACT SimpleAssets : public contract{ * @param stemplate is stringified json with key:state values, where key is key from mdata or idata and * state indicates recommended way of displaying field: * url, img, webgl, mp3, video, hide (ie. don't display), etc. + * @param imgpriority is json with assosiation category with tipe of image or video + * Example EOS:img, USD:mp3, KOLOBOK:webglb + * types of image + * txt - default + * url - show as clickable URL + * img - link to img file + * webgl - link to webgl file + * mp3 - link to mp3 file + * video - link to video file + * hide - do not show + * imgb - image as string in binary format + * webglb - webgl binary + * mp3b - mp3 binary + * videob - video binary + * * @return no return value */ - ACTION regauthor( name author, string data, string stemplate ); + ACTION regauthor( name author, string data, string stemplate, string imgpriority ); using regauthor_action = action_wrapper< "regauthor"_n, &SimpleAssets::regauthor >; /* @@ -76,9 +91,24 @@ CONTRACT SimpleAssets : public contract{ * @param stemplate is stringified json with key:state values, where key is key from mdata or idata and * state indicates recommended way of displaying field: * url, img, webgl, mp3, video, hide (ie. don't display), etc. + * @param imgpriority is json with assosiation category with tipe of image or video + * Example EOS:img, USD:mp3, KOLOBOK:webglb + * types of image + * txt - default + * url - show as clickable URL + * img - link to img file + * webgl - link to webgl file + * mp3 - link to mp3 file + * video - link to video file + * hide - do not show + * imgb - image as string in binary format + * webglb - webgl binary + * mp3b - mp3 binary + * videob - video binary + * * @return no return value. */ - ACTION authorupdate( name author, string data, string stemplate ); + ACTION authorupdate( name author, string data, string stemplate, string imgpriority ); using authorupdate_action = action_wrapper< "authorupdate"_n, &SimpleAssets::authorupdate >; /* @@ -517,6 +547,7 @@ CONTRACT SimpleAssets : public contract{ name author; string data; string stemplate; + string imgpriority; auto primary_key() const { return author.value; diff --git a/src/SimpleAssets.cpp b/src/SimpleAssets.cpp index dfb2b16..0fbc0e1 100644 --- a/src/SimpleAssets.cpp +++ b/src/SimpleAssets.cpp @@ -7,7 +7,7 @@ ACTION SimpleAssets::updatever( string version ) { configs.set( tokenconfigs{ "simpleassets"_n, version }, _self ); } -ACTION SimpleAssets::regauthor( name author, string data, string stemplate ) { +ACTION SimpleAssets::regauthor( name author, string data, string stemplate, string imgpriority ) { require_auth( author ); require_recipient( author ); @@ -19,6 +19,7 @@ ACTION SimpleAssets::regauthor( name author, string data, string stemplate ) { s.author = author; s.data = data; s.stemplate = stemplate; + s.imgpriority = imgpriority; }); } else { @@ -26,7 +27,7 @@ ACTION SimpleAssets::regauthor( name author, string data, string stemplate ) { } } -ACTION SimpleAssets::authorupdate( name author, string data, string stemplate ) { +ACTION SimpleAssets::authorupdate( name author, string data, string stemplate, string imgpriority ) { require_auth( author ); require_recipient( author ); @@ -41,6 +42,7 @@ ACTION SimpleAssets::authorupdate( name author, string data, string stemplate ) author_.modify( itr, author, [&]( auto& s ) { s.data = data; s.stemplate = stemplate; + s.imgpriority = imgpriority; }); } }