Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix indentation + Add dotenv to manage env variables and update Netwo…
…rkConfiguration
- Loading branch information
1 parent
243101c
commit 22a80e6
Showing
81 changed files
with
3,092 additions
and
2,985 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 |
---|---|---|
|
@@ -11,6 +11,7 @@ __pycache__/ | |
|
||
# Distribution / packaging | ||
.Python | ||
.env | ||
.env/ | ||
env/ | ||
venv/ | ||
|
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
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 |
---|---|---|
@@ -1,79 +1,80 @@ | ||
{ | ||
"name": "augur-core", | ||
"version": "1.1.0", | ||
"description": "Core augur contracts and deployment process", | ||
"author": "The Augur Developers <team@augur.net>", | ||
"repository": "http://github.com/AugurProject/augur-core", | ||
"main": "output/index.js", | ||
"types": "output/index.d.ts", | ||
"module": "output/index.js", | ||
"browser": "output/browser.js", | ||
"license": "GPL-3.0", | ||
"directories": { | ||
"src": "source", | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"lint": "npx solium --dir source --reporter=gcc", | ||
"build:source": "npx tsc", | ||
"build:contracts": "npm run build:flattener && . venv/bin/activate && node output/deployment/compileContracts.js", | ||
"build:interfaces": "node output/tools/generateContractInterfaces.js", | ||
"build:flattener": "source/tools/installSolidityFlattener", | ||
"build": "npm run build:source && npm run lint && npm run build:contracts && npm run build:interfaces", | ||
"preversion": "npm run build", | ||
"version": "git add source/libraries/ContractInterfaces.ts", | ||
"release": "npm version prerelease && npm publish", | ||
"test:unit": "pytest -vv", | ||
"test:unit:all": "pytest tests -vv", | ||
"test:integration": "npx mocha output/tests-integration/**/*.js --no-timeouts --require source-map-support/register", | ||
"deploy:net": "bash ./source/support/deploy/run.sh direct", | ||
"deploy:rinkeby": "npm run deploy:net -- rinkeby", | ||
"deploy:ropsten": "npm run deploy:net -- ropsten", | ||
"deploy:foundation": "npm run deploy:net -- foundation", | ||
"deploy": "npm run deploy:net -- rinkeby", | ||
"artifacts": "bash support/artifacts/run.sh" | ||
}, | ||
"dependencies": { | ||
"@types/get-port": "3.2.0", | ||
"@types/mkdirp": "0.5.1", | ||
"@types/node": "9.6.7", | ||
"@types/yargs": "11.0.0", | ||
"async-file": "2.0.2", | ||
"async-mkdirp": "1.2.0", | ||
"async-parallel": "1.2.3", | ||
"binascii": "0.0.1", | ||
"bn.js": "4.11.8", | ||
"copy-dir": "0.3.0", | ||
"crypto-promise": "2.0.0", | ||
"ethereumjs-testrpc": "6.0.3", | ||
"ethjs-abi": "0.2.1", | ||
"ethjs-account": "0.1.4", | ||
"ethjs-contract": "0.1.9", | ||
"ethjs-provider-http": "0.1.6", | ||
"ethjs-query": "0.3.1", | ||
"ethjs-rpc": "0.1.8", | ||
"ethjs-signer": "0.1.1", | ||
"fs-readfile-promise": "3.0.0", | ||
"get-port": "3.2.0", | ||
"path": "0.12.7", | ||
"recursive-readdir": "2.2.1", | ||
"replace": "1.0.0", | ||
"rimraf": "2.6.2", | ||
"solidity-coverage": "0.5.4", | ||
"yargs": "11.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "4.0.4", | ||
"@types/chai-as-promised": "7.1.0", | ||
"@types/mocha": "5.1.0", | ||
"chai": "4.1.2", | ||
"chai-as-promised": "7.1.1", | ||
"cross-env": "5.1.3", | ||
"mocha": "5.1.1", | ||
"solc": "0.4.20", | ||
"solium": "1.1.7", | ||
"source-map-support": "0.5.0", | ||
"ts-node": "3.3.0", | ||
"typescript": "2.6.1" | ||
} | ||
"name": "veil-augur", | ||
"version": "0.0.1", | ||
"description": "Core VeilAugur contracts and deployment process", | ||
"author": "Veil <hello@veil.co>", | ||
"repository": "http://github.com/veilco/veil-augur", | ||
"main": "output/index.js", | ||
"types": "output/index.d.ts", | ||
"module": "output/index.js", | ||
"browser": "output/browser.js", | ||
"license": "GPL-3.0", | ||
"directories": { | ||
"src": "source", | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"lint": "npx solium --dir source --reporter=gcc", | ||
"build:source": "npx tsc", | ||
"build:contracts": "npm run build:flattener && . venv/bin/activate && node output/deployment/compileContracts.js", | ||
"build:interfaces": "node output/tools/generateContractInterfaces.js", | ||
"build:flattener": "source/tools/installSolidityFlattener", | ||
"build": "npm run build:source && npm run lint && npm run build:contracts && npm run build:interfaces", | ||
"preversion": "npm run build", | ||
"version": "git add source/libraries/ContractInterfaces.ts", | ||
"release": "npm version prerelease && npm publish", | ||
"test:unit": "pytest -vv", | ||
"test:unit:all": "pytest tests -vv", | ||
"test:integration": "npx mocha output/tests-integration/**/*.js --no-timeouts --require source-map-support/register", | ||
"deploy:net": "bash ./source/support/deploy/run.sh direct", | ||
"deploy:rinkeby": "npm run deploy:net -- rinkeby", | ||
"deploy:ropsten": "npm run deploy:net -- ropsten", | ||
"deploy:kovan": "npm run deploy:net -- kovan", | ||
"deploy:mainnet": "npm run deploy:net -- mainnet", | ||
"artifacts": "bash support/artifacts/run.sh" | ||
}, | ||
"dependencies": { | ||
"@types/get-port": "3.2.0", | ||
"@types/mkdirp": "0.5.1", | ||
"@types/node": "9.6.7", | ||
"@types/yargs": "11.0.0", | ||
"async-file": "2.0.2", | ||
"async-mkdirp": "1.2.0", | ||
"async-parallel": "1.2.3", | ||
"binascii": "0.0.1", | ||
"bn.js": "4.11.8", | ||
"copy-dir": "0.3.0", | ||
"crypto-promise": "2.0.0", | ||
"dotenv": "^8.0.0", | ||
"ethereumjs-testrpc": "6.0.3", | ||
"ethjs-abi": "0.2.1", | ||
"ethjs-account": "0.1.4", | ||
"ethjs-contract": "0.1.9", | ||
"ethjs-provider-http": "0.1.6", | ||
"ethjs-query": "0.3.1", | ||
"ethjs-rpc": "0.1.8", | ||
"ethjs-signer": "0.1.1", | ||
"fs-readfile-promise": "3.0.0", | ||
"get-port": "3.2.0", | ||
"path": "0.12.7", | ||
"recursive-readdir": "2.2.1", | ||
"replace": "1.0.0", | ||
"rimraf": "2.6.2", | ||
"solidity-coverage": "0.5.4", | ||
"yargs": "11.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "4.0.4", | ||
"@types/chai-as-promised": "7.1.0", | ||
"@types/mocha": "5.1.0", | ||
"chai": "4.1.2", | ||
"chai-as-promised": "7.1.1", | ||
"cross-env": "5.1.3", | ||
"mocha": "5.1.1", | ||
"solc": "0.4.20", | ||
"solium": "1.1.7", | ||
"source-map-support": "0.5.0", | ||
"ts-node": "3.3.0", | ||
"typescript": "2.6.1" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,49 +1,48 @@ | ||
pragma solidity 0.4.25; | ||
|
||
|
||
import 'IControlled.sol'; | ||
import 'IController.sol'; | ||
import 'libraries/token/ERC20Basic.sol'; | ||
|
||
|
||
contract Controlled is IControlled { | ||
IController internal controller; | ||
|
||
constructor() public { | ||
controller = IController(msg.sender); | ||
} | ||
|
||
modifier onlyWhitelistedCallers { | ||
require(controller.assertIsWhitelisted(msg.sender)); | ||
_; | ||
} | ||
|
||
modifier onlyCaller(bytes32 _key) { | ||
require(msg.sender == controller.lookup(_key)); | ||
_; | ||
} | ||
|
||
modifier onlyControllerCaller { | ||
require(IController(msg.sender) == controller); | ||
_; | ||
} | ||
|
||
modifier onlyInGoodTimes { | ||
require(controller.stopInEmergency()); | ||
_; | ||
} | ||
|
||
modifier onlyInBadTimes { | ||
require(controller.onlyInEmergency()); | ||
_; | ||
} | ||
|
||
function getController() public view returns(IController) { | ||
return controller; | ||
} | ||
|
||
function setController(IController _controller) public onlyControllerCaller returns(bool) { | ||
controller = _controller; | ||
return true; | ||
} | ||
IController internal controller; | ||
|
||
constructor() public { | ||
controller = IController(msg.sender); | ||
} | ||
|
||
modifier onlyWhitelistedCallers { | ||
require(controller.assertIsWhitelisted(msg.sender)); | ||
_; | ||
} | ||
|
||
modifier onlyCaller(bytes32 _key) { | ||
require(msg.sender == controller.lookup(_key)); | ||
_; | ||
} | ||
|
||
modifier onlyControllerCaller { | ||
require(IController(msg.sender) == controller); | ||
_; | ||
} | ||
|
||
modifier onlyInGoodTimes { | ||
require(controller.stopInEmergency()); | ||
_; | ||
} | ||
|
||
modifier onlyInBadTimes { | ||
require(controller.onlyInEmergency()); | ||
_; | ||
} | ||
|
||
function getController() public view returns(IController) { | ||
return controller; | ||
} | ||
|
||
function setController(IController _controller) public onlyControllerCaller returns(bool) { | ||
controller = _controller; | ||
return true; | ||
} | ||
} |
Oops, something went wrong.