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

chore: Added cross contract tests #123

Merged
merged 2 commits into from
Apr 20, 2022
Merged

Conversation

ChaoticTempest
Copy link
Member

Added this specific test case where creating a top level account from a cross contract call should fail for a name that is too short in length

Copy link
Contributor

@itegulov itegulov left a comment

Choose a reason for hiding this comment

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

That's an interesting behavior. Is there a way we can improve the error message from the SDK side?

@austinabell
Copy link
Contributor

Where is this behaviour documented? This seems very strange and want to understand it before we create a test case around it specifically

@ChaoticTempest
Copy link
Member Author

@austinabell you can find it here: https://docs.near.org/docs/concepts/account

To allow for fair access to them, the top-level account names that are shorter than MIN_ALLOWED_TOP_LEVEL_ACCOUNT_LENGTH characters (32 at time of writing) will be auctioned off.

Specifically, only REGISTRAR_ACCOUNT_ID account can create new top-level accounts that are shorter than MIN_ALLOWED_TOP_LEVEL_ACCOUNT_LENGTH characters

@ChaoticTempest ChaoticTempest merged commit 436bfc7 into main Apr 20, 2022
@ChaoticTempest ChaoticTempest deleted the chore/cross-contract-tests branch April 20, 2022 15:47
@ChaoticTempest
Copy link
Member Author

@itegulov think it would require a protocol change since the host functions don't supply an error message when a Promise fails

@frol frol mentioned this pull request Oct 4, 2023
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.

3 participants