solana.js: add historyLimit to aggregator JSON

This commit is contained in:
Conner Gallagher 2022-12-20 08:37:43 -07:00
parent e0a81ae70b
commit 55a02f0672
1 changed files with 13 additions and 0 deletions

View File

@ -21,6 +21,8 @@ export class AggregatorJson implements CreateQueueFeedParams {
expiration: number;
varianceThreshold: number;
forceReportPeriod: number;
historyLimit?: number;
disableCrank: boolean;
crankIndex?: number;
@ -65,9 +67,15 @@ export class AggregatorJson implements CreateQueueFeedParams {
this.expiration = parseNumber(object, 'expiration', 0);
this.varianceThreshold = parseNumber(object, 'varianceThreshold', 0);
this.forceReportPeriod = parseNumber(object, 'forceReportPeriod', 0);
this.historyLimit =
'historyLimit' in object
? Number.parseInt(object.historyLimit)
: undefined;
this.disableCrank = parseBoolean(object, 'disableCrank', false);
this.crankIndex =
'crankIndex' in object ? Number(object.crankIndex) : undefined;
this.basePriorityFee =
'basePriorityFee' in object
? Number.parseInt(object.basePriorityFee)
@ -125,7 +133,12 @@ export class AggregatorJson implements CreateQueueFeedParams {
expiration: this.expiration,
varianceThreshold: this.varianceThreshold,
forceReportPeriod: this.forceReportPeriod,
historyLimit: this.historyLimit,
disableCrank: this.disableCrank,
basePriorityFee: this.basePriorityFee,
priorityFeeBump: this.priorityFeeBump,
priorityFeeBumpPeriod: this.priorityFeeBumpPeriod,
maxPriorityFeeMultiplier: this.maxPriorityFeeMultiplier,
fundAmount: this.fundAmount,
keypair: keypairToString(this.keypair),
authority: this.authority ? keypairToString(this.authority) : undefined,