New answers tagged

0

If you need to push multiple actions into one transaction, look at my answer .


1

I have created text file with the following inside: { "actions": [ { "account": "eosio", "name": "newaccount", "authorization": [ { "actor": "youraccount", "permission": "active", } ], "data": { "creator": "youraccount", "name": "yournewaccount", "owner": { ...


0

UPDATE: After doing some fiddling, here is what I learned (though an official explanation is nowhere to be found :/ ) : Let's say an account has 128 actions, then we make the following calls: <server>/v1/history/get_actions(<account_name>, pos=100, offset=-100) This gets us the earliest 100 actions. <server>/v1/history/get_actions(<...


0

It appears your actions are not wrapped in an array. Actions parameter needs to be an array of objects (actions). Try the adjusted format below. [{ "expiration": "2019-08-30T08:04:31.500", "ref_block_num": 47006097, "ref_block_prefix": 727977150, "context_free_actions": [], "actions": [{ "account": "...


1

Not recommended, but you can mimic default value feature with eosio::binary_extension. source: #include <eosio/eosio.hpp> #include <eosio/binary_extension.hpp> using namespace eosio; using namespace std; class [[eosio::contract]] test : public contract { public: using contract::contract; [[eosio::action]] void submittxn(string memo, ...


0

You cannot use default parameters in actions. You could, however, check the value of the parameters and decide how to handle null or empty strings. ACTION democontract::defaulttest( uint16_t i ) { if (i == 0) { i = 61; } printf("i is %u", i); } Another option would be to declare a vector of types to send into the action and only use what is ...


Top 50 recent answers are included