Skip to content

Commit

Permalink
- fixes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
iulianpascalau committed Sep 18, 2024
1 parent 8442068 commit 9a543fb
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/contracts/adder/adder.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def extract_contract_address(tx: TransactionOnNetwork) -> Address:
if event.identifier != "SCDeploy":
continue

return Address.from_hex(event.topics[0].hex(), "erd")
return Address.new_from_hex(event.topics[0].hex(), "erd")


if __name__ == "__main__":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def extract_contract_address(tx: TransactionOnNetwork) -> Address:
if event.identifier != "SCDeploy":
continue

return Address.from_hex(event.topics[0].hex(), "erd")
return Address.new_from_hex(event.topics[0].hex(), "erd")


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion examples/contracts/wrappedegld/wrapped-egld.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def main():

provider.do_post(f"{SIMULATOR_URL}/simulator/set-state", json_data)

wrapp_contract_address = Address.from_bech32(
wrapp_contract_address = Address.new_from_bech32(
"erd1qqqqqqqqqqqqqpgqhe8t5jewej70zupmh44jurgn29psua5l2jps3ntjj3"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/movebalance/move-balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def main():
config = TransactionsFactoryConfig(provider.get_network_config().chain_id)
tx_factory = TransferTransactionsFactory(config)
amount_egld = 1000000000000000000 # 1 egld
receiver = Address.from_bech32(
receiver = Address.new_from_bech32(
"erd13kp9r5fx4tf8da4ex37sd48pc4xhkmtteq6hcyt4y36pstte0tjqxjf3ns"
)
call_transaction = tx_factory.create_transaction_for_native_token_transfer(
Expand Down
6 changes: 3 additions & 3 deletions examples/staking/staking.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def main():
provider.do_post(f"{GENERATE_BLOCKS_UNTIL_EPOCH_REACHED_URL}/1", {})

# ################## create a staking provider
system_delegation_manager = Address.from_bech32(
system_delegation_manager = Address.new_from_bech32(
"erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqylllslmq6y6"
)
config = TransactionsFactoryConfig(provider.get_network_config().chain_id)
Expand Down Expand Up @@ -72,7 +72,7 @@ def main():

# ################## merge validator in delegator
response = provider.do_get(f"{INITIAL_WALLETS_URL}")
initial_address_with_stake = Address.from_bech32(
initial_address_with_stake = Address.new_from_bech32(
response.to_dictionary()["stakeWallets"][0]["address"]["bech32"]
)

Expand Down Expand Up @@ -147,7 +147,7 @@ def extract_contract_address(tx: TransactionOnNetwork) -> Address:
if event.identifier != "SCDeploy":
continue

return Address.from_hex(event.topics[0].hex(), "erd")
return Address.new_from_hex(event.topics[0].hex(), "erd")


def get_tx_and_verify_status(provider: ProxyNetworkProvider, tx_hash: str) -> TransactionOnNetwork:
Expand Down

0 comments on commit 9a543fb

Please sign in to comment.