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
const ethers = require('ethers'); | |
const provider = new ethers.providers.JsonRpcProvider('https://bsc-dataseed.binance.org/'); | |
// you can find pair address from Factory Contract, method getPair(token1Addr, token2Addr). | |
let Contract = { | |
PancakePair: new ethers.Contract('0xb694ec7C2a7C433E69200b1dA3EBc86907B4578B',['function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast)'], provider), | |
TwindexPair: new ethers.Contract('0xC789F6C658809eED4d1769a46fc7BCe5dbB8316E',['function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast)'], provider) | |
} |
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.5.16; | |
interface IERC20 { | |
function balanceOf(address _owner) external view returns (uint256 balance); | |
function transfer(address _to, uint256 _value) external returns (bool success); | |
} | |
interface IFlashloanReceiver { | |
function executeOperation( | |
address sender, |
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
/** | |
* searches deep into an object recursively... | |
* @param {Object} obj object to be searched | |
* @param {any} searchValue the value/key to search for | |
* @param {Object} [options] | |
* @param {boolean} options.[searchKeys] whether to search object keys as well as values. Defaults to `true` if `serchValue` is a string, `false` otherwise. | |
* @param {number} options.[maxDepth=20] maximum recursion depth (to avoid "Maximum call stack size exceeded") | |
* @returns {string[]} Paths on the object to the matching results | |
*/ | |
const findPaths = ( |
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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>For Topre REALFORCE 87 Users</name> | |
<devicevendordef> | |
<vendorname>TopreCorporation</vendorname> | |
<vendorid>0x0853</vendorid> | |
</devicevendordef> | |
<item> |