Skip to content

Instantly share code, notes, and snippets.

View Kayaba-Attribution's full-sized avatar
🎯
Focusing

kayaba-attribution Kayaba-Attribution

🎯
Focusing
View GitHub Profile
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.9.0;
interface IMyToken {
function getPastVotes(address, uint256) external view returns (uint256);
}
contract TokenizedBallot {
struct Proposal {
bytes32 name;
@Kayaba-Attribution
Kayaba-Attribution / gist:ce69c92d41b92da54b537531ae7cc533
Created August 22, 2024 16:59
MyToken ERC20Permit Mocha Tests
import { expect } from "chai";
import { viem } from "hardhat"
import { loadFixture } from "@nomicfoundation/hardhat-network-helpers";
import { parseEther, keccak256, toHex } from 'viem'
const MINT_VALUE = 100n;
async function deployContractFixture() {
const publicClient = await viem.getPublicClient();
const [deployer, acc1, acc2] = await viem.getWalletClients();