solidity-ifc-data
Solidity Smart Contract: IFC Data
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.6%) to scientific vocabulary
Keywords
Repository
Solidity Smart Contract: IFC Data
Basic Info
- Host: GitHub
- Owner: block-foundation
- License: cc-by-sa-4.0
- Language: TypeScript
- Default Branch: main
- Homepage: https://www.blockfoundation.io
- Size: 179 KB
Statistics
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
- Releases: 0
Topics
Metadata Files
README.md
IFC Data
Block Foundation Smart Contract Series [Solidity]

Contents
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.
Introduction
The IFCDataContract is a Solidity smart contract designed to integrate with Industry Foundation Classes (IFC) data via an Oracle.
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.
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.
IFCDataContractaims to bridge the gap between the decentralized world of Ethereum and the AEC industry by allowing seamless access to IFC data.
The 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.
The contract includes:
- A function (
requestIFCData) to request IFC data from the oracle. This function emits aReceivedNewRequestIdevent that includes the unique request ID for tracking the request. - 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 anIFCDataUpdatedevent. - A function (
getIFCData) to access the stored IFC data using the request ID.
The 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.
This 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.
Features
- Oracle Integration: Request and retrieve IFC data via a decentralized oracle.
- Access Control: Based on the
Ownablepattern, ensures only authorized calls. - Event Logging: Enhanced traceability and frontend integration support.
Setup & Installation
bash
git clone <repository-link>
cd IFCDataContract
- Install dependencies:
bash
npm install
Usage
- Compile the Contract:
bash
npx hardhat compile
- Deploy the Contract:
bash
npx hardhat run scripts/deploy.js --network rinkeby
Replace rinkeby with your desired network.
Testing
- Run the Test Script:
bash
npx hardhat test
Class Diagram
``` mermaid classDiagram
class IFCDataContract { -address public oracle -mapping(bytes32 => IFCData) private ifcData -event ReceivedNewRequestId(bytes32 indexed requestId) -event IFCDataUpdated(bytes32 indexed requestId, string buildingName, uint256 buildingHeight, uint256 buildingArea, uint256 buildingVolume) -modifier onlyOracle() +function requestIFCData() public onlyOwner +function fulfillIFCData(bytes32 _requestId, string memory _buildingName, uint256 _buildingHeight, uint256 _buildingArea, uint256 _buildingVolume) public onlyOracle +function getIFCData(bytes32 _requestId) public view returns (IFCData memory) }
class Ownable { -address public owner -event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -modifier onlyOwner() +function transferOwnership(address newOwner) public onlyOwner }
class IFCData { string buildingName uint256 buildingHeight uint256 buildingArea uint256 buildingVolume }
IFCDataContract --|> Ownable ```
In this diagram:
IFCDataContractis the main contract.- It is a subclass of
Ownable, meaning it inherits from theOwnablecontract. IFCDatais a struct used in theIFCDataContractcontract.- The contract has a mapping called
ifcDatafrombytes32toIFCData. - Functions, modifiers, and events in the contract are also represented.
Colophon
Authors
This is an open-source project by the Block Foundation.
The 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.
website: www.blockfoundation.io
Development Resources
Contributing
We'd love for you to contribute and to make this project even better than it is today! Please refer to the contribution guidelines for information.
Legal Information
Copyright
Copyright © 2023 Stichting Block Foundation. All Rights Reserved.
License
Except as otherwise noted, the content in this repository is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) License, and code samples are licensed under the Apache 2.0 License.
Also see LICENSE and LICENSE-CODE.
Disclaimer
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.
Owner
- Name: Block Foundation
- Login: block-foundation
- Kind: organization
- Email: info@blockfoundation.io
- Location: Netherlands
- Website: https://www.blockfoundation.io
- Repositories: 105
- Profile: https://github.com/block-foundation
The Block Foundation mission is enabling architects to take back initiative and contribute in solving the mismatch in housing through blockchain technology.
Citation (CITATION.cff)
cff-version: 1.2.0
title: "IFCData"
keywords:
- Solidity
- Ethereum
- Smart Contract
- Blockchain
version: 0.0.1
date-released: 2023-07-01
repository-code: "https://github.com/block-foundation/solidity-ifc-data"
url: "https://github.com/block-foundation/solidity-ifc-data"
# doi: "10.5281/zenodo.XXXXXXX"
license: "Apache-2.0"
license-url: "https://www.apache.org/licenses/LICENSE-2.0"
message: >-
If you use this software, please cite it using
the metadata from this file.
type: software
authors:
- given-names: Lars Bastiaan
family-names: van Vianen
email: lars@blockfoundation.io
affiliation: Block Foundation
orcid: "https://orcid.org/0000-0002-8790-8630"
GitHub Events
Total
- Delete event: 2
- Issue comment event: 4
- Pull request event: 4
- Create event: 2
Last Year
- Delete event: 2
- Issue comment event: 4
- Pull request event: 4
- Create event: 2