我正在尝试使用 Python 重新创建教程中的步骤 - 发行可替代令牌 ( https://xrpl.org/issue-a-fungible-token.html )。
当我尝试添加一个额外的步骤并尝试将资金从热地址发送到另一个(用户)帐户时,而我在步骤 3 下设置了转账费用 - 将发行人设置配置为某个值(例如 transfer_rate=1020000000),我得到以下错误:
xrpl.asyncio.transaction.reliable_submission.XRPLReliableSubmissionException: Transaction failed, tecPATH_PARTIAL: Path could not send full amount.
当我不设置转账费用时,从热地址发送到另一个地址是有效的。
可能是什么问题呢?
我用于生成额外用户帐户并尝试将令牌从热地址发送到它的代码:
hot_wallet_2 = generate_faucet_wallet(client, debug=True)
# Create trust line from hot 2 to cold address -----------------------------------
currency_code = "FOO"
trust_set_tx = xrpl.models.transactions.TrustSet(
account=hot_wallet_2.classic_address,
limit_amount=xrpl.models.amounts.issued_currency_amount.IssuedCurrencyAmount(
currency=currency_code,
issuer=cold_wallet.classic_address,
value="10000000000", # Large limit, arbitrarily chosen
)
)
ts_prepared = xrpl.transaction.safe_sign_and_autofill_transaction(
transaction=trust_set_tx,
wallet=hot_wallet_2,
client=client,
)
print("Creating trust line from hot address 2 to issuer...")
response = xrpl.transaction.send_reliable_submission(ts_prepared, client)
print(response)
# Send token 2 -------------------------------------------------------------------
issue_quantity = "2000"
send_token_tx = xrpl.models.transactions.Payment(
account=hot_wallet.classic_address,
destination=hot_wallet_2.classic_address,
amount=xrpl.models.amounts.issued_currency_amount.IssuedCurrencyAmount(
currency=currency_code,
issuer=cold_wallet.classic_address,
value=issue_quantity
)
)
pay_prepared = xrpl.transaction.safe_sign_and_autofill_transaction(
transaction=send_token_tx,
wallet=hot_wallet,
client=client,
)
print(f"Sending {issue_quantity} {currency_code} to {hot_wallet_2.classic_address}...")
response = xrpl.transaction.send_reliable_submission(pay_prepared, client)
print(response)