history-tools icon indicating copy to clipboard operation
history-tools copied to clipboard

Does the balance-snapshot example work?

Open nmw4 opened this issue 4 years ago • 1 comments

When I try to build the wasm file for balance.snap-server.hpp, I first have to change the file name to balance.snap-server.cpp as it will tell me that hpp.o: The file was not recognized as a valid object file

the second thing if I change it to a .cpp file I get the error that the struct action is already defined in ..contracts/eosio/action.hpp and redefined in history-tools/libraries/eosiolib/wasmql/eosio/database.hpp

also after I build the history-tools, I can't find where I can execute wasm-ql-pg (no file like this exists)

all the errors I get when I try to build the example:

`/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../contracts/eosio/action.hpp:255:11: error: redefinition of 'action' struct action { ^

/root/history-tools/libraries/eosiolib/wasmql/eosio/database.hpp:121:8: note: previous definition is here struct action { ^

In file included from /root/history-tools/balance-example/balance.snap-server.cpp:4: In file included from /usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/multi_index.hpp:7: /usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../contracts/eosio/action.hpp:536:51: error: no member named 'send' in 'eosio::action' action( perms, code, act, std::move(args) ).send(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^

/root/history-tools/balance-example/balance.snap-server.cpp:25:32: error: no viable conversion from 'uint64_t' (aka 'unsigned long long') to 'eosio::name' .scope = "eosio"_n.value, ^~~~~~~~~~~~~~~

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'uint64_t' (aka 'unsigned long long') to 'const eosio::name &' for 1st argument struct name { ^

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'uint64_t' (aka 'unsigned long long') to 'eosio::name &&' for 1st argument /root/history-tools/balance-example/balance.snap-server.cpp:32:32: error: no viable conversion from 'uint64_t' (aka 'unsigned long long') to 'eosio::name' .scope = "eosio"_n.value, ^~~~~~~~~~~~~~~

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'uint64_t' (aka 'unsigned long long') to 'const eosio::name &' for 1st argument struct name { ^

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'uint64_t' (aka 'unsigned long long') to 'eosio::name &&' for 1st argument /root/history-tools/balance-example/balance.snap-server.cpp:65:32: error: no viable conversion from 'uint64_t' (aka 'unsigned long long') to 'eosio::name' .scope = req.first_account.value, ^~~~~~~~~~~~~~~~~~~~~~~

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'uint64_t' (aka 'unsigned long long') to 'const eosio::name &' for 1st argument struct name { ^

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'uint64_t' (aka 'unsigned long long') to 'eosio::name &&' for 1st argument /root/history-tools/balance-example/balance.snap-server.cpp:72:32: error: no viable conversion from 'unsigned long long' to 'eosio::name' .scope = 0xffff'ffff'ffff'ffff, ^~~~~~~~~~~~~~~~~~~~~

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'unsigned long long' to 'const eosio::name &' for 1st argument struct name { ^

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'unsigned long long' to 'eosio::name &&' for 1st argument /root/history-tools/balance-example/balance.snap-server.cpp:100:32: error: no viable conversion from 'uint64_t' (aka 'unsigned long long') to 'eosio::name' .scope = "eosio"_n.value, ^~~~~~~~~~~~~~~

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'uint64_t' (aka 'unsigned long long') to 'const eosio::name &' for 1st argument struct name { ^

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'uint64_t' (aka 'unsigned long long') to 'eosio::name &&' for 1st argument /root/history-tools/balance-example/balance.snap-server.cpp:107:32: error: no viable conversion from 'uint64_t' (aka 'unsigned long long') to 'eosio::name' .scope = "eosio"_n.value, ^~~~~~~~~~~~~~~

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'uint64_t' (aka 'unsigned long long') to 'const eosio::name &' for 1st argument struct name { ^

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'uint64_t' (aka 'unsigned long long') to 'eosio::name &&' for 1st argument /root/history-tools/balance-example/balance.snap-server.cpp:136:32: error: no viable conversion from 'uint64_t' (aka 'unsigned long long') to 'eosio::name' .scope = req.first_account.value, ^~~~~~~~~~~~~~~~~~~~~~~

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'uint64_t' (aka 'unsigned long long') to 'const eosio::name &' for 1st argument struct name { ^

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'uint64_t' (aka 'unsigned long long') to 'eosio::name &&' for 1st argument /root/history-tools/balance-example/balance.snap-server.cpp:143:32: error: no viable conversion from 'unsigned long long' to 'eosio::name' .scope = 0xffff'ffff'ffff'ffff, ^~~~~~~~~~~~~~~~~~~~~

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'unsigned long long' to 'const eosio::name &' for 1st argument struct name { ^

/usr/opt/eosio.cdt/1.6.2/bin/../include/eosiolib/contracts/eosio/../../core/eosio/name.hpp:35:11: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'unsigned long long' to 'eosio::name &&' for 1st argument 10 errors generated. `

error

nmw4 avatar Aug 22 '20 14:08 nmw4

It looks like I forgot to include the .cpp files in the documentation. They probably no longer exist.

tbfleming avatar Aug 25 '20 13:08 tbfleming