-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
Coverage reportClick to see where and how coverage changed
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
sc_result = get_empty_smart_contract_result() | ||
sc_result.data = bytes.fromhex("4036663662") | ||
sc_result.logs = logs |
There was a problem hiding this comment.
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. 💭
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", "")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verbose, but explicit, good 👍
Updated the
TransactionOnNetwork
class to match the specs.