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'); | |
async function app() { | |
const privateKey = '...'; // bridge wallet, has permission to mint and burn | |
const abi = [ | |
'event Transfer(address indexed from, address indexed to, uint256 value)', | |
'function mint(address receiver, uint256 amount)', | |
'function burn(address account, uint256 amount)' |
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
// Sources flattened with hardhat v2.9.9 https://hardhat.org | |
// File @openzeppelin/contracts/utils/introspection/[email protected] | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) | |
pragma solidity ^0.8.0; | |
/** |
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
// Sources flattened with hardhat v2.6.8 https://hardhat.org | |
// File @openzeppelin/contracts/token/ERC20/[email protected] | |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
/** | |
* @dev Interface of the ERC20 standard as defined in the EIP. |
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 provider = new ethers.providers.JsonRpcProvider('https://data-seed-prebsc-1-s1.binance.org:8545/'); // TESTNET | |
const privateKey = '0xea0beba96beab7b2b8a79b2142f89c07a51342d6a2ebb0822267096d5b65abf7'; // address: 0x8526aDDf97F478bEb92223383778A4e8688951D9 | |
const wallet = new ethers.Wallet(privateKey, provider); | |
let balance = await provider.getBalance(wallet.address); | |
console.log('My Initial Balance is:', ethers.utils.formatEther(balance)); | |
const trx = await wallet.sendTransaction({ | |
to: '0x4Bd3Cea4dbeCb1bE89e690A049Ce7fa533B1d1eE', // private key: 0x002d370dbb49f65b232c69852f1148232bafd5c4427c0cf8ee52a1bbb72fe2f8 |
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: COPYRIGHT 2021 DOMECLOUD CO. LTD. ALL RIGHTS RESERVED. | |
pragma solidity >=0.4.20 <0.6; | |
import "hardhat/console.sol"; | |
contract Election{ | |
// N factor can be retrived from Election Comission's public key. | |
// use for Blind Signature verification | |
bytes public N_factor; | |
constructor(bytes memory N) public { |
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 DeFiSDK = require('./defi-sdk/defi-sdk-node'); | |
const DeFi = new DeFiSDK('https://bsc-dataseed.binance.org/', 'your private key or mnemonic keys'); | |
DeFi.loadContracts().then(async () => { | |
console.log('Ready...'); | |
const offset = 5; // in percent | |
let DOP = { |
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
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
const ethers = require('ethers'); | |
const mnemonic = `critic seek crop move student season draw fiscal put prevent message cereal` | |
const target = `0xB1aB1cdC94e4edC8a7cc3187D5CCE0169de7505c`; | |
let i = -1; | |
let wallet; | |
console.log('searching...') | |
do { |
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/'); | |
const BEP20 = { | |
BUSD: '0xe9e7cea3dedca5984780bafc599bd69add087d56', | |
DOP: '0x844fa82f1e54824655470970f7004dd90546bb28', | |
}; | |
const Contract = { | |
router: new ethers.Contract( |