SPLTokenProgram.uiAmountToAmount constructor
SPLTokenProgram.uiAmountToAmount({
- required SPLTokenUiAmountToAmountLayout layout,
- required SolAddress mint,
- SolAddress programId = SPLTokenProgramConst.tokenProgramId,
Convert a UiAmount of tokens to a little-endian u64
raw Amount, using
the given mint. In this version of the program, the mint can only
specify the number of decimals.
Implementation
factory SPLTokenProgram.uiAmountToAmount(
{required SPLTokenUiAmountToAmountLayout layout,
required SolAddress mint,
SolAddress programId = SPLTokenProgramConst.tokenProgramId}) {
return SPLTokenProgram(
layout: layout, keys: [mint.toReadOnly()], programId: programId);
}