We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expect your header file to be imported by other smart contracts
I've created a simplified .hpp because your original header file had too much unnecessary overhead
.hpp
Any logic that is used for private use case should be removed from the header files.
Would be useful to provide both an "advanced" & "basic" .hpp header files (basic wouldn't be used to compile contract, only for importing purposes)
delphioracle.hpp
#pragma once #include <eosio/eosio.hpp> #include <eosio/system.hpp> #include <eosio/time.hpp> #include <string> using namespace eosio; using namespace std; class [[eosio::contract("delphioracle")]] delphioracle : public contract { public: using contract::contract; [[eosio::action]] void set( const eosio::name scope, const uint64_t value ); //Holds the last datapoints_count datapoints from qualified oracles struct [[eosio::table]] datapoints { uint64_t id; name owner; uint64_t value; uint64_t median; eosio::time_point timestamp; uint64_t primary_key() const {return id;} uint64_t by_timestamp() const {return timestamp.elapsed.to_seconds();} uint64_t by_value() const {return value;} }; typedef eosio::multi_index<"datapoints"_n, datapoints, indexed_by<"value"_n, const_mem_fun<datapoints, uint64_t, &datapoints::by_value>>, indexed_by<"timestamp"_n, const_mem_fun<datapoints, uint64_t, &datapoints::by_timestamp>>> datapointstable; };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expect your header file to be imported by other smart contracts
I've created a simplified
.hpp
because your original header file had too much unnecessary overheadAny logic that is used for private use case should be removed from the header files.
Would be useful to provide both an "advanced" & "basic" .hpp header files (basic wouldn't be used to compile contract, only for importing purposes)
Simple -
delphioracle.hpp
The text was updated successfully, but these errors were encountered: