Skip to content

Instantly share code, notes, and snippets.

View danwbyrne's full-sized avatar
🌞
Focusing

Daniel Byrne danwbyrne

🌞
Focusing
View GitHub Profile
@danwbyrne
danwbyrne / neo-one-utils.ts
Created October 26, 2018 20:08
neo-one-utils (concatenated)
const directorySeparator = '/';
const backslashRegExp = /\\/g;
export function normalizePath(path: string): string {
return path.replace(backslashRegExp, directorySeparator);
}
import { pascalCase } from "change-case";
export const upperCaseFirst = pascalCase;
import { iif, Observable, throwError, timer, Observer, Subscriber, Subscription } from "rxjs";
import { concatMap, retryWhen } from "rxjs/operators";
export interface RetryBackoffConfig {
import { tsUtils } from '@neo-one/ts-utils';
import * as fs from 'fs-extra';
import path from 'path';
import ts from 'typescript';
import { Concatenator } from './Concatenator';
export type SymbolAndSources = { readonly [Symbol in string]: string };
export type SourceFileSymbolAndSources = { readonly [SourceFile in string]: SymbolAndSources };
export function concatenate(entry: string) {
export const bar = 'bang';
const sc1 = 'bar';
const foo = sc1;
const fizz = { foo: foo };
export { fizz };
slug title
node-introduction
Introduction

Keybase proof

I hereby claim:

  • I am danwbyrne on github.
  • I am danwbyrne (https://keybase.io/danwbyrne) on keybase.
  • I have a public key ASBlr3NARdmXAaD2dw0N-pxNwl3ALnIFBcoDsprDJlQSHgo

To claim this, I am signing this object:

@danwbyrne
danwbyrne / config.json
Last active June 21, 2019 16:48
node config proposal
{
"SETTINGS": {
"type": string,
"privateNet": boolean,
"address": string,
"secondsPerBlock": number,
"standbyValidators": string[]
},
"ENVIRONMENT": {
@danwbyrne
danwbyrne / rush-migration.md
Created October 10, 2019 19:38
Rush Migration Thoughts

Repo Structure

Instead of building the package directory into a dist directory we now build every packages/*/src folder into a packages/*/lib folder.

This has some major benefits, mainly in that we can point main in packages/*/package.json to lib/index.js, then down-stream packages importing an upstream package will get the built version.

To help mimic our previous setup I've added a tsconfig.dev.json to @neo-one/build-tools which adds a path mapping for neo-one/* to ../neo-one-* which ideally is only used

@danwbyrne
danwbyrne / testing.md
Last active October 31, 2019 21:08
Neotracker Docker Setup

current test setup

start database

docker run --rm -d --name db --network neotracker-net postgres:latest

start scraper test image

docker run -it --name scrape --network neotracker-net scrape:test /bin/bash
@danwbyrne
danwbyrne / node-config.json
Last active November 7, 2019 02:52
neotracker docker setup
{
"blockchain": {
"genesisBlock": "000000000000000000000000000000000000000000000000000000000000000000000000c187cfdd862581710dde2bafc28a8a918c1c628d3336768d248cefca5cf3055065fc8857000000001dac2b7c00000000980312637967bbe96a53e7ac4547947e9cf19238010001510500001dac2b7c00000000400000455b7b226c616e67223a227a682d434e222c226e616d65223a22e5b08fe89a81e882a1227d2c7b226c616e67223a22656e222c226e616d65223a22416e745368617265227d5d0000c16ff28623000000da1745e9b549bd0bfa1a569971c77eba30cd5a4b00000000400001445b7b226c616e67223a227a682d434e222c226e616d65223a22e5b08fe89a81e5b881227d2c7b226c616e67223a22656e222c226e616d65223a22416e74436f696e227d5d0000c16ff286230008009f7fd096d37ed2c0e3f7f0cfc924beef4ffceb680000000001000000019b7cffdaa674beae0f930ebe6085af9093e5fe56b34a5c220ccdcf6efc336fc50000c16ff2862300ab1a5269fef5bf9fd7f89a0780d9b1e269de921d010001510101000001e72d286979ee6cb1b7e65dfddfb2e384100b8d148e7758de42e4168b71792c600080b2bb119b1400ab1a5269fef5bf9fd7f89a0780d9b1e269de921d01000100",
"governingToken": "400000455b7b226c6
@danwbyrne
danwbyrne / Notes.md
Last active December 9, 2019 18:25
NEO 3.0 Client Conversion Notes

Cosigner

  • new object, has address information as well as contract permission information.

Transaction

  • has a nonce now
  • 'scripts' renamed appropriately to 'witnesses'
  • has a 'cosigners' property.

Header (BlockBase)

  • no longer has a nonce, nonce is now in ConsensusData for the block