blockchain_utils icon indicating copy to clipboard operation
blockchain_utils copied to clipboard

Feature: add conversion functions between 0x and bech32 address

Open BigtoC opened this issue 6 months ago • 3 comments

BigtoC avatar Jun 26 '25 14:06 BigtoC

@mrtnetwork Could you review this PR? 🙏

BigtoC avatar Jul 07 '25 09:07 BigtoC

@mrtnetwork Could you review this PR? 🙏

Hi! If you want to add support for Ethereum address conversion, you should define them in the eth_addr file, along with corresponding classes like EthBech32Encoder and EthBech32Decoder.

Also, make sure to validate everything before performing conversions. For example, check if the input is a valid Ethereum address before encoding, or if it's a valid Bech32-encoded Ethereum address before decoding.

mrtnetwork avatar Jul 07 '25 12:07 mrtnetwork

@mrtnetwork Could you review this PR? 🙏

Hi! If you want to add support for Ethereum address conversion, you should define them in the eth_addr file, along with corresponding classes like EthBech32Encoder and EthBech32Decoder.

Also, make sure to validate everything before performing conversions. For example, check if the input is a valid Ethereum address before encoding, or if it's a valid Bech32-encoded Ethereum address before decoding.

Thanks for reviewing! I've pushed the updated codes 🙏

BigtoC avatar Jul 07 '25 16:07 BigtoC