Setting things up
Installing Node and VS Code EditorInstalling "XRPL JS TS Demo" and DependenciesXRP Ledger accounts
Learning More About XRP Ledger AccountGenerating XRPL AccountDerive r-address From SecretBrief Overview of The XRP LedgerFirst XRPL interaction
Activate Existing XRPL Account on Test NetworkConnecting and Interacting with XRP Ledger: account_infoInteracting with XRP Ledger using JSON-RPCError Handling and Best PracticesBasics of XRP and Issued CurrencySigning Payment TransactionAssignment SolutionVerifying SignatureSubmit Transaction Signature To XRP LedgerSubscription MethodsSubscription Methods To Build Responsive AppTransaction VerificationBalance DetailTransaction CostMeasures to Avoid Ledger SpammingSource And Destination TagsAccountSet Transaction: Domain, GravatarAccountSet Transaction: SetFlag, ClearFlagDeposit AuthorizationTokens, transactions
Issuing Token on XRPLToken(IOU): Payment TransactionCommands To Fetch TrustLine InformationFreeze a TrustLineIssuer: Transfer FeesMore about TrustLineCurrency Code In Hex FormatRemoving a TrustLineRequire authorization FlagLedger features
AccountDelete TransactionTickets: TheoryTicketCreate TransactionDelete Ticket ObjectSetRegularKey
SetRegularKey: The ConceptAssigning RegularKeyChange RegularKeyRemove RegularKeyBlackhole An AccountMultiSigning
MultiSigning: The ConceptReplace SignerListCreate SignerListReplace SignerListMulti-signed Payment TransactionRemoving SignerListIssuer: Transfer Fees
Intro
A sender should send a little more to cover the transfer fee set by the issuer.
Video
Topics covered
- XRP To XRP transfers can never have a transfer fee, as it’s not issued by any issuer.
- Range of transfer fee.
- Implementing transfer fee.
- Transfers of tokens to and from the issuer will not have a transfer fee.
- Making payment transaction with SendMax to cover the transfer fee.
- Changing the transfer rate.
Update
if (issuerDetail.account_data.TransferRate) {
const Billion = 1000000000;
const percentage = ((issuerDetail.account_data.TransferRate - Billion) / Billion) * 100;
payload.SendMax = {
currency: asset,
value: String(Number(process.argv[5]) + (Number(process.argv[5]) * percentage) / 100),
issuer: issuer,
};
}
References
Final tip: For a better UX, your client application must let the user know that they will be charged a percentage of fee by the issuer of the token for the transaction. Only execute the transaction if user agrees for it.
← Previous
Next →