feat(transactional-test-runner): Make so that a "simple" Abstract Account could be created more easily #9444
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[run-ci]
Description of change
This change introduces a new transactional test subcommand,
init-abstract-acc, that encapsulates the boilerplate required to initialize an Abstract Account in Move-based tests.The new subcommand allows - to construct the appropriate
create_auth_info_v1call for a given AbstractAccount type and authenticate function. Invokes the module-specificcreate(...)function with user-provided inputs (e.g., Ed25519 public key) and the generatedAuthenticatorInfoV1.This allows test files to replace repetitive programmable blocks with a single line.
In addition the abstract account initialization flow accepts an explicit account type (e.g. aa::abstract_account::AbstractAccount).
It helps to parse all necessary data as package_id, module_name and account type itself.
Instead of this:
we have:
//# init-abstract-acc --sender A test abstract_account authenticate_ed25519 test::abstract_account::AbstractAccount --inputs x"cc6233...."The second added subcommand is
publish-deps.A new
publish-depssubcommand that compiles and publishes support Move modules from a given path.Path can be relative to iota root directory or absolute.
It looks like:
TODO
1 .When design is approved - update documentation in the
syntax.md.Links to any relevant issues
Fixes #9277 .
How the change has been tested
Run
iota-adapter-transactional-teststestsWith
cargo simtest