Skip to content

Instantly share code, notes, and snippets.

@dskvr
Created September 30, 2019 16:22
Show Gist options
  • Save dskvr/711db3578f1308df8e5160ef6111ace7 to your computer and use it in GitHub Desktop.
Save dskvr/711db3578f1308df8e5160ef6111ace7 to your computer and use it in GitHub Desktop.
ABI
{
"type": "object",
"additionalProperties": false,
"required": [
"version",
"types",
"structs",
"actions",
"tables",
"abi_extensions",
"error_messages",
"ricardian_clauses",
"variants"
],
"properties": {
"version": { "type": "string" },
"types": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"minProperties": 2,
"required": [ "new_type_name", "type" ],
"properties": {
"new_type_name": {
"type": "string",
"description": "C++ variable signature",
"pattern": "^([a-z1-9]{1}[a-z1-9_]{0,30}[a-z1-9]{1})$",
"id": "https://eosio.github.io/schemas/CppSignature.json",
"title": "CppSignature"
},
"type": {
"type": "string",
"description": "Native and EOSIO types",
"enum": [
"uint8",
"uint16",
"uint32",
"uint64",
"uint128",
"float32",
"float64",
"float128",
"bytes",
"name",
"string",
"time_point",
"time_point_sec",
"symbol_code",
"symbol",
"asset",
"checksum160",
"checksum256",
"checksum521",
"public_key",
"private_key",
"signature",
"account_name",
"action_name"
],
"id": "https://eosio.github.io/schemas/Type.json",
"title": "Type"
}
},
"id": "https://eosio.github.io/schemas/AbiType.json",
"title": "AbiType"
}
},
"structs": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"minProperties": 3,
"required": [ "name", "base", "fields" ],
"properties": {
"name": {
"type": "string",
"description": "C++ variable signature",
"pattern": "^([a-z1-9]{1}[a-z1-9_]{0,30}[a-z1-9]{1})$",
"id": "https://eosio.github.io/schemas/CppSignature.json",
"title": "CppSignature"
},
"base": { "type": "string" },
"fields": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"minProperties": 2,
"required": [ "name", "type" ],
"properties": {
"name": {
"type": "string",
"description": "C++ variable signature",
"pattern": "^([a-z1-9]{1}[a-z1-9_]{0,30}[a-z1-9]{1})$",
"id": "https://eosio.github.io/schemas/CppSignature.json",
"title": "CppSignature"
},
"type": {
"type": "string",
"description": "Native and EOSIO types",
"enum": [
"uint8",
"uint16",
"uint32",
"uint64",
"uint128",
"float32",
"float64",
"float128",
"bytes",
"name",
"string",
"time_point",
"time_point_sec",
"symbol_code",
"symbol",
"asset",
"checksum160",
"checksum256",
"checksum521",
"public_key",
"private_key",
"signature",
"account_name",
"action_name"
],
"id": "https://eosio.github.io/schemas/Type.json",
"title": "Type"
}
},
"id": "https://eosio.github.io/schemas/AbiStructFields.json",
"title": "AbiStructFields"
}
}
},
"id": "https://eosio.github.io/schemas/AbiStruct.json",
"title": "AbiStruct"
}
},
"actions": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [ "name", "type", "ricardian_contract" ],
"properties": {
"name": {
"anyOf": [
{
"type": "string",
"description": "String representation of privileged EOSIO name type",
"pattern": "^(eosio[\\.][a-z1-5]{1,6})$",
"id": "https://eosio.github.io/schemas/NamePrivileged.json",
"title": "NamePrivileged"
},
{
"type": "string",
"description": "String representation of basic EOSIO name type, must be 12 characters and contain only a-z and 0-5",
"pattern": "^[a-z]{1}[a-z1-5]{11}$",
"id": "https://eosio.github.io/schemas/NameBasic.json",
"title": "NameBasic"
},
{
"type": "string",
"description": "String representation of EOSIO bid name type, 1-12 characters and only a-z and 0-5 are allowed",
"pattern": "^([a-z1-5]{1,12})$",
"id": "https://eosio.github.io/schemas/NameBid.json",
"title": "NameBid"
},
{
"type": "string",
"description": "String representation of EOSIO name type",
"pattern": "^([a-z1-5]{1}[a-z1-5\\.]{0,10}[a-z1-5]{1})$",
"id": "https://eosio.github.io/schemas/NameCatchAll.json",
"title": "NameCatchAll"
}
],
"id": "https://eosio.github.io/schemas/Name.json",
"title": "Name"
},
"type": {
"anyOf": [
{
"type": "string",
"description": "String representation of privileged EOSIO name type",
"pattern": "^(eosio[\\.][a-z1-5]{1,6})$",
"id": "https://eosio.github.io/schemas/NamePrivileged.json",
"title": "NamePrivileged"
},
{
"type": "string",
"description": "String representation of basic EOSIO name type, must be 12 characters and contain only a-z and 0-5",
"pattern": "^[a-z]{1}[a-z1-5]{11}$",
"id": "https://eosio.github.io/schemas/NameBasic.json",
"title": "NameBasic"
},
{
"type": "string",
"description": "String representation of EOSIO bid name type, 1-12 characters and only a-z and 0-5 are allowed",
"pattern": "^([a-z1-5]{1,12})$",
"id": "https://eosio.github.io/schemas/NameBid.json",
"title": "NameBid"
},
{
"type": "string",
"description": "String representation of EOSIO name type",
"pattern": "^([a-z1-5]{1}[a-z1-5\\.]{0,10}[a-z1-5]{1})$",
"id": "https://eosio.github.io/schemas/NameCatchAll.json",
"title": "NameCatchAll"
}
],
"id": "https://eosio.github.io/schemas/Name.json",
"title": "Name"
},
"ricardian_contract": { "type": "string", "minLength": 0 }
},
"id": "https://eosio.github.io/schemas/AbiAction.json",
"title": "AbiAction"
}
},
"tables": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"minProperties": 5,
"required": [ "name", "index_type" ],
"properties": {
"name": {
"anyOf": [
{
"type": "string",
"description": "String representation of privileged EOSIO name type",
"pattern": "^(eosio[\\.][a-z1-5]{1,6})$",
"id": "https://eosio.github.io/schemas/NamePrivileged.json",
"title": "NamePrivileged"
},
{
"type": "string",
"description": "String representation of basic EOSIO name type, must be 12 characters and contain only a-z and 0-5",
"pattern": "^[a-z]{1}[a-z1-5]{11}$",
"id": "https://eosio.github.io/schemas/NameBasic.json",
"title": "NameBasic"
},
{
"type": "string",
"description": "String representation of EOSIO bid name type, 1-12 characters and only a-z and 0-5 are allowed",
"pattern": "^([a-z1-5]{1,12})$",
"id": "https://eosio.github.io/schemas/NameBid.json",
"title": "NameBid"
},
{
"type": "string",
"description": "String representation of EOSIO name type",
"pattern": "^([a-z1-5]{1}[a-z1-5\\.]{0,10}[a-z1-5]{1})$",
"id": "https://eosio.github.io/schemas/NameCatchAll.json",
"title": "NameCatchAll"
}
],
"id": "https://eosio.github.io/schemas/Name.json",
"title": "Name"
},
"index_type": {
"type": "string",
"enum": [ "i64" ],
"id": "https://eosio.github.io/schemas/IndexType.json",
"title": "IndexType"
},
"key_names": {
"type": "array",
"items": {
"type": "string",
"description": "C++ variable signature",
"pattern": "^([a-z1-9]{1}[a-z1-9_]{0,30}[a-z1-9]{1})$",
"id": "https://eosio.github.io/schemas/CppSignature.json",
"title": "CppSignature"
}
},
"key_types": {
"type": "array",
"items": {
"type": "string",
"enum": [ "uint64", "double" ],
"id": "https://eosio.github.io/schemas/KeyType.json",
"title": "KeyType"
}
},
"type": {
"type": "string",
"description": "C++ variable signature",
"pattern": "^([a-z1-9]{1}[a-z1-9_]{0,30}[a-z1-9]{1})$",
"id": "https://eosio.github.io/schemas/CppSignature.json",
"title": "CppSignature"
}
},
"id": "https://eosio.github.io/schemas/AbiTable.json",
"title": "AbiTable"
}
},
"abi_extensions": {
"type": "array",
"items": {
"type": "array",
"items": { "anyOf": [ { "type": "integer" }, { "type": "string" } ] },
"id": "https://eosio.github.io/schemas/Extension.json",
"title": "Extension"
}
},
"error_messages": { "type": "array", "items": { "type": "string" } },
"ricardian_clauses": { "type": "array", "items": { "type": "string" } },
"variants": { "type": "array", "items": { "type": "string" } }
},
"id": "https://eosio.github.io/schemas/Abi.json",
"title": "Abi"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment