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
pragma solidity ^ 0.5.13;
/*
Hopefully color token can help people see the potentials of resolve tokens.
*/
contract ColorToken{
uint8 constant REDBONDS = 0;
uint8 constant GREENBONDS = 1;
uint8 constant BLUEBONDS = 2;
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;
// 1 Configuration. The slope of the Pyramid.
@RossPfeiffer
RossPfeiffer / ColorToken.sol
Created October 28, 2019 02:03
Is there something wrong with "unstaking" for the resolve naming system?
pragma solidity ^ 0.5.12;
contract ColorToken{
uint8 constant REDBONDS = 0;
uint8 constant GREENBONDS = 1;
uint8 constant BLUEBONDS = 2;
uint8 constant REDRESOLVES = 3;
uint8 constant GREENRESOLVES = 4;
uint8 constant BLUERESOLVES = 5;
uint8 constant VOTES_FOR_CR = 6;
uint8 constant VOTING_FOR_MR = 7;
@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;
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 / 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";
@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 / 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;
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 / 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;