It used to be call EthAddress, but was renamed as per #2238 (comment)
However, this was in the light of bridging-in, where we were passing a 160 bit value that was represented as an address on Ethereum, but was in fact encoding a Miden AccountId - i.e. it was not a "valid" Ethereum address ("valid" in the sense that there was no account associated with it).
In the bridging out flow, the value carried by the B2AGG note will actually be a valid Ethereum destination address.
I wouldn't change the naming to EthAddress (because it is not strictly correct) across the board.
I think the best solution here is to:
- create a separate
EthAddress dedicated for the bridging-out flow. It also wouldn't have methods such as from_account_id(account_id: AccountId) as they don't make sense there.
- keep
EthAddress as the base struct, and create a EthAddressFormat trait to encompass Miden<>Ethereum conversion logic like from_account_id / from_account_id
WDYT?
Originally posted by @mmagician in #2334 (comment)
It used to be call
EthAddress, but was renamed as per #2238 (comment)However, this was in the light of bridging-in, where we were passing a 160 bit value that was represented as an
addresson Ethereum, but was in fact encoding a MidenAccountId- i.e. it was not a "valid" Ethereum address ("valid" in the sense that there was no account associated with it).In the bridging out flow, the value carried by the
B2AGGnote will actually be a valid Ethereum destinationaddress.I wouldn't change the naming to
EthAddress(because it is not strictly correct) across the board.I think the best solution here is to:
EthAddressdedicated for the bridging-out flow. It also wouldn't have methods such asfrom_account_id(account_id: AccountId)as they don't make sense there.EthAddressas the base struct, and create aEthAddressFormattrait to encompass Miden<>Ethereum conversion logic likefrom_account_id/from_account_idWDYT?
Originally posted by @mmagician in #2334 (comment)