Skip to content

Instantly share code, notes, and snippets.

View nch7's full-sized avatar

Nick Chikovani nch7

View GitHub Profile
enode://123c18cdc699c0ea37da3be0cfdbd5ee74c2bbe3244487b8f15e08b381945b4f35b16ef3f63c9a7d8563c5743502bb0979e8abdb8b484fc507a730c50dbeeb85@165.227.137.211:30303
enode://5ec0778b27b077b52ae6e928965de4ff5afda2a56ee20397e1324c0e2a7a5baaf17f69f56d973738df1b7614e73748a88a996f52a3105b0d183f6b77c94dc302@172.105.97.214:30303
enode://4b73d85ab532172276e65b3e680d83313e29564d5013d3f0ef232d0fc137d441d9088a82a767006dcd60da02eabc3db57dc1292fe2bc64f94f7059742b779c08@213.52.128.235:30303
enode://5313c56834ddd7cc800288274234913e75809d81ab6cb0ae9fadac43ef60309b66a46f7b6526c4a813e601122c43e6b8f5b67ad4cbcd9b557f9db39fd7a8e6fb@165.227.39.254:30303
enode://1c3ee21222580215a34c61e75500427fa3455d9a69f0c1a0c44c11c6facb93c2cf4734538b5e667490033d85c37c32a0f4202761009a1d71f60823bf40ef6223@178.62.22.12:30303
enode://98fa1f1ba6c60d4526a7d45b5bc8088133dca42f67cad2c60d6f32c4eed55c5b4b5f88084a3c19b34f64de7a66fd4269d4cec06e09a115859b6e6e533a7e18cf@139.162.249.72:30303
enode://0b0646097b6a6b9a7070915055d71c39194be0a47dd8d3bb4df641994259b2b6aa418
@nch7
nch7 / contracts...Swapper.sol
Created December 31, 2021 01:25
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
//SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.7;
import "./interfaces/IUniswapV2Pair.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/IWETH.sol";
import { FlashLoanReceiverBase } from "./interfaces/FlashLoanReceiverBase.sol";
import "./interfaces/ILendingPoolAddressesProvider.sol";
import "./interfaces/ILendingPool.sol";
@nch7
nch7 / gist-dac24a51a735e42f864c0ae14cedf9af...contracts...Swapper.sol
Created December 30, 2021 23:41
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
//SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.7;
import "./interfaces/IUniswapV2Pair.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/IWETH.sol";
import { FlashLoanReceiverBase } from "./interfaces/FlashLoanReceiverBase.sol";
import "./interfaces/ILendingPoolAddressesProvider.sol";
import "./interfaces/ILendingPool.sol";
@nch7
nch7 / contracts...DataSource.sol
Created December 30, 2021 23:37
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
//SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
interface IUniswapV3Pool {
function swap(
address recipient,
bool zeroForOne,
int256 amountSpecified,
@nch7
nch7 / .deps...github...Arachnid...solidity-stringutils...strings.sol
Created December 30, 2021 23:36
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
./src/strings.sol
@nch7
nch7 / contracts...interfaces...Address.sol
Created December 30, 2021 23:35
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// this line is added to create a gist. Empty file is not allowed.
@nch7
nch7 / .deps...github...Arachnid...solidity-stringutils...strings.sol
Created December 30, 2021 23:34
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
./src/strings.sol
@nch7
nch7 / .deps...github...Arachnid...solidity-stringutils...strings.sol
Created December 30, 2021 23:30
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
./src/strings.sol
Model::where(['ragaca1'=>'true', 'ragaca2'=>'false'])->where(function($q){
$q->orWhere('price','>=','100');
$q->orWhere('noprice','=','1');
})->where(function($q){
$q->orWhere('price','<=','1000');
$q->orWhere('noprice','=','1');
})->get();
Model::where(['ragaca1'=>'true', 'ragaca2'=>'false'])->where(function($q){
$q->orWhere('price','>=','100');
$q->orWhere('noprice','=','1');
})->where(function($q){
$q->orWhere('price','<=','1000');
$q->orWhere('noprice','=','1');
})->get();