Skip to content
New issue

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

RTT fails with ABI versions 1.1 and some 1.0 #34

Open
larryk85 opened this issue Apr 16, 2019 · 3 comments
Open

RTT fails with ABI versions 1.1 and some 1.0 #34

larryk85 opened this issue Apr 16, 2019 · 3 comments

Comments

@larryk85
Copy link
Contributor

The accepted ABI version is currently a subset of ABI version 1.0. This is problematic since EOSIO.CDT will produce ABIs that are ABI version 1.1 and will cause failure when try to use RTT. The ABI has have a fair amount of manual editing to get it to work with RTT, but even with that some ABIs still fail with various exceptions even though the ABI appears to be correct.

@esheffield
Copy link
Contributor

A couple of findings so far:

  • The JSON produced by cleos when pushing an action is not directly consumable by the RTT CLI tool for a couple of reasons. One, it expects a top-level transaction element containing the transaction object rather than the transaction object itself being the top-level. Two, the action data in the JSON is already in a serialized form when output by cleos so the RTT does not know how to handle that.

  • A number of contracts tested had problems due to containing invalid YAML in the metadata. This occurs mainly in cases where the summary metadata contains variables to be interpolated. the { } surrounding the variables is being processed by the YAML parser as an alternative dictionary syntax rather than a simple string. In this case, the entire string should be surrounded with ' ' or " ". For example:

Invalid: summary:A contract between {{ user1 }} and {{ user2 }}
Valid: summary:"A contract between {{ user1 }} and {{ user2 }}"

Accepted answer on this Stackoverflow question has a nice summary:
https://stackoverflow.com/questions/19109912/do-i-need-quotes-for-strings-in-yaml

The may be some other problems still related to ABI version but the above explained most of the problems we've encountered. Will continue some more investigation, but if some additional details on the exact errors or the differences between 1.1 and 1.0 could be provided that would be a big help.

@esheffield
Copy link
Contributor

Some addition info. Have found that the ABI causing these error also contained Mustache syntax errors in some contract text. Primarily around the conditionals. The correct syntax is {{#if ...}} whereas some places contain {{if ...}}. There were also references to a non-existent if_variable_exists helper. This is unnecessary as a simple {{#if var}} performs the expected action.

@lovesuper
Copy link

Is there will be some improvements for 1.1v supporting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants