Folder Structure
We will examine the hello-world template as a default perspective.
In many cases, the hello-world template provides an adequate structure for developers. The only thing that developers need to care and modify is src folder, where they develop their own programs and client application.
There are 3 components in src namely client, configs, and program.
client. A client application that developers provides perhaps function, UI/UX for end users to interact with on-chain program. For example, a function sayHello is defined in on-chain program, then in client we need to write a fews Javascript lines of code to let users call sayHello.
configs. Because all the communication between client and program is via serialized data, a sequence of bytes, which is very inconvenient for development. To lift this, SoproX has built SoproxABI for an automatic process. All thing you need is provide a schema for SoproxABI to be able to understand the data. The final result is always a JSON object that's so readable.
program. This is the crucial component of yours. This folder contains all relevant Rust file that define how you on-chain program run through data. In next section Solona Rust-based program, we will break this into small, but clear, pieces to have a deep look.
To understand how SoproxABI works, you can learn Rust types in Javascript - SoproxABI​
β”œβ”€β”€ LICENSE
β”œβ”€β”€ cluster-devnet.env
β”œβ”€β”€ cluster-mainnet-beta.env
β”œβ”€β”€ cluster-testnet.env
β”œβ”€β”€ lib
β”œβ”€β”€ node_modules
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ package.json
β”œβ”€β”€ scripts
└── src
β”œβ”€β”€ client
β”œβ”€β”€ configs
└── program
Copy link