Skip to content

Conversation

@gRoussac
Copy link
Contributor

@gRoussac gRoussac commented Aug 25, 2025

Updated get_immediate_caller and Add key_as_account_or_contract_or_package Key conversion

maintains CEP-18 compatibility, and standardizes caller Key for balances and allowances dictionaries.

Updated get_immediate_caller to clearly map different caller kinds (ACCOUNT, CONTRACT, ENTITY) to a Key, handling:

Legacy accounts + New entities account → AccountHash

Legacy contract packages → ContractPackageHash

New entities (not account)→ PackageHash

Introduced key_as_account_or_contract_or_package helper to convert new-style Key returned by get_immediate_caller into a compatible Key (AccountHash / Hash), ensuring backward compatibility. Storage keeps Key (AccountHash / Hash).

Documented behavior

Testing note: In tests enabling Addressable entities in test builder is depending on added feature test-enable-addressable-entity . Test are now run with or without addressable-entity

@gRoussac gRoussac changed the title Enable entity and introduce key_as_account_or_contract_or_package + c… Enable entity and introduce key_as_account_or_contract_or_package Aug 26, 2025
@gRoussac
Copy link
Contributor Author

gRoussac commented Jan 1, 2026

@darthsiroftardis Please bump execution_engine_testing https://github.com/casper-network/casper-node/blob/dev/execution_engine_testing/test_support/Cargo.toml#L3 to 8.1.2 so that we can have this method uitls::create_run_genesis_request_with_chainspec_config

thanks!

@gRoussac gRoussac marked this pull request as ready for review January 1, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants