Skip to content

Instantly share code, notes, and snippets.

View zone117x's full-sized avatar

Matthew Little zone117x

View GitHub Profile
{
"source": "pragma solidity ^0.4.23;\r\n\r\n\r\nimport \"./ERC20Basic.sol\";\r\nimport \"../../math/SafeMath.sol\";\r\n\r\n\r\n/**\r\n * @title Basic token\r\n * @dev Basic version of StandardToken, with no allowances.\r\n */\r\ncontract BasicToken is ERC20Basic {\r\n using SafeMath for uint256;\r\n\r\n mapping(address => uint256) balances;\r\n\r\n uint256 totalSupply_;\r\n\r\n /**\r\n * @dev total number of tokens in existence\r\n */\r\n function totalSupply() public view returns (uint256) {\r\n return totalSupply_;\r\n }\r\n\r\n /**\r\n * @dev transfer token for a specified address\r\n * @param _to The address to transfer to.\r\n * @param _value The amount to be transferred.\r\n */\r\n function transfer(address _to, uint256 _value) public returns (bool) {\r\n require(_to != address(0));\r\n require(_value <= balances[msg.sender]);\r\n\r\n balances[msg.sender] = balances[msg.sender].sub(_value);\r\n balances[_to] = balances[_to].add(_value);\r\n emit Transfer(msg.sender,
Instrumenting ./coverageEnv/contracts/ballot/ballot.sol
3644 ms parsing original contract C:/Users/matt/Projects/Kibo/contracts/ballot/ballot.sol
78757 ms preprocessor.run, parsed 16 times, on C:/Users/matt/Projects/Kibo/contracts/ballot/ballot.sol
4945 ms parsing instrumented contract C:/Users/matt/Projects/Kibo/contracts/ballot/ballot.sol
87371 ms instrumenting ./coverageEnv/contracts/ballot/ballot.sol
Instrumenting ./coverageEnv/contracts/ballot/interface/ballot.sol
15 ms parsing original contract C:/Users/matt/Projects/Kibo/contracts/ballot/interface/ballot.sol
169 ms preprocessor.run, parsed 13 times, on C:/Users/matt/Projects/Kibo/contracts/ballot/interface/ballot.sol
16 ms parsing instrumented contract C:/Users/matt/Projects/Kibo/contracts/ballot/interface/ballot.sol
203 ms instrumenting ./coverageEnv/contracts/ballot/interface/ballot.sol
{
"id": 75,
"nodeType": "Block",
"src": "778:246:0",
"statements": [
{
"condition": {
"argumentTypes": null,
"id": 48,
"name": "_isSomething",
Verifying my Blockstack ID is secured with the address 1Nw25PemCRv24UQAcZdaj4uD11nkTCWRTE https://explorer.blockstack.org/address/1Nw25PemCRv24UQAcZdaj4uD11nkTCWRTE
42pVXU53GnA24zoiBpvcwsGEcnXvjdAG2aScfMW7Kkck9ftGfpb9pwRXUQAas2e8jKHYKvXaZNosGYAqwJYwhbCu7KjkYxo
@zone117x
zone117x / crypto-webworker-support-check.js
Created January 15, 2019 14:43
Check for web worker Crypto API support
// Checks if the global.crypto API is supported inside web workers.
// Uses a serialized function inside a Blob URL to run a web worker
// without an external file.
// See https://medium.com/@roman01la/run-web-worker-with-a-function-rather-than-external-file-303add905a0
function checkCryptoWorkerSupport() {
return new Promise((resolve) => {
const checkFn = () => {
const cryptoSupported = self.crypto && self.crypto.getRandomValues
postMessage(!!cryptoSupported)
@zone117x
zone117x / blockstack.d.ts
Created March 7, 2019 00:52
blockstack.d.ts
/// <reference types="bigi" />
/// <reference types="node" />
/// <reference types="bn.js" />
declare module "errors" {
export const ERROR_CODES: {
MISSING_PARAMETER: string;
REMOTE_SERVICE_ERROR: string;
INVALID_STATE: string;
NO_SESSION_DATA: string;
UNKNOWN: string;
@zone117x
zone117x / gist:790486a8ea29ccf54621bf2d33a3909a
Created March 25, 2019 22:59
mattlittle.id blockstack verification
Verifying my Blockstack ID is secured with the address 1159ZPz88pypemHP84SMacuJWa3XmFSKcv https://explorer.blockstack.org/address/1159ZPz88pypemHP84SMacuJWa3XmFSKcv
@zone117x
zone117x / clarity-contract-interface-json.json
Last active June 21, 2019 13:14
clarity-contract-interface-json
{
"functions": [
{
"name": "f00",
"access": "private",
"args": [
{
"name": "a1",
"type": "int128"
}