| Category | Convention | Examples |
|---|---|---|
| Main contracts | PascalCase, domain-prefixed | TokenVault, TokenVaultFactory |
| Modules | PascalCase, functional-role suffix | VaultAdmin, VaultFundraise, VaultView |
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
| "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? |
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.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 |
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
| 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; |
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: 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"; |
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
| /** | |
| * | |
| * @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, |
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
| // consider our struct to be: | |
| /** | |
| struct TaskReward { | |
| uint256 igoId; | |
| Tier tier; | |
| address rewardee; | |
| uint256 taskId; | |
| } | |
| */ |
NewerOlder
