Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 30 additions & 25 deletions iips/IIP-0005/iip-0005.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ The following example can be taken as a reference for the API model.
"functionName": "0x5e7a300e640f645a4030aeb507c7be16909e6fa9711e7ca2d4397bbd967d5c50::auction::get_auction_metadata",
"typeArgs": [],
"arguments": [
"auc.iota",
"0x31deb8cbd320867089d52c37fed2d443520aac0fc5a957de1f64f9135b83f42b"
"0x31deb8cbd320867089d52c37fed2d443520aac0fc5a957de1f64f9135b83f42b",
"auc.iota"
]
}
}
Expand All @@ -81,12 +81,16 @@ The following example can be taken as a reference for the API model.

```json
{
"results": [
"start": "447575403174913",
"end": "447576324774913",
"address": "0xc9f649324694c0c18c6278c3a81945fb3ef0c9b91f21dd5b6a4364447ee348df",
"value": "500000000"
]
"jsonrpc": "2.0",
"id": 0,
"result": {
"functionReturnValues": [
"1748341418652",
"1748345018652",
"0xc9f649324694c0c18c6278c3a81945fb3ef0c9b91f21dd5b6a4364447ee348df",
"500000000"
]
}
}
```

Expand All @@ -95,26 +99,26 @@ The following example can be taken as a reference for the API model.
A new GraphQL read query is added to the IOTA GraphQL RPC interface with the following structure:

```graphql
view(
moveViewCall(
functionName: String!
typeArguments: [String]
arguments: [String]
): ViewResults!
): MoveViewResult!
```

#### Example

Query:

```graphql
view(
functionName: "0x5e7a300e640f645a4030aeb507c7be16909e6fa9711e7ca2d4397bbd967d5c50::auction::get_auction_metadata"
typeArgs: []
arguments: [ "auc.iota", "0x31deb8cbd320867089d52c37fed2d443520aac0fc5a957de1f64f9135b83f42b"]
) {
errors
results {
json
{
moveViewCall(
functionName: "0x5e7a300e640f645a4030aeb507c7be16909e6fa9711e7ca2d4397bbd967d5c50::auction::get_auction_metadata"
typeArgs: []
arguments: ["0x31deb8cbd320867089d52c37fed2d443520aac0fc5a957de1f64f9135b83f42b", "auc.iota"]
) {
error
results
}
}
```
Expand All @@ -124,13 +128,14 @@ Response:
```graphql
{
"data": {
"view": {
"results": {
"start": "447575403174913",
"end": "447576324774913",
"address": "0xc9f649324694c0c18c6278c3a81945fb3ef0c9b91f21dd5b6a4364447ee348df",
"value": "500000000"
}
"moveViewCall": {
"error": null,
"results": [
"1748341418652",
"1748345018652",
"0xc9f649324694c0c18c6278c3a81945fb3ef0c9b91f21dd5b6a4364447ee348df",
"500000000"
]
}
}
}
Expand Down