Skip to content

Instantly share code, notes, and snippets.

View RossPfeiffer's full-sized avatar
💭
finishing up the Scaling Solution

Ross RossPfeiffer

💭
finishing up the Scaling Solution
View GitHub Profile
@RossPfeiffer
RossPfeiffer / index.js
Created September 17, 2018 21:24
Partial Block Explorer
var Web3 = require('web3');
var web3 = new Web3('https://mainnet.infura.io/v3/bf5c3d819a0d4492a387eb40cdf82d6b');
var finalBlock = web3.eth.getBlockNumber().then(captureBlockRange);
//This will contain an ordered list of all transactions
var transactionList = new Array();
var ethTransferred = 0;
var addressRecords = [];//{address:"0x0",sent:0,received:0,contract:false}
{
"name": "server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "./node_modules/nodemon/bin/nodemon.js src/app.js --exec 'npm run node'"
},
"keywords": [],
"author": "",
@RossPfeiffer
RossPfeiffer / token.sol
Created October 5, 2019 12:07
Token Code
contract ERC223ReceivingContract{
function tokenFallback(address _from, uint _value, bytes calldata _data) external;
}
contract ResolveToken{
address pyramid;
constructor(address _pyramid) public{
pyramid = _pyramid;
}
@RossPfeiffer
RossPfeiffer / ColorToken.sol
Created October 10, 2019 09:12
Color Token is too large. why tho?
pragma solidity ^ 0.5.1;
contract ColorToken{
BondContract public bondContract;
ResolveContract public resolveContract;
address lastGateway;
address communityResolve;
string public name = "Color Token";
string public symbol = "RGB";
uint8 constant public decimals = 18;
pragma solidity ^ 0.5.1;
contract ColorToken{
BondContract public bondContract;
ResolveContract public resolveContract;
address lastGateway;
address communityResolve;
address THIS = address(this);
string public name = "Color Token";
string public symbol = "RGB";
@RossPfeiffer
RossPfeiffer / PoWHr.sol
Last active October 12, 2019 00:27
PrismTokenomics.com
pragma solidity ^ 0.5.1;
contract PoWHr{
// scaleFactor is used to convert Ether into bonds and vice-versa: they're of different
// orders of magnitude, hence the need to bridge between the two.
uint256 constant scaleFactor = 0x10000000000000000;
int constant crr_n = 1;
int constant crr_d = 2;
int constant public price_coeff = -0x1337FA66607BADA55;
@RossPfeiffer
RossPfeiffer / PoWHr.sol
Created October 12, 2019 17:11
PrismTokenomics.com
pragma solidity ^ 0.5.1;
contract PoWHr{
// scaleFactor is used to convert Ether into bonds and vice-versa: they're of different
// orders of magnitude, hence the need to bridge between the two.
uint256 constant scaleFactor = 0x10000000000000000;
int constant crr_n = 1;
int constant crr_d = 2;
int constant public price_coeff = -0x1337FA66607BADA55;
@RossPfeiffer
RossPfeiffer / ColorToken.sol
Created October 13, 2019 09:04
ColorToken
pragma solidity ^ 0.5.1;
contract ColorToken{
BondContract public bondContract;
ResolveContract public resolveContract;
address lastGateway;
address communityResolve;
address THIS = address(this);
string public name = "Color Token";
string public symbol = "RGB";
pragma solidity ^ 0.5.12;
contract ColorToken{
address THIS = address(this);
address constant nulf = 0x0000000000000000000000000000000000000000;
string public name = "Color Token";
string public symbol = "RGB";
uint8 constant public decimals = 18;
uint _totalSupply/*===*/;
@RossPfeiffer
RossPfeiffer / PoWHr.sol
Created October 24, 2019 15:33
Scaling Solution
pragma solidity ^ 0.5.12;
contract Pyramid{
// scaleFactor is used to convert Ether into bonds and vice-versa: they're of different
// orders of magnitude, hence the need to bridge between the two.
uint256 constant scaleFactor = 0x10000000000000000;
int constant crr_n = 1;
int constant crr_d = 2;
int constant public price_coeff = -0x1337FA66607BADA55;