futarchy icon indicating copy to clipboard operation
futarchy copied to clipboard

Cast unix timestamp as `u32` in autocrat

Open Henry-E opened this issue 10 months ago • 0 comments

This is what raydium does in their CLMM code and prophet suggested something similar during a code review, so maybe worth a tiny PR to modify. Solana timestamp is an i64 so better to cast as u32 than to make the other vars u64. It's not super important anyway, just a minor change.

https://github.com/raydium-io/raydium-clmm/blob/da57b0b7409f5a4437feb8fd0551683b14b8a1f5/programs/amm/src/states/oracle.rs#L162-L166

Henry-E avatar Mar 30 '24 21:03 Henry-E