Skip to content

Commit 1ecf74e

Browse files
authored
fix: change minDelegatorStake to uint64 (#903)
* fix: change minDelegatorStake to uint64 * fix: type in builder
1 parent ce1475b commit 1ecf74e

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/fixtures/pvm.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export const transformSubnetTx = () =>
283283
int(),
284284
int(),
285285
int(),
286-
int(),
286+
bigIntPr(),
287287
byte(),
288288
int(),
289289
input(),
@@ -303,7 +303,7 @@ export const transformSubnetTxBytes = () =>
303303
intBytes(),
304304
intBytes(),
305305
intBytes(),
306-
intBytes(),
306+
bigIntPrBytes(),
307307
byteByte(),
308308
intBytes(),
309309
bytesForInt(10),

src/serializable/pvm/transformSubnetTx.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class TransformSubnetTx extends AbstractSubnetTx {
3131
public readonly minStakeDuration: Int,
3232
public readonly maxStakeDuration: Int,
3333
public readonly minDelegationFee: Int,
34-
public readonly minDelegatorStake: Int,
34+
public readonly minDelegatorStake: BigIntPr,
3535
public readonly maxValidatorWeightFactor: Byte,
3636
public readonly uptimeRequirement: Int,
3737
public readonly subnetAuth: Serializable,
@@ -80,7 +80,7 @@ export class TransformSubnetTx extends AbstractSubnetTx {
8080
Int,
8181
Int,
8282
Int,
83-
Int,
83+
BigIntPr,
8484
Byte,
8585
Int,
8686
Codec,

src/utils/validateBurnedAmount/validateStaticBurnedAmount.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ describe('validateStaticBurnedAmount', () => {
222222
1,
223223
2,
224224
3,
225-
4,
225+
4n,
226226
5,
227227
6,
228228
[0, 2],

src/vms/pvm/builder.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ describe('pvmBuilder', () => {
789789
1,
790790
2,
791791
3,
792-
4,
792+
4n,
793793
5,
794794
6,
795795
subnetAuth,
@@ -818,7 +818,7 @@ describe('pvmBuilder', () => {
818818
new Int(1),
819819
new Int(2),
820820
new Int(3),
821-
new Int(4),
821+
new BigIntPr(4n),
822822
new Byte(hexToBuffer('0x5')),
823823
new Int(6),
824824
Input.fromNative(subnetAuth),

src/vms/pvm/builder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ export function newTransformSubnetTx(
788788
minStakeDuration: number,
789789
maxStakeDuration: number,
790790
minDelegationFee: number,
791-
minDelegatorStake: number,
791+
minDelegatorStake: bigint,
792792
maxValidatorWeightFactor: number,
793793
uptimeRequirement: number,
794794
subnetAuth: number[],
@@ -825,7 +825,7 @@ export function newTransformSubnetTx(
825825
new Int(minStakeDuration),
826826
new Int(maxStakeDuration),
827827
new Int(minDelegationFee),
828-
new Int(minDelegatorStake),
828+
new BigIntPr(minDelegatorStake),
829829
new Byte(hexToBuffer(maxValidatorWeightFactor.toString(16))),
830830
new Int(uptimeRequirement),
831831
Input.fromNative(subnetAuth),

0 commit comments

Comments
 (0)