- User creates a smart contract and deploys it to the blockchain.
- User registers the smart contract with the node using
register_async_message
extrinsic.
- The node periodically checks the registered smart contracts and executes them. The execution of this check is done with
on_initialize
hook. - The node checks if the smart contract is ready to be executed. If it is, the node executes the smart contract and updates the state of the smart contract.
- The node checks if the autonomous smart contract should be removed from the pool. If it should, the node removes the smart contract from the pool.
sudo apt-get update && apt-get upgrade
sudo apt install build-essential clang curl git make protobuf-compiler libprotobuf-dev
Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default stable
rustup update
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
Use the following command to build the node without launching it:
cargo build --release
cargo run --release -- --dev