Skip to content

Commit

Permalink
fixing integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dimas1185 committed Sep 22, 2023
1 parent f86e7a8 commit 74043a6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
10 changes: 10 additions & 0 deletions tests/toolchain/abigen-pass/singleton_contract.abi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
"version": "eosio::abi/1.2",
"types": [],
"structs": [
{
"name": "out_of_class",
"base": "",
"fields": [
{
"name": "id",
"type": "uint64"
}
]
},
{
"name": "out_of_class3",
"base": "",
Expand Down
8 changes: 5 additions & 3 deletions tools/include/eosio/abigen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,12 +841,14 @@ namespace eosio { namespace cdt {
if ((table_type->isEosioTable() && ag.is_eosio_contract(table_type, ag.get_contract_name())) || defined_in_contract(d)) {
// first parameter is table name
ag.add_table(d->getTemplateArgs()[0].getAsIntegral().getExtValue(), table_type);
if (table_type->isEosioTable())
ag.add_struct(table_type);
}
}
}
return true;
}
void set_contract_class(const CXXRecordDecl* decl) {
inline void set_contract_class(const CXXRecordDecl* decl) {
contract_class = decl;
}
};
Expand Down Expand Up @@ -882,10 +884,10 @@ namespace eosio { namespace cdt {

return true;
}
bool contract_found() const {
inline bool contract_found() const {
return contract_class != nullptr;
}
const clang::CXXRecordDecl* get_contract() const {
inline const clang::CXXRecordDecl* get_contract() const {
return contract_class;
}
};
Expand Down

0 comments on commit 74043a6

Please sign in to comment.