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

Add a general subintent tx type & make owner key changes reserved #129

Merged
merged 5 commits into from
Dec 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ impl StaticAnalysisCallback for GeneralSubintentDetector {
| InstructionV2::DropAllProofs(..)
| InstructionV2::CallFunction(..)
| InstructionV2::YieldToParent(_)
| InstructionV2::YieldToChild(_)
| InstructionV2::VerifyParent(_) => true,
/* Not Permitted */
InstructionV2::BurnResource(..)
| InstructionV2::CallRoyaltyMethod(..)
| InstructionV2::CallMetadataMethod(..)
| InstructionV2::CallRoleAssignmentMethod(..)
| InstructionV2::CallDirectVaultMethod(..)
| InstructionV2::AllocateGlobalAddress(..) => false,
| InstructionV2::AllocateGlobalAddress(..)
| InstructionV2::YieldToChild(_) => false,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a test for this? i.e. that a subintent yielding to CHILD is not matched?

Copy link
Contributor

@dhedey dhedey Dec 13, 2024

Choose a reason for hiding this comment

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

Similarly, given it's a requirement for the Gateway to return the correct classification for the MVP, can we have a test where a simple transaction intent manifest which has a YIELD_TO_CHILD is explicitly unclassified? (with a comment that this behaviour is needed for the wallet to mark transactions-with-subintents as Complex; and if changed, we should ensure we change it in line with Gateway and/or wallet behaviour)

};

if let InstructionV2::YieldToParent(..) = instruction {
Expand Down
Loading