Skip to content

Conversation

@shiyasmohd
Copy link
Contributor

@shiyasmohd shiyasmohd commented Jan 5, 2026

  • Added a new UDF evm_encode_address that converts hex-encoded strings to FixedSizeBinary(20) or FixedSizeBinary(32) values. Supports addresses with or without the "0x" prefix.
  • Added unit tests and integration tests.

Example

// evm address
evm_encode_hex('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2')
evm_encode_hex('C02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2')

// txn_hash, block_hash etc.
evm_encode_hex('0xcb8f66bff7ba069c3938626df640d294fd9e2700671e4e567bcea4a6df2cb9ff')
evm_encode_hex('cb8f66bff7ba069c3938626df640d294fd9e2700671e4e567bcea4a6df2cb9ff')

Closes #1530

@shiyasmohd shiyasmohd self-assigned this Jan 5, 2026
Copy link
Contributor

@LNSD LNSD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, check my comment 👀

@shiyasmohd shiyasmohd force-pushed the shiyasmohd/evm-addr-udf branch from 722cd1e to 2866265 Compare January 5, 2026 13:05
@shiyasmohd shiyasmohd marked this pull request as draft January 7, 2026 09:34
@shiyasmohd shiyasmohd changed the title feat(common): add evm_address udf feat(common): add evm_encode_address udf Jan 8, 2026
@shiyasmohd shiyasmohd force-pushed the shiyasmohd/evm-addr-udf branch from 2866265 to 1c7fd0f Compare January 8, 2026 06:30
@shiyasmohd shiyasmohd marked this pull request as ready for review January 8, 2026 06:41
@shiyasmohd shiyasmohd marked this pull request as draft January 8, 2026 07:11
@shiyasmohd shiyasmohd force-pushed the shiyasmohd/evm-addr-udf branch from 1c7fd0f to 710ea4b Compare January 8, 2026 09:16
@shiyasmohd shiyasmohd changed the title feat(common): add evm_encode_address udf feat(common): add evm_encode_hex udf Jan 8, 2026
@shiyasmohd shiyasmohd marked this pull request as ready for review January 8, 2026 09:21
@shiyasmohd
Copy link
Contributor Author

@LNSD PR is ready for review now.

Copy link
Contributor

@LNSD LNSD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement evm_encode_hex UDF

3 participants