Currently use 0.8.27 or 0.8.34. Avoid all versions in between.
0.8.27: Use if you don't need custom storage namespaces (ERC-7201, Diamond) or Solidity custom layouts (layout at).0.8.34: Use if you need features introduced>=0.8.28.
Currently use 0.8.27 or 0.8.34. Avoid all versions in between.
0.8.27: Use if you don't need custom storage namespaces (ERC-7201, Diamond) or Solidity custom layouts (layout at).0.8.34: Use if you need features introduced >=0.8.28.| "chat.tools.terminal.autoApprove": { | |
| "nl": true, | |
| // ============ PIPE CHAIN SUPPORT ============ | |
| "chat.tools.terminal.allowPipeChains": true, | |
| "chat.tools.terminal.validatePipeSegments": true, | |
| // ============ BASIC SYSTEM COMMANDS ============ | |
| "cd": true, | |
| "echo": true, |
List local stale branches:
git branch -vv | grep 'gone' | awk '{print $1}'List and delete local stale branches
git branch -vv | grep "gone" | awk '{print $1}' | xargs git branch --delete| Advantages | Disadvantages | |
|---|---|---|
| ABDKMath, Q64.64 | • 64 decimals• should be the most gas efficient: what about casting uint256 => int128? |
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.20; | |
| // chosen to use an initializer instead of a constructor | |
| import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; | |
| // chosen not to use Solady because EIP-2612 is not needed | |
| import { | |
| ERC20Upgradeable, | |
| IERC20, | |
| IERC20Metadata |
| pragma solidity 0.8.23; | |
| import {EIP712} from "openzeppelin-contracts/utils/cryptography/EIP712.sol"; | |
| import {ECDSA} from "openzeppelin-contracts/utils/cryptography/ECDSA.sol"; | |
| contract Swap is EIP712 { | |
| constructor() EIP712("Hand 2 Hand Exchange", "1") {} | |
| struct Data { | |
| IERC721 nft; |
| // SPDX-License-Identifier: UNLICENSED | |
| pragma solidity ^0.8.17; | |
| import {MerkleProof} from "openzeppelin-contracts/utils/cryptography/MerkleProof.sol"; | |
| // install murky with: `forge install dmfxyz/murky --no-commit ` | |
| import {Strings2} from "murky/differential_testing/test/utils/Strings2.sol"; | |
| import {Strings} from "openzeppelin-contracts/utils/Strings.sol"; | |
| import "forge-std/Test.sol"; |
| /** | |
| * | |
| * @param {ethers.Wallet} wallet | |
| * @param {ethers.BigNumber} chainId | |
| * @param {string} verifyingContract | |
| * @returns {string} full signature | |
| * | |
| * rewards is an object: { | |
| id: ethers.BigNumber, | |
| amount: ethers.BigNumber, |