{"id":18601606,"url":"https://github.com/hsk81/bit-oracle","last_synced_at":"2026-05-08T01:36:03.181Z","repository":{"id":143140757,"uuid":"145321348","full_name":"hsk81/bit-oracle","owner":"hsk81","description":"A bit oracle realized as an Ethereum Solidity contract","archived":false,"fork":false,"pushed_at":"2018-08-24T14:09:33.000Z","size":770,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-18T01:33:06.305Z","etag":null,"topics":["bit","contract","ethereum","oracle","solidity"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hsk81.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2018-08-19T16:53:13.000Z","updated_at":"2024-03-16T15:25:08.000Z","dependencies_parsed_at":"2023-04-04T04:24:21.454Z","dependency_job_id":null,"html_url":"https://github.com/hsk81/bit-oracle","commit_stats":null,"previous_names":["hsk81/bit-oracle"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsk81%2Fbit-oracle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsk81%2Fbit-oracle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsk81%2Fbit-oracle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsk81%2Fbit-oracle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hsk81","download_url":"https://codeload.github.com/hsk81/bit-oracle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254576387,"owners_count":22094358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bit","contract","ethereum","oracle","solidity"],"created_at":"2024-11-07T02:08:51.597Z","updated_at":"2026-05-08T01:35:58.162Z","avatar_url":"https://github.com/hsk81.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/hsk81/BitOracle.svg?branch=master)](https://travis-ci.org/hsk81/BitOracle)\n[![Coverage Status](https://coveralls.io/repos/github/hsk81/BitOracle/badge.svg?branch=master)](https://coveralls.io/github/hsk81/BitOracle?branch=master)\n\n# A simple Bit Oracle on Ethereum\nA Solidity contract realizing a simple bit oracle: A user can click either a `get`, `set` or `clear` bit button to get or set the oracle's state from or on the blockchain. That's it.\n\n## Run Contract Compilation\n```\n$ npm run compile\n```\n```\nCompiling .\\contracts\\BitLibrary.sol...\nCompiling .\\contracts\\BitOracle.sol...\nCompiling .\\contracts\\Migrations.sol...\nWriting artifacts to .\\build\\contracts\n```\n## Run Project Build\n```\n$ npm run build\n```\n### with `--debug` flag (to enable source maps):\n```\nnpm run -- build --debug\n```\n## Run Local Blockchain\n```\n$ npm run ganache-cli\n```\n```\nListening on 127.0.0.1:8545\n```\n## Run Contract Migration\n```\n$ npm run migrate\n```\n```\nUsing network 'development'.\n\nRunning migration: 1_migrations.js ...\nRunning migration: 2_bit_library.js ...\nRunning migration: 3_bit_oracle.js ...\n```\n## Run Contract Tests\n```\n$ npm run test\n```\n```\nUsing network 'development'.\n\n  Contract: BitOracle\n    √ should exist on deployment\n    √ should have an address\n    √ should have a get-bit function\n    √ should get a bit as false\n    √ should have a set-bit function\n    √ should set a bit as true (73ms)\n    √ should clear a bit emitting an event (74ms)\n\n  7 passing (217ms)\n```\n## Run Development Server\n```\n$ npm run start\n```\n```\n** browser-sync config **\n{ injectChanges: false,\n  files: [ './build/**/*.{html,css,js}' ],\n  watchOptions: { ignored: 'node_modules' },\n  server: { baseDir: './build', ...},\n  port: 8080 }\n```\n```\n[Browsersync] Access URLs:\n ---------------------------------------\n       Local: http://localhost:8080\n    External: http://172.27.243.112:8080\n ---------------------------------------\n          UI: http://localhost:3001\n UI External: http://172.27.243.112:3001\n ---------------------------------------\n[Browsersync] Serving files from: ./build\n[Browsersync] Watching files...\n18.08.24 15:31:21 200 GET /index.html\n18.08.24 15:31:21 200 GET /index.js\n```\n## User Interface\n```\nhttp://127.0.0.1:8080\n```\nVisit the above URL, and open the development *inspector* (`F12`) in the browser, where in the *console* section the responses from the blockchain upon clicking the `set`, `get` and `clear` bit buttons will be visible.\n\n* Click `get` bit button:\n```\n[on:get-bit] \u003e [false]\n```\n* Click `set` bit button:\n```\n[on:set-bit] \u003e [{…}]\n```\n* Click `get` bit button:\n```\n[on:get-bit] \u003e [true]\n```\n* Click `clear` bit button:\n```\n[on:clr-bit] \u003e [{…}]\n```\n* Click `get` bit button:\n```\n[on:get-bit] \u003e [false]\n```\n\n**NOTE:** In case of an error w.r.t. missing contracts, try to run `npm run build` and `npm run migrate` again.\n\n## Copyright\n\n © 2018 Hasan Karahan, https://github.com/hsk81.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhsk81%2Fbit-oracle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhsk81%2Fbit-oracle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhsk81%2Fbit-oracle/lists"}