3

I couldn't find any information on how to automatically include the ricardian clauses in the abi. I always get the error:

abi_generator.hpp:68 ricardian_contracts ] Warning, no ricardian clauses found for

I found out that the name must be ${contract}_rd.md. But the abi_generator doesn't even resolve the correct contract name in my contract.

  1. How is the contract name determined? It looks like you need to use the EOSIO_ABI macro in some way. How to do it when I cannot use this macro?
  2. I tested it with the example contract: eosiocpp -n hello and create files for hello_rc.md, hello.hi_rc.md. Running eosiocpp -g hello.abi hello.cpp creates the abi with no warnings, but the clauses are empty in the abi file. Why are they empty? Do they need a specific format?
4
  • There is a python script in the scripts directory for creating RCs with ABIs.github.com/EOSIO/eos/tree/master/scripts/abi_to_rc
    – Nat
    Jul 21, 2018 at 11:03
  • Any way to do it with eosiocpp? Aug 2, 2018 at 11:31
  • If there is a flag for creating rc's with eosiocpp, I do not know it.
    – Nat
    Aug 2, 2018 at 15:45
  • eosio-cpp cannot find the ricardian files, no matter what I tried. The -R path does not help. The eosio-init produces the same result ( "empty ricardian clause file") (BTW the message is wrong, it means the CONTRACT.contracts.md file not found) All the official examples do not work either... I even tried to debug the eosio-cpp to find the problem, but the eosio.cdt does not compile on Ubuntu... Not good... Can anyone actually compile a contract with ricardian files?
    – AlexNa
    Dec 30, 2021 at 18:02

1 Answer 1

1

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 CMake build system using eosio-init, and it will generate the cmake command target_ricardian_directory, where you should specify your ricardian contract files. These will then be automatically integrated into the compiled ABI file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.