Skip to content

Instantly share code, notes, and snippets.

View kx9x's full-sized avatar
💭
Lately been hacking around with DeFi on Ethereum

kx9x kx9x

💭
Lately been hacking around with DeFi on Ethereum
  • Seattle
View GitHub Profile
@kx9x
kx9x / keybase.md
Created February 8, 2022 06:39
keybase.md

Keybase proof

I hereby claim:

  • I am kx9x on github.
  • I am kx9x (https://keybase.io/kx9x) on keybase.
  • I have a public key whose fingerprint is DC0E 239A 51EF 7031 B7CC 7EF9 D757 5C24 A415 2FDF

To claim this, I am signing this object:

@kx9x
kx9x / !metakeeper_autotask.js
Last active November 5, 2020 20:03
metakeeper_autotask.js
// Settings edited by user
const INFURA_PROJECT_ID = ""
const INFURA_PROJECT_SECRET = ""
// Code starts here
const { ethers } = require("ethers");
const { DefenderRelaySigner } = require('defender-relay-client/lib/ethers');
const UniswapOracleV2 = "UniswapOracleV2";
const HegicPoolKeep3r = "HegicPoolKeep3r";
@kx9x
kx9x / !andres_autotask_example.js
Last active November 5, 2020 16:23
andres autotask with abi
const workableAbi = [{"inputs":[{"internalType":"address","name":"_keep3r","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"KP3R","outputs":[{"internalType":"contract IKeep3rV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"tokenOut","type":"address"}],"name":"consult","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"a
@kx9x
kx9x / !keeper_auto_task_relayer.js
Last active December 20, 2020 01:16
This gist shows a Keep3r autotask that can be used with OpenZeppelin Defender with relayers
// Settings edited by user
const INFURA_PROJECT_ID = ""
const INFURA_PROJECT_SECRET = ""
// Code starts here
const { ethers } = require("ethers");
const { DefenderRelaySigner } = require('defender-relay-client/lib/ethers');
const UniswapOracleV2 = "UniswapOracleV2";
const HegicPoolKeep3r = "HegicPoolKeep3r";
@kx9x
kx9x / !keeper_auto_task.js
Last active July 24, 2021 01:29
This gist shows an autotask that can be used with OpenZeppelin Defender on the free tier without relayer
// Settings edited by user
const YOUR_KEEP3R_ADDRESSS = "";
const YOUR_KEEP3R_PRIVATE_KEY = "";
// Code starts here
const { ethers } = require("ethers");
const privateKey = Buffer.from(YOUR_KEEP3R_PRIVATE_KEY, 'hex');
const UniswapSlidingWindow = "UniswapSlidingWindow";
const HegicPoolKeep3r = "HegicPoolKeep3r";
@kx9x
kx9x / INSTRUCTIONS.md
Last active November 5, 2020 16:18
Some quick example scripts that show how one can script against yearn vaults using eth-brownie

Use python 3.8 on Windows

Download all these files to the same directoy on your machine

Go to settings.py and follow the instructions to get an Etherscan API key and an Infura project set up. Brownie requires an infura project to access an Ethereum node for the latest blockchain data. Brownie also requires an etherscan API to download smart contracts when calling Contract.from_explorer(contract_address).

Install and run instructions pip install -r requirements.txt python sbtc_withdraw.py