I am wondering where I can find a list of supported datatypes that can be used in an actions parameters.

Edit: Should have specified this better. I am writing some actions such as:

/// @abi action
void foo(const WHAT_CAN_BE_HERE& bar);

And am wondering how I can find out what parameter datatypes (WHAT_CAN_BE_HERE) are supported.

You can use this list for built-in types (Todd Fleming shared the link on Telegram):

bool
int8
uint8
int16
uint16
int32
uint32
int64
uint64
int128
uint128
varuint32
varint32
float32
float64
float128
time_point
time_point_sec
block_timestamp_type
name
bytes
string
checksum160
checksum256
checksum512
public_key
private_key
signature
symbol
symbol_code
asset

or typedefs:

typedef uint64_t account_name;
typedef uint64_t permission_name;
typedef uint64_t table_name;
typedef uint32_t time;
typedef uint64_t scope_name;
typedef uint64_t action_name;
typedef uint16_t weight_type;
typedef struct checksum256 transaction_id_type;
typedef struct checksum256 block_id_type;
  • Thanks for the answer but what about non build-in types like vector? – eclipse Aug 12 at 19:07
  • You wil get "false: types can only be: vector, struct, class or a built-in type. (float) {"type":"float"}". Float is not supported at all. – Lonkly Sep 3 at 19:56

I don't have a full list, but you can definitely use these: account_name, uint64_t, double, permission_level, string asset etc

There is a bunch of standard types declared in respective section of documentation. Feel free to browse example contracts and path_to_eos_dir/contracts/eosiolib folder to find out the others :)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.