Skip to content
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

principal-destruct? decomposition fails for contract names starting with u<number> #5330

Open
csgui opened this issue Oct 18, 2024 · 2 comments

Comments

@csgui
Copy link

csgui commented Oct 18, 2024

It is possible to generate a contract principal using

(principal-construct? 0x15 0x5fe781ad4656928d3f52419118cdd229d0e75566 "u7E0cd1")

However, decomposing the generated principal into its components is not possible.

(principal-destruct? 'SN1FYF0DD8SB9539ZA90S266DT8MX1STNCSV9F6Z0.u7E0cd1)

The issue occurs when the contract principal name starts with a u<number>. It seems that the name is being parsed as an uint.

@obycode
Copy link
Contributor

obycode commented Oct 22, 2024

This is unfortunate. Clarity does not support that contract name, but it seems that the blockchain does, so you can deploy a contract with a name like that and you can call it directly, but you cannot call it from Clarity. This will have to be fixed in a future version of Clarity (or a future epoch).

@csgui
Copy link
Author

csgui commented Oct 22, 2024

Well, at least is an issue with Clarity. The lesser of two evils... Thanks @obycode !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Status: 🆕 New
Development

No branches or pull requests

3 participants