{"id":19506423,"url":"https://github.com/anton-karlovskiy/bitcoin-fork-explorer","last_synced_at":"2026-04-13T04:08:22.326Z","repository":{"id":249498615,"uuid":"831684301","full_name":"anton-karlovskiy/bitcoin-fork-explorer","owner":"anton-karlovskiy","description":"React frontend prototype with scalable architecture, CSS modules, dark mode, and Ethereum integration — optimized for performance and clean developer experience.","archived":false,"fork":false,"pushed_at":"2025-10-07T18:20:32.000Z","size":2975,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-07T19:41:22.094Z","etag":null,"topics":["anton-prototype","bitcoin","css-modules","dapp","dark-mode","developer-experience","eslint","ethereum","frontend","husky","interview-assignment","lint-staged","performance-optimization","project-setup","react","react-router","state-management","web-development","web3"],"latest_commit_sha":null,"homepage":"https://bitcoin-fork-explorer.vercel.app","language":"TypeScript","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/anton-karlovskiy.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-21T10:15:25.000Z","updated_at":"2025-10-07T18:29:32.000Z","dependencies_parsed_at":"2024-07-21T11:34:06.758Z","dependency_job_id":"9601395d-6937-43dd-9004-9edcf8b8ee79","html_url":"https://github.com/anton-karlovskiy/bitcoin-fork-explorer","commit_stats":null,"previous_names":["anton-karlovskiy/bitcoin-fork-explorer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anton-karlovskiy/bitcoin-fork-explorer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anton-karlovskiy%2Fbitcoin-fork-explorer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anton-karlovskiy%2Fbitcoin-fork-explorer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anton-karlovskiy%2Fbitcoin-fork-explorer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anton-karlovskiy%2Fbitcoin-fork-explorer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anton-karlovskiy","download_url":"https://codeload.github.com/anton-karlovskiy/bitcoin-fork-explorer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anton-karlovskiy%2Fbitcoin-fork-explorer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285369043,"owners_count":27159982,"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","status":"online","status_checked_at":"2025-11-20T02:00:05.334Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["anton-prototype","bitcoin","css-modules","dapp","dark-mode","developer-experience","eslint","ethereum","frontend","husky","interview-assignment","lint-staged","performance-optimization","project-setup","react","react-router","state-management","web-development","web3"],"created_at":"2024-11-10T22:37:04.874Z","updated_at":"2025-11-20T04:03:26.032Z","avatar_url":"https://github.com/anton-karlovskiy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Displaying Bitcoin Forks\n\nBlockchains are actually not chains of blocks but rather resemble a tree. When one parent block has more than one child block, the chain splits into one main chain and one or more forks.\nIn this problem, we assume that we have a [BTC Relay](http://btcrelay.org/) deployed on Ethereum that stores a set of Bitcoin blockchains (one main chain and several forks).\nYour task is two-fold: First, you will need to add functions to the library to extract the information of chains from the Ethereum smart contract. Second, you will have to display the forks in some way in the UI.\n\n## Task\n\nForks can happen relatively frequently depending on the blockchain. They are fairly rare in Bitcoin but a relay still needs to handle them. For users, forks pose a risk as well. In case their Bitcoin transaction ends up in a fork, the transaction is not part of the canonical main chain: if the user wants to prove that he/she made a transaction, the user would not be able to do that against the BTC-Relay.\n\nSince this can happen in practice, we would at least let the user know which chains the relay considers as forks. Hence, your task is to extract the chains from the relay smart contract and display them to the user. This question is somewhat open-ended and you can decide where you want to lay your focus.\n\n### Library\n\nOn the library, you will have to write a function that provides the chain elements to the UI\n\n- Create a getter that extracts the chain elements from the smart contract\n- Sort the chain elements according to their `current_height`\n- Return the sorted list of elements to the UI\n\n### UI\n\nIn the UI, you will have to create one or multiple pages that display the different forks. Ideally, a user can sensibly browse through the block headers. There is already a base suggestion available. Bootstrap is also already included, but feel free to switch to your favorite framework as well.\n\n## Existing Code\n\nThere are two sub-projects in this repository:\n\n- `dapp`: includes some boilerplate react code.\n- `relay`: includes the smart contract and the outline for the library in `relay/lib`\n\n### Lib\n\nMake sure you have the right [requirements](https://hardhat.org/tutorial/setting-up-the-environment.html) installed for smart contracts on Ethereum.\n\nIn one terminal, start your hardhat node:\n\n```bash\ncd relay\nyarn install\nyarn hardhat\n```\n\nIn another terminal, compile and deploy the contracts as well as creating the typechain interfaces:\n\n```bash\ncd relay\nyarn build\nyarn deploy\n```\n\nTip: you can link your projects with yarn to sync updates easily.\n\n```bash\nyarn link\n```\n\n### UI\n\nTo get started on the UI:\n\n```bash\ncd dapp\nyarn install\nyarn link relay\nyarn start\n```\n\nMake sure you have [Metamask](https://metamask.io/) installed in your browser, and set it to connect to your local hardhat node (if necessary, create a new network, setting the URL to `http://localhost:8545` and the Chain ID to `31337`).\n\n## Requirements and Criteria\n\nYou are supposed to solve the task with the following requirements:\n\n* Preferred programming language: TypeScript\n* Accepted programming language: TypeScript, JavaScript\n\nYour solution will be judged based on the following criteria:\n\n* Quality of the code\n* Readability of the code\n* Tests\n\n## Expected Code\n\nYour final solution should have the following code:\n\n* One or multiple pages displaying the different chains with their blocks\n* One or multiple functions in the library that extract the information from the smart contract\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanton-karlovskiy%2Fbitcoin-fork-explorer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanton-karlovskiy%2Fbitcoin-fork-explorer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanton-karlovskiy%2Fbitcoin-fork-explorer/lists"}