This file contains hidden or 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
| contract SomeStore { | |
| struct CatalystStorage { | |
| uint64 x; | |
| } | |
| CatalystStorage public stg; | |
| constructor() { | |
| stg = CatalystStorage({x: 0}); | |
| } |
This file contains hidden or 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: BUSL-1.1 | |
| pragma solidity ^0.8.0; | |
| /// @title Creates and initializes V3 Pools | |
| /// @notice Provides a method for creating and initializing a pool, if necessary, for bundling with other methods that | |
| /// require the pool to exist. | |
| interface IPoolInitializer { | |
| /// @notice Creates a new pool if it does not exist, then initializes if not initialized | |
| /// @dev This method can be bundled with others via IMulticall for the first action (e.g. mint) performed against a pool | |
| /// @param token0 The contract address of token0 of the pool |
This file contains hidden or 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.8.25; | |
| import { Test } from "forge-std/Test.sol"; | |
| import "forge-std/console.sol"; | |
| import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; | |
| import { Address } from "@openzeppelin/contracts/utils/Address.sol"; | |
| import { LinearCurve } from "../../src/curves/LinearCurve.sol"; | |
| import { CurveParametersOutOfRange, TradeType } from "../../src/curves/IIPSeedCurve.sol"; | |
| import { CommonTest, Defaults } from "../helpers/CommonTest.sol"; |
This file contains hidden or 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.8.25; | |
| import { Test } from "forge-std/Test.sol"; | |
| import "forge-std/console.sol"; | |
| import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; | |
| import { Address } from "@openzeppelin/contracts/utils/Address.sol"; | |
| import { LinearCurve } from "../src/curves/LinearCurve.sol"; | |
| import { CurveParametersOutOfRange, TradeType } from "../src/curves/IIPSeedCurve.sol"; | |
| import { CommonTest, Defaults } from "./helpers/CommonTest.sol"; |
This file contains hidden or 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
| // Next14 adapted version of https://github.com/family/connectkit/blob/main/packages/connectkit-next-siwe/src/configureSIWE.tsx | |
| import type { IncomingMessage, ServerResponse } from "http"; | |
| import { | |
| getIronSession, | |
| IronSession, | |
| SessionOptions as IronSessionOptions, | |
| } from "iron-session"; | |
| import { NextRequest, NextResponse } from "next/server"; | |
| import { cookies } from "next/headers"; |
This file contains hidden or 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
| 'use client' | |
| import { getUnixTime, sub } from 'date-fns' | |
| import { useCallback, useState } from 'react' | |
| import { Address, decodeErrorResult, toHex, zeroAddress } from 'viem' | |
| import { abi } from '@/lib/abi/EasyAuction' | |
| import { useEasyAuctionInitiateAuction } from '@/lib/generated/wagmi/contracts' | |
| import { Transaction } from '@/types/chain' | |
| import { BID_CANCEL_DEADLINE_INTERVAL_HOURS } from '@/utils/auction' | |
| import { currentChain, safeDecodeLogs } from '@/utils/chain' |
This file contains hidden or 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
| Stefan Adolf | |
| Write a JavaScript program that renders a p5js image of a flower inside a browser context | |
| Sure, here's an example of how to render a flower using p5js in a browser context: | |
| html | |
| Copy code | |
| <!DOCTYPE html> | |
| <html> | |
| <head> |
This file contains hidden or 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.8.0; | |
| import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
| import "@openzeppelin/contracts/utils/math/SafeMath.sol"; | |
| contract MultiBeneficiaryVestingToken { | |
| using SafeMath for uint256; | |
| struct VestingSchedule { |
This file contains hidden or 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
| [ | |
| { | |
| "anonymous": false, | |
| "inputs": [ | |
| { | |
| "indexed": true, | |
| "internalType": "address", | |
| "name": "owner", | |
| "type": "address" | |
| }, |
This file contains hidden or 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
| // contracts/Splice.sol | |
| // SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.10; | |
| import '@openzeppelin/contracts/utils/math/SafeMath.sol'; | |
| contract OneOnOneNFTMarketPlace { | |
| using SafeMath for uint256; | |
| struct RoyaltyReceiver { |