From ce59f588f2d6bd783abf830c6ae1e4b5d8c262ef Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 23 Dec 2020 23:37:33 -0600 Subject: [PATCH 1/8] Added fio.escrow contract. Added to root CMakeLists.txt and subfolder. --- contracts/CMakeLists.txt | 1 + contracts/fio.escrow/CMakeLists.txt | 11 +++++++++++ contracts/fio.escrow/fio.escrow.cpp | 17 +++++++++++++++++ contracts/fio.escrow/fio.escrow.hpp | 0 4 files changed, 29 insertions(+) create mode 100644 contracts/fio.escrow/CMakeLists.txt create mode 100644 contracts/fio.escrow/fio.escrow.cpp create mode 100644 contracts/fio.escrow/fio.escrow.hpp diff --git a/contracts/CMakeLists.txt b/contracts/CMakeLists.txt index c00a31f3..500a0a12 100644 --- a/contracts/CMakeLists.txt +++ b/contracts/CMakeLists.txt @@ -15,3 +15,4 @@ add_subdirectory(fio.fee) add_subdirectory(fio.request.obt) add_subdirectory(fio.tpid) add_subdirectory(fio.treasury) +add_subdirectory(fio.escrow) diff --git a/contracts/fio.escrow/CMakeLists.txt b/contracts/fio.escrow/CMakeLists.txt new file mode 100644 index 00000000..842ab7c5 --- /dev/null +++ b/contracts/fio.escrow/CMakeLists.txt @@ -0,0 +1,11 @@ +add_contract(fio.escrow fio.escrow fio.escrow.cpp) + +target_include_directories(fio.escrow + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/../ + ${CMAKE_CURRENT_SOURCE_DIR}/../fio.system/include + ) + +set_target_properties(fio.escrow + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") diff --git a/contracts/fio.escrow/fio.escrow.cpp b/contracts/fio.escrow/fio.escrow.cpp new file mode 100644 index 00000000..77b3670f --- /dev/null +++ b/contracts/fio.escrow/fio.escrow.cpp @@ -0,0 +1,17 @@ +#include + +namespace fioio { + + class [[eosio::contract("FioEscrow")]] FioEscrow : public eosio::contract { + [[eosio::action]] + void hi(name nm) { + print_f("Name : %\n", nm); + } + + [[eosio::action]] + void check(name nm) { + print_f("Name : %\n", nm); + eosio::check(nm == "hello"_n, "check name not equal to `hello`"); + } + }; +} \ No newline at end of file diff --git a/contracts/fio.escrow/fio.escrow.hpp b/contracts/fio.escrow/fio.escrow.hpp new file mode 100644 index 00000000..e69de29b From 26f5660382aa2bf1f8b749e418dac5cd1b85529a Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 2 Jan 2021 21:46:14 -0600 Subject: [PATCH 2/8] updates to fio.escrow and added fio.templete example code. --- contracts/CMakeLists.txt | 4 +++ contracts/fio.escrow/CMakeLists.txt | 2 +- contracts/fio.escrow/fio.escrow.cpp | 23 ++++++++++----- contracts/fio.escrow/fio.escrow.hpp | 4 +++ contracts/fio.templete/CMakeLists.txt | 12 ++++++++ contracts/fio.templete/fio.templete.cpp | 31 +++++++++++++++++++++ contracts/fio.templete/fio.templete.hpp | 37 +++++++++++++++++++++++++ 7 files changed, 105 insertions(+), 8 deletions(-) create mode 100644 contracts/fio.templete/CMakeLists.txt create mode 100644 contracts/fio.templete/fio.templete.cpp create mode 100644 contracts/fio.templete/fio.templete.hpp diff --git a/contracts/CMakeLists.txt b/contracts/CMakeLists.txt index 500a0a12..c6f9ca0b 100644 --- a/contracts/CMakeLists.txt +++ b/contracts/CMakeLists.txt @@ -15,4 +15,8 @@ add_subdirectory(fio.fee) add_subdirectory(fio.request.obt) add_subdirectory(fio.tpid) add_subdirectory(fio.treasury) + +add_subdirectory(fio.templete) + add_subdirectory(fio.escrow) + diff --git a/contracts/fio.escrow/CMakeLists.txt b/contracts/fio.escrow/CMakeLists.txt index 842ab7c5..4ec8039a 100644 --- a/contracts/fio.escrow/CMakeLists.txt +++ b/contracts/fio.escrow/CMakeLists.txt @@ -1,4 +1,4 @@ -add_contract(fio.escrow fio.escrow fio.escrow.cpp) +add_contract(fio.escrow fio.escrow ${CMAKE_CURRENT_SOURCE_DIR}/fio.escrow.cpp) target_include_directories(fio.escrow PUBLIC diff --git a/contracts/fio.escrow/fio.escrow.cpp b/contracts/fio.escrow/fio.escrow.cpp index 77b3670f..e4a7b22a 100644 --- a/contracts/fio.escrow/fio.escrow.cpp +++ b/contracts/fio.escrow/fio.escrow.cpp @@ -1,17 +1,26 @@ -#include +#include "fio.escrow.hpp" namespace fioio { - class [[eosio::contract("FioEscrow")]] FioEscrow : public eosio::contract { - [[eosio::action]] - void hi(name nm) { - print_f("Name : %\n", nm); + class [[eosio::contract("FioEscrow")]] FioEscrow : public eosio::contract { + public: + using contract::contract; + + FioEscrow(name s, name code, datastream ds) : + contract(s, code, ds) { } [[eosio::action]] - void check(name nm) { + void hi(name nm) { print_f("Name : %\n", nm); - eosio::check(nm == "hello"_n, "check name not equal to `hello`"); } + +// [[eosio::action]] +// void check(name nm) { +// print_f("Name : %\n", nm); +// eosio::check(nm == "hello"_n, "check name not equal to `hello`"); +// } }; + + EOSIO_DISPATCH(FioEscrow, (hi)) } \ No newline at end of file diff --git a/contracts/fio.escrow/fio.escrow.hpp b/contracts/fio.escrow/fio.escrow.hpp index e69de29b..a85ba923 100644 --- a/contracts/fio.escrow/fio.escrow.hpp +++ b/contracts/fio.escrow/fio.escrow.hpp @@ -0,0 +1,4 @@ +#include +#include +#include +#include \ No newline at end of file diff --git a/contracts/fio.templete/CMakeLists.txt b/contracts/fio.templete/CMakeLists.txt new file mode 100644 index 00000000..85fe06b0 --- /dev/null +++ b/contracts/fio.templete/CMakeLists.txt @@ -0,0 +1,12 @@ +add_contract(fio.templete fio.templete ${CMAKE_CURRENT_SOURCE_DIR}/fio.templete.cpp) + +target_include_directories(fio.templete + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../fio.system/include + ${CMAKE_CURRENT_SOURCE_DIR}/../ + ) + +set_target_properties(fio.templete + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") \ No newline at end of file diff --git a/contracts/fio.templete/fio.templete.cpp b/contracts/fio.templete/fio.templete.cpp new file mode 100644 index 00000000..ae1b53b6 --- /dev/null +++ b/contracts/fio.templete/fio.templete.cpp @@ -0,0 +1,31 @@ +/** Fio Templete implementation file + * Description: + * @author Casey Gardiner + * @modifedby + * @file fio.templete.cpp + * @license FIO Foundation ( https://github.com/fioprotocol/fio/blob/master/LICENSE ) Dapix + */ + +#include "fio.templete.hpp" + +namespace fioio { + + class [[eosio::contract("FIOTemplete")]] FIOTemplete: public eosio::contract { + + private: + // Table Reference Go Here + public: + using contract::contract; + + FIOTemplete(name s, name code, datastream ds) : + contract(s, code, ds){ + } + + [[eosio::action]] + void tempfunction1(const string &tpid, const name owner, const uint64_t &amount) { + print("temp function 1"); + } + }; //class FIOTemplete + + EOSIO_DISPATCH(FIOTemplete, (tempfunction1)) +} \ No newline at end of file diff --git a/contracts/fio.templete/fio.templete.hpp b/contracts/fio.templete/fio.templete.hpp new file mode 100644 index 00000000..0423dc14 --- /dev/null +++ b/contracts/fio.templete/fio.templete.hpp @@ -0,0 +1,37 @@ +/** Fio Templete implementation file + * Description: + * @author Casey Gardiner + * @modifedby + * @file fio.templete.cpp + * @license FIO Foundation ( https://github.com/fioprotocol/fio/blob/master/LICENSE ) Dapix + */ + +#pragma once + +#include +#include +#include +#include + +namespace fioio { + using namespace eosio; + + // @abi table templete i64 +// struct [[eosio::action]] templete { +// +// uint64_t id; +// uint128_t fioaddhash; +// string fioaddress; +// uint64_t tempvar; +// +// uint64_t primary_key() const { return id; } +// uint128_t by_name() const { return fioaddhash; } +// +// EOSLIB_SERIALIZE(templete, (id)(fioaddhash)(fioaddress)(tempvar) +// ) +// }; +// +// typedef multi_index<"templetes"_n, templete, +// indexed_by<"byname"_n, const_mem_fun < templete, uint128_t, &templete::by_name>>> +// templetes_table; +} \ No newline at end of file From 450f773bede482205809fd77e744cb770607721f Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 5 Jan 2021 12:27:07 -0600 Subject: [PATCH 3/8] abi file --- contracts/fio.escrow/fio.escrow.abi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 contracts/fio.escrow/fio.escrow.abi diff --git a/contracts/fio.escrow/fio.escrow.abi b/contracts/fio.escrow/fio.escrow.abi new file mode 100644 index 00000000..dd058193 --- /dev/null +++ b/contracts/fio.escrow/fio.escrow.abi @@ -0,0 +1,15 @@ +{ + "____comment": "This file was generated with eosio-abigen. DO NOT EDIT Thu Dec 31 03:35:08 2020", + "version": "eosio::abi/1.1", + "structs": [], + "types": [], + "actions": [{ + "name": "hi", + "type": "hi", + "ricardian_contract": "" + }], + "tables": [], + "ricardian_clauses": [], + "variants": [], + "abi_extensions": [] +} From c91030278f82dcb75022a3b5f9134d81bba0d424 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 7 Jan 2021 18:01:49 -0600 Subject: [PATCH 4/8] added constant and then to the setabi whitelist --- contracts/fio.common/fio.accounts.hpp | 43 +++++++++++++------------ contracts/fio.system/src/fio.system.cpp | 1 + 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/contracts/fio.common/fio.accounts.hpp b/contracts/fio.common/fio.accounts.hpp index 703c1af1..7cc87120 100644 --- a/contracts/fio.common/fio.accounts.hpp +++ b/contracts/fio.common/fio.accounts.hpp @@ -13,31 +13,32 @@ namespace fioio { using eosio::name; - static const name MSIGACCOUNT = name("eosio.msig"); - static const name WRAPACCOUNT = name("eosio.wrap"); - static const name SYSTEMACCOUNT = name("eosio"); - static const name ASSERTACCOUNT = name("eosio.assert"); + static const name MSIGACCOUNT = name("eosio.msig"); + static const name WRAPACCOUNT = name("eosio.wrap"); + static const name SYSTEMACCOUNT = name("eosio"); + static const name ASSERTACCOUNT = name("eosio.assert"); //these are legacy system account names from EOS, we might consider blocking these. - static const name BPAYACCOUNT = name("eosio.bpay"); - static const name NAMESACCOUNT = name("eosio.names"); - static const name RAMACCOUNT = name("eosio.ram"); - static const name RAMFEEACCOUNT = name("eosio.ramfee"); - static const name SAVINGACCOUNT = name("eosio.saving"); - static const name STAKEACCOUNT = name("eosio.stake"); - static const name VPAYACCOUNT = name("eosio.vpay"); - - - static const name REQOBTACCOUNT = name("fio.reqobt"); - static const name FeeContract = name("fio.fee"); - static const name AddressContract = name("fio.address"); - static const name TPIDContract = name("fio.tpid"); - static const name TokenContract = name("fio.token"); + static const name BPAYACCOUNT = name("eosio.bpay"); + static const name NAMESACCOUNT = name("eosio.names"); + static const name RAMACCOUNT = name("eosio.ram"); + static const name RAMFEEACCOUNT = name("eosio.ramfee"); + static const name SAVINGACCOUNT = name("eosio.saving"); + static const name STAKEACCOUNT = name("eosio.stake"); + static const name VPAYACCOUNT = name("eosio.vpay"); + + + static const name REQOBTACCOUNT = name("fio.reqobt"); + static const name FeeContract = name("fio.fee"); + static const name AddressContract = name("fio.address"); + static const name TPIDContract = name("fio.tpid"); + static const name TokenContract = name("fio.token"); static const name FOUNDATIONACCOUNT = name("tw4tjkmo4eyd"); - static const name TREASURYACCOUNT = name("fio.treasury"); - static const name FIOSYSTEMACCOUNT= name("fio.system"); - static const name FIOACCOUNT = name("fio"); + static const name TREASURYACCOUNT = name("fio.treasury"); + static const name FIOSYSTEMACCOUNT = name("fio.system"); + static const name FIOESCROW = name("fio.escrow"); + static const name FIOACCOUNT = name("fio"); static constexpr name FIOISSUER = name("eosio"_n); static constexpr eosio::symbol FIOSYMBOL = eosio::symbol("FIO", 9); diff --git a/contracts/fio.system/src/fio.system.cpp b/contracts/fio.system/src/fio.system.cpp index b32bc4f4..e3353ebc 100755 --- a/contracts/fio.system/src/fio.system.cpp +++ b/contracts/fio.system/src/fio.system.cpp @@ -174,6 +174,7 @@ namespace eosiosystem { acnt == TokenContract || acnt == TREASURYACCOUNT || acnt == FIOSYSTEMACCOUNT || + acnt == FIOESCROW || acnt == FIOACCOUNT),"set abi not permitted." ); From 41538cb14b5d15ca658be26b2e057ef76569053d Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 21 Apr 2022 11:39:07 -0500 Subject: [PATCH 5/8] add EscrowContract to permission list for `updatetpid` action. --- contracts/fio.tpid/fio.tpid.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/fio.tpid/fio.tpid.cpp b/contracts/fio.tpid/fio.tpid.cpp index 78ac0d69..c3718f0a 100644 --- a/contracts/fio.tpid/fio.tpid.cpp +++ b/contracts/fio.tpid/fio.tpid.cpp @@ -95,8 +95,8 @@ class [[eosio::contract("TPIDController")]] TPIDController: public eosio::contr void updatetpid(const string &tpid, const name owner, const uint64_t &amount) { eosio_assert(has_auth(AddressContract) || has_auth(TokenContract) || has_auth(TREASURYACCOUNT) || - has_auth(STAKINGACCOUNT) || has_auth("fio.reqobt"_n) || has_auth("eosio"_n), - "missing required authority of fio.address, fio.treasury, fio.token, eosio or fio.reqobt or fio.staking"); + has_auth(STAKINGACCOUNT) || has_auth("fio.reqobt"_n) || has_auth("eosio"_n) || has_auth(EscrowContract), + "missing required authority of fio.address, fio.treasury, fio.token, eosio, fio.reqobt, fio.staking or fio.escrow"); if (debugout) { print("update tpid calling updatetpid with tpid ", tpid, " owner ", owner, "\n"); } From 45fb0da29dd747d5fdc9492bfe489baa19542edb Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 21 Apr 2022 18:51:06 -0500 Subject: [PATCH 6/8] fixed bug verifying if a sale is valid. --- contracts/fio.escrow/fio.escrow.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/contracts/fio.escrow/fio.escrow.cpp b/contracts/fio.escrow/fio.escrow.cpp index 8dbdca4b..d0891127 100644 --- a/contracts/fio.escrow/fio.escrow.cpp +++ b/contracts/fio.escrow/fio.escrow.cpp @@ -196,6 +196,9 @@ namespace fioio { "E-Break Enabled, action disabled", ErrorNoWork); fio_400_assert(max_fee >= 0, "max_fee", to_string(max_fee), "Invalid fee value", ErrorMaxFeeInvalid); + fio_400_assert(validateTPIDFormat(tpid), "tpid", tpid, + "TPID must be empty or valid FIO address", + ErrorPubKeyValid); const uint128_t domainHash = string_to_uint128_hash(fio_domain.c_str()); @@ -296,11 +299,15 @@ namespace fioio { fio_400_assert(max_fee >= 0, "max_fee", to_string(max_fee), "Invalid fee value", ErrorMaxFeeInvalid); - const uint128_t domainHash = string_to_uint128_hash(fio_domain.c_str()); + fio_400_assert(validateTPIDFormat(tpid), "tpid", tpid, + "TPID must be empty or valid FIO address", + ErrorPubKeyValid); - auto domainsalesbydomain = domainsales.get_index<"bydomain"_n>(); - auto domainsale_iter = domainsalesbydomain.find(domainHash); - fio_400_assert(domainsale_iter != domainsalesbydomain.end(), "domainsale", fio_domain, +// const uint128_t domainHash = string_to_uint128_hash(fio_domain.c_str()); + + auto domainsale_iter = domainsales.find(sale_id); +// auto domainsale_iter = domainsalesbydomain.find(domainHash); + fio_400_assert(domainsale_iter != domainsales.end(), "domainsale", fio_domain, "Domain not found", ErrorDomainSaleNotFound); fio_400_assert(domainsale_iter->status == 1, "status", to_string(domainsale_iter->status), @@ -352,12 +359,12 @@ namespace fioio { ).send(); // domainsalesbydomain.erase(domainsale_iter); - domainsalesbydomain.modify(domainsale_iter, EscrowContract, [&](auto &row) { + domainsales.modify(domainsale_iter, EscrowContract, [&](auto &row) { row.status = 2; // status = 1: on sale, status = 2: Sold, status = 3; Cancelled row.date_updated = now(); }); - domainsale_iter = domainsalesbydomain.find(domainHash); + domainsale_iter = domainsales.find(sale_id); const uint128_t endpoint_hash = string_to_uint128_hash(LIST_DOMAIN_ENDPOINT); From 958ae7eb512ff1751910d8e57b1e0dab07a51751 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 21 Apr 2022 20:41:06 -0500 Subject: [PATCH 7/8] updated asserts to match updated logic --- contracts/fio.escrow/fio.escrow.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/contracts/fio.escrow/fio.escrow.cpp b/contracts/fio.escrow/fio.escrow.cpp index d0891127..a31d8d22 100644 --- a/contracts/fio.escrow/fio.escrow.cpp +++ b/contracts/fio.escrow/fio.escrow.cpp @@ -303,18 +303,17 @@ namespace fioio { "TPID must be empty or valid FIO address", ErrorPubKeyValid); -// const uint128_t domainHash = string_to_uint128_hash(fio_domain.c_str()); + const uint128_t domainHash = string_to_uint128_hash(fio_domain.c_str()); auto domainsale_iter = domainsales.find(sale_id); -// auto domainsale_iter = domainsalesbydomain.find(domainHash); - fio_400_assert(domainsale_iter != domainsales.end(), "domainsale", fio_domain, - "Domain not found", ErrorDomainSaleNotFound); + fio_400_assert(domainsale_iter != domainsales.end(), "sale_id", to_string(sale_id), + "Sale ID not found", ErrorDomainSaleNotFound); fio_400_assert(domainsale_iter->status == 1, "status", to_string(domainsale_iter->status), - "domain has already been bought or cancelled", ErrorNoWork); + "Domain has already been bought or cancelled", ErrorNoWork); - fio_400_assert(domainsale_iter->id == sale_id, "sale_id", to_string(sale_id), - "Sale ID does not match", ErrorDomainSaleNotFound); + fio_400_assert(domainsale_iter->domainhash == domainHash, "fio_domain", fio_domain.c_str(), + "Domain does not match",ErrorDomainSaleNotFound); auto saleprice = asset(domainsale_iter->sale_price, FIOSYMBOL); auto buyer_max_buy_price = asset(max_buy_price, FIOSYMBOL); @@ -358,7 +357,6 @@ namespace fioio { std::make_tuple(fio_domain, buyerAcct->clientkey, isTransferToEscrow, actor) ).send(); -// domainsalesbydomain.erase(domainsale_iter); domainsales.modify(domainsale_iter, EscrowContract, [&](auto &row) { row.status = 2; // status = 1: on sale, status = 2: Sold, status = 3; Cancelled row.date_updated = now(); From c5ccf465cbfca553440265759f12daa01312e810 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 22 Apr 2022 09:20:52 -0500 Subject: [PATCH 8/8] removing fio.templete --- contracts/fio.templete/CMakeLists.txt | 12 -------- contracts/fio.templete/fio.templete.cpp | 31 --------------------- contracts/fio.templete/fio.templete.hpp | 37 ------------------------- 3 files changed, 80 deletions(-) delete mode 100644 contracts/fio.templete/CMakeLists.txt delete mode 100644 contracts/fio.templete/fio.templete.cpp delete mode 100644 contracts/fio.templete/fio.templete.hpp diff --git a/contracts/fio.templete/CMakeLists.txt b/contracts/fio.templete/CMakeLists.txt deleted file mode 100644 index 85fe06b0..00000000 --- a/contracts/fio.templete/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -add_contract(fio.templete fio.templete ${CMAKE_CURRENT_SOURCE_DIR}/fio.templete.cpp) - -target_include_directories(fio.templete - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../fio.system/include - ${CMAKE_CURRENT_SOURCE_DIR}/../ - ) - -set_target_properties(fio.templete - PROPERTIES - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") \ No newline at end of file diff --git a/contracts/fio.templete/fio.templete.cpp b/contracts/fio.templete/fio.templete.cpp deleted file mode 100644 index ae1b53b6..00000000 --- a/contracts/fio.templete/fio.templete.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/** Fio Templete implementation file - * Description: - * @author Casey Gardiner - * @modifedby - * @file fio.templete.cpp - * @license FIO Foundation ( https://github.com/fioprotocol/fio/blob/master/LICENSE ) Dapix - */ - -#include "fio.templete.hpp" - -namespace fioio { - - class [[eosio::contract("FIOTemplete")]] FIOTemplete: public eosio::contract { - - private: - // Table Reference Go Here - public: - using contract::contract; - - FIOTemplete(name s, name code, datastream ds) : - contract(s, code, ds){ - } - - [[eosio::action]] - void tempfunction1(const string &tpid, const name owner, const uint64_t &amount) { - print("temp function 1"); - } - }; //class FIOTemplete - - EOSIO_DISPATCH(FIOTemplete, (tempfunction1)) -} \ No newline at end of file diff --git a/contracts/fio.templete/fio.templete.hpp b/contracts/fio.templete/fio.templete.hpp deleted file mode 100644 index 0423dc14..00000000 --- a/contracts/fio.templete/fio.templete.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/** Fio Templete implementation file - * Description: - * @author Casey Gardiner - * @modifedby - * @file fio.templete.cpp - * @license FIO Foundation ( https://github.com/fioprotocol/fio/blob/master/LICENSE ) Dapix - */ - -#pragma once - -#include -#include -#include -#include - -namespace fioio { - using namespace eosio; - - // @abi table templete i64 -// struct [[eosio::action]] templete { -// -// uint64_t id; -// uint128_t fioaddhash; -// string fioaddress; -// uint64_t tempvar; -// -// uint64_t primary_key() const { return id; } -// uint128_t by_name() const { return fioaddhash; } -// -// EOSLIB_SERIALIZE(templete, (id)(fioaddhash)(fioaddress)(tempvar) -// ) -// }; -// -// typedef multi_index<"templetes"_n, templete, -// indexed_by<"byname"_n, const_mem_fun < templete, uint128_t, &templete::by_name>>> -// templetes_table; -} \ No newline at end of file