Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
DeFi dreamer

Anton Bukov k06a

🚀
DeFi dreamer
View GitHub Profile
View CompressedCaller.sol
pragma solidity ^0.5.0;
contract CompressedCaller {
function compressedCall(
address target,
uint256 totalLength,
bytes memory zipped
)
View ShardedToken.sol
contract ShardedToken {
using SafeMath for uint256;
address owner = msg.sender;
uint256 private _totalSupply;
mapping(address => ShardedToken.Extension) private extensions;
function register() public {
extensions[msg.sender] = new Token.Extension();
}
View OneDex.sol
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,
View UniversalERC20.sol
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;
//
View SplitKyber.sol
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(
@k06a
k06a / Unipool.sol
Last active Nov 6, 2019
ETH-sETH Staking Pool for SNX reward
View Unipool.sol
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) {
View Loopring Pool
pragma solidity ^0.5.0;
import "github.com/openzeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";
/*
*
* staker1: |===========|
* : :
* staker2: : |===========|
* : : : :
@k06a
k06a / rDAI.sol
Last active Jun 16, 2020
rDAI 2.0 Concept
View rDAI.sol
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);
View MovingValue.sol
pragma solidity ^0.5.0;
import "github.com/openzeppelin/openzeppelin-contracts/contracts/math/SafeMath.sol";
library MovingValue {
using SafeMath for uint256;
struct Data {
View gDAI.sol
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";
You can’t perform that action at this time.