IOTA Developer Cheat Sheet
Quick reference on best practices for IOTA Network developers.
Dev Sheet
Commands | Description |
---|---|
which iota | to check if iota is already installed or not. |
iota client | to connect to IOTA network |
iota client envs | to check environments |
iota client new-env --alias <ALIAS> --rpc <RPC> | to create new environment. |
iota client switch --env <EnvAlias> | to switch another environment. |
RUST_LOG="off,iota_node=info" cargo run --bin iota start --force-regenesis --with-faucet | to start local network. |
iota keytool list | to list all the address. |
iota move new first_package | to create new move package. |
pnpm create @iota/dapp --template react-client-dapp | to setup React app with dApp kit |
cargo install --locked --git https://github.com/iotaledger/iota.git --branch <BRANCH-NAME> --features gas-profiler iota | To get the latest version of CLI |
iota client active-address | to get the current address. |
iota client -–help | to list out all commands of iota client. |
iota client new-address <Scheme> Scheme | to generate address , Scheme - (ed25519,secp256k1,secp256r1) |
Move
Topic | Description |
---|---|
General |
|
Composability |
|
Testing |
|
Apps
Topic | Description |
---|---|
Optimal performance | For optimal performance and data consistency, apps should use the wallet's signTransactionBlock API to sign transactions and then submit them via execute_transactionBlock on the app's full node. This ensures immediate read-after-write consistency, as the app's full node reflects writes instantly, avoiding delays from checkpointing. |
Lower latency | For lower latency, use executeTransactionBlock with "showEffects": false and "showEvents": false if your app only needs confirmation of a transaction without immediate access to its effects or events. |
Local cache | Apps should implement a local cache for frequently read data rather than over-fetching from the full node. |
Transaction cache | Whenever possible,use programmable transaction blocks to compose on-chain functionality instead of deploying new contracts, enabling batching and lowering gas fees. |
Wallet dependency | Apps should leave gas budget, gas price, and coin selection to the wallet. This gives wallets more flexibility, and it's the wallet's responsibility to dry run a transaction to ensure it doesn't fail. |
Signing
Topic | Description |
---|---|
Concurrent Transactions | Avoid signing concurrent transactions involving the same owned object. Use independent objects or wait for one transaction to finish to prevent client equivocation, which can lock the objects until the epoch ends. |
CLI transaction | Use the --serialize-output flag with any iota client command (e.g., publish , call ) to generate a base64 transaction for signing. |
Transaction Signing | IOTA supports several signature schemes for transaction signing, including native multisig. |
Feedback Form