Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #863 from EOSIO/uint8-bytes
Browse files Browse the repository at this point in the history
Convert vector<uint8_t> to bytes in ABI
  • Loading branch information
jeffreyssmith2nd authored Jul 10, 2020
2 parents 1333c50 + a8b7106 commit c26ba06
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/include/eosio/gen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,11 @@ struct generation_utils {
}
else if ( is_template_specialization( type, {"vector", "set", "deque", "list"} ) ) {
auto t =translate_type(get_template_argument( type ).getAsType());
return t=="int8" ? "bytes" : t+"[]";
if ( t=="int8" || t=="uint8" ) {
return "bytes";
} else {
return t+"[]";
}
}
else if ( is_template_specialization( type, {"optional"} ) )
return translate_type(get_template_argument( type ).getAsType())+"?";
Expand Down

0 comments on commit c26ba06

Please sign in to comment.