Skip to content

Implement test cases that involve delegation to System Contracts #84

@0x-ds

Description

@0x-ds

Test Cases to Re-implement (Hiero-Specific Suite)

All test cases share the same setup: an EOA has Code Delegation set to a System Contract (e.g. HTS at 0x167), so its effective code is 0xef0100 || 0x167.


Test Case 1 — Valid system-contract method call with value

Action: Call the EOA directly (transaction.to = eoa) with non-zero value and calldata encoding a valid system-contract function (e.g. mint).

Expected result:

  • The value transfer to the EOA succeeds.
  • The system-contract execution logic is not executed (no-op).

Verification strategy: First call mint directly on the HTS address to mutate state. Then perform the same mint call via the delegating EOA. Confirm the state is unchanged after the second call, proving the delegation path was a no-op.


Test Case 2 — Empty calldata

Action: Call the EOA directly with empty calldata (and optionally non-zero value).

Expected result:

  • If an empty call sent directly to HTS would revert, the same call routed through the delegating EOA should not revert (no-op, so no revert).

Test Case 3 — Non-existent method selector

Action: Call the EOA directly with calldata containing a function selector that does not exist on the system contract.

Expected result:

  • If an invalid-selector call sent directly to HTS would revert, the same call routed through the delegating EOA should not revert (no-op, so no revert).

Estimated effort: ~1 day

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions