@colony/colony-js-contract-loader-http
Advanced tools
Comparing version 1.5.4 to 1.6.2
@@ -19,2 +19,6 @@ 'use strict'; | ||
var _createClass2 = require('babel-runtime/helpers/createClass'); | ||
var _createClass3 = _interopRequireDefault(_createClass2); | ||
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn'); | ||
@@ -24,2 +28,6 @@ | ||
var _get2 = require('babel-runtime/helpers/get'); | ||
var _get3 = _interopRequireDefault(_get2); | ||
var _inherits2 = require('babel-runtime/helpers/inherits'); | ||
@@ -50,3 +58,3 @@ | ||
var abi = response.result, | ||
var result = response.result, | ||
status = response.status; | ||
@@ -57,2 +65,9 @@ | ||
var abi = void 0; | ||
try { | ||
abi = JSON.parse(result); | ||
} catch (error) { | ||
throw new Error('Error parsing result from Etherscan: ' + error.toString()); | ||
} | ||
var parsed = { | ||
@@ -93,2 +108,14 @@ abi: abi, | ||
// Remove everything except `contractAddress` from the load method, because | ||
// Etherscan only supports that field. | ||
(0, _createClass3.default)(EtherscanLoader, [{ | ||
key: 'load', | ||
value: function load(_ref2, requiredProps) { | ||
var contractAddress = _ref2.contractAddress; | ||
return (0, _get3.default)(EtherscanLoader.prototype.__proto__ || Object.getPrototypeOf(EtherscanLoader.prototype), 'load', this).call(this, { contractAddress: contractAddress }, requiredProps); | ||
} | ||
}]); | ||
return EtherscanLoader; | ||
@@ -95,0 +122,0 @@ }(_HttpLoader3.default); |
{ | ||
"name": "@colony/colony-js-contract-loader-http", | ||
"version": "1.5.4", | ||
"version": "1.6.2", | ||
"description": "Load Ethereum smart contract definitions/metadata over HTTP", | ||
@@ -46,3 +46,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@colony/colony-js-contract-loader": "^1.5.4", | ||
"@colony/colony-js-contract-loader": "^1.6.2", | ||
"assert": "^1.4.1", | ||
@@ -64,3 +64,4 @@ "babel-runtime": "^6.26.0", | ||
"yarn": ">=1.3.2" | ||
} | ||
}, | ||
"gitHead": "ac21133e161a57ab93930af100d36796ac4f8a5e" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
324176
19
2233