88
99import {
1010 combineCodec ,
11+ fixDecoderSize ,
12+ fixEncoderSize ,
1113 getAddressDecoder ,
1214 getAddressEncoder ,
13- getF64Decoder ,
14- getF64Encoder ,
15+ getBytesDecoder ,
16+ getBytesEncoder ,
1517 getStructDecoder ,
1618 getStructEncoder ,
1719 getU64Decoder ,
@@ -20,22 +22,23 @@ import {
2022 type FixedSizeCodec ,
2123 type FixedSizeDecoder ,
2224 type FixedSizeEncoder ,
25+ type ReadonlyUint8Array ,
2326} from '@solana/kit' ;
2427
2528export type Delegation = {
2629 voterPubkey : Address ;
2730 stake : bigint ;
2831 activationEpoch : bigint ;
2932 deactivationEpoch : bigint ;
30- warmupCooldownRate : number ;
33+ reserved : ReadonlyUint8Array ;
3134} ;
3235
3336export type DelegationArgs = {
3437 voterPubkey : Address ;
3538 stake : number | bigint ;
3639 activationEpoch : number | bigint ;
3740 deactivationEpoch : number | bigint ;
38- warmupCooldownRate : number ;
41+ reserved : ReadonlyUint8Array ;
3942} ;
4043
4144export function getDelegationEncoder ( ) : FixedSizeEncoder < DelegationArgs > {
@@ -44,7 +47,7 @@ export function getDelegationEncoder(): FixedSizeEncoder<DelegationArgs> {
4447 [ 'stake' , getU64Encoder ( ) ] ,
4548 [ 'activationEpoch' , getU64Encoder ( ) ] ,
4649 [ 'deactivationEpoch' , getU64Encoder ( ) ] ,
47- [ 'warmupCooldownRate ' , getF64Encoder ( ) ] ,
50+ [ 'reserved ' , fixEncoderSize ( getBytesEncoder ( ) , 8 ) ] ,
4851 ] ) ;
4952}
5053
@@ -54,7 +57,7 @@ export function getDelegationDecoder(): FixedSizeDecoder<Delegation> {
5457 [ 'stake' , getU64Decoder ( ) ] ,
5558 [ 'activationEpoch' , getU64Decoder ( ) ] ,
5659 [ 'deactivationEpoch' , getU64Decoder ( ) ] ,
57- [ 'warmupCooldownRate ' , getF64Decoder ( ) ] ,
60+ [ 'reserved ' , fixDecoderSize ( getBytesDecoder ( ) , 8 ) ] ,
5861 ] ) ;
5962}
6063
0 commit comments