# oracle-demo **Repository Path**: eostech/oracle-demo ## Basic Information - **Project Name**: oracle-demo - **Description**: demo一个预言机的场景 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-05-07 - **Last Updated**: 2021-10-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # oracle-demo ## 介绍 demo一个预言机的场景 ## 软件架构 [架构图](https://www.processon.com/view/link/609a4e911e08533e4299262e) ## 使用说明 ### 账户 - oracle账户: oracle - provider账户: provider1 - consumer账户: consumer1 ### 合约执行文件(wasm abi) 预言机合约:oracle/build/ 消费者合约:consumer/build/ ### API - RPC API: http://s1.hpe.net.net:3001 - Wallet API:http://s1.hpe.net.net:3000 ### consumer查询天气预报数据 ``` POST /v1/chain/get_table_rows HTTP/1.0 Host: s1.hpe.net.cn:3001 content-length: 276 Accept: */* Connection: close { "json": true, "code": "consumer1", "scope": "consumer1", "table": "datarecord", "table_key": "", "lower_bound": "", "upper_bound": "", "limit": 100, "key_type": "", "index_position": "", "encode_type": "dec", "reverse": false, "show_payer": false } ----- { "rows": [{ "id": 0, "data": "{\"weatherinfo\":{\"city\":\"北京\",\"cityid\":\"101010100\",\"temp\":\"27.9\",\"WD\":\"南风\",\"WS\":\"小于3级\",\"SD\":\"28%\",\"AP\":\"1002hPa\",\"njd\":\"暂无实况\",\"WSE\":\"<3\",\"time\":\"17:55\",\"sm\":\"2.1\",\"isRadar\":\"1\",\"Radar\":\"JC_RADAR_AZ9010_JB\"}}", "timestamp": 1620789398, "comment": "" } ], "more": true } ```