Skip to content

Conversation

@theiari
Copy link
Contributor

@theiari theiari commented Aug 8, 2025

Description of change

Introduced programmable_transaction.move and auth_context.move in the framework, in order to represent these types in Move.

Closes #8122
Closes #8165

How the change has been tested

programmable_transaction_tests has been tested using iota move test

Release Notes

@theiari theiari linked an issue Aug 8, 2025 that may be closed by this pull request
@vercel
Copy link

vercel bot commented Aug 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

6 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
apps-backend Ignored Ignored Preview Sep 2, 2025 7:52am
apps-ui-kit Ignored Ignored Preview Sep 2, 2025 7:52am
iota-evm-bridge Ignored Ignored Preview Sep 2, 2025 7:52am
iota-multisig-toolkit Ignored Ignored Preview Sep 2, 2025 7:52am
rebased-explorer Ignored Ignored Preview Sep 2, 2025 7:52am
wallet-dashboard Ignored Ignored Preview Sep 2, 2025 7:52am

@miker83z
Copy link
Contributor

miker83z commented Aug 8, 2025

No need to represent VectorType, Box and StructInput as well

@miker83z miker83z added the vm-language Issues related to the VM & Language Team label Aug 8, 2025
feat: added simple getter test
…ogrammable_transaction

fix: updated programmable_transaction_tests.move to pass both types and args for the ptb move call
refactor: changed structure of programmable_transaction.move for better clarity. removed get_ to getters
feat: added new test-only constructor for a programmable transaction
@theiari theiari changed the title feat: added auth_context.move module Added programmable_transaction.move and related test Aug 18, 2025
@theiari theiari changed the title Added programmable_transaction.move and related test feat: Added programmable_transaction.move and related test Aug 18, 2025
feat: added auth_context_tests.move
@miker83z miker83z changed the base branch from develop to vm-lang/aa-auth/8116-feature-branch August 19, 2025 09:31
@miker83z miker83z linked an issue Aug 19, 2025 that may be closed by this pull request
@miker83z miker83z marked this pull request as ready for review August 19, 2025 09:34
@miker83z miker83z requested a review from a team as a code owner August 19, 2025 09:34
@TheMrAI TheMrAI requested review from Dkwcs, TheMrAI and valeriyr August 22, 2025 07:36
Copy link
Contributor

@valeriyr valeriyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
Please, check the following tests:
https://github.com/iotaledger/iota/actions/runs/17121012254/job/48562298279?pr=8146
You need to fix at least this one: build_system_packages.

I have a question as well. We need to update the framework snapshots after changes like this. Are we going to do this in the current PR or later?

new_programmable_transaction
};
use std::type_name;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nice to add the tests that check all the errors we can have, to "freeze" this behavior in the tests.
What do you think?

@TheMrAI
Copy link
Contributor

TheMrAI commented Aug 22, 2025

Looks good! Please, check the following tests: https://github.com/iotaledger/iota/actions/runs/17121012254/job/48562298279?pr=8146 You need to fix at least this one: build_system_packages.

I have a question as well. We need to update the framework snapshots after changes like this. Are we going to do this in the current PR or later?

I think we should update it here. Just to try and keep the history saner, in case we want to decide later how to merge the whole shebang.

Copy link
Contributor

@TheMrAI TheMrAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would seriously consider removing all functions that do:
"match (arg) {
type => internal,
_ => Abort
}"

These functions are bloating the interface and provide little functionality. The caller of the library should be able to decide if they want to fail if something doesn't match, if they want to test it etc.
They have all the tools at their disposal as none of the enums used are private.

On a similar notion I would remove "is_pure_data", "is_object_data" stile functions as well. Let the user decide what they want to test and how. For example if they wanted to test if it is "ImmOrOwnedObject" they have to write the test themselves. There is no need to provide these.

If you do this, you can ignore my other comments regarding outputs as well.
The interface becomes much cleaner, you need to test much less.

fix: set all getters to return referenced variables
fix: added few extra comments into programmable_transaction structs
refactor: renamed command_variant_name to command_to_int for better understanding

test: updated programmable_transaction_tests for type safety and abort codes check
@miker83z miker83z merged commit 0dfba5a into vm-lang/aa-auth/8116-feature-branch Sep 2, 2025
33 of 36 checks passed
@miker83z miker83z deleted the vm-lang/aa-auth/8122-ptb-type-in-move branch September 2, 2025 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vm-language Issues related to the VM & Language Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AA][auth] Represent the AuthContext in move [AA][auth] PTB Type Move representation

5 participants