Skip to content

Commit

Permalink
Applies review changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
esdrubal committed Jul 17, 2024
1 parent 882a860 commit 671a030
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/abi/json-abi-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,18 @@ The ABI of a contract is represented as a JSON object containing the following p
- `"name"`: the name of the input.
- `"concreteTypeId"`: the _type concrete declaration_ hash based ID of the type of the input.
- `"output"`: the _type concrete declaration_ hash based ID of the type being returned by the function.
- `"attributes"`: an optional array of _attributes_. Each _attribute_ is explained in the [dedicated section](#attributes-semantics) and is represented as a JSON object that contains the following properties:
- `"name"`: the name of the attribute.
- `"arguments"`: an array of attribute arguments.
- `"loggedTypes"`: an array describing all instances of [`log`](../fuel-vm/instruction-set.md#log-log-event) or [`logd`](../fuel-vm/instruction-set.md#logd-log-data-event) in the contract's bytecode. Each instance is a JSON object that contains the following properties:
- `"logId"`: a string containing the 64bit hash based decimal ID calculated from the first 8 bytes of the `sha256` of a string that represents the type logged as defined in [Hash Based Ids](./hash-based-ids.md). The [`log`](../fuel-vm/instruction-set.md#log-log-event) and [`logd`](../fuel-vm/instruction-set.md#logd-log-data-event) instructions must set their `$rB` register to that ID.
- `"loggedType"`: the _type concrete declaration_ hash based ID of the value being logged.
- `"concreteTypeId"`: the _type concrete declaration_ hash based ID of the value being logged.
- `"messagesTypes"`: an array describing all instances of [`smo`](../fuel-vm/instruction-set.md#smo-send-message-to-output) in the contract's bytecode. Each instance is a JSON object that contains the following properties:
- `"message_id"`: a unique string ID.
- `"messageDataType"`: the _type concrete declaration_ hash based ID of the message data being sent.
- `"concreteTypeId"`: the _type concrete declaration_ hash based ID of the message data being sent.
- `"configurables"`: an array describing all `configurable` variables used in the contract. Each `configurable` variable is represented as a JSON object that contains the following properties:
- `"name"`: the name of the `configurable` variable.
- `"configurableType"`: the _type concrete declaration_ hash based ID of the type of the `configurable` variable.
- `"concreteTypeId"`: the _type concrete declaration_ hash based ID of the type of the `configurable` variable.
- `"offset"`: the specific offset within the contract's bytecode, in bytes, to the data section entry for the `configurable` variable.

> **Note**: This JSON should be both human-readable and parsable by the tooling around the FuelVM and the Sway programming language. There is a detailed specification for the binary encoding backing this readable descriptor. The [Function Selector Encoding](./fn-selector-encoding.md) section specifies the encoding for the function being selected to be executed and each of the argument types.
Expand Down Expand Up @@ -674,11 +677,11 @@ its JSON representation would look like:
"loggedTypes": [
{
"logId": "12896678128313068780",
"loggedType": "b2fa346d9ca66ceca61951a27dba2977b2a82b8aa8600670604f286a1393dffe"
"concreteTypeId": "b2fa346d9ca66ceca61951a27dba2977b2a82b8aa8600670604f286a1393dffe"
},
{
"logId": "16383228984366451899",
"loggedType": "eca2a040ce95fc19b7cd5f75bac530d052484d0b1a49267a2eb07a7a1b00c389"
"concreteTypeId": "eca2a040ce95fc19b7cd5f75bac530d052484d0b1a49267a2eb07a7a1b00c389"
}
]
}
Expand Down

0 comments on commit 671a030

Please sign in to comment.