threefoldtecharchive / twin_server_v2

Apache License 2.0
0 stars 0 forks source link

Contract get returns the data hex encoded #7

Open OmarElawady opened 3 years ago

OmarElawady commented 3 years ago

this is the result of contract get:

import { MessageBusClient } from "grid3_client"
async function main() {
    const payload = JSON.stringify( {"id": 1552})
    let rmb = new MessageBusClient();
    let msg = rmb.prepare("twinserver.contracts.get", [9], 0, 2);
    rmb.send(msg, payload);
    const result = await rmb.read(msg)
    console.log(result)
}
main()
{
  "version": 1,
  "contract_id": 1552,
  "twin_id": 9,
  "node_id": 4,
  "deploy_mentdata": "0x313233",
  "deployment_hash": "0x3163313037323532313732356233616437653436393631336239316137303932",
  "public_ips": 1,
  "state": "Created",
  "public_ips_list": [
    {
      "ip": "0x3138352e3230362e3132322e33352f3234",
      "gateway": "0x3138352e3230362e3132322e31",
      "contract_id": 1552
    }
  ]
}

also mentdata is correct? (it appears as deploy_mentdata in polka)