mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-21 20:25:51 +00:00
Update unfreeze_token.py
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
from xrpl.clients import JsonRpcClient
|
from xrpl.clients import JsonRpcClient
|
||||||
from xrpl.models import IssuedCurrencyAmount, TrustSet
|
from xrpl.models import IssuedCurrencyAmount, TrustSet, TrustSetFlag
|
||||||
from xrpl.transaction import (safe_sign_and_autofill_transaction,
|
from xrpl.transaction import (safe_sign_and_autofill_transaction,
|
||||||
send_reliable_submission)
|
send_reliable_submission)
|
||||||
from xrpl.models import TrustSetFlag
|
|
||||||
from xrpl.wallet import generate_faucet_wallet
|
from xrpl.wallet import generate_faucet_wallet
|
||||||
|
|
||||||
client = JsonRpcClient("https://s.altnet.rippletest.net:51234") # connect to testnet
|
client = JsonRpcClient("https://s.altnet.rippletest.net:51234") # connect to testnet
|
||||||
@@ -43,9 +42,9 @@ stxn_result = stxn_response.result
|
|||||||
# Print result and transaction hash
|
# Print result and transaction hash
|
||||||
if stxn_result["meta"]["TransactionResult"] == "tesSUCCESS":
|
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.classic_address}')
|
||||||
if stxn_result["meta"]["TransactionResult"] == "tecNoLineRedundant":
|
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.")
|
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:
|
else:
|
||||||
print(stxn_result["meta"]["TransactionResult"])
|
print(f"Transaction failed with {stxn_result['meta']['TransactionResult']}")
|
||||||
|
|
||||||
print(stxn_result["hash"])
|
print(stxn_result["hash"])
|
||||||
|
|||||||
Reference in New Issue
Block a user