Skip to content

Instantly share code, notes, and snippets.

View larrythecucumber321's full-sized avatar

Larry the Cucumber larrythecucumber321

View GitHub Profile
@larrythecucumber321
larrythecucumber321 / BGT.sol
Created September 22, 2024 23:50
PoL Contracts (Sep 22)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
// chosen to use an initializer instead of a constructor
import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
// chosen not to use Solady because EIP-2612 is not needed
import {
ERC20Upgradeable,
IERC20,
IERC20Metadata
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import { PausableUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol";
import { ERC20 } from "solady/src/tokens/ERC20.sol";
import { ERC4626 } from "solady/src/tokens/ERC4626.sol";
import { FactoryOwnable } from "../base/FactoryOwnable.sol";
import { Utils } from "../libraries/Utils.sol";
import { IHoneyErrors } from "./IHoneyErrors.sol";
@larrythecucumber321
larrythecucumber321 / BGT.sol
Last active July 11, 2024 09:39
Proof of Liquidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
// chosen to use an initializer instead of a constructor
import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
// chosen not to use Solady because EIP-2612 is not needed
import {
ERC20Upgradeable,
IERC20,
IERC20Metadata
[
{ "type": "constructor", "inputs": [], "stateMutability": "nonpayable" },
{ "type": "receive", "stateMutability": "payable" },
{
"type": "function",
"name": "UPGRADE_INTERFACE_VERSION",
"inputs": [],
"outputs": [{ "name": "", "type": "string", "internalType": "string" }],
"stateMutability": "view"
},
@larrythecucumber321
larrythecucumber321 / EntropyTest.sol
Last active May 17, 2024 13:52
Pyth Entropy Testing
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@pythnetwork/entropy-sdk-solidity/IEntropy.sol";
import "@pythnetwork/entropy-sdk-solidity/IEntropyConsumer.sol";
contract EntropyNFT is ERC721Enumerable, IEntropyConsumer {
event NumberRequested(uint64 sequenceNumber, address minter);
event Minted(address minter, uint256 tokenId);
@larrythecucumber321
larrythecucumber321 / tradingContract.json
Last active May 31, 2024 23:28
Berp Trading Interface
[
{ "type": "constructor", "inputs": [], "stateMutability": "nonpayable" },
{ "type": "receive", "stateMutability": "payable" },
{
"type": "function",
"name": "UPGRADE_INTERFACE_VERSION",
"inputs": [],
"outputs": [{ "name": "", "type": "string", "internalType": "string" }],
"stateMutability": "view"
},
@larrythecucumber321
larrythecucumber321 / jars
Created October 31, 2023 18:49
Pickle Vaults for Zaps
{
jar: 'LOOKS',
depositToken: '0xf4d2888d29D722226FafA5d9B24F9164c092421E',
pickleVaultToken: '0xb4EBc2C371182DeEa04B2264B9ff5AC4F0159C69',
balance: 1928273.507
},
{
jar: 'steCRV',
depositToken: '0x06325440D014e39736583c165C2963BA99fAf14E',
pickleVaultToken: '0x77C8A58D940a322Aea02dBc8EE4A30350D4239AD',
@larrythecucumber321
larrythecucumber321 / getBalances.ts
Created October 11, 2023 21:34
Get balances for hyUSD recollateralization auction
import hre from 'hardhat'
import { bn, fp } from '#/common/numbers'
import { whileImpersonating } from '#/utils/impersonation'
const main = async () => {
const eoa = 'ENTER_WALLET_ADDRESS_HERE'
// '0x465a5a630482f3abD6d3b84B39B29b07214d19e5', fusdc
// '0x3BECE5EC596331033726E5C6C188c313Ff4E3fE5', stkcvxeusd
// '0xaA91d24c2F7DBb6487f61869cD8cd8aFd5c5Cab2', morpho usdt
@larrythecucumber321
larrythecucumber321 / 3.0.0.md
Last active January 8, 2024 08:08
3.0.0 Upgrade Steps

Reserve 3.0.0 Upgrade Instructions

See here for a video Q&A between Nevin Freeman and Patrick Mckelvy explaining the impact & purpose of the 3.0.0 governance proposals

Electronic Dollar - eUSD

Description Target Contract Method Data
@larrythecucumber321
larrythecucumber321 / upgrade-instructions.ts
Created September 8, 2023 04:13
RToken upgrade instructions
import hre, { ethers } from 'hardhat'
import { getDeploymentFile, getDeploymentFilename, IDeployments } from './deployment/common'
import { getChainId } from '../common/blockchain-utils'
async function main() {
const rTokenAddresses = [
'0xA0d69E286B938e21CBf7E51D71F6A4c8918f482F',
'0xE72B141DF173b999AE7c1aDcbF60Cc9833Ce56a8',
'0xaCdf0DBA4B9839b96221a8487e9ca660a48212be',
]