diff --git a/iips/IIP-0005/iip-0005.md b/iips/IIP-0005/iip-0005.md index 33ce198..f36d997 100644 --- a/iips/IIP-0005/iip-0005.md +++ b/iips/IIP-0005/iip-0005.md @@ -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" ] } } @@ -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" + ] + } } ``` @@ -95,11 +99,11 @@ 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 @@ -107,14 +111,14 @@ view( 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 } } ``` @@ -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" + ] } } }