Skip to content

Can we make AccAddressFromHex safer? #11881

Closed
@ebuchman

Description

Juno seems to have sent funds to a tx hash: https://www.coindesk.com/tech/2022/05/05/typo-moves-36m-in-seized-juno-tokens-to-wrong-wallet/

It looks like they converted a 64-byte tx hash to an address: https://github.com/CosmosContracts/juno/blob/v4.0.0/app/upgrade/upgrade_handler.go#L17-L21

Addresses are 20 bytes, while this thing is 32 bytes. Can we get AccAddressFromHex to panic if the address is not the right length?

I know there is some work to allow longer addresses, but maybe it can still be configured somehow to prevent errors like this ?

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions