diff --git a/README.md b/README.md index 1e42d6bc55..7473520f1e 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,44 @@ - [![License](https://img.shields.io/badge/license-Apache-green.svg)](LICENSE) -[![Discord chat](https://img.shields.io/discord/964205366541963294.svg?logo=discord&style=flat-square)](https://discord.gg/zamKKnZBZp) - -![Move logo](assets/color/SVG/Move_Logo_Design_Digital_Final_-01.svg) - -# MoveVM for the Substrate -_This project is still in progress, so this document still needs to be updated._ +# MoveVM for Substrate -This is a modified MoveVM fork for the use of MoveVM in the [pallet-move](https://github.com/eigerco/pallet-move) Substrate repo. +This is a modified MoveVM fork for the use of MoveVM in the [pallet-move] Substrate repo. +Please check the [pallet-move] repository to learn more about this project. ## Requirements -### smove `smove` is a package manager for Move language in Substrate. Follow the [instructions](https://github.com/eigerco/smove) to install it. +## Development + +For the initial development setup, run the script: +```sh +./scripts/dev_setup.sh -ypt +``` + +### Design + +[pallet-move] uses the `move-vm-backend` to interact with the MoveVM. + +The integral part of MoveVM functionality still lies within the `language` directory and contains only the necessary modifications which make the MoveVM operable within the Substrate framework. + +### Testing + +To run tests for the MoveVM implementation, execute: +```sh +cargo test +``` + +To run tests for the `move-vm-backend` implementation, execute: +```sh +cargo test -p move-vm-backend --features build-move-projects-for-test # the `backend` main crate +cargo test -p move-vm-backend-common --features build-move-projects-for-test # helper crate for interaction with smove and pallet-move +cargo test -p move-vm-support # helper crate for interaction with language directory +``` +_Note: the feature flag `build-move-projects-for-test` needs to be provided only once in order to build all the necessary `move-vm-backend/tests/assets/move-projects/` projects for test purposes (with the `smove-build-all.sh` script). Also, the feature flag needs to be provided whenever any of those Move projects are modified._ + ## License Move is licensed as [Apache 2.0](https://github.com/move-language/move/blob/main/LICENSE). + +[pallet-move]: https://github.com/eigerco/pallet-move diff --git a/move-vm-backend/src/genesis.rs b/move-vm-backend/src/genesis.rs index d915e5f61e..b5ac435bc4 100644 --- a/move-vm-backend/src/genesis.rs +++ b/move-vm-backend/src/genesis.rs @@ -71,7 +71,7 @@ impl VmGenesisConfig { let publish_under_stdaddr = |bundle: &[u8]| { let result = - vm.publish_module_bundle(&bundle, CORE_CODE_ADDRESS, GasStrategy::Unmetered); + vm.publish_module_bundle(bundle, CORE_CODE_ADDRESS, GasStrategy::Unmetered); if !result.is_ok() { return Err(GenesisConfigError::PublishBundle(result)); diff --git a/move-vm-support/src/ss58_address.rs b/move-vm-support/src/ss58_address.rs index 7cc0300128..0e6d04dc2e 100644 --- a/move-vm-support/src/ss58_address.rs +++ b/move-vm-support/src/ss58_address.rs @@ -193,7 +193,7 @@ mod tests { #[should_panic] fn move_address_to_ss58_string_fail() { let move_address = "0x8EAF04151687736326C9FEA17E25FC5287613693C912909CB226AA4794F26A48AA"; // too long - let substrate_address = + let _substrate_addr = move_address_to_ss58_string(&AccountAddress::from_hex_literal(move_address).unwrap()); } }