Skip to content

dataswap/core

Repository files navigation

Welcome to @dataswapcore/contracts 👋

Version Documentation Maintenance License: MIT and APACHE

Dataswap

Dataswap is a blockchain-based Layer 2 project built on IPFS and Filecoin, functioning as a decentralized open data exchange platform. Its goal is to aggregate open datasets from various regions and industries globally, enabling the permanent storage of valuable human data. Additionally, Dataswap offers comprehensive and reliable services for data retrieval, downloading, and analysis. Through these efforts, it aims to facilitate data sharing and collaborative progress for humanity.

Features

Aggregating open big data from various global regions and industries, encompassing economic, financial, medical, and health data types. This creates efficient and valuable gateways to datasets.

Implement a decentralized matching mechanism to attract more open dataset suppliers, storage providers, retrieval providers, compute providers, and users, fostering global data sharing and innovation.

  • Dataswap storage

    • about Discussion on Trustless Notary and Trustless Notary Design Space + Guidelines, Dataswap storage has undertaken a more in-depth implementation in this regard.

      • Enabling proof and verification of stored Valid Data Consistency.
      • Monitoring client's valid data storage and verification with finer granularity.
      • Simplifying notary work through code.
      • Decoupling data cap and notary signatures to prevent malicious behavior.
    • Utilizing a data authentication mechanism (including data submit, verification, and auditing) to ensure the genuine value of platform data.

    • Utilizing the decentralized automated matching mechanism of DataSwap storage for the permanent storage (using Filecoin) and distribution of datasets, establishing a transparent and publicly accessible distributed data index.

  • Dataswap retrieve

    • Provide open retrieval and download services. This includes various access methods such as web interfaces, API integration, and file downloads.
      • Customers pay funds into smart contracts to easily search for and access the required datasets.
      • Retrieval service providers receive incentives by offering retrieval services.
  • Dataswap compute

    • Providing decentralized data analysis and matching services, empowering data-driven decision-making and intelligent solutions.

Documentation

For more details about Dataswap, check out the Dataswap Spec.

Setup

Please make sure to install the following before working with codebase:

npm

Node.js (16+)

Hardhat

Foundry

Deploy and Upgrade

export PRIVATE_KEY=“your private key” ;
export [network name]_RPC_URL="deploy network rpc url";
export DEPLOYER_ADDRESS="deployer address”;

# Deploy 
npx hardhat deploy --network [network name]

# Upgrade
npx hardhat upgrade --address [contract address] --name [contract name] --network [network name]

Usage

Installation

via yarn

$ yarn add @dataswapcore/contracts --save

via npm

$ npm install @dataswapcore/contracts --save

import

The solidity smart contracts themselves can be imported via the src directory of @dataswapcore/contracts:

import '@dataswapcore/contracts/src/v0.8/module/dataset/Datasets.sol';

Development

Clone the repository

git clone https://github.com/dataswap/core.git
cd core/

dependencies

forge install
yarn install

Build

forge build

or 

yarn hardhat compile

Test

forge test

and

yarn hardhat test

Gas Snapshots

forge snapshot

Cast

To be added

Author

👤 dataswap

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2023 dataswap.
This project is MIT and APACHE licensed.