Idavoll Network is an decentralized organization platform that provides infrastructure and services to users of the Idavoll Network and Polkadot ParaChains.
Setup instructions for working with the Rust programming language can
be found at the
Substrate Developer Hub. Follow those
steps to install rustup and configure the Rust toolchain to default to the
latest stable version.
This project uses a Makefile to document helpful commands and make it easier to execute
them. Get started by running these make
targets:
make init- Run the init script to configure the Rust toolchain for WebAssembly compilation.make run- Build and launch this project in development mode.
The init script and Makefile both specify the version of the Rust nightly compiler that this project depends on.
The make run command will perform an initial build. Use the following command to build the node
without launching it:
make buildor you and cargo build or cargo build --release to build it. and you can run cargo test to run the tests.
cargo build
or
cargo test
Once the project has been built, the following command can be used to explore all parameters and subcommands:
./target/release/idavoll-node -hThe make run command will launch a temporary node and its state will be discarded after you
terminate the process. After the project has been built, there are other ways to launch the node.
This command will start the single-node development chain with persistent state:
./target/release/idavoll-node --devPurge the development chain's state:
./target/release/idavoll-node purge-chain --devStart the development chain with detailed logging:
RUST_LOG=debug RUST_BACKTRACE=1 ./target/release/idavoll-node -lruntime=debug --devIf you want to see the multi-node consensus algorithm in action, refer to our Start a Private Network tutorial.
A simple way to use IDOVALL-NETWORK to create and use DAO organization,you can run local node for use it with ./target/release/idavoll-node --dev --tmp --ws-external, and use the Polkadot JS UI, you may need the types with the UI.then we can create a DAO organization and make it usefull.
1. create organization
2. add members into organization
3. deposit local asset
4. create proposal
5. vote to decision
6. view the result
we can create organization with the inherent user alice and submit an extrinsicz with idavoll.create_organization function.
origin: the owner of the organization,on this,it'salice.total: the issuance of the new token, When a user creates an organization, a new token is automatically created for voting.info: the details of the new organization,we can use the default value ofOrgInfo.
There is a simple way to add member to DAO organization,submit an extrinsicz with idavoll.add_member_and_assign_token function,In fact, all members of the organization have the right to add members and assign token to the new member, not just the rights that are unique to the owner of the organization. If a member of the organization wants to participate in the voting of proposals in the organization, it needs to have the unique token of the organization. Created when the organization is created, the token needs to be distributed by the owner or distributed by other members who own the token.
origin: the owner(alice) of the organization or other member in the organization.target: the new account.id: Ordinal number created by the organization,it mapped whit the organization id.assigned_value: the amount of the token,theorigin(alice) will transfer token to the new account.
After the organization is created, any member can deposit assets(Local asset[IDV]) to the organization as an organization asset, submit an extrinsicz with idavoll.deposit_to_organization function.
origin: the owner(alice) of the organization or other member in the organization.id: Ordinal number created by the organization,it mapped whit the organization id.value: the amount of the local asset(IDV).
Now we can submit an extrinsicz with idavoll.create_proposal to create proposals to spend the assets of the organization,then all members in the organization can voting on the proposal.
origin: any member in the organization.id: Ordinal number created by the organization,it mapped whit the organization id.length: the block number(length) as the proposal lift time, if the current block number more than thelength, than the proposal is expired.sub_param: the vote rule, it was satisfied with the organization's rule.Call:Call::IdavollModule(IdavallCall::vault_transfer(RECEIVER.clone(),value))like this
We can use idavoll.vote_proposal to participate in the voting of the proposal and process the result of the vote, all members in the organization can voting on proposal with the token values.
origin: any member in the organization.pid: the proposal id of the proposal return by create_proposal.value: the weight of vote power,it is the token amount of the token in the organization.yesorno: the user approve or against the proposal(yesorno).
Finally, after a proposal has been voted and passed, the content of the proposal will be automatically processed (that is, the call of Call in the proposal is executed), if the proposal is not passed, it will be closed, and the execution result can be directly viewed after the proposal is passed. (Such as Balance::free_balance).