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.0; | |
//pragma experimental ABIEncoderV2; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/math/SafeMath.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/SafeERC20.sol"; | |
interface InteractiveTaker { | |
function interact( | |
IERC20 takerAsset, |
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.0; | |
import "@openzeppelin/contracts/math/SafeMath.sol"; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; | |
// | |
// using UniversalERC20 for IERC20; | |
// |
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.0; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/math/SafeMath.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/SafeERC20.sol"; | |
interface IKyberReserve { | |
function trade( |
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.0; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/math/SafeMath.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20Detailed.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/SafeERC20.sol"; | |
contract Unipool is ERC20, ERC20Detailed("Unipool", "SNX-UNP", 18) { |
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.0; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; | |
/* | |
* | |
* staker1: |===========| | |
* : : | |
* staker2: : |===========| | |
* : : : : |
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.0; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/SafeERC20.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20Mintable.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20Detailed.sol"; | |
contract IFulcrum is IERC20 { | |
function tokenPrice() external view returns (uint256 price); | |
function mint(address receiver, uint256 amount) external returns (uint256 minted); |
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.0; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/math/SafeMath.sol"; | |
library MovingValue { | |
using SafeMath for uint256; | |
struct Data { |
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.0; | |
// TODO: Use latest git version with GSN support => "@openzeppelin/contracts@next" | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/math/SafeMath.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/SafeERC20.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20Detailed.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/ownership/Ownable.sol"; | |
import "github.com/openzeppelin/openzeppelin-contracts/contracts/GSN/GSNRecipient.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.5.0; | |
import "@openzeppelin/contracts/math/SafeMath.sol"; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
import "./UniversalERC20.sol"; | |
contract Minterest is ERC20 { | |
using SafeMath for uint256; |
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
#include <iostream> | |
#include <vector> | |
#include <math.h> | |
#include <numeric> | |
#include <tuple> | |
#include <algorithm> | |
std::tuple<std::vector<int>,int> selectRandom1(std::vector<int> likehoods, int sum, uint m) { |