@@ -163,6 +163,14 @@ module KMIR-SPL-TOKEN
163163 // mock mint
164164 rule #isSPLPackFunc("Mint::pack") => true
165165
166+ syntax Bool ::= #isSPLRentFromAccountInfoFunc ( String ) [function, total]
167+ rule #isSPLRentFromAccountInfoFunc(NAME) => findString(NAME, "Rent::from_account_info", 0) =/=Int -1
168+ rule #isSPLRentFromAccountInfoFunc(_) => false [owise]
169+
170+ syntax Bool ::= #isSPLRentGetFunc ( String ) [function, total]
171+ rule #isSPLRentGetFunc(NAME) => findString(NAME, "Rent::get", 0) =/=Int -1
172+ rule #isSPLRentGetFunc(_) => false [owise]
173+
166174 // Adjust references when moving across stack frames
167175 rule #adjustRef(SPLRefCell(PLACE, VAL), OFFSET) => SPLRefCell(#adjustRef(PLACE, OFFSET), #adjustRef(VAL, OFFSET))
168176 rule #adjustRef(SPLDataBorrow(PLACE, VAL), OFFSET) => SPLDataBorrow(#adjustRef(PLACE, OFFSET), #adjustRef(VAL, OFFSET))
@@ -431,18 +439,28 @@ module KMIR-SPL-TOKEN
431439 ListItem(SPLPubkeyRef(Aggregate(variantIdx(0), ListItem(Range(?SplRentAccountKey:List))))) // pub key: &'a Pubkey
432440 ListItem(
433441 SPLRefCell(
434- place(
435- LOCAL,
436- appendP(PROJS, projectionElemDeref projectionElemField(fieldIdx(1), #hack()) .ProjectionElems)
442+ Reference(
443+ 0,
444+ place(
445+ LOCAL,
446+ appendP(PROJS, projectionElemDeref projectionElemField(fieldIdx(1), #hack()) .ProjectionElems)
447+ ),
448+ mutabilityNot,
449+ metadata(noMetadataSize, 0, noMetadataSize)
437450 ),
438451 Integer(?SplRentLamports:Int, 64, false)
439452 )
440453 ) // lamports: Rc<RefCell<&'a mut u64>>
441454 ListItem( // data: Rc<RefCell<&'a mut [u8]>>
442455 SPLRefCell(
443- place(
444- LOCAL,
445- appendP(PROJS, projectionElemDeref projectionElemField(fieldIdx(2), #hack()) .ProjectionElems)
456+ Reference(
457+ 0,
458+ place(
459+ LOCAL,
460+ appendP(PROJS, projectionElemDeref projectionElemField(fieldIdx(2), #hack()) .ProjectionElems)
461+ ),
462+ mutabilityNot,
463+ metadata(noMetadataSize, 0, noMetadataSize)
446464 ),
447465 SPLDataBuffer(
448466 Aggregate(variantIdx(0),
0 commit comments