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

EOSIO.CDT Version 1.3.0 Release Notes

Compare
Choose a tag to compare
@larryk85 larryk85 released this 11 Oct 00:12
· 2008 commits to master since this release
cb1a407

eosiolib C API

  • addition of uint64_t typedef capi_name #132
  • removal of uint64_t typedefs #132
    • account_name
    • permission_name
    • scope_name
    • table_name
    • action_name
      • these have been replaced by capi_name, and as a practice should not be used. The new version of the name type should be used to replace these instances. This decision was made because of bad implict casting issues with uint64_t and the new pattern should allow for better type safety.
    • symbol_name
      • this has no C equivalent and is superceded by the symbol_code struct. As with the previously mentioned named types, this was removed and replaced with symbol_code to allow for better type safety in contracts. To use a symbol, i.e. symbol name and precision, use the symbol class.
  • removal of time and weight_type typedefs #132
  • removal of the typedefs transaction_id_type and block_id_type #132
  • removal of the account_permission struct #132
  • renaming of typedefs #132
    • checksum160 -> capi_checksum160
    • checksum256 -> capi_checksum256
    • checksum512 -> capi_checksum512
    • public_key -> capi_public_key
    • signature -> capi_signature
  • removal of non-existent intrinsics declarations require_write_lock and require_read_lock #132

eosiolib C++ API

  • removal of eosiolib/vector.hpp #132
    • removed alias eosio::vector and typedef bytes
  • removal of eosiolib/types.hpp #132
  • removal of eosiolib/optional.hpp #136
  • removal of eosiolib/core_symbol.hpp #122
  • added eosiolib/name.hpp #132

eosiolib/types.hpp

  • moved the typedef eosio::extensions_types to eosiolib/transaction.hpp #132
  • removed comparison functions for checksum structs #132
  • removal of eosio::char_to_symbol, eosio::string_to_name, eosio::name_suffix functions #132
  • removal of the N macro. #132
  • moved eosio::name struct definition and ""_n operator to eosiolib/name.hpp #132

eosiolib/name.hpp

  • removal of implicit and explicit conversions to uint64_t. #132
  • addition of enum class eosio::name::raw #132
  • added bool conversion operator for conditionally testing if a name is empty #132
  • all constructors are now constexpr #132
  • added constexpr methods eosio::name::length, eosio::name::suffix #132
  • added equivalence, inverted equivalence and less than operators to eosio::name #132

eosiolib/symbol.hpp

  • removed eosio::symbol_type struct and replaced with eosio::symbol class #122
  • added struct eosio::symbol_code #122
    • added two constexpr constructors that take either a raw uint64_t or an std::string_view
    • added constexpr methods is_valid, length and raw
    • added a print method
    • added bool conversion operator to test is symbol_code is empty
  • removal of eosio::string_to_symbol, eosio::is_valid_symbol, eosio::symbol_name_length functions #122
  • removal of the S macro. #122
  • added struct eosio::symbol #122
    • added two constexpr constructors that take either a raw uint64_t or a symbol_code and a uint8_t precision.
  • modified struct eosio::extended_symbol #132
    • restricted fields to private
    • added constexpr constructor that takes a eosio::symbol and an eosio::name.
    • added constexpr methods get_symbol and get_contract.
    • made existing comparison operators constexpr

eosiolib/asset.hpp

  • The main constructor now requires a int64_t (quantity) and eosio::symbol explicitly. #132

eosiolib/contract.hpp

  • The constructor for eosio::contract now takes an eosio::name for the receiver, an eosio::name for the code, and a eosio::datastream<const char*> for the datastream used for the contract. The last argument is for manually unpacking an action, see the section on eosio::ignore for a more indepth usage. #136

eosiolib/dispatcher.hpp

  • renamed the macro EOSIO_ABI to EOSIO_DISPATCH, as this makes more sense as to what this macro does. #136
  • modified the definition of EOSIO_DISPATCH to work with the new constructor for eosio::contract

eosiolib/multi_index.hpp

  • the first template parameter for indexed_by now requires the argument be convertible to eosio::name::raw (replacing uint64_t. #132
  • the first template parameter for multi_index now requires the argument be convertible to eosio::name::raw (replacing uint64_t. #132
  • the constructor now takes an eosio::name type for the code (replacing uint64_t), scope is still uint64_t. #132
  • various other replacements of uint64_t to eosio::name #132

eosiolib/singleton.hpp

  • the first template parameter for eosio::singleton now requires the argument be convertible to eosio::name::raw (replacing uint64_t. #132
  • the constructor now takes an eosio::name type for the code. #132
  • in the methods get_or_create and set the argument bill_to_account is now of type eosio::name (replacing uint64_t). #132

eosiolib/action.hpp

  • added C++ function eosio::require_auth #132
  • added C++ function eosio::has_auth #132
  • added C++ function eosio::is_account #132
  • redefined eosio::permission_level to use eosio::name in place of uint64_t #132
  • removed the macro ACTION #136

eosiolib/permission.hpp

  • The optional provided_keys argument of the function eosio::check_transaction_authorization is now of the type std::set<eosio::public_key> rather than the type std::set<capi_public_key>. #132
  • the account and permission arguments of eosio::check_transaction_authorization are both eosio::name now instead of uint64_t #132

eosiolib/ignore.hpp

  • added new type ignore #133
    • this type acts as a placeholder for actions that don't want to deserialize their fields but what the types to be reflected in the abi.
      ACTION action(ignore<some_type>) { some_type st; _ds >> st; }
  • added new type ignore_wrapper #133
    • this allows for calling SEND_INLINE_ACTION with ignore_wrapper(some_value) against an action with an ignore of matching types.

macros

  • added ACTION macro, this is simply a wrapper for [[eosio::action]] void #136
  • added TABLE macro, this is simply a wrapper for struct [[eosio::table]] #136
  • added CONTRACT macro, this is simply a wrapper for class [[eosio::contract]] #136

CMake

  • added eosio.cdt-config.cmake to allow for find_package(eosio.cdt) #105
  • added new macro add_contract #136
  • new version checking mechanism is included, see eosio.contracts/CMakeLists.txt to see this in use. #111

libc

  • replaced printf, sprintf, and snprintf with new minimal variants, and allows contracts to use these functions without causing stack overflow issues. #142

libcxx

  • removed sstream, with the intent to return this after more has been done. #142
  • added __cxa_pure_virtual to allow for pure virtual methods in contract classes. #142
  • std::to_string now works without the issues of stack overflows. #142

attributes

  • added [[eosio::ignore]] attribute to flag a type as being ignored by the deserializer, this attribute is primarily only used for internal use within eosiolib. #133
  • added [[eosio::contract]] attribute #133

boost

  • is now part of the library (Boost will be removed in a future release), no more external dependence on Boost and all system inclusion are within it's sysroot. #105

eosio-cpp

  • bumped the default standard to C++17 #133

eosio-abigen

  • various fixes for vector, optional, stalling. Produces accurate abis for eosio.contracts.