v2.66.0
What's Changed
Summary
This release introduces support for EVM-compatible entity address conversion via the new ToEvmAddress() and FromEvmAddress() methods across multiple types. These methods do not encode shard and realm values in the address, see this document. Additionally, several legacy SolidityAddress methods have been deprecated in favor of the new EVM methods. The EthereumFlow feature is also deprecated, with EthereumTransaction now recommended for all use cases. Minor dependency updates are included.
Enhancements
-
Introduced new method:
<EntityId>.ToEvmAddress()forAccountId,ContractId,ContractDelegateId,TopicId,TokenId, andFileId. #1391- Returns a 20-byte EVM-compatible address:
- If the entity has an alias address, it is returned directly.
- Otherwise, a long-zero address is returned with only the entity number encoded in the last 8 bytes (big-endian).
- Shard and realm values are not included in the output.
- Returns a 20-byte EVM-compatible address:
-
Introduced new method:
<EntityId>FromEvmAddress(shard, realm, evmAddress)forTopicId,TokenId, andFileId. #1391- Parses only long-zero EVM addresses that encode the entity number.
- If a non-long-zero address is passed, an error is thrown to enforce correctness.
Deprecated
FromSolidityAddressin AccountId, ContractId, DelegateContractId, FileId, TokenId, and TopicId #1391ToSolidityAddressin AccountId, ContractId, DelegateContractId, FileId, TokenId, and TopicId #1391EthereumFlow, with the introduction of jumbo transactions, it should always be less cost and more efficient to useEthereumTransactioninstead #1428
Dependency Changes
- Chore(deps): Bump step-security/harden-runner from 2.12.1 to 2.12.2 by @dependabot in #1427
Full Changelog: v2.65.0...v2.66.0