iotaledger / wasp

Node for IOTA Smart Contracts
Apache License 2.0
296 stars 147 forks source link

Rename chainId to aliasAddress/chainAddress #2263

Open Tuditi opened 1 year ago

Tuditi commented 1 year ago

Is your feature request related to a problem? Please describe. The naming of the api calls are confusing. In the EVM Space, the chainId word is reserved to denote the number that mitigates replay attacks (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md).

Additionally, code becomes very confusing when using both the Ethereum JSON-RPC together with the WASP REST API.

Yet this is used throughout the whole codebase/API calls instead of the chain address. Whereas the ethereum chainId is called evmChainId.

Describe the solution you'd like

Consistent naming across ecosystems would help evm devs/users to understand the concept of an alias address and how it is different from a chainId.

Describe alternatives you've considered

AliasAddress could also work.

Additional context

image

image

image

lmoe commented 1 year ago

Might make sense to change. We should be careful with it though, as it most likely require regeneration of the api libs for tests/dashboard/cli. Needs to be checked first.