- Allow
colima start
to run without password:
cat <<-EOF | sudo tee /private/etc/sudoers.d/colima
%admin ALL=NOPASSWD: /bin/rm -rf /var/run/docker.sock
%admin ALL=NOPASSWD: /bin/ln -s $HOME/.colima/docker.sock /var/run/docker.sock
EOF
This is a short overview on how to completely remove any old mysql server installs in OSX and upgrade to MariaDB without conflicts. Things can get a bit weird when you have various old installs of MySQL server floating around, and utilizing homebrew to install and upgrade MariaDB as a drop in replacement for MySQL has worked well, especially if you're used to managing MySQL installs via yum in linux.
Backup all of your current databases with mysqldump
This isn't a tutorial on backups, and there are many ways to do it. You should know how to backup your data anyway. For this example, we'll do a full backup of our InnoDB databases.
const eventFilterv5WithPagination = (contractAddress, erc20abi, _provider, numberOfResponses) => { | |
// creating the interface of the ABI | |
const iface = new ethers.utils.Interface(erc20abi.abi); | |
// intialize array for the logs | |
let logs = []; | |
// get latest block number | |
const latest = await provider.getBlockNumber(); | |
// intialize a counter for which block we're scraping starting at the most recent block | |
let blockNumberIndex = latest; |
// SPDX-License-Identifier: CC0 | |
pragma solidity ^0.8.0; | |
// author @koeppelmann | |
// Detector Factory allows to deploy new CensorshipDetector | |
// Each CensorshipDetector monitors wether a specific address is being cencored on Ethereum | |
// Each CensorshipDetector must be funded with ETH (anyone can send ETH to the CensorshipDetector) | |
// Once funded anyone can call the "withdrawal" in the "CensorshipDetector" every 1h and it will pay a small bounty to tx.origin (100k * basefee) | |
// During this transaction the "CensorshipDetector" will send 1 wei to the address that is endangered of being cencored. | |
// CensorshipDetector will log the coinbase (validator address) (those are NOT censoring) and the number of blocks that has passed. |
// SPDX-License-Identifier: AGPL-3.0-or-later | |
// The ABI encoder is necessary, but older Solidity versions should work | |
pragma solidity ^0.7.0; | |
pragma experimental ABIEncoderV2; | |
// These definitions are taken from across multiple dydx contracts, and are | |
// limited to just the bare minimum necessary to make flash loans work. | |
library Types { | |
enum AssetDenomination { Wei, Par } |
import { BigNumber, providers, Wallet, Contract } from "ethers"; | |
import { FlashbotsBundleProvider, FlashbotsBundleResolution, FlashbotsBundleTransaction, SimulationResponseSuccess } from "@flashbots/ethers-provider-bundle"; | |
import { Provider } from "@ethersproject/abstract-provider"; | |
import { Console } from "console"; | |
import { send } from "process"; | |
import * as fs from "fs" | |
import { connect } from "http2"; | |
const MWEI = 10n ** 6n | |
const GWEI = 10n ** 9n |
pragma solidity 0.6.12; | |
pragma experimental ABIEncoderV2; | |
import { IERC20 } from "./Interfaces.sol"; | |
import { SafeMath,SafeERC20 } from "./Libraries.sol"; | |
import "./ISoloMargin.sol"; | |
contract DydxFlashloanBase { | |
using SafeMath for uint256; |
/* test/sample-test.js */ | |
describe("NFTMarket", function() { | |
it("Should create and execute market sales", async function() { | |
/* deploy the marketplace */ | |
const Market = await ethers.getContractFactory("NFTMarket") | |
const market = await Market.deploy() | |
await market.deployed() | |
const marketAddress = market.address | |
/* deploy the NFT contract */ |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.7.0 <0.9.0; | |
interface IDai { | |
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; | |
// function permit(address holder, address spender, uint256 nonce, uint256 expiry, | |
// bool allowed, uint8 v, bytes32 r, bytes32 s) external; | |
function transferFrom(address, address, uint256) external returns (bool); | |
function balanceOf(address) external view returns (uint256); |
contract WyvernExchange is Exchange { | |
function calculateMatchPrice_( | |
address[14] addrs, | |
uint[18] uints, | |
uint8[8] feeMethodsSidesKindsHowToCalls, | |
bytes calldataBuy, | |
bytes calldataSell, | |
bytes replacementPatternBuy, | |
bytes replacementPatternSell, | |
bytes staticExtradataBuy, |