MUTOYASAR / move-tools

🛠️ Toolset for Move VM/language, including: package manager, compiler, resource viewer and language server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move tools

Toolset for work with Move language based projects:

  • dove - package manager and compiler.

Supported projects and dialects:

Installation

Using pre-compiled binaries:

Just visit releases page and download binaries you are going to use.

Using source code:

Clone this repository and follow documentation:

git clone git@github.com:pontem-network/move-tools.git
cd move-tools

Dove

Regular installation:

cargo install --path dove
See help:
dove -h
Create new project:
dove new first_project 

By default, the Pont dialect is used. You can change the dialect by adding an entry in Move.toml.

[package]
dialect = "Pont"
  • dialect - dialect of the Move language. Default is pont. Supported dialects:
  • diem - for original diem version.
  • pont - Polkadot SS58 addresses.
  • dfinance - bech32 addresses.
Build project:
dove build

See ./build/ folder to get scripts/modules binaries.

Clean build directory:
dove clean

The contents of the directories will be deleted:

  • <PROJECT_DIR>/storage
  • <PROJECT_DIR>/build
Clear build directory and global cache:
dove clean --global

The contents of the directories will be deleted:

  • <PROJECT_DIR>/storage
  • <PROJECT_DIR>/build
  • ~/.move/

Pallet Transactions

Command tx allows you to create transactions for Polkadot chain with Move Pallete on board.

tx takes script identifier, type parameters, and arguments and creates a transaction file as an artifact of work.

Example:

dove tx 'store_u64(60)'

This command searches for the script by name 'store_u64' in the script directory. Then it compiles it and creates a transaction file.

This command will fail if:

  • There is no script with the name given name 'store_u64'.
  • There is more than one script with the name 'store_64'.
  • The passed parameters or type parameters do not match the script parameters.
  • There are syntax errors in the script.

You can use type parameters like in the Move language.

Example:

dove tx 'create_account<0x01::PONT::PONT>()'

You allow can use SS58 address format:

dove tx 'create_account<5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY::MyToken::Token>()'
dove tx 'create_account(5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY, 10, true, [10, 20, 30, 40])'

Supported types:

  • Numbers (u8, u64, u128)
  • Boolean
  • Addresses
  • Vectors
  • Type parameters (generics).

For more commands and parameters look at help:

dove tx --help

More

If you look for examples, guidelines how to write modules/scripts or tests, visit Pontem Documentation.

Resource Viewer

Resource viewer is currently out of date and pending migration inside dove in future versions.

See documentation.

Executor

Migrated inside Dove, see help:

dove run --help

LICENSE

LICENSE

About

🛠️ Toolset for Move VM/language, including: package manager, compiler, resource viewer and language server.

License:MIT License


Languages

Language:Rust 99.1%Language:Nix 0.7%Language:Shell 0.2%