You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there are no integration/end-to-end tests for testing the functionality introduced in HIP 632
Solution
Create test client tests which exercise the function of the Hedera Account Service. Include tests for the following scenarios
Positive Tests
Verify getVirtualAddresses returns the correct list of evmAddresses when an account holds 0, 1 and multiple virtual addresses.
Verify getHederaAddress returns the correct Hedera account Id given a virtual evmAddress.
Verify isVirtualAddress correctly returns true when a given evmAddress is a virtual address.
Verify isAuthorized correctly returns true when the signatureBlob has been validated to have been signed by a single key of a given address in the single key scenario.
Verify isAuthorized correctly returns true when the signatureBlob has been validated to have been signed by the multiple keys of a given address in multisig scenarios (e.g. 3 of 3 keys).
Verify isAuthorized correctly returns true when the signatureBlob has been validated to have been signed by the sufficient multiple keys of a given address in threshold keys scenarios (e.g. 2 of 3 keys).
Verify isAuthorizedRaw correctly returns true when the signatureBlob has been validated to have been signed by the evm key of a given address.
Negative Tests
Verify getVirtualAddresses returns an empty list of evmAddresses given an unknown Hedera account Id.
Verify getVirtualAddresses returns INVALID_ACCOUNT_ID given a special Hedera account Id (e.g. 0.0.800, 0.0.801).
Verify getHederaAddress returns INVALID_ACCOUNT_ID given a non-existing virtual evmAddress.
Verify getHederaAddress returns INVALID_ACCOUNT_ID given an evmAddress that is on the list of well known evm addresses.
Verify isVirtualAddress correctly returns false when a given evmAddress is not a virtual address.
Verify isAuthorized correctly returns false when the signatureBlob does not validate to have been signed by the key of a given address in the single key scenario. Also validate multikey/nested scenarios.
Verify isAuthorized correctly returns false when the signatureBlob does not validate to have been signed by the keys of a given address in the multisig scenarios.
Verify isAuthorized correctly returns false when the signatureBlob does not validate to have been signed by the sufficient keys of a given address in the threshold key scenario.
Verify isAuthorized returns error when passed signatureBlob in incorrect format (not encoded SignatureMap)
Verify isAuthorizedRaw correctly returns false when the signatureBlob does not validate to have been signed by the evm key of a given address.
Alternatives
No response
The text was updated successfully, but these errors were encountered:
Problem
Epic: #4619
Currently there are no integration/end-to-end tests for testing the functionality introduced in HIP 632
Solution
Create test client tests which exercise the function of the Hedera Account Service. Include tests for the following scenarios
Positive Tests
getVirtualAddresses
returns the correct list of evmAddresses when an account holds 0, 1 and multiple virtual addresses.getHederaAddress
returns the correct Hedera account Id given a virtual evmAddress.isVirtualAddress
correctly returns true when a given evmAddress is a virtual address.isAuthorized
correctly returns true when the signatureBlob has been validated to have been signed by a single key of a given address in the single key scenario.isAuthorized
correctly returns true when the signatureBlob has been validated to have been signed by the multiple keys of a given address in multisig scenarios (e.g. 3 of 3 keys).isAuthorized
correctly returns true when the signatureBlob has been validated to have been signed by the sufficient multiple keys of a given address in threshold keys scenarios (e.g. 2 of 3 keys).isAuthorizedRaw
correctly returns true when the signatureBlob has been validated to have been signed by the evm key of a given address.Negative Tests
getVirtualAddresses
returns an empty list of evmAddresses given an unknown Hedera account Id.getVirtualAddresses
returns INVALID_ACCOUNT_ID given aspecial
Hedera account Id (e.g. 0.0.800, 0.0.801).getHederaAddress
returns INVALID_ACCOUNT_ID given a non-existing virtual evmAddress.getHederaAddress
returns INVALID_ACCOUNT_ID given an evmAddress that is on the list of well known evm addresses.isVirtualAddress
correctly returns false when a given evmAddress is not a virtual address.isAuthorized
correctly returns false when the signatureBlob does not validate to have been signed by the key of a given address in the single key scenario. Also validate multikey/nested scenarios.isAuthorized
correctly returns false when the signatureBlob does not validate to have been signed by the keys of a given address in the multisig scenarios.isAuthorized
correctly returns false when the signatureBlob does not validate to have been signed by the sufficient keys of a given address in the threshold key scenario.isAuthorized
returns error when passed signatureBlob in incorrect format (not encoded SignatureMap)isAuthorizedRaw
correctly returns false when the signatureBlob does not validate to have been signed by the evm key of a given address.Alternatives
No response
The text was updated successfully, but these errors were encountered: