Jump to content

Error - Issue a Fungible Token with Transfer Fee


Nomis

Recommended Posts

I am try to recrate the steps in the Tutorial using Python - Issue a Fungible Token (https://xrpl.org/issue-a-fungible-token.html).

 

When I try to add an extra step and try to send the funds from the hot address to another (user) account, whereas I set a transfer fee under step 3 - Configure Issuer Settings to some value (e.g. transfer_rate=1020000000), I get the following error:

xrpl.asyncio.transaction.reliable_submission.XRPLReliableSubmissionException: Transaction failed, tecPATH_PARTIAL: Path could not send full amount. 

When I don't set the transfer fee, the sending from the hot address to another address works.

What could be the problem?

 

My code for generating the user account: 

 

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)

 

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...