Skip to main content
7 votes
Accepted

Tables are not generated in abi file

Try the below snippet: // @abi table tests i64 struct test_rec { test_hash hash; account_name creator; uint64_t primary_key() const { return hash; } account_name get_creator() const {...
Leo Ribeiro's user avatar
  • 3,023
4 votes

How to pass arrays into a smart contract's action method

After looking through the example contracts, I finally found one that had an array of objects. To receive them, the contract needs to declare the parameter as a std::vector<uint128>. The ...
John Haager's user avatar
  • 1,844
2 votes

EOS system contract is too large to execute in local machine!

To avoid leaving this question unanswered: OP solved their issue by increasing the max-transaction-time in their config file.
2 votes

Error while producing abi file for 'Hello World' contract

I'm not familiar with that specific error message, but what I do know is that the ABI generation feature will only work if your code is properly annotated by marking the actions and DB tables like ...
Andres Berrios's user avatar
2 votes

Why does the -abigen option in eosio.cdt not work?

The solution to my problem was that the wasm file had to exactly match the name of the contract in the attributes of the contract class. So as my file was called mycontract.wasm, I had to have the ...
Phillip Hamnett - EOS42's user avatar
2 votes

empty actions - abi file

Your code should be like this // @abi action void token::create( account_name issuer, asset maximum_supply ) { require_auth( _self ); auto sym = maximum_supply....
Nirdesh Kumar's user avatar
2 votes

ABI file not generated

I wasn't getting an abi file, but it was compiling fine. I finally noticed that I had the file named: widgets.cpp but the class was widget. Watch out for missing "S"s. Ran again and the abi ...
gofly's user avatar
  • 33
1 vote

Error: fetching abi for eosio: deadline exceeded by xx us

You can fix this by starting nodeos while setting --abi-serializer-max-time-ms to 50000 or so. I'm not sure if there's such an option in eos-js but if you get the error using cleos, you can ...
cmadh's user avatar
  • 1,929
1 vote

How to use binary extensions

Here is an excellent example of how to use binary extensions: https://github.com/EOSIO/eosio.cdt/blob/ab8002109adc4f39d17c7ac38c4d8582af74190a/docs/guides/binary-extension.md I will post the full ...
Phillip Hamnett - EOS42's user avatar
1 vote
Accepted

How can I generate an ABI out of a wasm?

There are currently no recommended tools for generating ABI automatically. However, there's an article in the documentation about how to write an ABI file yourself. From the article: As of v1.2.0, ...
confused00's user avatar
  • 5,554
1 vote
Accepted

Is it possible to declare parameters optional for an action in the ABI?

You can use type? for optionals, similar to type[] for arrays.
bytemaster's user avatar
  • 1,434
1 vote

Multiple Inheritance within ABI files

So I have been in discussion with Todd Fleming from B1, and he said that this is currently not possible. The solution is to include the other classes as members within the concrete class: class A { }...
Phillip Hamnett - EOS42's user avatar
1 vote
Accepted

Is there a way to have a 2 dimensional vector in my table?

OK I found the answer in developers telegram. If anyone has the same problem you can use: vector<vector<foo>> and in the abi file you define a new type foo_vector of type foo[] and ...
Savvas Vezyridis's user avatar
1 vote

eosforumdapp mongodb : unsupported_abi_version_exception: ABI has an unsupported version

Perhaps when you were synching, at that moment in time, eosforumrcpp had an invalid ABI version? Right now, it seems like their versioning is fine: $ cleos get abi eosforumrcpp { ...
confused00's user avatar
  • 5,554
1 vote

What's the key_names and key_types mean?

The key_names is a list of the primary key and all the secondary keys. The key_types is the type of each of the respective keys. In a simple table (only a primary key), the type is always uint64 or ...
Phillip Hamnett - EOS42's user avatar
1 vote

Getting bin for multiple json payloads via RPC abi_json_to_bin

Answering my own question, The bin data should be generated for each individual json in payload and appended in the actions field as a list. The transaction will then be signed, packed and pushed.
silvercondor's user avatar
1 vote

ignore //abi table comment

Macros should work, but you'd have to edit the eosiocpp script in order to be able to use them when you compile the code. You can't just do eosiocpp -DGEN_TABLE like in normal c++.
Phillip Hamnett - EOS42's user avatar
1 vote
Accepted

Is is possible to defer a non abi action using a abi action?

It isn't possible to call a non-ABI action in the way you want. Only something in the ABI can be called in a transaction, whether it is deferred or not.
Phillip Hamnett - EOS42's user avatar
1 vote

How to create ricardian clauses in the ABI with eosiocpp

The eosiocpp compiler was the old deprecated way of compiling the c++ into wasm contracts. The new way uses a compiler called eosio-cpp, which is very confusing. With eosio.cdt, you can generate a ...
Phillip Hamnett - EOS42's user avatar
1 vote

Error 3010008: No ABI found

check your ABI using: cleos get abi YOUR_CONTRACT If returned ABI is null update your contract: cd YOUR_CONTRACT_DIR cleos set contract YOUR_CONTRACT_ACC . YOUR_CONTRACT.wast YOUR_CONTRACT.abi -p ...
Mikky Snowman's user avatar
1 vote

How to generate ABI with Ricardian Contracts?

The ABI file is actually generated from the cpp file you're compiling from. eosiocpp -g file.abi file.cpp This is also the reason you use the macro in your code to tell the compiler which of your ...
Nat's user avatar
  • 3,425
1 vote

eosiocpp tool generates different types

This depends on which version of EOSIO you are using. If you are using v1.3 or higher, then you should change compilers to use eosio.cdt, not eosiocpp. There are many differences between the two, ...
Phillip Hamnett - EOS42's user avatar
1 vote

Custom struct abi serialization

You can create your custom struct in code and add EOSIO_SERIALIZE to it. After, you can use it in your contract action parameters like this: void funcname(const account_name account, st_data_req ...
Vivienne Fosh's user avatar
1 vote

Custom struct abi serialization

The functionality of the system contracts are built in and can't be changed unless there is consensus amongst the BPs. However, for your own contract you can create actions and the serializer will ...
Phillip Hamnett - EOS42's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible