-
Notifications
You must be signed in to change notification settings - Fork 7
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
PLT-7305 - Improve error message on invalid addresses #59
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. It's nice to get this into the linter.
There's another test that could be done during linting: checking that the contract isn't mixing mainnet and testnet addresses, since there would be no network where the contract could run correctly. (In fact, we might want to have the "send to Runner" check that the contract has addresses that are consistent with the network.)
Good idea, I made a ticket: PLT-8828 |
This PR:
In order to achieve this, the PR also implements the address validation algorithm in PureScript, with the following caveats:
I am tagging @bwbush for expertise on CIP19, and @hrajchert for expertise in PureScript and the Playground.
It would be good to double check the way I am validating the padding of the bech32, I am not 100% confident it is correct.
If you merge the PR, please squash it, because some of the intermediate commits are broken.
Pre-submit checklist: