This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |