@@ -52,7 +52,7 @@ public static class Procedures
5252/// <summary>Input for query.</summary>
5353public readonly struct GetProposalIndicesInput : ISmartContractInput
5454{
55- public const int Size = 5 ;
55+ public const int Size = 8 ;
5656
5757 public int SerializedSize => Size ;
5858
@@ -63,7 +63,7 @@ public byte[] ToBytes()
6363 {
6464 var bytes = new byte [ Size ] ;
6565 bytes . AsSpan ( 0 , 1 ) [ 0 ] = ( byte ) ( ActiveProposals ? 1 : 0 ) ;
66- BinaryPrimitives . WriteInt32LittleEndian ( bytes . AsSpan ( 1 ) , PrevProposalIndex ) ;
66+ BinaryPrimitives . WriteInt32LittleEndian ( bytes . AsSpan ( 4 ) , PrevProposalIndex ) ;
6767 return bytes ;
6868 }
6969}
@@ -94,7 +94,7 @@ public static GetProposalIndicesOutput FromBytes(ReadOnlySpan<byte> data)
9494/// <summary>Input for query.</summary>
9595public readonly struct GetProposalInput : ISmartContractInput
9696{
97- public const int Size = 34 ;
97+ public const int Size = 40 ;
9898
9999 public int SerializedSize => Size ;
100100
@@ -155,7 +155,7 @@ public static GetProposalOutput FromBytes(ReadOnlySpan<byte> data)
155155/// <summary>Input for query.</summary>
156156public readonly struct GetVoteInput : ISmartContractInput
157157{
158- public const int Size = 34 ;
158+ public const int Size = 40 ;
159159
160160 public int SerializedSize => Size ;
161161
@@ -224,17 +224,59 @@ public static GetVotingResultsOutput FromBytes(ReadOnlySpan<byte> data)
224224
225225// ═══ Function: GetLatestTransfers (inputType=5) ═══
226226
227+ /// <summary>Nested type from GetLatestTransfers.</summary>
228+ public readonly struct GetLatestTransfersLatestTransfersEntry
229+ {
230+ public const int Size = 304 ;
231+
232+ public required byte [ ] Destination { get ; init ; }
233+ public byte [ ] Url { get ; init ; }
234+ public long Amount { get ; init ; }
235+ public uint Tick { get ; init ; }
236+ public bool Success { get ; init ; }
237+
238+ public static GetLatestTransfersLatestTransfersEntry ReadFrom ( ReadOnlySpan < byte > data )
239+ {
240+ var url = new byte [ 256 ] ;
241+ for ( int i = 0 ; i < 256 ; i ++ )
242+ {
243+ url [ i ] = data . Slice ( 32 + i * 1 , 1 ) [ 0 ] ;
244+ }
245+ return new GetLatestTransfersLatestTransfersEntry
246+ {
247+ Destination = data [ 0 ..] . Slice ( 0 , 32 ) . ToArray ( ) ,
248+ Url = url ,
249+ Amount = BinaryPrimitives . ReadInt64LittleEndian ( data [ 288 ..] ) ,
250+ Tick = BinaryPrimitives . ReadUInt32LittleEndian ( data [ 296 ..] ) ,
251+ Success = ( data . Slice ( 300 , 1 ) [ 0 ] != 0 )
252+ } ;
253+ }
254+ }
255+
227256/// <summary>Input for query (empty).</summary>
228257public readonly struct GetLatestTransfersInput : ISmartContractInput
229258{
230259 public int SerializedSize => 0 ;
231260 public byte [ ] ToBytes ( ) => [ ] ;
232261}
233262
234- /// <summary>Output (empty) .</summary>
263+ /// <summary>Output.</summary>
235264public readonly struct GetLatestTransfersOutput : ISmartContractOutput < GetLatestTransfersOutput >
236265{
237- public static GetLatestTransfersOutput FromBytes ( ReadOnlySpan < byte > data ) => new ( ) ;
266+ public GetLatestTransfersLatestTransfersEntry [ ] Entries { get ; init ; }
267+
268+ public static GetLatestTransfersOutput FromBytes ( ReadOnlySpan < byte > data )
269+ {
270+ var entries = new GetLatestTransfersLatestTransfersEntry [ 128 ] ;
271+ for ( int i = 0 ; i < 128 ; i ++ )
272+ {
273+ entries [ i ] = GetLatestTransfersLatestTransfersEntry . ReadFrom ( data . Slice ( 0 + i * GetLatestTransfersLatestTransfersEntry . Size , GetLatestTransfersLatestTransfersEntry . Size ) ) ;
274+ }
275+ return new GetLatestTransfersOutput
276+ {
277+ Entries = entries
278+ } ;
279+ }
238280}
239281
240282// ═══ Function: GetProposalFee (inputType=6) ═══
@@ -262,25 +304,83 @@ public static GetProposalFeeOutput FromBytes(ReadOnlySpan<byte> data)
262304
263305// ═══ Function: GetRegularPayments (inputType=7) ═══
264306
307+ /// <summary>Nested type from GetRegularPayments.</summary>
308+ public readonly struct GetRegularPaymentsRegularPaymentEntry
309+ {
310+ public const int Size = 312 ;
311+
312+ public required byte [ ] Destination { get ; init ; }
313+ public byte [ ] Url { get ; init ; }
314+ public long Amount { get ; init ; }
315+ public uint Tick { get ; init ; }
316+ public int PeriodIndex { get ; init ; }
317+ public bool Success { get ; init ; }
318+ public byte [ ] _padding0 { get ; init ; }
319+ public byte [ ] _padding1 { get ; init ; }
320+
321+ public static GetRegularPaymentsRegularPaymentEntry ReadFrom ( ReadOnlySpan < byte > data )
322+ {
323+ var url = new byte [ 256 ] ;
324+ for ( int i = 0 ; i < 256 ; i ++ )
325+ {
326+ url [ i ] = data . Slice ( 32 + i * 1 , 1 ) [ 0 ] ;
327+ }
328+ var _padding0 = new byte [ 1 ] ;
329+ for ( int i = 0 ; i < 1 ; i ++ )
330+ {
331+ _padding0 [ i ] = data . Slice ( 305 + i * 1 , 1 ) [ 0 ] ;
332+ }
333+ var _padding1 = new byte [ 2 ] ;
334+ for ( int i = 0 ; i < 2 ; i ++ )
335+ {
336+ _padding1 [ i ] = data . Slice ( 306 + i * 1 , 1 ) [ 0 ] ;
337+ }
338+ return new GetRegularPaymentsRegularPaymentEntry
339+ {
340+ Destination = data [ 0 ..] . Slice ( 0 , 32 ) . ToArray ( ) ,
341+ Url = url ,
342+ Amount = BinaryPrimitives . ReadInt64LittleEndian ( data [ 288 ..] ) ,
343+ Tick = BinaryPrimitives . ReadUInt32LittleEndian ( data [ 296 ..] ) ,
344+ PeriodIndex = BinaryPrimitives . ReadInt32LittleEndian ( data [ 300 ..] ) ,
345+ Success = ( data . Slice ( 304 , 1 ) [ 0 ] != 0 ) ,
346+ _padding0 = _padding0 ,
347+ _padding1 = _padding1
348+ } ;
349+ }
350+ }
351+
265352/// <summary>Input for query (empty).</summary>
266353public readonly struct GetRegularPaymentsInput : ISmartContractInput
267354{
268355 public int SerializedSize => 0 ;
269356 public byte [ ] ToBytes ( ) => [ ] ;
270357}
271358
272- /// <summary>Output (empty) .</summary>
359+ /// <summary>Output.</summary>
273360public readonly struct GetRegularPaymentsOutput : ISmartContractOutput < GetRegularPaymentsOutput >
274361{
275- public static GetRegularPaymentsOutput FromBytes ( ReadOnlySpan < byte > data ) => new ( ) ;
362+ public GetRegularPaymentsRegularPaymentEntry [ ] Entries { get ; init ; }
363+
364+ public static GetRegularPaymentsOutput FromBytes ( ReadOnlySpan < byte > data )
365+ {
366+ var entries = new GetRegularPaymentsRegularPaymentEntry [ 128 ] ;
367+ for ( int i = 0 ; i < 128 ; i ++ )
368+ {
369+ entries [ i ] = GetRegularPaymentsRegularPaymentEntry . ReadFrom ( data . Slice ( 0 + i * GetRegularPaymentsRegularPaymentEntry . Size , GetRegularPaymentsRegularPaymentEntry . Size ) ) ;
370+ }
371+ return new GetRegularPaymentsOutput
372+ {
373+ Entries = entries
374+ } ;
375+ }
276376}
277377
278378// ═══ Procedure: SetProposal (inputType=1) ═══
279379
280380/// <summary>Input payload for procedure.</summary>
281381public sealed class SetProposalPayload : ITransactionPayload , ISmartContractInput
282382{
283- public const int Size = 20 ;
383+ public const int Size = 24 ;
284384
285385 public ushort InputType => 1 ;
286386 public ushort InputSize => Size ;
0 commit comments