Skip to content

Instantly share code, notes, and snippets.

@crypto-perry
crypto-perry / algorandoracle.sol
Created July 24, 2019 22:53
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.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity >=0.5.0;
import './tradeoracleinterface.sol';
contract AlgorandVerifier is TradeOracle {
mapping (uint256 => bool) blockheaders;
function addBlockHeader(uint256 bh) public {
blockheaders[bh] = true;
}
@crypto-perry
crypto-perry / futuresescrow.sol
Created July 31, 2019 22:21
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.1+commit.c8a2cb62.js&optimize=true&gist=
pragma solidity >=0.5.0;
import './tradeoracleinterface.sol';
contract FuturesEscrow {
enum TradeState {None, Filled, Closed}
event Deposit(address account, uint256 amount);
event Withdrawal(address account, uint256 amount);
@crypto-perry
crypto-perry / futuresescrow.sol
Created July 31, 2019 23:05
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.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity >=0.5.0;
import './tradeoracleinterface.sol';
contract FuturesEscrow {
enum TradeState {None, Filled, Closed}
event Deposit(address account, uint256 amount);
event Withdrawal(address account, uint256 amount);
@crypto-perry
crypto-perry / futuresescrow.sol
Created August 1, 2019 20:38
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.1+commit.c8a2cb62.js&optimize=true&gist=
pragma solidity >=0.5.0;
import './tradeoracleinterface.sol';
contract FuturesEscrow {
enum TradeState {None, Filled, Closed}
event Deposit(address account, uint256 amount);
event Withdrawal(address account, uint256 amount);
@crypto-perry
crypto-perry / erc20options.sol
Created August 7, 2019 21:22
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.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity >=0.5.0;
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
@crypto-perry
crypto-perry / erc20options.sol
Created August 9, 2019 18:00
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.1+commit.c8a2cb62.js&optimize=true&gist=
pragma solidity >=0.5.0;
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
@crypto-perry
crypto-perry / erc20options.sol
Created August 9, 2019 18:34
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.1+commit.c8a2cb62.js&optimize=true&gist=
pragma solidity >=0.5.0;
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
@crypto-perry
crypto-perry / erc20options.sol
Created August 9, 2019 20:41
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.1+commit.c8a2cb62.js&optimize=true&gist=
pragma solidity >=0.5.0;
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
@crypto-perry
crypto-perry / erc20options.sol
Created August 11, 2019 04:56
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=undefined&optimize=false&gist=
pragma solidity >=0.5.0;
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
@crypto-perry
crypto-perry / erc20options.sol
Created August 11, 2019 05:14
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.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity >=0.5.0;
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);