Skip to content

Instantly share code, notes, and snippets.

@barchef
barchef / interactions.ts
Created December 13, 2024 19:10
interactions.ts
import { ethers, run } from "hardhat"
function sleep(milliseconds: number) {
return new Promise((resolve) => setTimeout(resolve, milliseconds))
}
//const BUIDL_ADDRESS = "0x6056661b6f060ffD55d165c90d98D0f5fE08a0CA" // sepolia
//const BUIDL_ADDRESS = "0x40Be61a8C047e84Aa974eac296eaaBF09945D3b2" // mainnet
const BUIDL_TOKEN_ADDRESS=process.env.BUIDL_TOKEN_ADDRESS ?? "";
@barchef
barchef / BIDStaking.sol
Last active August 22, 2024 17:21
BIDStaking.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "hardhat/console.sol";
contract BIDStaking is ReentrancyGuard {
@barchef
barchef / BUIDL404.sol
Created July 22, 2024 13:32
BUIDL404.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {IERC721Receiver} from "@openzeppelin/contracts/interfaces/IERC721Receiver.sol";
import {IERC165} from "@openzeppelin/contracts/interfaces/IERC165.sol";
import {IERC404} from "./interfaces/IERC404.sol";
import {DoubleEndedQueue} from "./lib/DoubleEndedQueue.sol";
import {ERC721Events} from "./lib/ERC721Events.sol";
@barchef
barchef / Keybase.md
Created February 18, 2024 19:15
Keybase.md

Keybase proof

I hereby claim:

  • I am barchef on github.
  • I am barchef (https://keybase.io/barchef) on keybase.
  • I have a public key ASDmlfkT29kvy9mawCmN49Snzzcg75cCN8ZMNn2uzFIwVgo

To claim this, I am signing this object:

@barchef
barchef / ContractConfigurator.sol
Created October 31, 2017 18:39
ContractConfigurator
pragma solidity ^0.4.15;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) constant returns (uint256);
@barchef
barchef / gist:c25b137ba7003b230dbc51c7fa726caa
Created October 12, 2017 21:29
Second Rinkeby Test Account
0x3948c772dA7b84391F18A2386d94a35182Be7227
@barchef
barchef / gist:5f74258f627e2efef1b3a4c7360315d0
Last active October 12, 2017 21:28
Rinkeby Test Account
0x3948c772dA7b84391F18A2386d94a35182Be7227