diff --git a/assets/javascripts/application.js b/assets/javascripts/application.js old mode 100755 new mode 100644 index 64fa91f..f08f6d7 --- a/assets/javascripts/application.js +++ b/assets/javascripts/application.js @@ -19,7 +19,7 @@ function generatePassword() { } function addValidator(web3, validatorViewObj, contractAddr, abi, cb) { console.log("***Add validator function***"); - attachToContract(web3, abi, contractAddr, function(err, oraclesContract) { + attachToContract(web3, abi, contractAddr, function(err, ValidatorsStorage) { console.log("attach to oracles contract"); if (err) { console.log(err) @@ -27,13 +27,13 @@ function addValidator(web3, validatorViewObj, contractAddr, abi, cb) { } console.log(validatorViewObj); - console.log(oraclesContract); + console.log(ValidatorsStorage); var txHash; var gasPrice = web3.utils.toWei(new web3.utils.BN(1), 'gwei') var opts = {from: web3.eth.defaultAccount, gasPrice: gasPrice} - oraclesContract.methods.addValidator(validatorViewObj.miningKey, + ValidatorsStorage.methods.addValidator(validatorViewObj.miningKey, validatorViewObj.zip, validatorViewObj.licenseID, validatorViewObj.licenseExpiredAt, @@ -324,19 +324,19 @@ function startDapp(web3, isOraclesNetwork) { getAccounts(async function(accounts) { let config = await getConfig() - getConfigCallBack(web3, accounts, config.contractAddress, config.abi) + getConfigCallBack(web3, accounts, config) }); //getting of config callback - function getConfigCallBack(web3, accounts, contractAddress, abi) { + function getConfigCallBack(web3, accounts, config) { //checks if chosen account is valid initial key if (accounts.length == 1) { var possibleInitialKey = accounts[0].substr(2); checkInitialKey(web3, "checkInitialKey(address)", possibleInitialKey, - contractAddress, - abi, + config.Ethereum[config.environment].KeysStorage.addr, + config.Ethereum[config.environment].KeysStorage.abi, function(_isNew) { _isNew = !!+_isNew; if (!_isNew) swal("Warning", "Current key isn't valid initial key. Please, choose your initial key in MetaMask and reload the page. Check Oracles network wiki for more info.", "warning"); @@ -349,13 +349,13 @@ function startDapp(web3, isOraclesNetwork) { $("#initialKeySource").click(); }) - $("#initialKeySource").change({contractAddress: contractAddress, abi:abi}, initialKeySourceOnChange); + $("#initialKeySource").change({config: config}, initialKeySourceOnChange); } function initialKeySourceOnChange(ev) { - initialKeyChosen(this, ev.data.contractAddress, ev.data.abi, function(address) { + initialKeyChosen(this, ev.data.config, function(address) { generateAddresses(keys, function(_keys) { - fillContractData(ev.data.contractAddress, ev.data.abi, _keys, address, function(err, address) { + fillContractData(ev.data.config, _keys, address, function(err, address) { transferCoinsToPayoutKey(err, address, _keys); }) }); @@ -363,11 +363,11 @@ function startDapp(web3, isOraclesNetwork) { }; //triggers, if initial key is chosen - function initialKeyChosen(el, contractAddress, abi, cb) { + function initialKeyChosen(el, config, cb) { var file = $(el).prop('files')[0]; $(el).remove(); var newEl = ""; - $(newEl).change({contractAddress: contractAddress, abi:abi}, initialKeySourceOnChange).appendTo($(".create-keys")); + $(newEl).change({config: config}, initialKeySourceOnChange).appendTo($(".create-keys")); var reader = new FileReader(); reader.readAsText(file, "UTF-8"); reader.onload = function (evt) { @@ -385,8 +385,8 @@ function startDapp(web3, isOraclesNetwork) { checkInitialKey(web3, "checkInitialKey(address)", address, - contractAddress, - abi, + config.Ethereum[config.environment].KeysStorage.addr, + config.Ethereum[config.environment].KeysStorage.abi, function(_isNew) { _isNew = !!+_isNew; @@ -443,7 +443,7 @@ function startDapp(web3, isOraclesNetwork) { } //Geeneration of all 3 addresses callback - function fillContractData(contractAddress, abi, keys, address, cb) { + function fillContractData(config, keys, address, cb) { $(".content").hide(); $('.waiting-container').show(); $('.waiting-container').empty(); @@ -460,8 +460,8 @@ function startDapp(web3, isOraclesNetwork) { //adds notary personal data to contract addValidator(web3, validatorViewObj, - contractAddress, - abi, + config.Ethereum[config.environment].ValidatorsStorage.addr, + config.Ethereum[config.environment].ValidatorsStorage.abi, function(txHash, err) { if (err) { loadingFinished(); @@ -476,8 +476,8 @@ function startDapp(web3, isOraclesNetwork) { //activate generated production keys createKeys(web3, keys, - contractAddress, - abi, + config.Ethereum[config.environment].KeysManager.addr, + config.Ethereum[config.environment].KeysManager.abi, function(res, err) { if (err) { loadingFinished(); diff --git a/assets/javascripts/application/addValidator.js b/assets/javascripts/application/addValidator.js index 42dd7e1..fcb35b3 100755 --- a/assets/javascripts/application/addValidator.js +++ b/assets/javascripts/application/addValidator.js @@ -1,6 +1,6 @@ function addValidator(web3, validatorViewObj, contractAddr, abi, cb) { console.log("***Add validator function***"); - attachToContract(web3, abi, contractAddr, function(err, oraclesContract) { + attachToContract(web3, abi, contractAddr, function(err, ValidatorsStorage) { console.log("attach to oracles contract"); if (err) { console.log(err) @@ -8,13 +8,13 @@ function addValidator(web3, validatorViewObj, contractAddr, abi, cb) { } console.log(validatorViewObj); - console.log(oraclesContract); + console.log(ValidatorsStorage); var txHash; var gasPrice = web3.utils.toWei(new web3.utils.BN(1), 'gwei') var opts = {from: web3.eth.defaultAccount, gasPrice: gasPrice} - oraclesContract.methods.addValidator(validatorViewObj.miningKey, + ValidatorsStorage.methods.addValidator(validatorViewObj.miningKey, validatorViewObj.zip, validatorViewObj.licenseID, validatorViewObj.licenseExpiredAt, diff --git a/assets/javascripts/application/index.js b/assets/javascripts/application/index.js index cd9b3d4..522abd1 100644 --- a/assets/javascripts/application/index.js +++ b/assets/javascripts/application/index.js @@ -15,19 +15,19 @@ function startDapp(web3, isOraclesNetwork) { getAccounts(async function(accounts) { let config = await getConfig() - getConfigCallBack(web3, accounts, config.contractAddress, config.abi) + getConfigCallBack(web3, accounts, config) }); //getting of config callback - function getConfigCallBack(web3, accounts, contractAddress, abi) { + function getConfigCallBack(web3, accounts, config) { //checks if chosen account is valid initial key if (accounts.length == 1) { var possibleInitialKey = accounts[0].substr(2); checkInitialKey(web3, "checkInitialKey(address)", possibleInitialKey, - contractAddress, - abi, + config.Ethereum[config.environment].KeysStorage.addr, + config.Ethereum[config.environment].KeysStorage.abi, function(_isNew) { _isNew = !!+_isNew; if (!_isNew) swal("Warning", "Current key isn't valid initial key. Please, choose your initial key in MetaMask and reload the page. Check Oracles network wiki for more info.", "warning"); @@ -40,13 +40,13 @@ function startDapp(web3, isOraclesNetwork) { $("#initialKeySource").click(); }) - $("#initialKeySource").change({contractAddress: contractAddress, abi:abi}, initialKeySourceOnChange); + $("#initialKeySource").change({config: config}, initialKeySourceOnChange); } function initialKeySourceOnChange(ev) { - initialKeyChosen(this, ev.data.contractAddress, ev.data.abi, function(address) { + initialKeyChosen(this, ev.data.config, function(address) { generateAddresses(keys, function(_keys) { - fillContractData(ev.data.contractAddress, ev.data.abi, _keys, address, function(err, address) { + fillContractData(ev.data.config, _keys, address, function(err, address) { transferCoinsToPayoutKey(err, address, _keys); }) }); @@ -54,11 +54,11 @@ function startDapp(web3, isOraclesNetwork) { }; //triggers, if initial key is chosen - function initialKeyChosen(el, contractAddress, abi, cb) { + function initialKeyChosen(el, config, cb) { var file = $(el).prop('files')[0]; $(el).remove(); var newEl = ""; - $(newEl).change({contractAddress: contractAddress, abi:abi}, initialKeySourceOnChange).appendTo($(".create-keys")); + $(newEl).change({config: config}, initialKeySourceOnChange).appendTo($(".create-keys")); var reader = new FileReader(); reader.readAsText(file, "UTF-8"); reader.onload = function (evt) { @@ -76,8 +76,8 @@ function startDapp(web3, isOraclesNetwork) { checkInitialKey(web3, "checkInitialKey(address)", address, - contractAddress, - abi, + config.Ethereum[config.environment].KeysStorage.addr, + config.Ethereum[config.environment].KeysStorage.abi, function(_isNew) { _isNew = !!+_isNew; @@ -134,7 +134,7 @@ function startDapp(web3, isOraclesNetwork) { } //Geeneration of all 3 addresses callback - function fillContractData(contractAddress, abi, keys, address, cb) { + function fillContractData(config, keys, address, cb) { $(".content").hide(); $('.waiting-container').show(); $('.waiting-container').empty(); @@ -151,8 +151,8 @@ function startDapp(web3, isOraclesNetwork) { //adds notary personal data to contract addValidator(web3, validatorViewObj, - contractAddress, - abi, + config.Ethereum[config.environment].ValidatorsStorage.addr, + config.Ethereum[config.environment].ValidatorsStorage.abi, function(txHash, err) { if (err) { loadingFinished(); @@ -167,8 +167,8 @@ function startDapp(web3, isOraclesNetwork) { //activate generated production keys createKeys(web3, keys, - contractAddress, - abi, + config.Ethereum[config.environment].KeysManager.addr, + config.Ethereum[config.environment].KeysManager.abi, function(res, err) { if (err) { loadingFinished(); diff --git a/assets/javascripts/config.json b/assets/javascripts/config.json index b87223a..2f129c2 100755 --- a/assets/javascripts/config.json +++ b/assets/javascripts/config.json @@ -3,8 +3,1154 @@ "networkID": 12648430, "Ethereum": { "live": { - "contractAddress": "0xf472e0e43570b9afaab67089615080cf7c20018d", - "abi": [{"constant":true,"inputs":[{"name":"ballotID","type":"uint256"}],"name":"getBallotAffectedKey","outputs":[{"name":"value","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"ballotID","type":"uint256"}],"name":"getBallotMemo","outputs":[{"name":"value","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"miningKeys","outputs":[{"name":"isActive","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"validator","outputs":[{"name":"fullName","type":"string"},{"name":"streetName","type":"string"},{"name":"state","type":"string"},{"name":"zip","type":"uint256"},{"name":"licenseID","type":"string"},{"name":"licenseExpiredAt","type":"uint256"},{"name":"disablingDate","type":"uint256"},{"name":"disablingTX","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"getLastBlockHash","outputs":[{"name":"_blockHash","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"ballotID","type":"uint256"}],"name":"getBallotVotingStart","outputs":[{"name":"value","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"getValidatorFullName","outputs":[{"name":"value","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"key","type":"address"}],"name":"checkInitialKey","outputs":[{"name":"value","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"ballotsMapping","outputs":[{"name":"owner","type":"address"},{"name":"miningKey","type":"address"},{"name":"affectedKey","type":"address"},{"name":"memo","type":"string"},{"name":"affectedKeyType","type":"uint256"},{"name":"createdAt","type":"uint256"},{"name":"votingStart","type":"uint256"},{"name":"votingDeadline","type":"uint256"},{"name":"votesAmmount","type":"int256"},{"name":"result","type":"int256"},{"name":"addAction","type":"bool"},{"name":"active","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"validators","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getDisabledValidators","outputs":[{"name":"value","type":"address[]"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"payoutKeys","outputs":[{"name":"isActive","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"miningPayoutKeysPair","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"getValidatorState","outputs":[{"name":"value","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"ballots","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"getValidatorStreetName","outputs":[{"name":"value","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"initialKeys","outputs":[{"name":"isNew","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"ballotID","type":"uint256"}],"name":"ballotIsVoted","outputs":[{"name":"value","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"ballotID","type":"uint256"}],"name":"ballotIsActive","outputs":[{"name":"value","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"getValidatorLicenseID","outputs":[{"name":"value","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"getValidatorLicenseExpiredAt","outputs":[{"name":"value","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"disabledValidators","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"ballotID","type":"uint256"}],"name":"getBallotOwner","outputs":[{"name":"value","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"getValidatorDisablingDate","outputs":[{"name":"value","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"ballotID","type":"uint256"},{"name":"owner","type":"address"},{"name":"miningKey","type":"address"},{"name":"affectedKey","type":"address"},{"name":"affectedKeyType","type":"uint256"},{"name":"addAction","type":"bool"},{"name":"memo","type":"string"}],"name":"addBallot","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"ballotID","type":"uint256"}],"name":"getBallotAffectedKeyType","outputs":[{"name":"value","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"ballotID","type":"uint256"}],"name":"getBallotVotingEnd","outputs":[{"name":"value","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"miningKey","type":"address"},{"name":"zip","type":"uint256"},{"name":"licenseExpiredAt","type":"uint256"},{"name":"licenseID","type":"string"},{"name":"fullName","type":"string"},{"name":"streetName","type":"string"},{"name":"state","type":"string"}],"name":"addValidator","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"ballotID","type":"uint256"}],"name":"getBallotAction","outputs":[{"name":"value","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"ballotID","type":"uint256"}],"name":"getBallotMiningKey","outputs":[{"name":"value","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"key","type":"address"}],"name":"addInitialKey","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"ballotID","type":"uint256"}],"name":"ballotCreatedAt","outputs":[{"name":"value","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"ballotID","type":"uint256"}],"name":"getVotesAgainst","outputs":[{"name":"value","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getValidators","outputs":[{"name":"value","type":"address[]"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"miningAddr","type":"address"},{"name":"payoutAddr","type":"address"},{"name":"votingAddr","type":"address"}],"name":"createKeys","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"ballotID","type":"uint256"},{"name":"accept","type":"bool"}],"name":"vote","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"votingKeys","outputs":[{"name":"isActive","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"ballotID","type":"uint256"}],"name":"getVotesFor","outputs":[{"name":"value","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"checkPayoutKeyValidity","outputs":[{"name":"value","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"getValidatorZip","outputs":[{"name":"value","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getBallots","outputs":[{"name":"value","type":"uint256[]"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"votingMiningKeysPair","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"checkVotingKeyValidity","outputs":[{"name":"value","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"votingLowerLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_parent_hash","type":"bytes32"},{"indexed":false,"name":"_new_set","type":"address[]"}],"name":"InitiateChange","type":"event"}] - } + "ValidatorsStorage": { + "addr": "0xf472e0e43570b9afaab67089615080cf7c20018d", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "miningKey", + "type": "address" + }, + { + "name": "fullName", + "type": "string" + }, + { + "name": "streetName", + "type": "string" + }, + { + "name": "state", + "type": "string" + }, + { + "name": "zip", + "type": "uint256" + }, + { + "name": "licenseID", + "type": "string" + }, + { + "name": "licenseExpiredAt", + "type": "uint256" + }, + { + "name": "disablingDate", + "type": "uint256" + }, + { + "name": "disablingTX", + "type": "string" + } + ], + "name": "setValidator", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "name": "disableValidator", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "validator", + "outputs": [ + { + "name": "fullName", + "type": "string" + }, + { + "name": "streetName", + "type": "string" + }, + { + "name": "state", + "type": "string" + }, + { + "name": "zip", + "type": "uint256" + }, + { + "name": "licenseID", + "type": "string" + }, + { + "name": "licenseExpiredAt", + "type": "uint256" + }, + { + "name": "disablingDate", + "type": "uint256" + }, + { + "name": "disablingTX", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getLastBlockHash", + "outputs": [ + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "name": "getValidatorFullName", + "outputs": [ + { + "name": "value", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "validators", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getDisabledValidators", + "outputs": [ + { + "name": "value", + "type": "address[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "name": "addValidator", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "x", + "type": "address" + } + ], + "name": "toString", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "name": "getValidatorState", + "outputs": [ + { + "name": "value", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "name": "getValidatorStreetName", + "outputs": [ + { + "name": "value", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "ballotsManager", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "keysStorage", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "name": "setValidatorsManager", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "name": "setBallotsManager", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "name": "getValidatorLicenseID", + "outputs": [ + { + "name": "value", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "name": "getValidatorLicenseExpiredAt", + "outputs": [ + { + "name": "value", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "disabledValidators", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "name": "getValidatorDisablingDate", + "outputs": [ + { + "name": "value", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "miningKey", + "type": "address" + } + ], + "name": "isMiningKeyDataExists", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "validatorsManager", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getValidators", + "outputs": [ + { + "name": "value", + "type": "address[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "validatorsManagerAddr", + "type": "address" + }, + { + "name": "keysStorageAddr", + "type": "address" + }, + { + "name": "ballotsManagerAddr", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getDisabledValidatorsLength", + "outputs": [ + { + "name": "value", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "name": "setkeysStorage", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "name": "getValidatorZip", + "outputs": [ + { + "name": "value", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "i", + "type": "uint256" + } + ], + "name": "getValidatorAtPosition", + "outputs": [ + { + "name": "value", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "i", + "type": "uint256" + } + ], + "name": "getDisabledValidatorAtPosition", + "outputs": [ + { + "name": "value", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "index", + "type": "uint256" + } + ], + "name": "removeValidator", + "outputs": [ + { + "name": "", + "type": "address[]" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getValidatorsLength", + "outputs": [ + { + "name": "value", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_parent_hash", + "type": "bytes32" + }, + { + "indexed": false, + "name": "_new_set", + "type": "address[]" + } + ], + "name": "InitiateChange", + "type": "event" + } + ] + }, + "KeysStorage": { + "addr": "0xeb1352fa30033da7f2a7b50a033ed47ef4b178a6", + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "votingKey", + "type": "address" + } + ], + "name": "getMiningByVoting", + "outputs": [ + { + "name": "miningKey", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "miningKeys", + "outputs": [ + { + "name": "isActive", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "validatorsStorage", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "miningKey", + "type": "address" + } + ], + "name": "getVotingByMining", + "outputs": [ + { + "name": "votingKey", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "key", + "type": "address" + } + ], + "name": "checkInitialKey", + "outputs": [ + { + "name": "value", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "miningKey", + "type": "address" + }, + { + "name": "payoutKey", + "type": "address" + } + ], + "name": "setMiningPayoutKeysPair", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "payoutKeys", + "outputs": [ + { + "name": "isActive", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "miningKey", + "type": "address" + }, + { + "name": "votingKey", + "type": "address" + } + ], + "name": "setMiningVotingKeysPair", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "licensesIssued", + "outputs": [ + { + "name": "", + "type": "int8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "increaseLicenses", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "keysManager", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_payoutKey", + "type": "address" + }, + { + "name": "_isActive", + "type": "bool" + } + ], + "name": "setPayoutKey", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "ballotsManager", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "initialKeys", + "outputs": [ + { + "name": "isNew", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "miningKey", + "type": "address" + } + ], + "name": "getPayoutByMining", + "outputs": [ + { + "name": "payoutKey", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "key", + "type": "address" + } + ], + "name": "addInitialKey", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "validatorsManager", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "name": "checkMiningKeyValidity", + "outputs": [ + { + "name": "value", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "initialKeysIssued", + "outputs": [ + { + "name": "", + "type": "int8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "miningAddr", + "type": "address" + }, + { + "name": "payoutAddr", + "type": "address" + }, + { + "name": "votingAddr", + "type": "address" + } + ], + "name": "createKeys", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "votingKeys", + "outputs": [ + { + "name": "isActive", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getLicensesIssuedFromGovernance", + "outputs": [ + { + "name": "licensesIssuedFromGovernance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "votingKey", + "type": "address" + }, + { + "name": "miningKey", + "type": "address" + } + ], + "name": "setVotingMiningKeysPair", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "name": "checkPayoutKeyValidity", + "outputs": [ + { + "name": "value", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "miningToSecondaryKeys", + "outputs": [ + { + "name": "votingKey", + "type": "address" + }, + { + "name": "payoutKey", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_votingKey", + "type": "address" + }, + { + "name": "_isActive", + "type": "bool" + } + ], + "name": "setVotingKey", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "votingMiningKeysPair", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "addr", + "type": "address" + } + ], + "name": "checkVotingKeyValidity", + "outputs": [ + { + "name": "value", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "initialKeysInvalidated", + "outputs": [ + { + "name": "", + "type": "int8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "keysManagerAddr", + "type": "address" + }, + { + "name": "ballotsManagerAddr", + "type": "address" + }, + { + "name": "validatorsStorageAddr", + "type": "address" + }, + { + "name": "validatorsManagerAddr", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ] + } + } } } \ No newline at end of file diff --git a/assets/javascripts/modules.js b/assets/javascripts/modules.js index 033cdef..a0eb742 100644 --- a/assets/javascripts/modules.js +++ b/assets/javascripts/modules.js @@ -23088,29 +23088,36 @@ arguments[4][80][0].apply(exports,arguments) arguments[4][81][0].apply(exports,arguments) },{"bn.js":158,"dup":81,"minimalistic-assert":221,"minimalistic-crypto-utils":222}],183:[function(require,module,exports){ module.exports={ - "_from": "elliptic@^6.2.3", + "_args": [ + [ + "elliptic@6.4.0", + "/Users/viktor/Documents/HintsProjects/BlockNotary/Oracles/oracles-dapps-keys-generation" + ] + ], + "_from": "elliptic@6.4.0", "_id": "elliptic@6.4.0", "_inBundle": false, "_integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", "_location": "/elliptic", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "elliptic@^6.2.3", + "raw": "elliptic@6.4.0", "name": "elliptic", "escapedName": "elliptic", - "rawSpec": "^6.2.3", + "rawSpec": "6.4.0", "saveSpec": null, - "fetchSpec": "^6.2.3" + "fetchSpec": "6.4.0" }, "_requiredBy": [ - "/secp256k1" + "/eth-lib", + "/secp256k1", + "/web3-eth-accounts/eth-lib" ], "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", - "_shasum": "cac9af8762c85836187003c8dfe193e5e2eae5df", - "_spec": "elliptic@^6.2.3", - "_where": "/Users/viktor/Documents/HintsProjects/BlockNotary/Oracles/oracles-dapps-keys-generation-myfork/node_modules/secp256k1", + "_spec": "6.4.0", + "_where": "/Users/viktor/Documents/HintsProjects/BlockNotary/Oracles/oracles-dapps-keys-generation", "author": { "name": "Fedor Indutny", "email": "fedor@indutny.com" @@ -23118,7 +23125,6 @@ module.exports={ "bugs": { "url": "https://github.com/indutny/elliptic/issues" }, - "bundleDependencies": false, "dependencies": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -23128,7 +23134,6 @@ module.exports={ "minimalistic-assert": "^1.0.0", "minimalistic-crypto-utils": "^1.0.0" }, - "deprecated": false, "description": "EC cryptography", "devDependencies": { "brfs": "^1.4.3", @@ -73998,30 +74003,34 @@ module.exports = { },{"bn.js":321,"eth-lib/lib/hash":186,"number-to-bn":224,"underscore":269,"utf8":271}],325:[function(require,module,exports){ module.exports={ - "_from": "web3", + "_args": [ + [ + "web3@1.0.0-beta.26", + "/Users/viktor/Documents/HintsProjects/BlockNotary/Oracles/oracles-dapps-keys-generation" + ] + ], + "_from": "web3@1.0.0-beta.26", "_id": "web3@1.0.0-beta.26", "_inBundle": false, "_integrity": "sha1-u0ba9q78MT92iz3jnX9KjXvQZmM=", "_location": "/web3", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "web3", + "raw": "web3@1.0.0-beta.26", "name": "web3", "escapedName": "web3", - "rawSpec": "", + "rawSpec": "1.0.0-beta.26", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "1.0.0-beta.26" }, "_requiredBy": [ - "#USER", "/" ], "_resolved": "https://registry.npmjs.org/web3/-/web3-1.0.0-beta.26.tgz", - "_shasum": "bb46daf6aefc313f768b3de39d7f4a8d7bd06663", - "_spec": "web3", - "_where": "/Users/viktor/Documents/HintsProjects/BlockNotary/Oracles/oracles-dapps-keys-generation-myfork", + "_spec": "1.0.0-beta.26", + "_where": "/Users/viktor/Documents/HintsProjects/BlockNotary/Oracles/oracles-dapps-keys-generation", "author": { "name": "ethereum.org" }, @@ -74054,7 +74063,6 @@ module.exports={ "bugs": { "url": "https://github.com/ethereum/web3.js/issues" }, - "bundleDependencies": false, "dependencies": { "web3-bzz": "^1.0.0-beta.26", "web3-core": "^1.0.0-beta.26", @@ -74064,7 +74072,6 @@ module.exports={ "web3-shh": "^1.0.0-beta.26", "web3-utils": "^1.0.0-beta.26" }, - "deprecated": false, "description": "Ethereum JavaScript API", "keywords": [ "Ethereum", @@ -74207,7 +74214,7 @@ module.exports = require('../package.json').version; },{"../package.json":329}],329:[function(require,module,exports){ module.exports={ - "_from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", + "_from": "websocket@git://github.com/frozeman/WebSocket-Node.git#7004c39c42ac98875ab61126e5b4a925430f592c", "_id": "websocket@1.0.24", "_inBundle": false, "_integrity": "sha1-1bSDGjm26R6Kq7OQxfmv6krmlzo=", @@ -74215,20 +74222,20 @@ module.exports={ "_phantomChildren": {}, "_requested": { "type": "git", - "raw": "websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", + "raw": "websocket@git://github.com/frozeman/WebSocket-Node.git#7004c39c42ac98875ab61126e5b4a925430f592c", "name": "websocket", "escapedName": "websocket", - "rawSpec": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", - "saveSpec": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", + "rawSpec": "git://github.com/frozeman/WebSocket-Node.git#7004c39c42ac98875ab61126e5b4a925430f592c", + "saveSpec": "git://github.com/frozeman/WebSocket-Node.git#7004c39c42ac98875ab61126e5b4a925430f592c", "fetchSpec": "git://github.com/frozeman/WebSocket-Node.git", - "gitCommittish": "browserifyCompatible" + "gitCommittish": "7004c39c42ac98875ab61126e5b4a925430f592c" }, "_requiredBy": [ "/web3-providers-ws" ], "_resolved": "git://github.com/frozeman/WebSocket-Node.git#7004c39c42ac98875ab61126e5b4a925430f592c", - "_spec": "websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", - "_where": "/Users/viktor/Documents/HintsProjects/BlockNotary/Oracles/oracles-dapps-keys-generation-myfork/node_modules/web3-providers-ws", + "_spec": "websocket@git://github.com/frozeman/WebSocket-Node.git#7004c39c42ac98875ab61126e5b4a925430f592c", + "_where": "/Users/viktor/Documents/HintsProjects/BlockNotary/Oracles/oracles-dapps-keys-generation", "author": { "name": "Brian McKelvey", "email": "brian@worlize.com",