Skip to main content

Development guide

PlatON is compatible with EVM and WASM virtual machines, so it can support contract development in more high-level languages, lowering the learning threshold for contracts while improving performance in processing contract transactions.This significantly lowers the learning curve for writing contracts, while improving performance for processing contract transactions. The documentation in this section helps developers quickly write, deploy, and debug contracts on the PlatON network, and develop various Dapp applications based on contracts.

What is Dapp?#

Dapp (Decentralized Application) is a decentralized application built on the blockchain.

How to develop a Dapp?#

From the developer's point of view, a Dapp application is essentially a process of interacting with a contract. You can call the contract directly through the web side, or you can interact with the contract through SDKs. The whole development process is roughly divided into three major processes: development environment preparation, contract development, front-end and back-end development.

Development environment preparation#

  • Private Network-Build a private node or network locally, which can help you quickly develop and debug local applications.
  • Dev Network-Access to dev network can help you test your code in a more open environment.
  • Main_Network-When you are done testing on the private and development networks, you can seamlessly migrate to the PlatON main network and start using the application seamlessly.

Contract Development#

PlatON supports dual virtual machines, Wasm and EVM, so developers can choose their contract development language based on their area of expertise.

Solidity Contract Development#

  • Getting Started with Development - You can learn how to deploy, compile, publish, and invoke contracts on the PlatON network
  • Best Practices - How to set reasonable fees, how to avoid deducting fees for failed transactions, and other contract writing specifications
  • Development Costs-Introduce the cost of fees for Slolidity contract deployment calls on PlatON and the comparison analysis with Ether fees.
  • Security Guide-Introduces how to improve the security of contracts
  • Contract Migration-In addition to writing your own contracts, you can also migrate contracts from Ether or other public chains that support Solidity contracts to PlatON network
  • System contract call-How to call system contract in Solidity contract

WASM Contract Development#

WASM contract currently only supports C++ language development, but you are welcome to continue to extend the contract in other major languages.

  • Getting Started-Introducing how to compile and publish calls to Wasm contracts on PlatON
  • Development Costs-Introduce the cost of Wasm contract deployment invocation on PlatON and the comparison analysis with Ether contract fees
  • Best Practices-Introduction to how to set reasonable fees, how to avoid deducting fees for failed transactions, and other contract writing specifications
  • Wasm API

Front-end or back-end development#

If you want to interact directly with the contract through the web front-end, please refer to the following documentation.

  • Samurai API - provides support for web wallet development
  • JS SDK-How to use JS to interact with contracts or PlatON network

If you want to interact with a contract or PlatON network by writing backend code, the following SDKs in different languages can help.

How to publish PRC Token?#

Since PlatON inherits the EVM virtual machine, theoretically it can be compatible with all the Tokens of the Ethernet standard protocol, currently the commonly used Token protocols are PRC-20 and PRC-721.