Comparing version 0.20.5 to 0.20.6
@@ -145,3 +145,3 @@ /** | ||
console.log("**********************************************************************"); | ||
console.log("1. Deploy the following conract in your ethereum environment"); | ||
console.log("1. Deploy the following contract in your ethereum environment"); | ||
console.log(signatureContractCodeReadable); | ||
@@ -208,7 +208,7 @@ console.log("2. Set the following parameters (i.e. at the end of the code)"); | ||
// Value 2- Please provide the password of the accound to be used | ||
//setPassword('<Provide teh password>'); | ||
//setPassword('<Provide the password>'); | ||
// Value 3- Please update the address of the contract after deployment | ||
// The contract code is made available at the top under signatureContractCodeReadable variable | ||
// Please deploy teh contract and update the contract address here | ||
// Please deploy the contract and update the contract address here | ||
//setContractAddress('<Provide the deployed contract address>'); | ||
@@ -215,0 +215,0 @@ |
@@ -148,6 +148,6 @@ /* | ||
* @param {String} string | ||
* @param {Number} optional padding | ||
* @param {Boolean} allowZero to convert code point zero to 00 instead of end of string | ||
* @returns {String} hex representation of input string | ||
*/ | ||
var fromUtf8 = function(str) { | ||
var fromUtf8 = function(str, allowZero) { | ||
str = utf8.encode(str); | ||
@@ -157,6 +157,12 @@ var hex = ""; | ||
var code = str.charCodeAt(i); | ||
if (code === 0) | ||
break; | ||
var n = code.toString(16); | ||
hex += n.length < 2 ? '0' + n : n; | ||
if (code === 0) { | ||
if (allowZero) { | ||
hex += '00'; | ||
} else { | ||
break; | ||
} | ||
} else { | ||
var n = code.toString(16); | ||
hex += n.length < 2 ? '0' + n : n; | ||
} | ||
} | ||
@@ -210,11 +216,18 @@ | ||
var extractDisplayName = function (name) { | ||
var length = name.indexOf('('); | ||
return length !== -1 ? name.substr(0, length) : name; | ||
var stBracket = name.indexOf('('); | ||
var endBracket = name.indexOf(')'); | ||
return (stBracket !== -1 && endBracket !== -1) ? name.substr(0, stBracket) : name; | ||
}; | ||
/// @returns overloaded part of function/event name | ||
/** | ||
* Should be called to get type name of contract function | ||
* | ||
* @method extractTypeName | ||
* @param {String} name of function/event | ||
* @returns {String} type name for function/event eg. multiply(uint256) -> uint256 | ||
*/ | ||
var extractTypeName = function (name) { | ||
/// TODO: make it invulnerable | ||
var length = name.indexOf('('); | ||
return length !== -1 ? name.substr(length + 1, name.length - 1 - (length + 1)).replace(' ', '') : ""; | ||
var stBracket = name.indexOf('('); | ||
var endBracket = name.indexOf(')'); | ||
return (stBracket !== -1 && endBracket !== -1) ? name.substr(stBracket + 1, endBracket - stBracket - 1).replace(' ', '') : ""; | ||
}; | ||
@@ -275,3 +288,3 @@ | ||
else if (!isFinite(val)) | ||
return fromAscii(val); | ||
return fromUtf8(val,1); | ||
} | ||
@@ -278,0 +291,0 @@ |
{ | ||
"version": "0.20.5" | ||
"version": "0.20.6" | ||
} |
/* jshint ignore:start */ | ||
Package.describe({ | ||
name: 'ethereum:web3', | ||
version: '0.20.5', | ||
version: '0.20.6', | ||
summary: 'Ethereum JavaScript API, middleware to talk to a ethreum node over RPC', | ||
@@ -6,0 +6,0 @@ git: 'https://github.com/ethereum/ethereum.js', |
{ | ||
"name": "web3", | ||
"namespace": "ethereum", | ||
"version": "0.20.5", | ||
"version": "0.20.6", | ||
"description": "Ethereum JavaScript API, middleware to talk to a ethereum node over RPC", | ||
@@ -6,0 +6,0 @@ "main": "./index.js", |
@@ -135,5 +135,6 @@ # Migration 0.13.0 -> 0.14.0 | ||
- Purescript [purescript-web3](https://github.com/f-o-a-m/purescript-web3) | ||
- PHP [web3.php](https://github.com/sc0Vu/web3.php) | ||
[npm-image]: https://badge.fury.io/js/web3.png | ||
[npm-image]: https://badge.fury.io/js/web3.svg | ||
[npm-url]: https://npmjs.org/package/web3 | ||
@@ -140,0 +141,0 @@ [travis-image]: https://travis-ci.org/ethereum/web3.js.svg |
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 too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
6201595
54600
150
5