Skip to content

Instantly share code, notes, and snippets.

View korrio's full-sized avatar
👽

kOrriO korrio

👽
  • Hal Finney Co.,Ltd.
  • mempool
  • X @korrio
View GitHub Profile
@korrio
korrio / pancakeswap.json
Created May 17, 2021 14:26
pancakeswap.json
{
"name": "saltswap",
"timestamp": "2020-08-25T15:41:29.665Z",
"version": {
"major": 1,
"minor": 3,
"patch": 1
},
"tags": {},
"logoURI": "/images/coins/wbnb.png",
@korrio
korrio / BUSD.json
Created May 15, 2021 11:56
Full BUSD ABI
{
"contractName": "BUSD",
"abi": [
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
pragma solidity 0.5.7;
import "../zeppelin/token/ERC20/IERC20.sol";
import "../zeppelin/math/SafeMath.sol";
import "../ownership/Ownable.sol";
import "./ReserveEternalStorage.sol";
/**
* @title An interface representing a contract that calculates transaction fees
*/
@korrio
korrio / lottery.json
Created May 11, 2021 17:12
lottery.json
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Buy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DevWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"issueIndex","type":"uint256"},{"indexed":false,"internalType":"uint8[4]","name":"winningNumbers","type":"uint8[4]"}],"name":"Drawing","type":"event"},{"anonymous":fals
@korrio
korrio / auto-script.js
Created May 6, 2021 15:24
auto-script.js
// Third-party
const fs = require('fs');
const Web3 = require('web3');
const schedule = require('node-schedule');
const Lottery = require('../build/contracts/Lottery.json');
const { privateKeys } = JSON.parse(fs.readFileSync('../.secret').toString().trim());
const { mainnetPrivateKeys } = JSON.parse(fs.readFileSync('../.secret').toString().trim());
const CHAIN_ID = 56; // mainnet
@korrio
korrio / custom-pancake.sh
Created May 3, 2021 07:40
custom-pancake.sh
git clone https://github.com/suraneti/pancake-uikit && \
cd pancake-uikit && yarn && yarn build && \
rm -rf ../node_modules/@pancakeswap-libs/uikit/dist && \
mv dist/ ../node_modules/@pancakeswap-libs/uikit/ && \
cd .. && rm -rf pancake-uikit/
@korrio
korrio / RoyalReferral.sol
Last active May 3, 2021 02:43
RoyalReferral.sol
// File: contracts/libs/IBEP20.sol
pragma solidity >=0.4.0;
interface IBEP20 {
/**
* @dev Returns the amount of tokens in existence.
*/
@korrio
korrio / ModSalary.sol
Created April 13, 2021 07:05
ModSalary.sol
// File: @openzeppelin/contracts/math/SafeMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
@korrio
korrio / timelocks.sol
Created April 4, 2021 06:15
timelocks.sol
pragma solidity ^0.5.0;
/**
* @title SimpleTimelock
* @dev SimpleTimelock is an ETH holder contract that will allow a
* beneficiary to receive the ETH after a given release time.
*/
contract SimpleTimelock {
@korrio
korrio / fetchFarms.ts
Created March 21, 2021 11:08
fetchFarms.ts
import BigNumber from 'bignumber.js'
import erc20 from 'config/abi/erc20.json'
import masterchefABI from 'config/abi/masterchef.json'
import multicall from 'utils/multicall'
import { getAddress, getMasterChefAddress } from 'utils/addressHelpers'
import farmsConfig from 'config/constants/farms'
const fetchFarms = async () => {
const data = await Promise.all(
farmsConfig.map(async (farmConfig) => {