-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6750c66
Showing
18 changed files
with
565 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.sol linguist-language=Solidity |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# embark | ||
.embark/ | ||
chains.json | ||
|
||
# egg-related | ||
viper.egg-info/ | ||
build/ | ||
dist/ | ||
.eggs/ | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# dotenv | ||
.env | ||
|
||
# virtualenv | ||
.venv/ | ||
venv/ | ||
ENV/ | ||
|
||
# Coverage tests | ||
.coverage | ||
.cache/ | ||
coverage/ | ||
coverageEnv/ | ||
coverage.json | ||
|
||
# node | ||
node_modules/ | ||
npm-debug.log | ||
|
||
# other | ||
.vs/ | ||
bin/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"development": { | ||
"enabled": true, | ||
"networkType": "custom", | ||
"genesisBlock": "config/development/genesis.json", | ||
"datadir": ".embark/development/datadir", | ||
"mineWhenNeeded": true, | ||
"nodiscover": true, | ||
"maxpeers": 0, | ||
"rpcHost": "localhost", | ||
"rpcPort": 8545, | ||
"rpcCorsDomain": "http://localhost:8000", | ||
"account": { | ||
"password": "config/development/password" | ||
}, | ||
"targetGasLimit": 8000000, | ||
"wsOrigins": "http://localhost:8000", | ||
"wsRPC": true, | ||
"wsHost": "localhost", | ||
"wsPort": 8546, | ||
"simulatorMnemonic": "example exile argue silk regular smile grass bomb merge arm assist farm", | ||
"simulatorBlocktime": 0 | ||
}, | ||
"testnet": { | ||
"enabled": true, | ||
"networkType": "testnet", | ||
"light": true, | ||
"rpcHost": "localhost", | ||
"rpcPort": 8545, | ||
"rpcCorsDomain": "http://localhost:8000", | ||
"account": { | ||
"password": "config/testnet/password" | ||
} | ||
}, | ||
"livenet": { | ||
"enabled": true, | ||
"networkType": "livenet", | ||
"light": true, | ||
"rpcHost": "localhost", | ||
"rpcPort": 8545, | ||
"rpcCorsDomain": "http://localhost:8000", | ||
"account": { | ||
"password": "config/livenet/password" | ||
} | ||
}, | ||
"privatenet": { | ||
"enabled": true, | ||
"networkType": "custom", | ||
"rpcHost": "localhost", | ||
"rpcPort": 8545, | ||
"rpcCorsDomain": "http://localhost:8000", | ||
"datadir": "yourdatadir", | ||
"networkId": "123", | ||
"bootnodes": "" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"default": { | ||
"enabled": true, | ||
"provider": "whisper", | ||
"available_providers": ["whisper", "orbit"], | ||
"connection": { | ||
"host": "localhost", | ||
"port": 8546, | ||
"type": "ws" | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"default": { | ||
"versions": { | ||
"web3.js": "1.0.0-beta", | ||
"solc": "0.4.21" | ||
}, | ||
"deployment": { | ||
"host": "localhost", | ||
"port": 8545, | ||
"type": "rpc" | ||
}, | ||
"dappConnection": [ | ||
"$WEB3", | ||
"http://localhost:8545" | ||
], | ||
"gas": "auto", | ||
"contracts": { | ||
"Bounty": {"deploy": false}, | ||
"BountyFactory": {"deploy": false}, | ||
"BountyKernel": {"deploy": false}, | ||
"BountyManager": {"deploy": false}, | ||
"BountyManagerFactory": {"deploy": false}, | ||
"BountyManagerKernel": {"deploy": false}, | ||
"BountyManagerPreSigned": {"deploy": false}, | ||
"Controlled": { "deploy": false }, | ||
"ContributionWallet": {"deploy": false}, | ||
"DelayedUpdatableInstance": { "deploy": false }, | ||
"DelayedUpdatableInstanceStorage": { "deploy": false }, | ||
"DelegatedCall": { "deploy": false }, | ||
"DelegationProxy": {"deploy": false}, | ||
"DelegationProxyInterface": {"deploy": false}, | ||
"DelegationProxyKernel": {"deploy": false}, | ||
"DelegationProxyFactory": {"deploy": false}, | ||
"Democracy": {"deploy": false}, | ||
"DemocracyStorage": {"deploy": false}, | ||
"DevTokensHolder": {"deploy": false}, | ||
"DynamicCeiling": {"deploy": false}, | ||
"EmojiBoard": {"deploy": false}, | ||
"EmojiTable": {"deploy": false}, | ||
"ERC725": { "deploy": false }, | ||
"ERC735": { "deploy": false }, | ||
"Factory": { "deploy": false }, | ||
"FeeRecycler": {"deploy": false}, | ||
"FriendsRecovery": { "deploy": false }, | ||
"Identity": { "gas": 5000000 }, | ||
"IdentityFactory": { "deploy": false }, | ||
"IdentityKernel": { "gas": 5000000 }, | ||
"Instance": { "deploy": false }, | ||
"InstanceStorage": { "deploy": false }, | ||
"MessageDeliveryPayout": {"deploy": false}, | ||
"MiniMeToken": {"deploy": false}, | ||
"MiniMeTokenFactory": {"deploy": false}, | ||
"MultiSig": {"deploy": false}, | ||
"Ownable": {"deploy": false}, | ||
"Owned": {"deploy": false}, | ||
"ProposalManager": {"deploy": false}, | ||
"SGTExchanger": {"deploy": false}, | ||
"SNT": {"deploy": false}, | ||
"SNTPlaceHolder": {"deploy": false}, | ||
"StandardToken": {"deploy": false}, | ||
"StatusContribution": {"deploy": false}, | ||
"TestContract": { "deploy": false }, | ||
"TokenRegistry": {"deploy": false}, | ||
"TrustNetwork": {"deploy": false}, | ||
"UpdatableInstance": { "deploy": false }, | ||
"UpdatedIdentityKernel": { "deploy": false } | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"config": { | ||
"homesteadBlock": 1 | ||
}, | ||
"nonce": "0x0000000000000042", | ||
"difficulty": "0x0", | ||
"alloc": { | ||
"0x3333333333333333333333333333333333333333": {"balance": "15000000000000000000"} | ||
}, | ||
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"coinbase": "0x3333333333333333333333333333333333333333", | ||
"timestamp": "0x00", | ||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"extraData": "0x", | ||
"gasLimit": "0x7a1200" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dev_password |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"default": { | ||
"versions": { | ||
"ipfs-api": "17.2.4" | ||
}, | ||
"enabled": true, | ||
"ipfs_bin": "ipfs", | ||
"provider": "ipfs", | ||
"available_providers": ["ipfs"], | ||
"host": "localhost", | ||
"port": 5001 | ||
}, | ||
"development": { | ||
"enabled": true, | ||
"provider": "ipfs", | ||
"host": "localhost", | ||
"port": 5001, | ||
"getUrl": "http://localhost:8080/ipfs/" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test_password |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"enabled": true, | ||
"host": "localhost", | ||
"port": 8000 | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
pragma solidity ^0.4.8; | ||
|
||
contract Controlled { | ||
/// @notice The address of the controller is the only address that can call | ||
/// a function with this modifier | ||
modifier onlyController { | ||
require(msg.sender == controller); | ||
_; | ||
} | ||
|
||
address public controller; | ||
|
||
function Controlled() public { | ||
controller = msg.sender; | ||
} | ||
|
||
/// @notice Changes the controller of the contract | ||
/// @param _newController The new controller of the contract | ||
function changeController(address _newController) public onlyController { | ||
controller = _newController; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
pragma solidity ^0.4.21; | ||
|
||
/// @dev `Owned` is a base level contract that assigns an `owner` that can be | ||
/// later changed | ||
contract Owned { | ||
|
||
/// @dev `owner` is the only address that can call a function with this | ||
/// modifier | ||
modifier onlyOwner() { | ||
require(msg.sender == owner); | ||
_; | ||
} | ||
|
||
address public owner; | ||
|
||
/// @notice The Constructor assigns the message sender to be `owner` | ||
function Owned() public { | ||
owner = msg.sender; | ||
} | ||
|
||
address public newOwner; | ||
|
||
/// @notice `owner` can step down and assign some other address to this role | ||
/// @param _newOwner The address of the new owner. 0x0 can be used to create | ||
/// an unowned neutral vault, however that cannot be undone | ||
function changeOwner(address _newOwner) public onlyOwner { | ||
newOwner = _newOwner; | ||
} | ||
|
||
|
||
function acceptOwnership() public { | ||
if (msg.sender == newOwner) { | ||
owner = newOwner; | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
pragma solidity ^0.4.21; | ||
|
||
/** | ||
* Math operations with safety checks | ||
*/ | ||
library SafeMath { | ||
function mul(uint a, uint b) internal pure returns (uint) { | ||
uint c = a * b; | ||
assert(a == 0 || c / a == b); | ||
return c; | ||
} | ||
|
||
function div(uint a, uint b) internal pure returns (uint) { | ||
// assert(b > 0); // Solidity automatically throws when dividing by 0 | ||
uint c = a / b; | ||
// assert(a == b * c + a % b); // There is no case in which this doesn't hold | ||
return c; | ||
} | ||
|
||
function sub(uint a, uint b) internal pure returns (uint) { | ||
assert(b <= a); | ||
return a - b; | ||
} | ||
|
||
function add(uint a, uint b) internal pure returns (uint) { | ||
uint c = a + b; | ||
assert(c >= a); | ||
return c; | ||
} | ||
|
||
function max64(uint64 a, uint64 b) internal pure returns (uint64) { | ||
return a >= b ? a : b; | ||
} | ||
|
||
function min64(uint64 a, uint64 b) internal pure returns (uint64) { | ||
return a < b ? a : b; | ||
} | ||
|
||
function max256(uint256 a, uint256 b) internal pure returns (uint256) { | ||
return a >= b ? a : b; | ||
} | ||
|
||
function min256(uint256 a, uint256 b) internal pure returns (uint256) { | ||
return a < b ? a : b; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
pragma solidity ^0.4.11; | ||
|
||
// Abstract contract for the full ERC 20 Token standard | ||
// https://github.com/ethereum/EIPs/issues/20 | ||
|
||
contract ERC20Token { | ||
/* This is a slight change to the ERC20 base standard. | ||
function totalSupply() constant returns (uint256 supply); | ||
is replaced with: | ||
uint256 public totalSupply; | ||
This automatically creates a getter function for the totalSupply. | ||
This is moved to the base contract since public getter functions are not | ||
currently recognised as an implementation of the matching abstract | ||
function by the compiler. | ||
*/ | ||
/// total amount of tokens | ||
uint256 public totalSupply; | ||
|
||
/// @param _owner The address from which the balance will be retrieved | ||
/// @return The balance | ||
function balanceOf(address _owner) public constant returns (uint256 balance); | ||
|
||
/// @notice send `_value` token to `_to` from `msg.sender` | ||
/// @param _to The address of the recipient | ||
/// @param _value The amount of token to be transferred | ||
/// @return Whether the transfer was successful or not | ||
function transfer(address _to, uint256 _value) public returns (bool success); | ||
|
||
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` | ||
/// @param _from The address of the sender | ||
/// @param _to The address of the recipient | ||
/// @param _value The amount of token to be transferred | ||
/// @return Whether the transfer was successful or not | ||
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); | ||
|
||
/// @notice `msg.sender` approves `_spender` to spend `_value` tokens | ||
/// @param _spender The address of the account able to transfer the tokens | ||
/// @param _value The amount of tokens to be approved for transfer | ||
/// @return Whether the approval was successful or not | ||
function approve(address _spender, uint256 _value) public returns (bool success); | ||
|
||
/// @param _owner The address of the account owning tokens | ||
/// @param _spender The address of the account able to transfer the tokens | ||
/// @return Amount of remaining tokens allowed to spent | ||
function allowance(address _owner, address _spender) public constant returns (uint256 remaining); | ||
|
||
event Transfer(address indexed _from, address indexed _to, uint256 _value); | ||
event Approval(address indexed _owner, address indexed _spender, uint256 _value); | ||
} |
Oops, something went wrong.