Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 2.34 KB

Morphware.md

File metadata and controls

59 lines (42 loc) · 2.34 KB

Morphware

Type

Morphware

Description

Cloud compute prices and metadata. Morphware needs rental prices of cloud compute providers to help determine the rewards for participating compute providers in their decentralized network.

Parameters

  1. version
    • Description: Morphware query version. Morphware provides detailed specs for each version here.
    • ABI type: uint256
    • Example: 1

Expected Response

  • Description: An array of JSON strings containing cloud compute prices and metadata. Refer to the detailed response requirements of each Morphware query version here.
  • ABI type: string[] (Expected Solidity type to decode the bytes reponse into. More info here)
  • Packed: false
  • Examples: here

Query Data

  • Description: Query data is needed to generate the query ID. To generate the query data, the version parameter value (e.g. 1) is first encoded as bytes, then the query type string with those bytes. Order of encoding matters.
  • ABI type: bytes
  • Examples: here

Query ID

  • Description: The unique identifier for this query is constructed by taking the Keccak hash of the query data bytes.
  • ABI type: bytes32
  • Examples: here

JSON Representation

The JSON representation of this query type can be used in a variety of languages to construct query objects.

{
  "type": "Morphware",
  "abi": [
    {
      "type": "uint256",
      "name": "version"
    }
  ],
  "response": {
    "type": "string[]",
    "packed": false
  }
}

Dispute Considerations & Potential Data Sources

Reporters should review the dispute considerations and suggested data sources for each Morphware query version here.