Dapps

A dapp is service that enables direct interaction between end users and providers (e.g. connecting buyers and sellers in some marketplace, owners and storers in file storage). Expanse dapps typically interface users via an HTML/Javascript web application using a Javascript API to communicate with the blockchain. Dapps would typically have their own suite of associated contracts on the blockchain which they use to encode business logic and allow persistent storage of their consensus-critical state. Remember that because of the redundant nature of computation on the Expanse network, the gas costs of execution will always be higher than private execution offchain. This incentivizes dapp developers to restrict the amount of code they execute and amount of data they store on the blockchain.

Dapp directories

Dapps that use Expanse are compiled to the following lists. They are listed in various stages of development (concept, working prototype, live/deployed). If you are developing a dapp, consider adding an entry to these listings:

The offered decentralised services listed cover a wide range of areas including finance, insurance, prediction markets, social networks, distributed computation and storage, gambling, marketplace, internet of things, governance, collaboration, development and games.

In the future, dapps are likely to be listed and distributed in dappstores integrated in dapp browsers.

Dapp browsers

  • Mist - official GUI dapp browser developed by the foundation, alpha stage. Mist as Wallet dapp is in beta.
  • Syng - Mobile Expanse browser (alpha) by Jarrad Hope - supported by DEVgrants
  • MetaMask - Aaron Kumavis Davis’s in-browser GUI. Epicenter Bitcoin interview on github - supported by DEVgrants
  • AlethZero - C++ exp client GUI, (discontinued).
  • Supernova - (discontinued).

Developer Tools

Dapp development requires an understanding of the Web3 Javascript API, the JSON RPC API, and the Solidity programming language.

Note

There are developer tools that help you develop, test, and deploy dapps in a way that automatically utilizes the resources listed below.

  • Web3 JavaScript API - This is the main JavaScript SDK to use when you want to interact with an Expanse node.
  • JSON RPC API - This is the low level JSON RPC 2.0 interface to interface with a node. This API is used by the Web3 JavaScript API.
  • Solidity Docs - Solidity is the Expanse developed Smart Contract language, which compiles to EVM (Expanse Virtual Machine) opcodes.
  • Test Networks - Test networks help developers develop and test Expanse code and network interactions without spending their own Expanse on the main network. Test network options are listed below.
  • Dapp development resources. This assists you in developing, debugging, and deploying Expanse applications.

Mix-IDE

Mix is the official Expanse IDE that allows developers to build and deploy contracts and decentralized applications on top of the Expanse blockchain. It includes a Solidity source code debugger. Mix

IDEs/Frameworks

Below are developer frameworks and IDEs used for writing Expanse dapps.

  • Truffle - Truffle is a development environment, testing framework and asset pipeline for Expanse.
  • Dapple - Dapple is a tool for Solidity developers to help build and manage complex contract systems on Expanse-like blockchains.
  • Populus - Populus is a Smart Contract development framework written in python.
  • Eris-PM - The Eris Package Manager deploys and tests smart contract systems on private and public chains.
  • Embark - Embark is a Ðapp development framework written in JavaScript.
  • EtherScripter (obsolete, discontinued)
  • Resilience Raw Transaction Broadcaster

Expanse-console

Commandline console for Expanse nodes.

Ethconsole connects to an Expanse node running in the background (tested with exp and gexp) via IPC and provides an interactive javascript console containing the web3 object with admin additions.

Here you could find a list of available commands expanse node control commands

To use this console you would need to start a local expanse node with ipc communication socket enabled (file gexp.ipc in data directory). By default ipc socket should be located at you local home directory in .expanse after you started a node. You could also set --test option to use specific node test commands.

In the console you could then type

Here the defenition of --test mode node commands:

More information about node configuration file.

Base layer services

Swarm

Swarm is a distributed storage platform and content distribution service, a native base layer service of the Expanse web 3 stack. The primary objective of Swarm is to provide a sufficiently decentralized and redundant store of Expanse’s public record, in particular to store and distribute dapp code and data as well as block chain data. From an economic point of view, it allows participants to efficiently pool their storage and bandwidth resources in order to provide the aforementioned services to all participants.

From the end user’s perspective, Swarm is not that different from WWW, except that uploads are not to a specific server. The objective is to peer-to-peer storage and serving solution that is DDOS-resistant, zero-downtime, fault-tolerant and censorship-resistant as well as self-sustaining due to a built-in incentive system which uses peer to peer accounting and allows trading resources for payment. Swarm is designed to deeply integrate with the devp2p multiprotocol network layer of Expanse as well as with the Expanse blockchain for domain name resolution, service payments and content availability insurance.

ÐΞVcon talks on swarm

Expanse Alarm Clock

A marketplace that facilitates scheduling transactions to occur at a later time. Serves a similar role to things like crontab in unix, or setTimeout in javascript.

Expanse Computation Market

A marketplace that facilitates verifiable execution of computations off-chain. Allows for very expernsive computations to be used within the EVM without having to actually pay the high gas costs of executing them on-chain.

BTCRelay

BTCrelay

The EVM

The Expanse Virtual Machine (EVM) is the runtime environment for smart contracts in Expanse. It is not only sandboxed, but actually completely isolated, which means that code running inside the EVM has no access to network, filesystem, or other processes. Smart contracts even have limited access to other smart contracts.

Contracts live on the blockchain in an Expanse-specific binary format (EVM bytecode). However, contracts are typically written in an Expanse high level language, compiled into byte code using an EVM compiler, and finally uploaded on the blockchain using an Expanse client.