Skip to content

Commit

Permalink
doc: restructuring readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Rqnsom committed Feb 5, 2024
1 parent 74e5a00 commit 07694da
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 11 deletions.
42 changes: 33 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion move-vm-backend/src/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion move-vm-support/src/ss58_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

0 comments on commit 07694da

Please sign in to comment.