Skip to content

Instantly share code, notes, and snippets.

View NAKsir-melody's full-sized avatar

sigmoid NAKsir-melody

View GitHub Profile
@NAKsir-melody
NAKsir-melody / yam.sol
Created September 10, 2020 06:18
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.5.17+commit.d19bba13.js&optimize=false&gist=
pragma solidity ^0.5.17;
pragma experimental ABIEncoderV2;
import "github/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import "github/OpenZeppelin/openzeppelin-contracts/contracts/ownership/Ownable.sol";
import "github/OpenZeppelin/openzeppelin-contracts/contracts/GSN/Context.sol";
import "github/studydefi/money-legos/src/dydx/contracts/DydxFlashloanBase.sol";
import "github/studydefi/money-legos/src/dydx/contracts/ICallee.sol";
import "github/Uniswap/uniswap-v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
@NAKsir-melody
NAKsir-melody / assist_aave.sol
Created May 8, 2020 05:31
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.6.6+commit.6c089d02.js&optimize=false&gist=
pragma solidity 0.5.16;
//https://docs.aave.com/developers/tutorials/performing-a-flash-loan/...-with-remix
import "https://github.com/mrdavey/ez-flashloan/blob/remix/contracts/aave/FlashLoanReceiverBase.sol";
import "https://github.com/mrdavey/ez-flashloan/blob/remix/contracts/aave/ILendingPool.sol";
import "https://github.com/mrdavey/ez-flashloan/blob/remix/contracts/aave/ILendingPoolAddressesProvider.sol";
@NAKsir-melody
NAKsir-melody / assist_aave.sol
Created May 6, 2020 05:03
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.5.16+commit.9c3226ce.js&optimize=false&gist=
pragma solidity 0.5.16;
//https://docs.aave.com/developers/tutorials/performing-a-flash-loan/...-with-remix
import "https://github.com/mrdavey/ez-flashloan/blob/remix/contracts/aave/FlashLoanReceiverBase.sol";
import "https://github.com/mrdavey/ez-flashloan/blob/remix/contracts/aave/ILendingPool.sol";
import "https://github.com/mrdavey/ez-flashloan/blob/remix/contracts/aave/ILendingPoolAddressesProvider.sol";
@NAKsir-melody
NAKsir-melody / readdb.go
Created May 15, 2019 15:15
Read ethereum level DB directly
package main
import (
"fmt"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/trie"
_ "github.com/ethereum/go-ethereum/common"