Skip to content

Instantly share code, notes, and snippets.

View DonGuillotine's full-sized avatar
🎯
Focusing

Donald Nwokoro DonGuillotine

🎯
Focusing
View GitHub Profile
  1. Date Handling You're passing the Date objects directly to createEvent, but they need to be converted to Unix timestamps first. Here's how to fix this:
const handleSubmit = (e: React.FormEvent) => {
  e.preventDefault();
  if (isConnected) {
    setIsSubmitting(true);

    if (validateForm()) {
import re
from collections import Counter
from datetime import datetime
import pandas as pd
import matplotlib.pyplot as plt
from typing import Dict, List, Tuple
import seaborn as sns
class WhatsAppAnalyzer:
def __init__(self, file_path: str):
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./interfaces/IFlashBorrower.sol";
import "./interfaces/ICauldron.sol";
import "./interfaces/IBentoBox.sol";
import "./interfaces/ILendingPool.sol";

Attack Contract

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import {Web3BridgeCXIPool} from "src/web3bridgecxipool.sol";
import {IFlashLoanEtherReceiver} from "src/web3bridgecxipool.sol";

contract ExploitContract is IFlashLoanEtherReceiver {
    Web3BridgeCXIPool private immutable pool;
// SPDX-License-Identifier: SEE LICENSE IN LICENSE
pragma solidity ^0.8.13;

import "../src/Challenge/Challenge2.sol";
import {Test} from "forge-std/Test.sol";

contract Challenge2Test is Test {
    ChallengeTwo challengeContract;
    address admin = makeAddr('admin');

Flawed Withdrawal Limit Check Exploit

// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

interface IVIP_Bank {
    function deposit() external payable;
    function withdraw(uint _amount) external;
    function balances(address) external view returns (uint);
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
contract StudentPortal {
struct Student {
string name;
string email;
uint256 dateOfBirth;
string localGovernmentArea;
string country;
<title>Ethereum 101</title>

Conventional Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default