Skip to content

evm address to substrate address function #417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jpgundrum
Copy link

@jpgundrum jpgundrum commented Apr 4, 2025

Similar functionality to the evmToAddress function in ts - but for python.

How to use:

    evm_address = "0x3e3FF16083Bf0a444B8fF86C7156eB3368e3cefB"
    ss58_format = 42
    ss58_address = evm_to_address(evm_address, ss58_format)
    print(f"SS58 Address: {ss58_address}")

Can see the evm address in the Explorer. After clicking on the View Substrate Data button you will see how the Substrate Address matches the one outputted from the code example above.

Please double check for faulty logic and confirm with tests on your side. Not sure if there is a python implementation for this anywhere... if there is please make it public so it is easier to use.

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.

1 participant