Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.20; | |
import {ICurtaGolf} from "curta-golf/src/interfaces/ICurtaGolf.sol"; | |
import {ICourse} from "curta-golf/src/interfaces/ICourse.sol"; | |
import {IERC721} from "./interfaces/IERC721.sol"; | |
import {SafeTransferLib} from "solady/utils/SafeTransferLib.sol"; | |
import {SafeCastLib} from "solady/utils/SafeCastLib.sol"; | |
/// @author philogy <https://github.com/philogy> |
// The factorial binary builds solutions for the 2nd Curta gas-golfing course. | |
package main | |
import ( | |
"fmt" | |
"math/bits" | |
"github.com/ethereum/go-ethereum/common" | |
. "github.com/solidifylabs/specops" //lint:ignore ST1001 SpecOps DSL is designed to be dot-imported |
#!/usr/bin/env bash | |
# Pre-requisites: | |
# - foundry (https://getfoundry.sh/) | |
# - rsync (https://github.com/WayneD/rsync) | |
# - pnpm (https://pnpm.io) | |
# - sd (https://github.com/chmln/sd) | |
# Strict mode: https://gist.github.com/vncsna/64825d5609c146e80de8b1fd623011ca | |
set -euo pipefail |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.19; | |
import "./PuzzleBox.sol"; | |
// One word, or 32 bytes | |
uint256 constant ONE_WORD = 0x20; | |
// We lay out calldata in memory starting at this offset, immediately after the | |
// 4 byte function selector |
U+0039 | |
U+003A | |
U+002F | |
U+0023 | |
U+0050 | |
U+0075 | |
U+007A | |
U+006C | |
U+0065 | |
U+0041 |
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.19; | |
/** | |
* @title Returnbomb attack example | |
* @author pcaversaccio | |
*/ | |
contract Evil { | |
uint256 public counter; |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');