Skip to content
Proposals and specs for a decentralized type system.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
client
contracts
docs
LICENSE
README.md Begin Ethereum 2.0 research doc Jul 7, 2019

README.md

dType

Join the chat at https://gitter.im/pipeos-one/dType

dType is a Decentralized Type System for a Global OS, for Ethereum. A global type system enables independently built system parts to interoperate. Developers should agree on standardizing common types and a type registry, continuously working on improving them, to become part of the Global OS. Ethereum could become the origin for defining types for other programming languages.

dType supports any Solidity type, including functions, along with custom user types. dType assigns a unique global identifier for each type and stores data needed to recompose the type's ABI. Various storage mechanism extensions can be optionally integrated with dType, enabling efficient blockchain data analysis, especially by blockchain explorers, without relying on off-chain centralized services to provide ABI data.

ERCs

  1. EIP-1900: dType - Decentralized Type System for EVM, discussions here
  2. EIP-2157: dType Storage Extension - Decentralized Type System for EVM
  3. EIP-xxxx: dType - Extending the Decentralized Type System for Functions

Ethereum 2.0

In research: dType on Eth2.

Demos

Playlist: https://www.youtube.com/playlist?list=PL323JufuD9JC46yClCf5fdaEX17kocem7

Vision

Specs

dType

dType Registry Contract

Types are registered in the dType contract. See dType.sol.

struct dType {
    address contractAddress;
    bytes32 source;
    string name;
    string[] types;
    string[] labels;
}

Type Contract

A type must implement a library and a contract that stores the Ethereum address of that library, along with other contract addresses related to that type (e.g. smart contract for storing the data entries for that type).

contract TypeRootContract {
  address public libraryAddress;
  address public storageAddress;

  constructor(address _library, address _storage) public {
    require(_library != address(0x0));
    libraryAddress = _library;
    storageAddress = _storage;
  }
}

A type library contains the definition of the type, along with helper functions. Example typeALib.sol.

A type storage contract contains data entries for the type. Example typeAContract.sol.

Functional Programming Pattern

Example for functional programming with dType.run().

runExample

Development

Contracts

Prerequisites:

npm install -g truffle

Compile:

cd contracts
truffle compile

Test:

truffle test
truffle test test/dtype.js

Deployment prerequisites:

mkdir private
cd private
touch infuraKey.txt
touch privateKey.json

Deployment commands:

Ganache is set on port 8545.

truffle migrate --network ganache

Client app:

cd client
npm install
npm run start

For the client app to run correctly, you need to first deploy the contracts with truffle migrate and connect with Metamask to the testnet/private network.

You can’t perform that action at this time.