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
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, |
// consider our struct to be: | |
/** | |
struct TaskReward { | |
uint256 igoId; | |
Tier tier; | |
address rewardee; | |
uint256 taskId; | |
} | |
*/ |
const { ethers } = require('ethers'); | |
/** | |
* @notice Path to where your .env file is. If the .env is at the root of your project, | |
* you can simply write `require('dotenv').config()` | |
*/ | |
require('dotenv').config({ path: '../../.env' }); | |
async function main() { | |
// instanciation can also be done using a private key | |
const wallet = new ethers.Wallet.fromMnemonic(process.env.SEED); |
require("dotenv").config(); | |
const { EthersEthereum } = require("@rarible/ethers-ethereum"); | |
const fetch = (...args) => | |
import("node-fetch").then(({ default: fetch }) => fetch(...args)); | |
global.FormData = require("form-data"); | |
global.window = { | |
fetch: fetch, | |
dispatchEvent: () => {}, | |
}; |