Skip to content

Instantly share code, notes, and snippets.

@davidlaprade
davidlaprade / comet.t.sol
Created February 7, 2023 21:11
Compound V3 Rebasing Test
pragma solidity ^0.8.13;
import "forge-std/Test.sol";
import "forge-std/console2.sol";
interface IComet {
function supply(address asset, uint amount) virtual external;
function balanceOf(address owner) virtual external view returns (uint256);
}
@davidlaprade
davidlaprade / indentation-per-line.sql
Last active July 23, 2022 16:31
Google BigQuery of Open Source Github Repos to Determine Average Indentation Per line
-- Original query can be found here:
-- https://console.cloud.google.com/bigquery?sq=226172199733:c6cfab4e7c6b49e791513d3229f9ddf4
-- CAVEATS:
-- * This query is quite expensive to run on the full public dataset, ~$13. If
-- you are just interested in trying it out, I recommend commenting out the
-- first subquery and replacing with the version below, which uses a much
-- smaller sample table.
-- * This includes indentation on code comments, which should be fine as comments
-- usually inherit the indentation of the code context