You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of my smart contracts that work fine with 3.1.0 generate an invalid ABI when compiling with 4.0.0
After some searching, I noticed that the ABIs generated with 4.0.0 contain a table definition from an other namespace.
Minimal example, test.cpp:
#include <eosio/eosio.hpp>
#include <eosio/singleton.hpp>
using namespace eosio;
namespace other {
struct config { name standard = name("test"); };
typedef singleton <name("config"), config> configt;
};
class [[eosio::contract("test")]] test : public eosio::contract {
public:
using contract::contract;
[[eosio::action]]
void init() {
}
};
When compiling this with 3.1.0 the following ABI is generated, which is what I expect:
It incorrectly contains the config table which refers to an undefined config struct. Also strange is that, if the other namespace contains multiple table definitions, only one seems to be added the the ABI.
Not sure how/why this happens, but wanted to check if this is an issue with cdt or my compilation
The text was updated successfully, but these errors were encountered:
Some of my smart contracts that work fine with
3.1.0
generate an invalid ABI when compiling with4.0.0
After some searching, I noticed that the ABIs generated with 4.0.0 contain a table definition from an other namespace.
Minimal example, test.cpp:
When compiling this with 3.1.0 the following ABI is generated, which is what I expect:
The ABI from 4.0.0:
It incorrectly contains the
config
table which refers to an undefinedconfig
struct. Also strange is that, if the other namespace contains multiple table definitions, only one seems to be added the the ABI.Not sure how/why this happens, but wanted to check if this is an issue with cdt or my compilation
The text was updated successfully, but these errors were encountered: