Change classic_address to address xrpl-py

This commit is contained in:
JST5000
2023-06-08 14:33:14 -07:00
parent 45d9e894ed
commit 3a6c7dac74
46 changed files with 121 additions and 121 deletions

View File

@@ -12,7 +12,7 @@ sender_wallet = generate_faucet_wallet(client=client)
print("Successfully generated test wallet")
# build accountset transaction to disable freezing
accountset = AccountSet(account=sender_wallet.classic_address, set_flag=AccountSetFlag.ASF_NO_FREEZE)
accountset = AccountSet(account=sender_wallet.address, set_flag=AccountSetFlag.ASF_NO_FREEZE)
print("Now sending an AccountSet transaction to set the ASF_NO_FREEZE flag...")
@@ -25,6 +25,6 @@ stxn_result = stxn_response.result
# print result and transaction hash
if stxn_result["meta"]["TransactionResult"] == "tesSUCCESS":
print(f'Successfully enabled no freeze for {sender_wallet.classic_address}')
print(f'Successfully enabled no freeze for {sender_wallet.address}')
print(stxn_result["hash"])

View File

@@ -11,14 +11,14 @@ token_name = "FOO"
# Amount a trustline can handle, for this transaction it is set to 0
value = "100"
target_addr = generate_faucet_wallet(client=client).classic_address
target_addr = generate_faucet_wallet(client=client).address
sender_wallet = generate_faucet_wallet(client=client)
print("Successfully generated test wallets")
# Build trustline freeze transaction
trustset = TrustSet(account=sender_wallet.classic_address, limit_amount=IssuedCurrencyAmount(
trustset = TrustSet(account=sender_wallet.address, limit_amount=IssuedCurrencyAmount(
currency= token_name,
issuer=target_addr,
value = value),
@@ -33,6 +33,6 @@ stxn_response = submit_and_wait(trustset, client, sender_wallet)
stxn_result = stxn_response.result
if(stxn_result["meta"]["TransactionResult"] == 'tesSUCCESS'):
print(f"Froze {token_name} issued by {target_addr} for address {sender_wallet.classic_address}")
print(f"Froze {token_name} issued by {target_addr} for address {sender_wallet.address}")
if(stxn_result["meta"]["TransactionResult"] == 'tesSUCCESS'):
print(f"Froze {token_name} issued by {target_addr} for address {sender_wallet.classic_address}")
print(f"Froze {token_name} issued by {target_addr} for address {sender_wallet.address}")

View File

@@ -11,7 +11,7 @@ sender_wallet = generate_faucet_wallet(client)
print("Successfully generated test wallet")
# Build accountset transaction to enable global freeze
accountset = AccountSet(account=sender_wallet.classic_address,
accountset = AccountSet(account=sender_wallet.address,
set_flag=AccountSetFlag.ASF_GLOBAL_FREEZE)
print("Preparing and submitting Account set transaction with ASF_GLOBAL_FREEZE ...")
@@ -24,5 +24,5 @@ stxn_result = stxn_response.result
# Print result and transaction hash
if stxn_result["meta"]["TransactionResult"] == "tesSUCCESS":
print(f'Successfully enabled global freeze for {sender_wallet.classic_address}')
print(f'Successfully enabled global freeze for {sender_wallet.address}')
print(stxn_result["hash"])

View File

@@ -12,7 +12,7 @@ value = "0"
print("Generating two test wallets...")
# Address to unfreeze trustline
target_addr = generate_faucet_wallet(client=client).classic_address
target_addr = generate_faucet_wallet(client=client).address
print("Successfully generated the target account")
# Sender wallet
@@ -22,7 +22,7 @@ print("Successfully generated the sender account")
print("Successfully generated test wallets")
# Build trustline freeze transaction
trustset = TrustSet(account=sender_wallet.classic_address, limit_amount=IssuedCurrencyAmount(
trustset = TrustSet(account=sender_wallet.address, limit_amount=IssuedCurrencyAmount(
currency=token_name,
issuer=target_addr,
value = value
@@ -39,7 +39,7 @@ stxn_result = stxn_response.result
# Print result and transaction hash
if stxn_result["meta"]["TransactionResult"] == "tesSUCCESS":
print(f'Successfully enabled no freeze for {sender_wallet.classic_address}')
print(f'Successfully enabled no freeze for {sender_wallet.address}')
if stxn_result["meta"]["TransactionResult"] == "tecNO_LINE_REDUNDANT":
print("This was used on an account which didn't have a trustline yet. To try this out, modify `target_addr` to point to an account with a frozen trustline, and make sure the currency code matches.")
else: