From 74e1fd6965510f0fc018383965511469953a7a13 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 29 Mar 2019 17:59:37 +0000 Subject: [PATCH] v0.3.2 --- README.md | 8 ++++++-- build/SimpleAssets/SimpleAssets.abi | 18 +++++++++++++----- build/SimpleAssets/SimpleAssets.wasm | Bin 94026 -> 94133 bytes include/SimpleAssets.hpp | 6 ++++-- ricardian/SimpleAssets.contracts.md | 7 ++++++- src/SimpleAssets.cpp | 8 +++----- 6 files changed, 32 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 47d7198..f698eb9 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,10 @@ There are two ways to use Simple Assets: 2) Dapps can Deploy their own copy of Simple Assets and make modifications to have greater control of functionality. We consider this an example of a dapp being its own "ownership authority." Before deploying, Simple Assets should be modified to prevent anyone from making assets. --------------------------- +# Change Log v0.3.2 +- Added `memo` parameter to action `offer`; +- Added `memo` parameter to action `delegate`; + # Change Log v0.3.1 - Internal action for NFT `createlog` added. Used by create action to log assetid so that third party explorers can easily get new asset ids and other information. - New singelton table `tokenconfigs` added. It helps external contracts parse actions and tables correctly (Usefull for decentralized exchanges, marketplaces and other contracts that use multiple tokens). @@ -89,14 +93,14 @@ https://github.com/CryptoLions/SimpleAssets/blob/master/include/SimpleAssets.hpp transfer (from, to , [assetid1,..,assetidn], memo) burn (owner, [assetid1,..,assetidn], memo) - offer (owner, newowner, [assetid1,..,assetidn]) + 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) + delegate (owner, to, [assetid1,..,assetidn], period, memo) undelegate (owner, from, [assetid1,..,assetidn]) diff --git a/build/SimpleAssets/SimpleAssets.abi b/build/SimpleAssets/SimpleAssets.abi index 3f9c779..b41a0e5 100644 --- a/build/SimpleAssets/SimpleAssets.abi +++ b/build/SimpleAssets/SimpleAssets.abi @@ -1,5 +1,5 @@ { - "____comment": "This file was generated with eosio-abigen. DO NOT EDIT Wed Mar 27 13:50:53 2019", + "____comment": "This file was generated with eosio-abigen. DO NOT EDIT Fri Mar 29 17:59:05 2019", "version": "eosio::abi/1.1", "structs": [ { @@ -243,6 +243,10 @@ { "name": "period", "type": "uint64" + }, + { + "name": "memo", + "type": "string" } ] }, @@ -305,6 +309,10 @@ { "name": "assetids", "type": "uint64[]" + }, + { + "name": "memo", + "type": "string" } ] }, @@ -602,12 +610,12 @@ { "name": "createlog", "type": "createlog", - "ricardian_contract": "" + "ricardian_contract": "## ACTION NAME: createlog (internal)" }, { "name": "delegate", "type": "delegate", - "ricardian_contract": "## ACTION NAME: delegate\n\n ### INTENT\n\t\tDelegates asset to {{to}}. This action changes the asset owner by calling the transfer action.\n\t\tIt also adds a record in the delegates table to record the asset as borrowed. This blocks\n\t\tthe asset from all owner actions (transfers, offers, burning by borrower).\n\n ### Input parameters:\n\t\t`owner` - current asset owner account;\n\t\t`to` - borrower account name;\n\t\t`assetids` - array of assetid's to delegate;\n\t\t`period` - time in seconds that the asset will be lent. Lender cannot undelegate until \n\t\t the period expires, however the receiver can transfer back at any time.\n\n ### TERM\n This Contract expires at the conclusion of code execution.\n\n by CryptoLions [ https://cryptolions.io ]" + "ricardian_contract": "## ACTION NAME: delegate\n\n ### INTENT\n\t\tDelegates asset to {{to}}. This action changes the asset owner by calling the transfer action.\n\t\tIt also adds a record in the delegates table to record the asset as borrowed. This blocks\n\t\tthe asset from all owner actions (transfers, offers, burning by borrower).\n\n ### Input parameters:\n\t\t`owner` - current asset owner account;\n\t\t`to` - borrower account name;\n\t\t`assetids` - array of assetid's to delegate;\n\t\t`period` - time in seconds that the asset will be lent. Lender cannot undelegate until \n\t\t the period expires, however the receiver can transfer back at any time.\n\t\t`memo` - memo for delegate action\n\n ### TERM\n This Contract expires at the conclusion of code execution.\n\n by CryptoLions [ https://cryptolions.io ]" }, { "name": "issuef", @@ -617,7 +625,7 @@ { "name": "offer", "type": "offer", - "ricardian_contract": "## ACTION NAME: offer\n\n ### INTENT\n\t\tOffer asset for claim. This is an alternative to the transfer action. Offer can be used by an \n\t\tasset owner to transfer the asset without using their RAM. After an offer is made, the account\n\t\tspecified in {{newowner}} is able to make a claim, and take control of the asset using their RAM.\n\t\tOffer action is not available if an asste is delegated (borrowed).\n\n ### Input parameters:\n\t\t`owner` - current asset owner account;\n\t\t`newowner` - new asset owner, who will able to claim;\n\t\t`assetids` - array of assetid's to offer;\n\n ### TERM\n This Contract expires at the conclusion of code execution.\n\n by CryptoLions [ https://cryptolions.io ]" + "ricardian_contract": "## ACTION NAME: offer\n\n ### INTENT\n\t\tOffer asset for claim. This is an alternative to the transfer action. Offer can be used by an \n\t\tasset owner to transfer the asset without using their RAM. After an offer is made, the account\n\t\tspecified in {{newowner}} is able to make a claim, and take control of the asset using their RAM.\n\t\tOffer action is not available if an asste is delegated (borrowed).\n\n ### Input parameters:\n\t\t`owner` - current asset owner account;\n\t\t`newowner` - new asset owner, who will able to claim;\n\t\t`assetids` - array of assetid's to offer;\n\t\t`memo` - memo for offer action\n\n ### TERM\n This Contract expires at the conclusion of code execution.\n\n by CryptoLions [ https://cryptolions.io ]" }, { "name": "openf", @@ -652,7 +660,7 @@ { "name": "updatever", "type": "updatever", - "ricardian_contract": "" + "ricardian_contract": "## ACTION NAME: updatever (internal)" } ], "tables": [ diff --git a/build/SimpleAssets/SimpleAssets.wasm b/build/SimpleAssets/SimpleAssets.wasm index 85fde4e8040f2de0f598274b257d824dbf597455..4b0a9915415fb64033ec6f9177f12a3219e12438 100755 GIT binary patch delta 8549 zcmbVS3wTu3wLa^dd1W5SNeCf?5cW)7LwF^CNdUd(pa>#VP+Oq=Fb0y48Inmz1`4e@ z(b8&dZ-pG`k=iO0+o^w0h8`9Y$9*-j;iOsy%lCcCp~)#^xR zQ+;RC@<>OdDHc}(Jg+Zb-Pwr|&o@QZG<7OjJnd^-Rv&9x8?TR4PgQiD@k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@@ CONTRACT SimpleAssets : public contract { * owner - current asset owner account; * newowner - new asset owner, who will able to claim; * assetids - array of assetid's to offer + * memo - memo for offer action */ - ACTION offer( name owner, name newowner, std::vector& assetids); + ACTION offer( name owner, name newowner, std::vector& assetids, string memo); using offer_action = action_wrapper<"offer"_n, &SimpleAssets::offer>; @@ -187,8 +188,9 @@ CONTRACT SimpleAssets : public contract { * assetids - array of assetid's to delegate; * 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. + * memo - memo for delegate action */ - ACTION delegate( name owner, name to, std::vector& assetids, uint64_t period ); + ACTION delegate( name owner, name to, std::vector& assetids, uint64_t period, string memo ); using delegate_action = action_wrapper<"delegate"_n, &SimpleAssets::delegate>; diff --git a/ricardian/SimpleAssets.contracts.md b/ricardian/SimpleAssets.contracts.md index 2dc172c..decf067 100644 --- a/ricardian/SimpleAssets.contracts.md +++ b/ricardian/SimpleAssets.contracts.md @@ -135,6 +135,7 @@ `owner` - current asset owner account; `newowner` - new asset owner, who will able to claim; `assetids` - array of assetid's to offer; + `memo` - memo for offer action ### TERM This Contract expires at the conclusion of code execution. @@ -193,6 +194,7 @@ `assetids` - array of assetid's to delegate; `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. + `memo` - memo for delegate action ### TERM This Contract expires at the conclusion of code execution. @@ -327,6 +329,9 @@ by CryptoLions [ https://cryptolions.io ] - +

updatever

+## ACTION NAME: updatever (internal) +

createlog

+## ACTION NAME: createlog (internal) diff --git a/src/SimpleAssets.cpp b/src/SimpleAssets.cpp index 64fe760..f36e55a 100644 --- a/src/SimpleAssets.cpp +++ b/src/SimpleAssets.cpp @@ -262,7 +262,7 @@ ACTION SimpleAssets::update( name author, name owner, uint64_t assetid, string m } -ACTION SimpleAssets::offer( name owner, name newowner, std::vector& assetids){ +ACTION SimpleAssets::offer( name owner, name newowner, std::vector& assetids, string memo){ require_auth( owner ); require_recipient( owner ); @@ -356,7 +356,7 @@ ACTION SimpleAssets::burn( name owner, std::vector& assetids, string m } -ACTION SimpleAssets::delegate( name owner, name to, std::vector& assetids, uint64_t period ){ +ACTION SimpleAssets::delegate( name owner, name to, std::vector& assetids, uint64_t period, string memo ){ require_auth( owner ); require_recipient( owner ); @@ -390,11 +390,9 @@ ACTION SimpleAssets::delegate( name owner, name to, std::vector& asset s.period = period; }); - if (i != 0) assetidsmemo += ", "; - assetidsmemo += std::to_string(assetid); } - SEND_INLINE_ACTION( *this, transfer, { {owner, "active"_n} }, { owner, to, assetids, "delegate assetids: "+ assetidsmemo} ); + SEND_INLINE_ACTION( *this, transfer, { {owner, "active"_n} }, { owner, to, assetids, memo} ); }