diff --git a/multiversx_sdk/core/transaction_factories/__init__.py b/multiversx_sdk/core/transaction_factories/__init__.py deleted file mode 100644 index 743c9caa..00000000 --- a/multiversx_sdk/core/transaction_factories/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -from multiversx_sdk.core.transaction_factories.delegation_transactions_factory import \ - DelegationTransactionsFactory -from multiversx_sdk.core.transaction_factories.smart_contract_transactions_factory import \ - SmartContractTransactionsFactory -from multiversx_sdk.core.transaction_factories.token_management_transactions_factory import ( - RegisterAndSetAllRolesTokenType, TokenManagementTransactionsFactory) -from multiversx_sdk.core.transaction_factories.transactions_factory_config import \ - TransactionsFactoryConfig -from multiversx_sdk.core.transaction_factories.transfer_transactions_factory import \ - TransferTransactionsFactory - -__all__ = [ - "DelegationTransactionsFactory", - "TokenManagementTransactionsFactory", - "RegisterAndSetAllRolesTokenType", - "TransactionsFactoryConfig", - "SmartContractTransactionsFactory", - "TransferTransactionsFactory" -] diff --git a/multiversx_sdk/core/transaction_parsers/token_operations_outcome_parser_test.py b/multiversx_sdk/core/transaction_parsers/token_operations_outcome_parser_test.py index e6a95bde..ad55e0a1 100644 --- a/multiversx_sdk/core/transaction_parsers/token_operations_outcome_parser_test.py +++ b/multiversx_sdk/core/transaction_parsers/token_operations_outcome_parser_test.py @@ -1,13 +1,13 @@ from multiversx_sdk.core import Address from multiversx_sdk.core.codec import encode_unsigned_number -from multiversx_sdk.core.transaction_factories.transactions_factory_config import \ - TransactionsFactoryConfig from multiversx_sdk.core.transaction_parsers.token_operations_outcome_parser import \ TokenOperationsOutcomeParser from multiversx_sdk.core.transaction_parsers.transaction_on_network_wrapper import ( ContractResultsWrapper, TransactionEventTopicWrapper, TransactionEventWrapper, TransactionLogsWrapper, TransactionOnNetworkWrapper) +from multiversx_sdk.core.transactions_factories.transactions_factory_config import \ + TransactionsFactoryConfig frank = Address.new_from_bech32("erd1kdl46yctawygtwg2k462307dmz2v55c605737dp3zkxh04sct7asqylhyv") grace = Address.new_from_bech32("erd1r69gk66fmedhhcg24g2c5kn2f2a5k4kvpr6jfw67dn2lyydd8cfswy6ede") diff --git a/multiversx_sdk/core/transactions_factories/__init__.py b/multiversx_sdk/core/transactions_factories/__init__.py new file mode 100644 index 00000000..e8b456a6 --- /dev/null +++ b/multiversx_sdk/core/transactions_factories/__init__.py @@ -0,0 +1,19 @@ +from multiversx_sdk.core.transactions_factories.delegation_transactions_factory import \ + DelegationTransactionsFactory +from multiversx_sdk.core.transactions_factories.smart_contract_transactions_factory import \ + SmartContractTransactionsFactory +from multiversx_sdk.core.transactions_factories.token_management_transactions_factory import ( + RegisterAndSetAllRolesTokenType, TokenManagementTransactionsFactory) +from multiversx_sdk.core.transactions_factories.transactions_factory_config import \ + TransactionsFactoryConfig +from multiversx_sdk.core.transactions_factories.transfer_transactions_factory import \ + TransferTransactionsFactory + +__all__ = [ + "DelegationTransactionsFactory", + "TokenManagementTransactionsFactory", + "RegisterAndSetAllRolesTokenType", + "TransactionsFactoryConfig", + "SmartContractTransactionsFactory", + "TransferTransactionsFactory" +] diff --git a/multiversx_sdk/core/transaction_factories/delegation_transactions_factory.py b/multiversx_sdk/core/transactions_factories/delegation_transactions_factory.py similarity index 99% rename from multiversx_sdk/core/transaction_factories/delegation_transactions_factory.py rename to multiversx_sdk/core/transactions_factories/delegation_transactions_factory.py index 6fe5f7e0..8a704d5a 100644 --- a/multiversx_sdk/core/transaction_factories/delegation_transactions_factory.py +++ b/multiversx_sdk/core/transactions_factories/delegation_transactions_factory.py @@ -6,7 +6,7 @@ from multiversx_sdk.core.interfaces import IAddress, IValidatorPublicKey from multiversx_sdk.core.serializer import arg_to_string from multiversx_sdk.core.transaction import Transaction -from multiversx_sdk.core.transaction_factories.transaction_builder import \ +from multiversx_sdk.core.transactions_factories.transaction_builder import \ TransactionBuilder diff --git a/multiversx_sdk/core/transaction_factories/delegation_transactions_factory_test.py b/multiversx_sdk/core/transactions_factories/delegation_transactions_factory_test.py similarity index 99% rename from multiversx_sdk/core/transaction_factories/delegation_transactions_factory_test.py rename to multiversx_sdk/core/transactions_factories/delegation_transactions_factory_test.py index 6399d417..8cac5be4 100644 --- a/multiversx_sdk/core/transaction_factories/delegation_transactions_factory_test.py +++ b/multiversx_sdk/core/transactions_factories/delegation_transactions_factory_test.py @@ -1,8 +1,8 @@ from multiversx_sdk.core.address import Address from multiversx_sdk.core.constants import DELEGATION_MANAGER_SC_ADDRESS -from multiversx_sdk.core.transaction_factories.delegation_transactions_factory import \ +from multiversx_sdk.core.transactions_factories.delegation_transactions_factory import \ DelegationTransactionsFactory -from multiversx_sdk.core.transaction_factories.transactions_factory_config import \ +from multiversx_sdk.core.transactions_factories.transactions_factory_config import \ TransactionsFactoryConfig from multiversx_sdk.wallet import ValidatorSecretKey, ValidatorSigner diff --git a/multiversx_sdk/core/transaction_factories/relayed_transactions_factory.py b/multiversx_sdk/core/transactions_factories/relayed_transactions_factory.py similarity index 97% rename from multiversx_sdk/core/transaction_factories/relayed_transactions_factory.py rename to multiversx_sdk/core/transactions_factories/relayed_transactions_factory.py index 4b3e2040..0bb840f7 100644 --- a/multiversx_sdk/core/transaction_factories/relayed_transactions_factory.py +++ b/multiversx_sdk/core/transactions_factories/relayed_transactions_factory.py @@ -103,6 +103,6 @@ def _prepare_inner_transaction_for_relayed_v1(self, inner_transaction: ITransact tx["sndUserName"] = base64.b64encode(inner_transaction.sender_username.encode()).decode() if inner_transaction.receiver_username: - tx[f"rcvUserName"] = base64.b64encode(inner_transaction.receiver_username.encode()).decode() + tx["rcvUserName"] = base64.b64encode(inner_transaction.receiver_username.encode()).decode() return json.dumps(tx, separators=(",", ":")) diff --git a/multiversx_sdk/core/transaction_factories/relayed_transactions_factory_test.py b/multiversx_sdk/core/transactions_factories/relayed_transactions_factory_test.py similarity index 98% rename from multiversx_sdk/core/transaction_factories/relayed_transactions_factory_test.py rename to multiversx_sdk/core/transactions_factories/relayed_transactions_factory_test.py index 9e1f629e..c910baf9 100644 --- a/multiversx_sdk/core/transaction_factories/relayed_transactions_factory_test.py +++ b/multiversx_sdk/core/transactions_factories/relayed_transactions_factory_test.py @@ -3,9 +3,9 @@ from multiversx_sdk.core.address import Address from multiversx_sdk.core.errors import InvalidInnerTransactionError from multiversx_sdk.core.transaction import Transaction, TransactionComputer -from multiversx_sdk.core.transaction_factories.relayed_transactions_factory import \ +from multiversx_sdk.core.transactions_factories.relayed_transactions_factory import \ RelayedTransactionsFactory -from multiversx_sdk.core.transaction_factories.transactions_factory_config import \ +from multiversx_sdk.core.transactions_factories.transactions_factory_config import \ TransactionsFactoryConfig from multiversx_sdk.testutils.wallets import load_wallets diff --git a/multiversx_sdk/core/transaction_factories/smart_contract_transaction_factory_test.py b/multiversx_sdk/core/transactions_factories/smart_contract_transaction_factory_test.py similarity index 98% rename from multiversx_sdk/core/transaction_factories/smart_contract_transaction_factory_test.py rename to multiversx_sdk/core/transactions_factories/smart_contract_transaction_factory_test.py index d07828cb..0b8a4f3a 100644 --- a/multiversx_sdk/core/transaction_factories/smart_contract_transaction_factory_test.py +++ b/multiversx_sdk/core/transactions_factories/smart_contract_transaction_factory_test.py @@ -3,9 +3,9 @@ from multiversx_sdk.core.address import Address from multiversx_sdk.core.constants import CONTRACT_DEPLOY_ADDRESS from multiversx_sdk.core.tokens import Token, TokenComputer, TokenTransfer -from multiversx_sdk.core.transaction_factories.smart_contract_transactions_factory import \ +from multiversx_sdk.core.transactions_factories.smart_contract_transactions_factory import \ SmartContractTransactionsFactory -from multiversx_sdk.core.transaction_factories.transactions_factory_config import \ +from multiversx_sdk.core.transactions_factories.transactions_factory_config import \ TransactionsFactoryConfig diff --git a/multiversx_sdk/core/transaction_factories/smart_contract_transactions_factory.py b/multiversx_sdk/core/transactions_factories/smart_contract_transactions_factory.py similarity index 97% rename from multiversx_sdk/core/transaction_factories/smart_contract_transactions_factory.py rename to multiversx_sdk/core/transactions_factories/smart_contract_transactions_factory.py index 108d2f75..df1a627c 100644 --- a/multiversx_sdk/core/transaction_factories/smart_contract_transactions_factory.py +++ b/multiversx_sdk/core/transactions_factories/smart_contract_transactions_factory.py @@ -9,9 +9,9 @@ from multiversx_sdk.core.interfaces import IAddress, IToken, ITokenTransfer from multiversx_sdk.core.serializer import arg_to_string, args_to_strings from multiversx_sdk.core.transaction import Transaction -from multiversx_sdk.core.transaction_factories.token_transfers_data_builder import \ +from multiversx_sdk.core.transactions_factories.token_transfers_data_builder import \ TokenTransfersDataBuilder -from multiversx_sdk.core.transaction_factories.transaction_builder import \ +from multiversx_sdk.core.transactions_factories.transaction_builder import \ TransactionBuilder diff --git a/multiversx_sdk/core/transaction_factories/token_management_transactions_factory.py b/multiversx_sdk/core/transactions_factories/token_management_transactions_factory.py similarity index 99% rename from multiversx_sdk/core/transaction_factories/token_management_transactions_factory.py rename to multiversx_sdk/core/transactions_factories/token_management_transactions_factory.py index 6cb54031..2cdf6150 100644 --- a/multiversx_sdk/core/transaction_factories/token_management_transactions_factory.py +++ b/multiversx_sdk/core/transactions_factories/token_management_transactions_factory.py @@ -1,4 +1,3 @@ - import logging from enum import Enum from typing import List, Protocol @@ -6,7 +5,7 @@ from multiversx_sdk.core.interfaces import IAddress from multiversx_sdk.core.serializer import arg_to_string from multiversx_sdk.core.transaction import Transaction -from multiversx_sdk.core.transaction_factories.transaction_builder import \ +from multiversx_sdk.core.transactions_factories.transaction_builder import \ TransactionBuilder logger = logging.getLogger(__name__) diff --git a/multiversx_sdk/core/transaction_factories/token_management_transactions_factory_test.py b/multiversx_sdk/core/transactions_factories/token_management_transactions_factory_test.py similarity index 98% rename from multiversx_sdk/core/transaction_factories/token_management_transactions_factory_test.py rename to multiversx_sdk/core/transactions_factories/token_management_transactions_factory_test.py index 7e7d932f..5ff22279 100644 --- a/multiversx_sdk/core/transaction_factories/token_management_transactions_factory_test.py +++ b/multiversx_sdk/core/transactions_factories/token_management_transactions_factory_test.py @@ -1,7 +1,7 @@ from multiversx_sdk.core.address import Address -from multiversx_sdk.core.transaction_factories.token_management_transactions_factory import ( +from multiversx_sdk.core.transactions_factories.token_management_transactions_factory import ( RegisterAndSetAllRolesTokenType, TokenManagementTransactionsFactory) -from multiversx_sdk.core.transaction_factories.transactions_factory_config import \ +from multiversx_sdk.core.transactions_factories.transactions_factory_config import \ TransactionsFactoryConfig frank = Address.new_from_bech32("erd1kdl46yctawygtwg2k462307dmz2v55c605737dp3zkxh04sct7asqylhyv") diff --git a/multiversx_sdk/core/transaction_factories/token_transfers_data_builder.py b/multiversx_sdk/core/transactions_factories/token_transfers_data_builder.py similarity index 100% rename from multiversx_sdk/core/transaction_factories/token_transfers_data_builder.py rename to multiversx_sdk/core/transactions_factories/token_transfers_data_builder.py diff --git a/multiversx_sdk/core/transaction_factories/transaction_builder.py b/multiversx_sdk/core/transactions_factories/transaction_builder.py similarity index 100% rename from multiversx_sdk/core/transaction_factories/transaction_builder.py rename to multiversx_sdk/core/transactions_factories/transaction_builder.py diff --git a/multiversx_sdk/core/transaction_factories/transactions_factory_config.py b/multiversx_sdk/core/transactions_factories/transactions_factory_config.py similarity index 100% rename from multiversx_sdk/core/transaction_factories/transactions_factory_config.py rename to multiversx_sdk/core/transactions_factories/transactions_factory_config.py diff --git a/multiversx_sdk/core/transaction_factories/transfer_transactions_factory.py b/multiversx_sdk/core/transactions_factories/transfer_transactions_factory.py similarity index 95% rename from multiversx_sdk/core/transaction_factories/transfer_transactions_factory.py rename to multiversx_sdk/core/transactions_factories/transfer_transactions_factory.py index 301a2d48..17a793d6 100644 --- a/multiversx_sdk/core/transaction_factories/transfer_transactions_factory.py +++ b/multiversx_sdk/core/transactions_factories/transfer_transactions_factory.py @@ -3,9 +3,9 @@ from multiversx_sdk.core.errors import BadUsageError from multiversx_sdk.core.interfaces import IAddress, IToken, ITokenTransfer from multiversx_sdk.core.transaction import Transaction -from multiversx_sdk.core.transaction_factories.token_transfers_data_builder import \ +from multiversx_sdk.core.transactions_factories.token_transfers_data_builder import \ TokenTransfersDataBuilder -from multiversx_sdk.core.transaction_factories.transaction_builder import \ +from multiversx_sdk.core.transactions_factories.transaction_builder import \ TransactionBuilder ADDITIONAL_GAS_FOR_ESDT_TRANSFER = 100000 diff --git a/multiversx_sdk/core/transaction_factories/transfer_transactions_factory_test.py b/multiversx_sdk/core/transactions_factories/transfer_transactions_factory_test.py similarity index 96% rename from multiversx_sdk/core/transaction_factories/transfer_transactions_factory_test.py rename to multiversx_sdk/core/transactions_factories/transfer_transactions_factory_test.py index 81346389..2bd27f91 100644 --- a/multiversx_sdk/core/transaction_factories/transfer_transactions_factory_test.py +++ b/multiversx_sdk/core/transactions_factories/transfer_transactions_factory_test.py @@ -1,8 +1,8 @@ from multiversx_sdk.core.address import Address from multiversx_sdk.core.tokens import Token, TokenComputer, TokenTransfer -from multiversx_sdk.core.transaction_factories.transactions_factory_config import \ +from multiversx_sdk.core.transactions_factories.transactions_factory_config import \ TransactionsFactoryConfig -from multiversx_sdk.core.transaction_factories.transfer_transactions_factory import \ +from multiversx_sdk.core.transactions_factories.transfer_transactions_factory import \ TransferTransactionsFactory diff --git a/multiversx_sdk/core/transactions_outcome_parsers/__init__.py b/multiversx_sdk/core/transactions_outcome_parsers/__init__.py new file mode 100644 index 00000000..9f32e286 --- /dev/null +++ b/multiversx_sdk/core/transactions_outcome_parsers/__init__.py @@ -0,0 +1,6 @@ +from multiversx_sdk.core.transactions_outcome_parsers.resources import ( + SmartContractResult, TransactionEvent, TransactionLogs, TransactionOutcome) +from multiversx_sdk.core.transactions_outcome_parsers.token_management_transactions_outcome_parser import \ + TokenManagementTransactionsOutcomeParser + +__all__ = ["TokenManagementTransactionsOutcomeParser", "SmartContractResult", "TransactionEvent", "TransactionLogs", "TransactionOutcome"] diff --git a/multiversx_sdk/core/transaction_outcome_parsers/resources.py b/multiversx_sdk/core/transactions_outcome_parsers/resources.py similarity index 93% rename from multiversx_sdk/core/transaction_outcome_parsers/resources.py rename to multiversx_sdk/core/transactions_outcome_parsers/resources.py index 599444a6..8335d186 100644 --- a/multiversx_sdk/core/transaction_outcome_parsers/resources.py +++ b/multiversx_sdk/core/transactions_outcome_parsers/resources.py @@ -6,7 +6,7 @@ def __init__(self, address: str = "", identifier: str = "", topics: List[str] = [], - data: str = "") -> None: + data: bytes = b"") -> None: self.address = address self.identifier = identifier self.topics = topics @@ -25,7 +25,7 @@ class SmartContractResult: def __init__(self, sender: str = "", receiver: str = "", - data: str = "", + data: bytes = b"", logs: TransactionLogs = TransactionLogs()) -> None: self.sender = sender self.receiver = receiver diff --git a/multiversx_sdk/core/transaction_outcome_parsers/token_management_transactions_outcome_parser.py b/multiversx_sdk/core/transactions_outcome_parsers/token_management_transactions_outcome_parser.py similarity index 98% rename from multiversx_sdk/core/transaction_outcome_parsers/token_management_transactions_outcome_parser.py rename to multiversx_sdk/core/transactions_outcome_parsers/token_management_transactions_outcome_parser.py index 78e4ae87..6cf65bc6 100644 --- a/multiversx_sdk/core/transaction_outcome_parsers/token_management_transactions_outcome_parser.py +++ b/multiversx_sdk/core/transactions_outcome_parsers/token_management_transactions_outcome_parser.py @@ -5,9 +5,9 @@ from multiversx_sdk.core.codec import decode_unsigned_number from multiversx_sdk.core.constants import DEFAULT_HRP from multiversx_sdk.core.errors import ParseTransactionOutcomeError -from multiversx_sdk.core.transaction_outcome_parsers.resources import ( +from multiversx_sdk.core.transactions_outcome_parsers.resources import ( TransactionEvent, TransactionOutcome) -from multiversx_sdk.core.transaction_outcome_parsers.token_management_transactions_outcome_parser_types import ( +from multiversx_sdk.core.transactions_outcome_parsers.token_management_transactions_outcome_parser_types import ( AddQuantityOutcome, BurnOutcome, BurnQuantityOutcome, FreezeOutcome, IssueFungibleOutcome, IssueNonFungibleOutcome, IssueSemiFungibleOutcome, MintOutcome, NFTCreateOutcome, PauseOutcome, RegisterAndSetAllRolesOutcome, diff --git a/multiversx_sdk/core/transaction_outcome_parsers/token_management_transactions_outcome_parser_test.py b/multiversx_sdk/core/transactions_outcome_parsers/token_management_transactions_outcome_parser_test.py similarity index 95% rename from multiversx_sdk/core/transaction_outcome_parsers/token_management_transactions_outcome_parser_test.py rename to multiversx_sdk/core/transactions_outcome_parsers/token_management_transactions_outcome_parser_test.py index 51117091..95ca168a 100644 --- a/multiversx_sdk/core/transaction_outcome_parsers/token_management_transactions_outcome_parser_test.py +++ b/multiversx_sdk/core/transactions_outcome_parsers/token_management_transactions_outcome_parser_test.py @@ -4,9 +4,9 @@ import pytest from multiversx_sdk.core.errors import ParseTransactionOutcomeError -from multiversx_sdk.core.transaction_outcome_parsers.resources import ( +from multiversx_sdk.core.transactions_outcome_parsers.resources import ( SmartContractResult, TransactionEvent, TransactionLogs, TransactionOutcome) -from multiversx_sdk.core.transaction_outcome_parsers.token_management_transactions_outcome_parser import \ +from multiversx_sdk.core.transactions_outcome_parsers.token_management_transactions_outcome_parser import \ TokenManagementTransactionsOutcomeParser @@ -18,7 +18,7 @@ def test_ensure_error(self): address="erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u", identifier="signalError", topics=["Avk0jZ1kR+l9c76wQQoYcu4hvXPz+jxxTdqQeaCrbX8=", "dGlja2VyIG5hbWUgaXMgbm90IHZhbGlk"], - data="QDc1NzM2NTcyMjA2NTcyNzI2Zjcy" + data="QDc1NzM2NTcyMjA2NTcyNzI2Zjcy".encode() ) sc_result = SmartContractResult() @@ -49,7 +49,7 @@ def test_parse_issue_fungible(self): tx_results_and_logs = TransactionOutcome([empty_result], tx_log) outcome = self.parser.parse_issue_fungible(tx_results_and_logs) - assert outcome.identifier == identifier + assert outcome.token_identifier == identifier def test_parse_issue_non_fungible(self): identifier = "NFT-f01d1e" @@ -91,7 +91,7 @@ def test_parse_issue_non_fungible(self): tx_results_and_logs = TransactionOutcome([empty_result], tx_log) outcome = self.parser.parse_issue_non_fungible(tx_results_and_logs) - assert outcome.identifier == identifier + assert outcome.token_identifier == identifier def test_parse_issue_semi_fungible(self): identifier = "SEMIFNG-2c6d9f" @@ -112,7 +112,7 @@ def test_parse_issue_semi_fungible(self): tx_results_and_logs = TransactionOutcome([empty_result], tx_log) outcome = self.parser.parse_issue_semi_fungible(tx_results_and_logs) - assert outcome.identifier == identifier + assert outcome.token_identifier == identifier def test_parse_register_meta_esdt(self): identifier = "METATEST-e05d11" @@ -133,7 +133,7 @@ def test_parse_register_meta_esdt(self): tx_results_and_logs = TransactionOutcome([empty_result], tx_log) outcome = self.parser.parse_register_meta_esdt(tx_results_and_logs) - assert outcome.identifier == identifier + assert outcome.token_identifier == identifier def test_parse_register_and_set_all_roles(self): identifier = "LMAO-d9f892" @@ -168,7 +168,7 @@ def test_parse_register_and_set_all_roles(self): sc_result = SmartContractResult( sender="erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u", receiver="erd18s6a06ktr2v6fgxv4ffhauxvptssnaqlds45qgsrucemlwc8rawq553rt2", - data="RVNEVFNldFJvbGVANGM0ZDQxNGYyZDY0Mzk2NjM4MzkzMkA0NTUzNDQ1NDUyNmY2YzY1NGM2ZjYzNjE2YzRkNjk2ZTc0QDQ1NTM0NDU0NTI2ZjZjNjU0YzZmNjM2MTZjNDI3NTcyNmU=", + data="RVNEVFNldFJvbGVANGM0ZDQxNGYyZDY0Mzk2NjM4MzkzMkA0NTUzNDQ1NDUyNmY2YzY1NGM2ZjYzNjE2YzRkNjk2ZTc0QDQ1NTM0NDU0NTI2ZjZjNjU0YzZmNjM2MTZjNDI3NTcyNmU=".encode(), logs=result_log ) @@ -295,7 +295,7 @@ def test_parse_pause(self): tx_results_and_logs = TransactionOutcome([empty_result], tx_log) outcome = self.parser.parse_pause(tx_results_and_logs) - assert outcome.identifier == identifier + assert outcome.token_identifier == identifier def test_parse_unpause(self): identifier = "AAA-29c4c9" @@ -313,7 +313,7 @@ def test_parse_unpause(self): tx_results_and_logs = TransactionOutcome([empty_result], tx_log) outcome = self.parser.parse_unpause(tx_results_and_logs) - assert outcome.identifier == identifier + assert outcome.token_identifier == identifier def test_parse_freeze(self): identifier = "AAA-29c4c9" @@ -336,7 +336,7 @@ def test_parse_freeze(self): sc_result = SmartContractResult( sender="erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u", receiver="erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th", - data="RVNEVEZyZWV6ZUA0MTQxNDEyZDMyMzk2MzM0NjMzOQ==", + data="RVNEVEZyZWV6ZUA0MTQxNDEyZDMyMzk2MzM0NjMzOQ==".encode(), logs=tx_log ) tx_results_and_logs = TransactionOutcome([sc_result], TransactionLogs()) @@ -368,7 +368,7 @@ def test_parse_unfreeze(self): sc_result = SmartContractResult( sender="erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u", receiver="erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th", - data="RVNEVEZyZWV6ZUA0MTQxNDEyZDMyMzk2MzM0NjMzOQ==", + data="RVNEVEZyZWV6ZUA0MTQxNDEyZDMyMzk2MzM0NjMzOQ==".encode(), logs=tx_log ) tx_results_and_logs = TransactionOutcome([sc_result], TransactionLogs()) @@ -400,7 +400,7 @@ def test_parse_wipe(self): sc_result = SmartContractResult( sender="erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u", receiver="erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th", - data="RVNEVEZyZWV6ZUA0MTQxNDEyZDMyMzk2MzM0NjMzOQ==", + data="RVNEVEZyZWV6ZUA0MTQxNDEyZDMyMzk2MzM0NjMzOQ==".encode(), logs=tx_log ) tx_results_and_logs = TransactionOutcome([sc_result], TransactionLogs()) diff --git a/multiversx_sdk/core/transaction_outcome_parsers/token_management_transactions_outcome_parser_types.py b/multiversx_sdk/core/transactions_outcome_parsers/token_management_transactions_outcome_parser_types.py similarity index 90% rename from multiversx_sdk/core/transaction_outcome_parsers/token_management_transactions_outcome_parser_types.py rename to multiversx_sdk/core/transactions_outcome_parsers/token_management_transactions_outcome_parser_types.py index f8a74e45..c6c41c41 100644 --- a/multiversx_sdk/core/transaction_outcome_parsers/token_management_transactions_outcome_parser_types.py +++ b/multiversx_sdk/core/transactions_outcome_parsers/token_management_transactions_outcome_parser_types.py @@ -4,22 +4,22 @@ @dataclass class IssueFungibleOutcome: - identifier: str + token_identifier: str @dataclass class IssueNonFungibleOutcome: - identifier: str + token_identifier: str @dataclass class IssueSemiFungibleOutcome: - identifier: str + token_identifier: str @dataclass class RegisterMetaEsdtOutcome: - identifier: str + token_identifier: str @dataclass @@ -60,12 +60,12 @@ class BurnOutcome: @dataclass class PauseOutcome: - identifier: str + token_identifier: str @dataclass class UnPauseOutcome: - identifier: str + token_identifier: str @dataclass