Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration support: "v8" to "v9" #363

Open
popenta opened this issue Nov 22, 2023 · 3 comments
Open

Migration support: "v8" to "v9" #363

popenta opened this issue Nov 22, 2023 · 3 comments
Assignees
Labels
migration Migration support

Comments

@popenta
Copy link
Contributor

popenta commented Nov 22, 2023

This new version of mxpy(v9) contains quite a few changes over the previous one.

mxpy deps

By using the mxpy deps install rust command rust will be installed system-wide. When installing the rust module, sc-meta, twiggy and wasm-opt are also installed.
The clang dependency has also been removed. You can not install it through mxpy anymore. You'll have to install it manually, if needed.

@popenta popenta self-assigned this Nov 22, 2023
@popenta
Copy link
Contributor Author

popenta commented Nov 22, 2023

mxpy contract

From now on, mxpy will use sc-meta for displaying the available contract templates and for creating a new contract using the available templates.

For the mxpy contract new command:

  • the name argument is no longer a positional argument, should be used as a keyword argument: --name
  • the --directory argument is no longer existent, --path should be used instead
  • a new argument has been introduced, --tag. It is used to specify the framework version on which the contract should be created

For the mxpy contract templates command:

  • the --tag argument has been added. It is used to specify the sc-meta framework version referred to

@popenta
Copy link
Contributor Author

popenta commented Nov 22, 2023

Two new sub-commands have been added for the wallet command group:

  • mxpy wallet sign-message
  • mxpy wallet verify-message

mxpy wallet sign-message

This command is used to sign a message. It requires the --message argument and you'll also need to pass in a wallet that will be used for signing the message.

When running mxpy wallet sign-message --message test --pem alice.pem the output will look something like this:

{
            "address": "erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th",
            "message": "test",
            "signature": "0x7aff43cd6e3d880a65033bf0a1b16274854fd7dfa9fe5faa7fa9a665ee851afd4c449310f5f1697d348e42d1819eaef69080e33e7652d7393521ed50d7427a0e"
}

@popenta
Copy link
Contributor Author

popenta commented Nov 22, 2023

mxpy wallet verify-message

This command is used for verifying a previously signed message. It requires the --address argument which is the bech32 address of the signer, the --message argument which represents the signed message(in readable format) and the --signature argument which is the message signature hex encoded.

To verify the message signed above we can run the following command:

mxpy wallet verify-message \
--address erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th \
--message test \
--signature 0x7aff43cd6e3d880a65033bf0a1b16274854fd7dfa9fe5faa7fa9a665ee851afd4c449310f5f1697d348e42d1819eaef69080e33e7652d7393521ed50d7427a0e

The output will look like this:

The message "test" was signed by erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th

In case the message was not signed by someone with that address the output will be:

The message "not signed" was NOT signed by erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th

@popenta popenta added the migration Migration support label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migration Migration support
Projects
None yet
Development

No branches or pull requests

1 participant