-
Notifications
You must be signed in to change notification settings - Fork 54
feat: Added programmable_transaction.move and related test #8146
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
feat: Added programmable_transaction.move and related test #8146
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 6 Skipped Deployments
|
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
|
No need to represent VectorType, Box and StructInput as well |
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
feat: added simple getter test
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
…ogrammable_transaction fix: updated programmable_transaction_tests.move to pass both types and args for the ptb move call
crates/iota-framework/packages/iota-framework/tests/programmable_transaction_tests.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/tests/programmable_transaction_tests.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/tests/programmable_transaction_tests.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/tests/programmable_transaction_tests.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/tests/programmable_transaction_tests.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/tests/programmable_transaction_tests.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/tests/programmable_transaction_tests.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/programmable_transaction.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/programmable_transaction.move
Outdated
Show resolved
Hide resolved
refactor: changed structure of programmable_transaction.move for better clarity. removed get_ to getters feat: added new test-only constructor for a programmable transaction
feat: added auth_context_tests.move
crates/iota-framework/packages/iota-framework/sources/auth_context.move
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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?
crates/iota-framework/packages/iota-framework/sources/programmable_transaction.move
Outdated
Show resolved
Hide resolved
| new_programmable_transaction | ||
| }; | ||
| use std::type_name; | ||
|
|
There was a problem hiding this comment.
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?
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. |
TheMrAI
left a comment
There was a problem hiding this 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.
crates/iota-framework/packages/iota-framework/sources/programmable_transaction.move
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/programmable_transaction.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/programmable_transaction.move
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/tests/auth_context_tests.move
Outdated
Show resolved
Hide resolved
crates/iota-framework/packages/iota-framework/sources/programmable_transaction.move
Show resolved
Hide resolved
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
crates/iota-framework/packages/iota-framework/tests/programmable_transaction_tests.move
Outdated
Show resolved
Hide resolved
0dfba5a
into
vm-lang/aa-auth/8116-feature-branch
Description of change
Introduced
programmable_transaction.moveandauth_context.movein the framework, in order to represent these types in Move.Closes #8122
Closes #8165
How the change has been tested
programmable_transaction_testshas been tested usingiota move testRelease Notes