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
HIP-329 CREATE2 opcode adds support for EIP-1014 generated contract addresses.
Solution
We need to centralize EntityId creation into a service that can do additional lookups. Since we need to also use this from transaction handlers and perhaps other places we should extract it to a separate service class.
Add evm_address bytea to contract and contract_history
Populate evm_address on contract create
Rename REST solidity_address to evm_address
Return contract.evm_address on REST API if populated. Else return calculated shard/realm/num format.
Add an EntityIdService with the following methods:
EntityId lookup(ContractID contractId);
void store(EntityId entityId, byte[] evmAddress);
Cache lookup method. Don't use cache annotations to avoid reflection penalty for highly used method.
Replace any uses of EntityId.of(ContractID) with EntityIdService.lookup(ContractID)
Deprecate EntityId.of(ContractID) as we want to ensure the service is used going forward and also because we want to remove protobuf dependencies from common module.
Alternatives
No response
The text was updated successfully, but these errors were encountered:
Problem
HIP-329 CREATE2 opcode adds support for EIP-1014 generated contract addresses.
Solution
We need to centralize EntityId creation into a service that can do additional lookups. Since we need to also use this from transaction handlers and perhaps other places we should extract it to a separate service class.
evm_address bytea
tocontract
andcontract_history
evm_address
on contract createsolidity_address
toevm_address
contract.evm_address
on REST API if populated. Else return calculated shard/realm/num format.EntityIdService
with the following methods:EntityId lookup(ContractID contractId);
void store(EntityId entityId, byte[] evmAddress);
lookup
method. Don't use cache annotations to avoid reflection penalty for highly used method.EntityId.of(ContractID)
withEntityIdService.lookup(ContractID)
EntityId.of(ContractID)
as we want to ensure the service is used going forward and also because we want to remove protobuf dependencies from common module.Alternatives
No response
The text was updated successfully, but these errors were encountered: