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.12; | |
contract GasReserve { | |
uint256[] g; | |
function reserveGas(uint256 quantity) internal { | |
if (quantity > 0) | |
reserve(quantity); | |
} |
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
const ethers = require('ethers'); | |
class Signature { | |
constructor(ethereum) { | |
this.ethereum = ethereum; | |
} | |
provider() { | |
return new ethers.providers.Web3Provider(this.ethereum); | |
} |
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.8.0; | |
/** | |
* @dev Implementation of the {IERC20} interface. | |
* | |
* This implementation is agnostic to the way tokens are created. This means | |
* that a supply mechanism has to be added in a derived contract using {_mint}. | |
* For a generic mechanism see {ERC20PresetMinterPauser}. | |
* |
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
class S3Bucket(object): | |
def __init__(self, bucket, aws_access_key_id, aws_secret_access_key): | |
self.client = boto3.client( | |
's3', | |
aws_access_key_id=aws_access_key_id, | |
aws_secret_access_key=aws_secret_access_key | |
) | |
self.bucket = bucket | |
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" | |
"encoding/json" | |
"net/http" | |
"flag" | |
) | |
type Market struct { |
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
<!DOCTYPE html> | |
<head> | |
<title>Pusher Test</title> | |
<script src="https://js.pusher.com/5.1/pusher.min.js"></script> | |
<script> | |
// Enable pusher logging - don't include this in production | |
Pusher.logToConsole = true; | |
var pusher = new Pusher('6c3d25b9b072a4c03090', { |
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
from ethlite.Contracts import Contract | |
from ethlite.NetworkUtil import NetworkUtil | |
from json import loads | |
import requests | |
class Accounts(object): | |
endpoint = 'https://api.dydx.exchange/v1/accounts/' | |
@classmethod |
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
#!/usr/bin/env python2 | |
# coding: utf-8 | |
import os,socket,threading,time | |
#import traceback | |
allow_delete = False | |
#local_ip = socket.gethostbyname(socket.gethostname()) | |
local_ip = "0.0.0.0" | |
local_port = 8888 |