This file contains 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
import java.math.BigInteger; | |
import java.util.*; | |
class Forloop { | |
public static void main(String []args){ | |
int[] allInputs = new int[]{10000, 50000, 100000, 500000, 1000000}; | |
for(int i=0;i<allInputs.length;i++){ | |
BigInteger number = BigInteger.valueOf(allInputs[i]); | |
BigInteger result = BigInteger.valueOf(1); |
This file contains 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
package main | |
import ( | |
"fmt" | |
"time" | |
"math/big" | |
) | |
func main(){ | |
This file contains 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
package main | |
import ( | |
"encoding/json" | |
"log" | |
"math/rand" | |
"net/http" | |
"strconv" | |
"github.com/gorilla/mux" | |
) |
This file contains 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.9; | |
// Adding only the ERC-20 function we need | |
interface DaiToken { | |
function transfer(address dst, uint wad) external returns (bool); | |
function transferFrom(address src, address dst, uint wad) external returns (bool); | |
function balanceOf(address guy) external view returns (uint); | |
function approve(address guy, uint wad) external returns (bool); | |
function allowance(address src, address guy) external view returns (uint); | |
} |
This file contains 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
import schedule | |
import time | |
import json | |
from web3 import Web3 | |
import gspread | |
from oauth2client.service_account import ServiceAccountCredentials | |
from datetime import datetime | |
import math | |
millnames = ['',' K',' M',' B',' T'] |
This file contains 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.6.12; | |
import './interfaces/IUniswapV2Router02.sol'; | |
import '/interfaces/IERC20.sol'; | |
import '/interfaces/IUniswapV2Pair.sol'; | |
import '/interfaces/IUniswapV2Router02.sol'; | |
import '/helper/SafeERC20.sol'; | |
import '/helper/SafeMath.sol'; | |
import "./IRelayRecipient.sol"; |
This file contains 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.6.8; | |
import "../helper/SafeERC20.sol"; | |
import "../interface/IUniswapV2Router02.sol"; | |
import "../interface/IERC721.sol"; | |
import "hardhat/console.sol"; | |
import "../NFTX/ERC721Holder.sol"; | |
interface INFTX { | |
function mint(uint256 vaultId, uint256[] calldata nftIds, uint256 d2Amount) external payable; |
This file contains 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
/** | |
* @title: Cream SLP wrapper | |
* @summary: Used for interacting with Cream Sushiswap LP Statergy. Has | |
* a common interface with all other protocol wrappers. | |
* This contract holds assets only during a tx, after tx it should be empty | |
* @author: Idle Labs Inc., idle.finance | |
*/ | |
pragma solidity 0.5.16; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; |
This file contains 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
/** | |
* @title: Idle BarnBridge wrapper | |
* @summary: Used for interacting with BarnBridge. Has | |
* a common interface with all other protocol wrappers. | |
* This contract holds assets only during a tx, after tx it should be empty | |
* @author: Idle Labs Inc., idle.finance | |
*/ | |
pragma solidity 0.5.16; | |
pragma experimental ABIEncoderV2; |
This file contains 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: GPL-3.0 | |
pragma solidity 0.7.0; | |
import "@openzeppelin/contracts/math/SafeMath.sol"; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
import "./IYieldSource.sol"; | |
import "./IIdleToken.sol"; | |
import "./IIdleTokenHelper.sol"; |
OlderNewer