SPLTokenSwapAccount.fromJson constructor

SPLTokenSwapAccount.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory SPLTokenSwapAccount.fromJson(Map<String, dynamic> json) {
  return SPLTokenSwapAccount(
    version: json['version'],
    isInitialized: json['isInitialized'],
    bumpSeed: json['bumpSeed'],
    poolTokenProgramId: json['poolTokenProgramId'],
    tokenAccountA: json['tokenAccountA'],
    tokenAccountB: json['tokenAccountB'],
    tokenPool: json['tokenPool'],
    mintA: json['mintA'],
    mintB: json['mintB'],
    feeAccount: json['feeAccount'],
    fees: TokenSwapFees.fromJson(json["fees"]),
    curveType: SPLTokenSwapCurveType.fromValue(json['curveType']),
    curveParameters: (json['curveParameters'] as List).cast(),
  );
}