Skip to content

Conversation

@greg7mdp
Copy link
Contributor

@greg7mdp greg7mdp commented May 19, 2025

Resolves #337.

Example contract with hi action taking a bitset:

#include <eosio/eosio.hpp>
#include <eosio/bitset.hpp>

class [[eosio::contract]] hello : public eosio::contract {
public:
   using eosio::contract::contract;
   [[eosio::action]] void hi(eosio::name user, eosio::bitset b) {
      print( "Hello, ", user, ", --> ", b);
   }
};

calling hi action

❯ ./bin/cleos push action hello hi '["bob", "0010"]' -p hello@active                                                        
executed transaction: d7084775dcd3b93c6ff44f74db838fe140909e3cc8a70b8677d431164de4c1a3  104 bytes  320 us
#         hello <= hello::hi                    {"user":"bob","b":"0010"}
>> Hello, bob, --> 0010
warning: transaction executed locally, but may not be confirmed by the network yet         ] 

greg7mdp added 5 commits May 8, 2025 11:05
The cmake build have the same file included twice with different paths:

```
/home/greg/github/enf/cdt/build_clang18_debug/bin/cdt-cpp -D_LIBCPP_BUILDING_LIBRARY -I/home/greg/github/enf/cdt/libraries/libc/cdt-musl/include -I/home/greg/github/enf/cdt/libraries/libc/cdt-musl/src/internal -I/home/greg/github/enf/cdt/libraries/libc/cdt-musl/src/crypt -I/home/greg/github/enf/cdt/libraries/libc/cdt-musl/arch/eos -I/home/greg/github/enf/cdt/libraries/libc++/cdt-libcxx/include -I/home/greg/github/enf/cdt/libraries -O3 -Wall -no-missing-ricardian-clause -g -g -std=gnu++17 -MD -MT eosiolib/CMakeFiles/eosio.dir/eosiolib.cpp.obj -MF eosiolib/CMakeFiles/eosio.dir/eosiolib.cpp.obj.d -o eosiolib/CMakeFiles/eosio.dir/eosiolib.cpp.obj -c /home/greg/github/enf/cdt/libraries/eosiolib/eosiolib.cpp
In file included from /home/greg/github/enf/cdt/libraries/eosiolib/eosiolib.cpp:3:
In file included from /home/greg/github/enf/cdt/libraries/eosiolib/contracts/eosio/system.hpp:9:
In file included from /home/greg/github/enf/cdt/libraries/eosiolib/contracts/eosio/../../core/eosio/name.hpp:9:
In file included from /home/greg/github/enf/cdt/libraries/eosiolib/core/eosio/reflect.hpp:3:
In file included from /home/greg/github/enf/cdt/build_clang18_debug/bin/../include/bluegrass/meta/refl.hpp:11:
/home/greg/github/enf/cdt/build_clang18_debug/bin/../include/eosiolib/core/eosio/print.hpp:78:16: error: redefinition of 'printhex'
   inline void printhex( const void* ptr, uint32_t size) {
               ^
/home/greg/github/enf/cdt/libraries/eosiolib/core/eosio/print.hpp:78:16: note: previous definition is here
   inline void printhex( const void* ptr, uint32_t size) {
               ^
```
@spoonincode
Copy link
Contributor

The output ABI version needs to be updated. Did we make a conclusive decision on 1.3 vs 2.0 🥴 ? idk if we should (or if it's worth) trying to detect if any 1.3/2.0 features are being used and only output the new version in that case.

@spoonincode
Copy link
Contributor

Still need to determine what to do about generated ABI version.

Copy link
Contributor

@spoonincode spoonincode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ABI versioning stuff will be handled separately in #355

@greg7mdp greg7mdp merged commit 1631a59 into main Jun 5, 2025
7 checks passed
@greg7mdp greg7mdp deleted the gh_337 branch June 5, 2025 14:43
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

Successfully merging this pull request may close these issues.

ABI 1.3: bitset type

4 participants