Skip to main content

Development guide

This section helps developers to quickly write, deploy and debug contracts on the Alaya network and develop various DApp applications based on the contracts.

What is DApp?#

A DApp is a decentralized application built on the blockchain. It usually consists of a series of contracts, an interactive front-end and a back-end service.

What a DApp?#

A DApp is a decentralized application build on the blockchain, usually consisting of a series of smart contracts, an interactive interface, and backend services.

Set up local development environment#

  • Private network - Build a private node or cluster network locally, which can help you debug your local application quickly.
  • Join the dev network - Use the development network to test your application in a more open network environment.

How to Write Contracts?#

Tools for development#

  • Alaya-Truffle - A contract development framework that supports WASM and Solidity contracts.
  • IDE - An interface-based development tool that supports WASM and Solidity contracts.

Solidity contract#

  • Getting started - An example of how to deploy, compile, publish, and call contracts on the Alaya network.
  • Best practices - Learn about some of the specifications for writing contracts on trasaction fees.
  • Development costs - Introduces the fee cost about Solidity contract deployment and call, and the comparative analysis of the fee with Ethereum.
  • Contract security - A few writing specifications on how to improve the security of the contract.
  • Migration tutorial - A tutorial on migrating Solidity contracts from Ethereum to the Alaya network.

WASM contract#

WASM currently supports contract development in C++ language, that would be welcome if you want to extend WASM to support contracts in other major languages.

  • Getting started - An example of how to deploy, compile, publish and invoke a WASM contract on the Alaya network.
  • Development costs - Introduction to the fee cost about WASM contract deployment and call.
  • Best practices - Learn about some of the specifications for writing contracts on trasaction fees.
  • Wasm_API - Introduction to WASM's contract library.

Front-end or back-end development#

You can interact directly with the contract through the front-end directly, and the following documentation will help.

  • Samurai API - Introduction to a Web Wallet API that supports the Alaya network.
  • JS SDK - How to use JavaScrip to interact with contracts on the Alaya network.

If you want to interact with the Alaya network by writing back-end services, the following SDKs in different languages can help.

PRC Token#

Since Alaya inherits EVM, the Alaya network is theoretically compatible with all standard Token protocols on Ethereum. Token protocols that are currently explicitly supported are ARC-20ARC-721.