Skip to content

Instantly share code, notes, and snippets.

// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;
import {ERC165Checker} from "openzeppelin-contracts/utils/introspection/ERC165Checker.sol";
import {MerkleBase} from "../utils/MerkleBase.sol";
import {MerkleProof} from "openzeppelin-contracts/utils/cryptography/MerkleProof.sol";
import {MinPriorityQueue, Bid} from "../lib/MinPriorityQueue.sol";
import {Minter} from "../modules/Minter.sol";
import {ICryptoPunk} from "../punks/interfaces/ICryptoPunk.sol";
@xgracias
xgracias / tokenbound.md
Created April 28, 2023 02:51
ERC-6551: Non-fungible Token Bound Accounts

Registry

interface IERC6551Registry {
    /// @dev The registry SHALL emit the AccountCreated event upon successful account creation
    event AccountCreated(
        address account,
        address implementation,
        uint256 chainId,
        address tokenContract,
@xgracias
xgracias / multicall.md
Created May 8, 2023 00:37
Batch contract calls
@xgracias
xgracias / sign and verify.ts
Created April 8, 2024 12:37
Sign and verify message on Keplr
export const signMessage = async (
chainId: string,
address: string,
): Promise<StdSignature | undefined> => {
const anyWindow: any = window;
if (!anyWindow.getOfflineSigner) {
throw new Error('Keplr extension is not available');
}
const signed = await window.keplr?.signArbitrary(