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

Added support for tokens prefix #145

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Conversation

popenta
Copy link
Collaborator

@popenta popenta commented Nov 11, 2024

Added support for ESDT token prefix. Used for tokens created on sovereign chains.

@popenta popenta self-assigned this Nov 11, 2024
Copy link

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  multiversx_sdk/core
  tokens.py 127, 130
Project Total  

This report was generated by python-coverage-comment-action

The second element is the ticker.
The third element is the random sequence.
"""
if token_parts[0].isalnum() and token_parts[0].islower():
Copy link
Contributor

Choose a reason for hiding this comment

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

has_prefix = token_parts[0].isalnum() and token_parts[0].islower()
...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

will do it in the next PR.

@@ -193,3 +193,69 @@ def test_egld_as_single_token_transfer(self):
assert transaction.chain_id == "D"
assert transaction.data.decode() == "MultiESDTNFTTransfer@8049d639e5a6980d1cd2392abcce41029cda74a1563523a202f09641cc2618f8@01@45474c442d303030303030@@0de0b6b3a7640000"
assert transaction.gas_limit == 1_243_500

def test_create_nft_transfer_with_prefix(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

🚀

@popenta popenta merged commit aa0f093 into feat/next Nov 13, 2024
6 checks passed
@popenta popenta deleted the token-prefix-for-sovereign branch November 13, 2024 07:15
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