-
Notifications
You must be signed in to change notification settings - Fork 1
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
Refactored python scripts #82
Conversation
examples/contracts/adder/adder.py
Outdated
for event in tx.logs.events: | ||
if event.identifier != "SCDeploy": | ||
continue | ||
|
||
return factory.create_from_hex(event.topics[0].hex()) | ||
return Address.from_hex(event.topics[0].hex(), "erd") |
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 could have been new_from_hex(...)
but it's ok as it is.
for event in tx.logs.events: | ||
if event.identifier != "SCDeploy": | ||
continue | ||
|
||
return factory.create_from_hex(event.topics[0].hex()) | ||
return Address.from_hex(event.topics[0].hex(), "erd") |
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.
same comment as above
@@ -34,11 +35,12 @@ def main(): | |||
|
|||
provider.do_post(f"{SIMULATOR_URL}/simulator/set-state", json_data) | |||
|
|||
factory = AddressFactory("erd") | |||
wrapp_contract_address = factory.create_from_bech32("erd1qqqqqqqqqqqqqpgqhe8t5jewej70zupmh44jurgn29psua5l2jps3ntjj3") | |||
wrapp_contract_address = Address.from_bech32( |
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.
here could have been new_from_bech32(...)
.
examples/movebalance/move-balance.py
Outdated
amount_egld = 1000000000000000000 # 1 egld | ||
receiver = AddressFactory("erd").create_from_bech32("erd13kp9r5fx4tf8da4ex37sd48pc4xhkmtteq6hcyt4y36pstte0tjqxjf3ns") | ||
receiver = Address.from_bech32( |
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.
same as above
9a543fb
multiversx-sdk
python libgenerate-blocks-until-epoch-reached
andgenerate-blocks-until-transaction-processed
endpoint routes wherever possible