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

Update TransactionOnNetwork to specs #147

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

popenta
Copy link
Collaborator

@popenta popenta commented Nov 12, 2024

Updated the TransactionOnNetwork class to match the specs.

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

github-actions bot commented Nov 12, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  multiversx_sdk/core
  address.py
  tokens.py
  transaction_on_network.py
  multiversx_sdk/core/transactions_outcome_parsers
  smart_contract_transactions_outcome_parser.py
  multiversx_sdk/network_providers
  api_network_provider.py
  http_resources.py
  proxy_network_provider.py
  transaction_awaiter.py
  transaction_decoder.py
  multiversx_sdk/testutils
  mock_network_provider.py 86-88
  mock_transaction_on_network.py
Project Total  

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

if len(pubkey) != PUBKEY_LENGTH:
raise BadPubkeyLengthError(len(pubkey), PUBKEY_LENGTH)

self.pubkey = bytes(pubkey)
self.hrp = hrp

@classmethod
Copy link
Contributor

Choose a reason for hiding this comment

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

🚀

Comment on lines +222 to +224
sc_result = get_empty_smart_contract_result()
sc_result.data = bytes.fromhex("4036663662")
sc_result.logs = logs
Copy link
Contributor

Choose a reason for hiding this comment

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

This is somehow more verbose than before. 💭

Comment on lines +51 to +58
sender = Address.new_from_bech32(response.get("sender", ""))
receiver = Address.new_from_bech32(response.get("receiver", ""))
hash = bytes.fromhex(tx_hash)
nonce = response.get("nonce", -1)
round = response.get("round", -1)
epoch = response.get("epoch", -1)
timestamp = response.get("timestamp", 0)
block_hash = bytes.fromhex(response.get("blockHash", ""))
Copy link
Contributor

Choose a reason for hiding this comment

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

Verbose, but explicit, good 👍

@popenta popenta merged commit 17b04ba into feat/next Nov 14, 2024
6 checks passed
@popenta popenta deleted the TOOL-337-update-tx-on-network branch November 14, 2024 10:16
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