Skip to content

Instantly share code, notes, and snippets.

View michojekunle's full-sized avatar
🎯
Buidling

A M D michojekunle

🎯
Buidling
View GitHub Profile
import { useAccount, useSignMessage } from "wagmi";
import { useConnect } from "wagmi";
import { Button } from "./ui/button";
import { injected } from "wagmi/connectors";
import { liskSepolia } from "viem/chains";
const ConnectAndSign = () => {
const { connectAsync } = useConnect();
const { signMessageAsync } = useSignMessage();
const { isConnected, address } = useAccount();
@michojekunle
michojekunle / ChallengeTwo.t.sol
Last active October 26, 2024 15:27
Comprehensive test for Challenge two CTF contract including exploit test and forking ETH sepolia testnet
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;
import "../src/ChallengeTwo.sol";
import {Test, console2} from "forge-std/Test.sol";
// open function to find the passkey
function findPassKey() pure returns (uint16) {
for (uint16 i; i < type(uint16).max; ++i) {
if (
@michojekunle
michojekunle / VIPBank.test.js
Last active October 22, 2024 17:26
Hardhat test for the VIPBank Contract
const { expect } = require("chai");
const { ethers } = require("hardhat");
describe("VIP_Bank Contract", function () {
let vipBank;
let manager;
let vipUser;
let anotherUser;
beforeEach(async function () {
@michojekunle
michojekunle / custom-connect-button.tsx
Created September 19, 2024 17:59
Custom connect button rainbow
"use client";
import { ConnectButton } from '@rainbow-me/rainbowkit';
export default function CustomConnectButton() {
return (
<ConnectButton.Custom>
{({
account,
chain,
openAccountModal,
@michojekunle
michojekunle / phone-input.tsx
Last active July 31, 2024 06:35
PHONE INPUT
import { CheckIcon, ChevronsUpDown } from "lucide-react";
import * as React from "react";
import * as RPNInput from "react-phone-number-input";
import flags from "react-phone-number-input/flags";
import { Button } from "@/components/ui/button";
import {