@@ -14,10 +14,6 @@ export class ContractStorageUpdateRequest {
1414 * Storage slot we are updating.
1515 */
1616 public readonly storageSlot : Fr ,
17- /**
18- * Old value of the storage slot.
19- */
20- public readonly oldValue : Fr ,
2117 /**
2218 * New value of the storage slot.
2319 */
@@ -29,12 +25,12 @@ export class ContractStorageUpdateRequest {
2925 ) { }
3026
3127 toBuffer ( ) {
32- return serializeToBuffer ( this . storageSlot , this . oldValue , this . newValue ) ;
28+ return serializeToBuffer ( this . storageSlot , this . newValue ) ;
3329 }
3430
3531 static fromBuffer ( buffer : Buffer | BufferReader ) {
3632 const reader = BufferReader . asReader ( buffer ) ;
37- return new ContractStorageUpdateRequest ( Fr . fromBuffer ( reader ) , Fr . fromBuffer ( reader ) , Fr . fromBuffer ( reader ) ) ;
33+ return new ContractStorageUpdateRequest ( Fr . fromBuffer ( reader ) , Fr . fromBuffer ( reader ) ) ;
3834 }
3935
4036 /**
@@ -52,32 +48,31 @@ export class ContractStorageUpdateRequest {
5248 * @returns The array.
5349 */
5450 static getFields ( fields : FieldsOf < ContractStorageUpdateRequest > ) {
55- return [ fields . storageSlot , fields . oldValue , fields . newValue , fields . sideEffectCounter ] as const ;
51+ return [ fields . storageSlot , fields . newValue , fields . sideEffectCounter ] as const ;
5652 }
5753
5854 static empty ( ) {
59- return new ContractStorageUpdateRequest ( Fr . ZERO , Fr . ZERO , Fr . ZERO ) ;
55+ return new ContractStorageUpdateRequest ( Fr . ZERO , Fr . ZERO ) ;
6056 }
6157
6258 isEmpty ( ) {
63- return this . storageSlot . isZero ( ) && this . oldValue . isZero ( ) && this . newValue . isZero ( ) ;
59+ return this . storageSlot . isZero ( ) && this . newValue . isZero ( ) ;
6460 }
6561
6662 toFriendlyJSON ( ) {
67- return `Slot=${ this . storageSlot . toFriendlyJSON ( ) } : ${ this . oldValue . toFriendlyJSON ( ) } => ${ this . newValue . toFriendlyJSON ( ) } ` ;
63+ return `Slot=${ this . storageSlot . toFriendlyJSON ( ) } : ${ this . newValue . toFriendlyJSON ( ) } ` ;
6864 }
6965
7066 toFields ( ) : Fr [ ] {
71- return [ this . storageSlot , this . oldValue , this . newValue ] ;
67+ return [ this . storageSlot , this . newValue ] ;
7268 }
7369
7470 static fromFields ( fields : Fr [ ] | FieldReader ) : ContractStorageUpdateRequest {
7571 const reader = FieldReader . asReader ( fields ) ;
7672
7773 const storageSlot = reader . readField ( ) ;
78- const oldValue = reader . readField ( ) ;
7974 const newValue = reader . readField ( ) ;
8075
81- return new ContractStorageUpdateRequest ( storageSlot , oldValue , newValue ) ;
76+ return new ContractStorageUpdateRequest ( storageSlot , newValue ) ;
8277 }
8378}
0 commit comments