我是 xrpl 的新手,正在学习 python 教程。昨天我必须设置三个信任线,今天我尝试删除它们但没有成功。
在我的在线研究中,我在 xrpchat 网站上发现了这两个线程:
https://www.xrpchat.com/topic/2338-how-to-totally-remove-trustlines/
https://www.xrpchat.com/topic/16834-is-there-a-way-to-totally-remove-trust-lines/
两个线程都提供了相同的答案:
如果信任线在您身边处于默认状态,则不会计入您的储备金。如果信任线在双方都处于其默认状态,它将被删除。默认状态意味着:
- 余额为零。
- 限制为零。
- 线路未验证或冻结。
- Line 不允许波纹,除非帐户设置了“DefaultRipple”标志,在这种情况下它必须允许波纹。
imo 我试图删除的三个信任线满足上述四个点......交易成功完成“信任线已删除”但信任线仍在显示并且它们的储备被锁定(参见https://test.bithomp的屏幕截图.com/)。
我无法弄清楚我错过了什么或做错了什么。所以我真的很感激,如果有人能指出我的错误是什么以及如何解决它。
[在此处输入图片描述][1]
这是我使用的地址:rf84on2iJ41Dy67M6ZdMCJzBA9rVZynos4
这些是我创建的三个信任线:
token_currency_code = "ZAP"
token_issuer = "rpswrb1mVCtahne4R2NHGe1eTemwAg3Y7X"
token_value = "47.61678015"
token_currency_code = "广域网"
token_issuer = "rpswrb1mVCtahne4R2NHGe1eTemwAg3Y7X"
token_value = "1.17096019"
token_currency_code = "MXN"
token_issuer = "rpswrb1mVCtahne4R2NHGe1eTemwAg3Y7X"
token_value = "17.8441"
删除时我使用:
token_currency_code = "ZAP"
token_issuer = "rpswrb1mVCtahne4R2NHGe1eTemwAg3Y7X"
token_value = "0"
token_currency_code = "广域网"
token_issuer = "rpswrb1mVCtahne4R2NHGe1eTemwAg3Y7X"
token_value = "0"
token_currency_code = "MXN"
token_issuer = "rpswrb1mVCtahne4R2NHGe1eTemwAg3Y7X"
token_value = "0"
我一直在玩这些标志而没有结果
flags= 262144, # 禁用无波纹标志,允许在此信任线上进行波纹。flags= 131072, # 启用无波纹标志 flags= 1048576, # 冻结信任线。
这是我一直在使用的代码:
client = JsonRpcClient(JSON_RPC_URL)
My_Wallet_Address = "rf84on2iJ41Dy67M6ZdMCJzBA9rVZynos4"
My_Wallet_seed = "<myseed>"
# flags= 262144, # Disable the No Ripple flag, allowing rippling on this trust line.
# flags= 131072, # Enable the No Ripple flag
# flags= 1048576, # Freeze the trust line.
tx_flags= 1048576
# -----------------
token_currency_code = "ZAP"
token_issuer = "rpswrb1mVCtahne4R2NHGe1eTemwAg3Y7X"
token_value = "0"
# -----------------
#token_currency_code = "WAN"
#token_issuer = "rpswrb1mVCtahne4R2NHGe1eTemwAg3Y7X"
#token_value = "0"
# -----------------
#token_currency_code = "MXN"
#token_issuer = "rpswrb1mVCtahne4R2NHGe1eTemwAg3Y7X"
#token_value = "0"
# ------------------
from xrpl.core import keypairs
public, private = keypairs.derive_keypair(My_Wallet_seed)
My_Wallet_account = keypairs.derive_classic_address(public)
from xrpl.wallet import Wallet
My_Wallet_wallet: Wallet = xrpl.wallet.Wallet(My_Wallet_seed, 0)
from xrpl.ledger import get_fee
# Delete trust line -----------------------------------
trust_set_tx = xrpl.models.transactions.TrustSet(
account=My_Wallet_wallet.classic_address,
fee=get_fee(client),
flags= tx_flags,
limit_amount=xrpl.models.amounts.issued_currency_amount.IssuedCurrencyAmount(
currency=token_currency_code,
issuer=token_issuer,
value=token_value,
)
)
ts_prepared = xrpl.transaction.safe_sign_and_autofill_transaction(
transaction=trust_set_tx,
wallet=My_Wallet_wallet,
client=client,
)
print("Delete trust line ...")
response = xrpl.transaction.send_reliable_submission(ts_prepared, client)
print(response)
``
and this is the output:
Delete trust line ...
Response(status=<ResponseStatus.SUCCESS: 'success'>, result={'Account': 'rf84on2iJ41Dy67M6ZdMCJzBA9rVZynos4', 'Fee': '10', 'Flags': 1048576, 'LastLedgerSequence': 24145712, 'LimitAmount': {'currency': 'ZAP', 'issuer': 'rpswrb1mVCtahne4R2NHGe1eTemwAg3Y7X', 'value': '0'}, 'Sequence': 24095419, 'SigningPubKey': 'ED6D46333BBAB91D539FEA52E1129FAB0F52DCA72BD681F5952B0C408D27A4C9F1', 'TransactionType': 'TrustSet', 'TxnSignature': '12653F1536ABB39346F8172A2B1DAC6D1FEA17C1AA12212C845134A937FE74CDC91224F880C4010B487D073F756F736904819E33DE4CF284DF2E8EF7C675B30A', 'date': 694613911, 'hash': '0ED99BDB7A1D6D44AE519407C9154BCC80DA448AF0C1D4B56473383D7DB4DCA4', 'inLedger': 24145695, 'ledger_index': 24145695, 'meta': {'AffectedNodes': [{'ModifiedNode': {'FinalFields': {'Account': 'rf84on2iJ41Dy67M6ZdMCJzBA9rVZynos4', 'Balance': '21999840', 'Flags': 0, 'OwnerCount': 3, 'Sequence': 24095420}, 'LedgerEntryType': 'AccountRoot', 'LedgerIndex': 'B4F90BF9B121813B822C4473F30E5CCCC4BE798E74CD55C0B15A77E644BE7D9C', 'PreviousFields': {'Balance': '21999850', 'Sequence': 24095419}, 'PreviousTxnID': '2458A55EBDCD918E8C067305B93D3FDD56824EC26608FD475F3A6E25115F9E67', 'PreviousTxnLgrSeq': 24124624}}], 'TransactionIndex': 0, 'TransactionResult': 'tesSUCCESS'}, 'validated': True}, id=None, type=<ResponseType.RESPONSE: 'response'>)
``
Any Idea, what my mistake is?
Many thanks in advance.
[1]: https://i.stack.imgur.com/vusZe.png