{"id":39710640,"url":"https://github.com/block-foundation/solidity-ifc-data","last_synced_at":"2026-01-18T10:38:08.206Z","repository":{"id":185919019,"uuid":"673633445","full_name":"block-foundation/solidity-ifc-data","owner":"block-foundation","description":"Solidity Smart Contract: IFC Data","archived":false,"fork":false,"pushed_at":"2024-10-28T08:26:04.000Z","size":183,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-04T21:41:47.462Z","etag":null,"topics":["aec","architecture","bim","bim-applications","bim-data","bim-model","block-foundation","blockfoundation","construction","eth","ethereum","ifc","industry-foundation-classes","smart-contracts","sol","solidity"],"latest_commit_sha":null,"homepage":"https://www.blockfoundation.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-sa-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/block-foundation.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":".github/SUPPORT.md","governance":".github/GOVERNANCE.md","roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"block-foundation","open_collective":"block"}},"created_at":"2023-08-02T04:39:58.000Z","updated_at":"2024-08-04T19:17:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"2420e59c-a487-4cac-a7d7-cb2ef19d2d14","html_url":"https://github.com/block-foundation/solidity-ifc-data","commit_stats":null,"previous_names":["block-foundation/solidity-ifc-data"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/block-foundation/solidity-ifc-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-foundation%2Fsolidity-ifc-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-foundation%2Fsolidity-ifc-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-foundation%2Fsolidity-ifc-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-foundation%2Fsolidity-ifc-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/block-foundation","download_url":"https://codeload.github.com/block-foundation/solidity-ifc-data/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-foundation%2Fsolidity-ifc-data/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28534551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["aec","architecture","bim","bim-applications","bim-data","bim-model","block-foundation","blockfoundation","construction","eth","ethereum","ifc","industry-foundation-classes","smart-contracts","sol","solidity"],"created_at":"2026-01-18T10:38:08.035Z","updated_at":"2026-01-18T10:38:08.103Z","avatar_url":"https://github.com/block-foundation.png","language":"TypeScript","funding_links":["https://github.com/sponsors/block-foundation","https://opencollective.com/block"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"right\"\u003e\n\n[![GitHub License](https://img.shields.io/github/license/block-foundation/blocktxt?style=flat-square\u0026logo=readthedocs\u0026logoColor=FFFFFF\u0026label=\u0026labelColor=%23041B26\u0026color=%23041B26\u0026link=LICENSE)](https://github.com/block-foundation/solidity-ifc-data/blob/main/LICENSE)\n[![devContainer](https://img.shields.io/badge/Container-Remote?style=flat-square\u0026logo=visualstudiocode\u0026logoColor=%23FFFFFF\u0026label=Remote\u0026labelColor=%23041B26\u0026color=%23041B26)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/block-foundation/solidity-ifc-data)\n\n\u003c/div\u003e\n\n---\n\n\u003cdiv\u003e\n    \u003cimg align=\"right\" src=\"https://raw.githubusercontent.com/block-foundation/brand/master/src/logo/logo_gray.png\" width=\"96\" alt=\"Block Foundation Logo\"\u003e\n    \u003ch1 align=\"left\"\u003eIFC Data\u003c/h1\u003e\n    \u003ch3 align=\"left\"\u003eBlock Foundation Smart Contract Series [Solidity]\u003c/h3\u003e\n\u003c/div\u003e\n\n---\n\n\u003cimg align=\"right\" width=\"75%\" src=\"https://raw.githubusercontent.com/block-foundation/brand/master/src/image/repository_cover/block_foundation-structure-03-accent.jpg\"  alt=\"Block Foundation Brand\"\u003e\n\n### Contents\n\n- [Introduction](#introduction)\n- [Colophon](#colophon)\n\n\u003cbr clear=\"both\"/\u003e\n\n---\n\n\u003cdiv align=\"right\"\u003e\n\n[![Report a Bug](https://img.shields.io/badge/Report%20a%20Bug-GitHub?style=flat-square\u0026\u0026logoColor=%23FFFFFF\u0026color=%23E1E4E5)](https://github.com/block-foundation/solidity-ifc-data/issues/new?assignees=\u0026labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected\u0026projects=\u0026template=bug_report.yml)\n[![Request a Feature](https://img.shields.io/badge/Request%20a%20Feature-GitHub?style=flat-square\u0026\u0026logoColor=%23FFFFFF\u0026color=%23E1E4E5)](https://github.com/block-foundation/solidity-ifc-data/issues/new?assignees=\u0026labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected\u0026projects=\u0026template=feature_request.yml)\n[![Ask a Question](https://img.shields.io/badge/Ask%20a%20Question-GitHub?style=flat-square\u0026\u0026logoColor=%23FFFFFF\u0026color=%23E1E4E5)](https://github.com/block-foundation/solidity-ifc-data/issues/new?assignees=\u0026labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected\u0026projects=\u0026template=question.yml)\n[![Make a Suggestion](https://img.shields.io/badge/Make%20a%20Suggestion-GitHub?style=flat-square\u0026\u0026logoColor=%23FFFFFF\u0026color=%23E1E4E5)](https://github.com/block-foundation/solidity-ifc-data/issues/new?assignees=\u0026labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected\u0026projects=\u0026template=suggestion.yml)\n[![Start a Discussion](https://img.shields.io/badge/Start%20a%20Discussion-GitHub?style=flat-square\u0026\u0026logoColor=%23FFFFFF\u0026color=%23E1E4E5)](https://github.com/block-foundation/solidity-ifc-data/issues/new?assignees=\u0026labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected\u0026projects=\u0026template=discussion.yml)\n\n\u003c/div\u003e\n\n**The `IFCDataContract` is a Solidity-based Ethereum smart contract designed to facilitate the integration with Industry Foundation Classes (IFC) data through a decentralized oracle mechanism.**\n\n## Introduction\n\nThe `IFCDataContract` is a Solidity smart contract designed to integrate with Industry Foundation Classes (IFC) data via an Oracle. \n\n\u003e IFC is a data standard used widely in the architecture, engineering, and construction (AEC) industry to facilitate interoperability between different software used in these fields. The data standard encompasses various elements of building information modeling (BIM) including building elements, cost management, project management, structural elements, and more.\n\n\u003e Industry Foundation Classes (IFC) is a crucial data standard in the architecture, engineering, and construction (AEC) industry, serving to promote interoperability across varying software platforms. `IFCDataContract` aims to bridge the gap between the decentralized world of Ethereum and the AEC industry by allowing seamless access to IFC data.\n\nThe `IFCDataContract` contract acts as a client contract in a decentralized oracle network and is designed to request specific IFC data from an external data source, receive and store that data, and then provide access to the stored data.\n\nThe contract includes:\n\n- A function (`requestIFCData`) to request IFC data from the oracle. This function emits a `ReceivedNewRequestId` event that includes the unique request ID for tracking the request.\n- A function (`fulfillIFCData`) that is used by the oracle to fulfill the data request. This function updates the contract's state with the received data and emits an `IFCDataUpdated` event.\n- A function (`getIFCData`) to access the stored IFC data using the request ID.\n\nThe contract is derived from the `Ownable` contract, giving it a basic access control mechanism with an owner role. The owner can request IFC data, while the oracle is the only address authorized to fulfill data requests.\n\nThis contract represents a simple yet powerful example of how blockchain technology can interact with industry-specific standards like IFC, enabling the creation of decentralized applications that can serve specialized use cases in sectors such as construction and architecture.\n\n## Features\n\n- **Oracle Integration**: Request and retrieve IFC data via a decentralized oracle.\n- **Access Control**: Based on the `Ownable` pattern, ensures only authorized calls.\n- **Event Logging**: Enhanced traceability and frontend integration support.\n\n## Setup \u0026 Installation\n\n1. **Prerequisites**:\n   - [Node.js](https://nodejs.org/)\n   - [npm](https://www.npmjs.com/)\n   - [Hardhat](https://hardhat.org/)\n   - Ethereum Wallet (e.g., [Metamask](https://metamask.io/))\n\n2. **Clone the repository**:\n\n   ```bash\n   git clone \u003crepository-link\u003e\n   cd IFCDataContract\n   ```\n\n3. **Install dependencies**:\n\n   ```bash\n   npm install\n   ```\n\n## Usage\n\n1. **Compile the Contract**:\n\n   ```bash\n   npx hardhat compile\n   ```\n\n2. **Deploy the Contract**:\n\n   ```bash\n   npx hardhat run scripts/deploy.js --network rinkeby\n   ```\n\n   Replace `rinkeby` with your desired network.\n\n## Testing\n\n1. **Run the Test Script**:\n\n   ```bash\n   npx hardhat test\n   ```\n\n\n## Class Diagram\n\n``` mermaid\nclassDiagram\n\n  class IFCDataContract {\n    -address public oracle\n    -mapping(bytes32 =\u003e IFCData) private ifcData\n    -event ReceivedNewRequestId(bytes32 indexed requestId)\n    -event IFCDataUpdated(bytes32 indexed requestId, string buildingName, uint256 buildingHeight, uint256 buildingArea, uint256 buildingVolume)\n    -modifier onlyOracle()\n    +function requestIFCData() public onlyOwner\n    +function fulfillIFCData(bytes32 _requestId, string memory _buildingName, uint256 _buildingHeight, uint256 _buildingArea, uint256 _buildingVolume) public onlyOracle\n    +function getIFCData(bytes32 _requestId) public view returns (IFCData memory)\n  }\n\n  class Ownable {\n    -address public owner\n    -event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)\n    -modifier onlyOwner()\n    +function transferOwnership(address newOwner) public onlyOwner\n  }\n\n  class IFCData {\n    string buildingName\n    uint256 buildingHeight\n    uint256 buildingArea\n    uint256 buildingVolume\n  }\n\n  IFCDataContract --|\u003e Ownable\n```\n\nIn this diagram:\n\n- `IFCDataContract` is the main contract.\n- It is a subclass of `Ownable`, meaning it inherits from the `Ownable` contract.\n- `IFCData` is a struct used in the `IFCDataContract` contract.\n- The contract has a mapping called `ifcData` from `bytes32` to `IFCData`.\n- Functions, modifiers, and events in the contract are also represented.\n\n\n\n---\n\n## Colophon\n\n### Authors\n\nThis is an open-source project by the **[Block Foundation](https://www.blockfoundation.io \"Block Foundation website\")**.\n\nThe Block Foundation mission is enabling architects to take back initiative and contribute in solving the mismatch in housing through blockchain technology. Therefore the Block Foundation seeks to unschackle the traditional constraints and construct middle ground between rent and the rigidity of traditional mortgages.\n\nwebsite: [www.blockfoundation.io](https://www.blockfoundation.io \"Block Foundation website\")\n\n### Development Resources\n\n#### Contributing\n\nWe'd love for you to contribute and to make this project even better than it is today!\nPlease refer to the [contribution guidelines](.github/CONTRIBUTING.md) for information.\n\n### Legal Information\n\n#### Copyright\n\nCopyright \u0026copy; 2023 [Stichting Block Foundation](https://www.blockfoundation.io/ \"Block Foundation website\"). All Rights Reserved.\n\n#### License\n\nExcept as otherwise noted, the content in this repository is licensed under the\n[Creative Commons Attribution 4.0 International (CC BY 4.0) License](https://creativecommons.org/licenses/by/4.0/), and\ncode samples are licensed under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).\n\nAlso see [LICENSE](https://github.com/block-foundation/community/blob/master/src/LICENSE) and [LICENSE-CODE](https://github.com/block-foundation/community/blob/master/src/LICENSE-CODE).\n\n#### Disclaimer\n\n**THIS SOFTWARE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock-foundation%2Fsolidity-ifc-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblock-foundation%2Fsolidity-ifc-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock-foundation%2Fsolidity-ifc-data/lists"}