{"id":37154359,"url":"https://github.com/bandprotocol/oracle-consumer","last_synced_at":"2026-01-14T18:12:30.849Z","repository":{"id":163861747,"uuid":"592167410","full_name":"bandprotocol/oracle-consumer","owner":"bandprotocol","description":"Example cosmos-sdk module that utilizes oracle request via IBC","archived":false,"fork":false,"pushed_at":"2025-02-14T09:59:12.000Z","size":2246,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-14T10:38:15.962Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bandprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-23T04:52:25.000Z","updated_at":"2025-02-14T09:59:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"0d6cd0e5-eb5e-43ee-a688-509172dce60e","html_url":"https://github.com/bandprotocol/oracle-consumer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bandprotocol/oracle-consumer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bandprotocol%2Foracle-consumer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bandprotocol%2Foracle-consumer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bandprotocol%2Foracle-consumer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bandprotocol%2Foracle-consumer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bandprotocol","download_url":"https://codeload.github.com/bandprotocol/oracle-consumer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bandprotocol%2Foracle-consumer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28429958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T18:12:30.364Z","updated_at":"2026-01-14T18:12:30.844Z","avatar_url":"https://github.com/bandprotocol.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oracle Consumer Chain\n\nThe oracle-consumer is an application of the Cosmos SDK that demonstrates the use of the [pricefeed-module](https://github.com/bandprotocol/oracle-consumer/tree/main/x/pricefeed) implemented by BandProtocol. This module allows other Cosmos SDK applications to easily obtain data from BandChain through IBC.\n\n- `oracle-consumerd`: The Oracle Consumer Daemon and command-line interface (CLI). Runs a full node of the consumer application. \n\noracle-consumer is built on the Cosmos SDK using the following modules:\n\n- `x/consumer`: Consume data from pricefeed module.\n- `x/pricefeed`: Logic of requesting data from BandChain.\n\n### Prerequisites\nBe sure you have met the prerequisites before you install and use Consumer Chain\n\n#### Operating systems\n- Ubuntu 22.04\n\n#### Go (for ignite and consumer chain)\n- 1.19.5 or higher\n\n#### Rust (for Hermes Relayer)\n- 1.65.0 or higher\n\n\n\n### Running Consumer Chain\nThis guide will provide instructions on how to install the `oracle-consumerd` binary and run the CLI on a server. By following these steps, you will have the binary properly set up and ready to use.\n\n\n##### Install ignite CLI\nIgnite CLI is an easy-to-use CLI tool for creating and maintaining sovereign application-specific blockchains. Blockchains created with Ignite CLI use Cosmos SDK and Tendermint. \n\nTo install the `ignite` binary in `/usr/local/bin` run the following command:\n```\ncurl https://get.ignite.com/cli! | bash\n```\n\n##### Installing build-essential package in Ubuntu \n\n```\nsudo apt update \u0026\u0026 sudo apt install build-essential\n```\n\n##### Install the binaries and run consumer chain\n\n```\ngit clone -b \u003clatest-release-tag\u003e https://github.com/bandprotocol/oracle-consumer.git\ncd oracle-consumer \u0026 ignite chain serve -v\n```\n\nYou can locate the `\u003clatest-release-tag\u003e` [here](https://github.com/bandprotocol/oracle-consumer/releases).\n\n\u003e When you initiate the chain, the Alice and Bob mnemonic will be displayed in your logging. Kindly preserve this mnemonic for use in the section below.\n\n```\n[IGNITE] ✔ Added account alice with address cosmos1d2dymcelkm6qgfaje3t4xt8vlpqfn227nvu9ja and mnemonic:\n[IGNITE]   [your alice mnemonic]\n[IGNITE] ✔ Added account bob with address cosmos1cn9yzz5p7scdc7s0he7vujyfcvtldlnv86tnys and mnemonic:\n[IGNITE]   [your bob mnemonic]\n```\n\nBy executing the command `ignite chain serve -v`, the oracle-consumerd binary will be installed and your consumer chain will start running.\n\nVerify that everything is installed successfully by running:\n\n```\noracle-consumerd version --long\n```\n\nYou should see something similar to the following:\n\n```\n...\nbuild_tags: \"\"\ncommit: ...\ncosmos_sdk_version: v0.46.12\ngo: go version go1.19.5 darwin/amd64\nname: Oracle-Consumer\nserver_name: oracle-consumerd\nversion: \"\"\n```\n\n### Connecting Hermes Relayer to BandChain\nThe last step is to set up a relayer to listen and relay IBC packets between an oracle-consumer chain and BandChain.\n\nHere are the simple guides for setting up a relayer.\n* [Setup Hermes Relayer](docs/setup_hermes_relayer.md)\n\n\n### Open and Vote the source channel param change proposal\nThe current default value for the source channel is `[not_set]`. If you wish to obtain BandChain data through IBC, you will need to open the proposal to change the source channel param to your own source channel. An example of how to open parameter change proposal is provided below.\n\n#### Create proposal.json\n\u003e Note: this example has been provided in `example/proposals/source-channel-params-change.json`\n\n```json\n{\n  \"messages\": [\n    {\n      \"@type\": \"/pricefeed.MsgUpdateParams\",\n      \"authority\": \u003cGov Address\u003e,\n      \"params\": {\n        \"ask_count\": \"16\",\n        \"min_count\": \"10\",\n        \"min_ds_count\": \"3\",\n        \"prepare_gas_base\": \"3000\",\n        \"prepare_gas_each\": \"600\",\n        \"execute_gas_base\": \"70000\",\n        \"execute_gas_each\": \"7500\",\n        \"source_channel\": \"channel-1\",\n        \"fee_limit\": [\n          {\n            \"amount\": \"1000000\",\n            \"denom\": \"uband\"\n          }\n        ]\n      }\n    }\n  ],\n  \"metadata\": \"ipfs://CID\",\n  \"deposit\": \"10000000stake\",\n  \"title\": \"Param change for SourceChannel\",\n  \"summary\": \"Proposal for change SourceChannel param in pricefeed module\"\n}\n```\n\nNote that you have to put your gov module address in authority field, you can get it by running this command `oracle-consumerd query auth module-account gov`\n\n#### Submit proposal\n\n```\noracle-consumerd tx gov submit-proposal example/proposals/source-channel-params-change.json --from alice\n```\n\n#### Vote the proposal\n\n```\noracle-consumerd tx gov vote 1 yes --from alice\n```\n\n```\noracle-consumerd tx gov vote 1 yes --from bob\n```\n\n### Open and Vote the update symbol requests proposal\nThe purpose of this proposal is to request price data from BandChain at `block_interval` specified in the proposal. If the proposal is approved, the pricefeed module will retrieve the data and store the response on the consumer chain.\n\n#### Create proposal.json\n\u003e Note: this example has been provided in `example/proposals/update-symbol-requests.json`\n\n```json\n{\n    \"title\": \"Update Symbol requests\",\n    \"description\": \"Update symbol that request price from BandChain\",\n    \"symbol_requests\": [\n        {\n            \"symbol\": \"BTC\",\n            \"oracle_script_id\": \"396\",\n            \"block_interval\": \"40\"\n        },\n        {\n            \"symbol\": \"ETH\",\n            \"oracle_script_id\": \"396\",\n            \"block_interval\": \"40\"\n        }\n    ],\n    \"deposit\": \"10000000stake\"\n}\n```\nYou can also delete symbol request by set `\"block_interval\": \"0\"` on this proposal.\n\n#### Submit proposal\n\n```\noracle-consumerd tx gov submit-legacy-proposal update-symbol-request example/proposals/update-symbol-requests.json --from alice\n```\n\n#### Vote the proposal\n\n```\noracle-consumerd tx gov vote 2 yes --from alice\n```\n\n```\noracle-consumerd tx gov vote 2 yes --from bob\n```\n\n### Check proposal status\n\n```\noracle-consumerd query gov proposals\n```\n\n### Another way to initiate source channel and symbol requests\n\nTo utilize the Ignite feature to replace the genesis state, insert the code shown below into the `config.yml` file. and restat the chin by using `ignite chain serve -r -v` command.\n\n```yml\ngenesis:\n  app_state:\n    pricefeed:\n      params:\n        source_channel: \"channel-0\"\n      symbol_requests: [{\"symbol\": \"BAND\", \"oracle_script_id\": 396, \"block_interval\":  40}]\n```\n\n### Query latest price that got from BandChain\n\nQuery latest price that got from BandChin via pricefeed module\n\n```\noracle-consumerd query pricefeed price BAND\n```\n\nQuery latest price that got from BandChin via consumer module\n\n```\noracle-consumerd query consumer price BAND\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbandprotocol%2Foracle-consumer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbandprotocol%2Foracle-consumer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbandprotocol%2Foracle-consumer/lists"}