Skip to content

Commit

Permalink
Merge pull request EOSIO#1491 from joneric/update-abi-format
Browse files Browse the repository at this point in the history
updated abi format
  • Loading branch information
b1bart authored Feb 27, 2018
2 parents b69677a + 8fc78cb commit d3f30a5
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 128 deletions.
68 changes: 36 additions & 32 deletions contracts/exchange/exchange.abi
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,63 @@
],
"structs": [{
"name": "order_id",
"fields": {
"name" : "account_name",
"id" : "uint64"
}
"base": "",
"fields": [
{"name":"name", "type":"account_name"},
{"name":"id", "type":"uint64"}
]
},{
"name" : "bid",
"fields" : {
"buyer" : "order_id",
"at_price" : "uint128",
"quantity" : "uint64",
"expiration" : "time"
}
"base": "",
"fields" : [
{"name":"buyer", "type":"order_id"},
{"name":"at_price", "type":"uint128"},
{"name":"quantity", "type":"uint64"},
{"name":"expiration", "type":"time"}
]
},{
"name" : "ask",
"fields" : {
"seller" : "order_id",
"at_price" : "uint128",
"quantity" : "uint64",
"expiration" : "time"
}
"base": "",
"fields" : [
{"name":"seller", "type":"order_id"},
{"name":"at_price", "type":"uint128"},
{"name":"quantity", "type":"uint64"},
{"name":"expiration", "type":"time"}
]
},{
"name" : "account",
"fields" : {
"owner" : "account_name",
"eos_balance" : "uint64",
"currency_balance" : "uint64",
"open_orders" : "uint32"
}
"base": "",
"fields" : [
{"name":"owner", "type":"account_name"},
{"name":"eos_balance", "type":"uint64"},
{"name":"currency_balance", "type":"uint64"},
{"name":"open_orders", "type":"uint32"}
]
},{
"name" : "buy_order",
"base" : "bid",
"fields" : {
"fill_or_kill" : "uint8"
}
"fields" : [
{"name":"fill_or_kill", "type":"uint8"}
]
},{
"name" : "sell_order",
"base" : "ask",
"fields" : {
"fill_or_kill" : "uint8"
}
"fields" : [
{"name":"fill_or_kill", "type":"uint8"}
]
}
],
"actions": [{
"action": "buy",
"name": "buy",
"type": "buy_order"
},{
"action": "sell",
"name": "sell",
"type": "sell_order"
},{
"action": "cancelbuy",
"name": "cancelbuy",
"type": "order_id"
},{
"action": "cancelsell",
"name": "cancelsell",
"type": "order_id"
}
],
Expand Down
2 changes: 1 addition & 1 deletion contracts/identity/identity.abi
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{"name":"type", "type":"string"},
{"name":"data", "type":"uint8[]"},
{"name":"memo", "type":"string"},
{"name":"confidence", "type":"uint8"},
{"name":"confidence", "type":"uint8"}
]
},{
"name": "certprop",
Expand Down
70 changes: 35 additions & 35 deletions contracts/simpledb/simpledb.abi
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,56 @@
"structs": [{
"name": "record1",
"base": "",
"fields": {
"key": "uint64",
"u256": "uint256",
"u128": "uint128",
"u64": "uint64",
"u32": "uint32",
"u16": "uint16",
"u8": "uint8",
"i64": "int64",
"i32": "int32",
"i16": "int16",
"i8": "int8",
"price": "price"
}
"fields": [
{"name":"key", "type":"uint64"},
{"name":"u256", "type":"uint256"},
{"name":"u128", "type":"uint128"},
{"name":"u64", "type":"uint64"},
{"name":"u32", "type":"uint32"},
{"name":"u16", "type":"uint16"},
{"name":"u8", "type":"uint8"},
{"name":"i64", "type":"int64"},
{"name":"i32", "type":"int32"},
{"name":"i16", "type":"int16"},
{"name":"i8", "type":"int8"},
{"name":"price", "type":"price"}
]
},{
"name": "record2",
"base": "",
"fields": {
"key1": "uint128",
"key2": "uint128"
}
"fields": [
{"name":"key1", "type":"uint128"},
{"name":"key2", "type":"uint128"}
]
},{
"name": "record3",
"base": "",
"fields": {
"key1": "uint64",
"key2": "uint64",
"key3": "uint64"
}
"fields": [
{"name":"key1", "type":"uint64"},
{"name":"key2", "type":"uint64"},
{"name":"key3", "type":"uint64"}
]
},{
"name": "key_value1",
"base": "",
"fields": {
"key": "string",
"value": "string"
}
"fields": [
{"name":"key", "type":"string"},
{"name":"value", "type":"string"}
]
},{
"name": "complex_type",
"base": "",
"fields": {
"name": "string",
"age": "uint64"
}
"fields": [
{"name":"name", "type":"string"},
{"name":"age", "type":"uint64"}
]
},{
"name": "key_value2",
"base": "",
"fields": {
"key": "string",
"value": "complex_type"
}
"fields": [
{"name":"key", "type":"string"},
{"name":"value", "type":"complex_type"}
]
}
],
"actions": [{
Expand Down
18 changes: 9 additions & 9 deletions contracts/skeleton/skeleton.abi
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
"structs": [{
"name": "transfer",
"base": "",
"fields": {
"from": "account_name",
"to": "account_name",
"amount": "uint64"
}
"fields": [
{"name":"from", "type":"account_name"},
{"name":"to", "type":"account_name"},
{"name":"amount", "type":"uint64"}
]
},{
"name": "account",
"base": "",
"fields": {
"account": "name",
"balance": "uint64"
}
"fields": [
{"name":"account", "type":"name"},
{"name":"balance", "type":"uint64"}
]
}
],
"actions": [{
Expand Down
42 changes: 21 additions & 21 deletions contracts/storage/storage.abi
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,32 @@
"structs": [{
"name": "transfer",
"base": "",
"fields": {
"from": "account_name",
"to": "account_name",
"amount": "uint64"
}
"fields": [
{"name":"from", "type":"account_name"},
{"name":"to", "type":"account_name"},
{"name":"amount", "type":"uint64"}
]
},{
"name": "account",
"base": "",
"fields": {
"account": "account_name",
"tokbalance": "uint64",
"quotausage": "uint64"
}
"fields": [
{"name":"account", "type":"account_name"},
{"name":"tokbalance", "type":"uint64"},
{"name":"quotausage", "type":"uint64"}
]
},{
"name": "link",
"base": "",
"fields": {
"owner" : "account_name",
"eospath" : "string",
"ipfspath" : "string",
"size" : "uint32",
"store" : "uint8",
"accept": "uint8",
"stake" : "uint64",
"producer": "account_name"
}
"fields": [
{"name":"owner", "type":"account_name"},
{"name":"eospath", "type":"string"},
{"name":"ipfspath", "type":"string"},
{"name":"size" , "type":"uint32"},
{"name":"store", "type":"uint8"},
{"name":"accept", "type":"uint8"},
{"name":"stake", "type":"uint64"},
{"name":"producer", "type":"account_name"}
]
}
],
"actions": [{
Expand Down Expand Up @@ -62,7 +62,7 @@
"name": "links",
"type" : "link",
"index_type": "str",
"key_names" : ["eospath"]
"key_names" : ["eospath"],
"key_types" : ["string"]
}
]
Expand Down
60 changes: 30 additions & 30 deletions contracts/tic_tac_toe/tic_tac_toe.abi
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,51 @@
"structs": [{
"name": "game",
"base": "",
"fields": {
"challenger": "account_name",
"host": "account_name",
"turn": "account_name",
"winner": "account_name",
"board": "uint8[]"
}
"fields": [
{"name":"challenger", "type":"account_name"},
{"name":"host", "type":"account_name"},
{"name":"turn", "type":"account_name"},
{"name":"winner", "type":"account_name"},
{"name":"board", "type":"uint8[]"}
]
},{
"name": "create",
"base": "",
"fields": {
"challenger": "account_name",
"host": "account_name"
}
"fields": [
{"name":"challenger", "type":"account_name"},
{"name":"host", "type":"account_name"}
]
},{
"name": "restart",
"base": "",
"fields": {
"challenger": "account_name",
"host": "account_name",
"by": "account_name"
}
"fields": [
{"name":"challenger", "type":"account_name"},
{"name":"host", "type":"account_name"},
{"name":"by", "type":"account_name"}
]
},{
"name": "close",
"base": "",
"fields": {
"challenger": "account_name",
"host": "account_name"
}
"fields": [
{"name":"challenger", "type":"account_name"},
{"name":"host", "type":"account_name"}
]
},{
"name": "movement",
"base": "",
"fields": {
"row": "uint32",
"column": "uint32"
}
"fields": [
{"name":"row", "type":"uint32"},
{"name":"column", "type":"uint32"}
]
},{
"name": "move",
"base": "",
"fields": {
"challenger": "account_name",
"host": "account_name",
"by": "account_name",
"movement": "movement"
}
"fields": [
{"name":"challenger", "type":"account_name"},
{"name":"host", "type":"account_name"},
{"name":"by", "type":"account_name"},
{"name":"movement", "type":"movement"}
]
}
],
"actions": [{
Expand Down

0 comments on commit d3f30a5

Please sign in to comment.