Skip to content

Instantly share code, notes, and snippets.

View McCoady's full-sized avatar

McToady.eth McCoady

View GitHub Profile
//Priority List
0xE4260Df86f5261A41D19c2066f1Eb2Eb4F009e84
0xdb4782d463628cc5b1de8f1220f755BA3bA4728E
0xeFEed35D024CF5B59482Fa4BC594AaeAf694E669
0xfAB22550fcD520A7eCED27414CD74Bc70a6ac1a9
0xe6B9F6b9cC3DAC911976008b131c2Ca634D576c5
0x5B5b71687e7cb013aE35ac9928DbD5393Ea36C63
0x4e4acd7fC67a37A88B5cF9D9f0f8aB58449a88Bf
0x34aA3F359A9D614239015126635CE7732c18fDF3
0xF552832498d5b913f65B2b0c5696f4D57b13F4E3
@McCoady
McCoady / SimpleMultisig.sol
Last active August 13, 2023 11:54
Simple Multisig Code
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol";
import "lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol";
import "lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol";
// Can receive ERC721/ERC1155/ERC20
contract SimpleWallet is IERC721Receiver, ERC1155Holder {
error AlreadyInit();
@McCoady
McCoady / KingOfTheHuff.huff
Created August 14, 2023 19:01
Basic Huff Implementation of Classic King Of The Ether Contract
#define function kingMe() payable returns ()
#define function getValue() view returns (uint256)
#define function getKing() view returns(address)
#define constant VALUE = FREE_STORAGE_POINTER()
#define constant KING = FREE_STORAGE_POINTER()
#define macro GET_VALUE() = takes(0) returns(0) {
// Read uint256 from storage
[VALUE] // [value_ptr]
@McCoady
McCoady / balancesMulticall.js
Created October 5, 2023 21:28
Multicall example to batch fetch balances
import { ethers } from "ethers";
import dotenv from "dotenv";
dotenv.config();
const tokenAbi = [
{
"name": "balanceOf", "type": "function", "stateMutability": "view", "inputs": [{ "internalType": "address", "name": "user", "type": "address" }],
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }]
},
]