@ -263,6 +263,13 @@ var coder = new SolidityCoder([
inputFormatter : f . formatInputBytes ,
inputFormatter : f . formatInputBytes ,
outputFormatter : f . formatOutputBytes
outputFormatter : f . formatOutputBytes
} ) ,
} ) ,
new SolidityType ( {
name : 'string' ,
match : 'strict' ,
mode : 'bytes' ,
inputFormatter : f . formatInputString ,
outputFormatter : f . formatOutputString
} ) ,
new SolidityType ( {
new SolidityType ( {
name : 'real' ,
name : 'real' ,
match : 'prefix' ,
match : 'prefix' ,
@ -328,26 +335,43 @@ var formatInputInt = function (value) {
} ;
} ;
/ * *
/ * *
* Formats input value to byte representation of string
* Formats input bytes
*
*
* @ method formatInputBytes
* @ method formatInputBytes
* @ param { String }
* @ param { String }
* @ returns { SolidityParam }
* @ returns { SolidityParam }
* /
* /
var formatInputBytes = function ( value ) {
var formatInputBytes = function ( value ) {
var result = utils . fromAscii ( value , c . ETH_PADDING ) . substr ( 2 ) ;
var result = utils . padRight ( utils . toHex ( value ) . substr ( 2 ) , 64 ) ;
return new SolidityParam ( result ) ;
return new SolidityParam ( result ) ;
} ;
} ;
/ * *
/ * *
* Formats input value to byte representation of string
* Formats input bytes
*
*
* @ method formatInput DynamicBytes
* @ method formatDynamicInput Bytes
* @ param { String }
* @ param { String }
* @ returns { SolidityParam }
* @ returns { SolidityParam }
* /
* /
var formatInputDynamicBytes = function ( value ) {
var formatInputDynamicBytes = function ( value ) {
var result = utils . fromAscii ( value , c . ETH_PADDING ) . substr ( 2 ) ;
value = utils . toHex ( value ) . substr ( 2 ) ;
var l = Math . floor ( ( value . length + 63 ) / 64 ) ;
var result = utils . padRight ( value , l * 64 ) ;
var length = Math . floor ( value . length / 2 ) ;
return new SolidityParam ( formatInputInt ( length ) . value + result , 32 ) ;
} ;
/ * *
* Formats input value to byte representation of string
*
* @ method formatInputString
* @ param { String }
* @ returns { SolidityParam }
* /
var formatInputString = function ( value ) {
var result = utils . fromAscii ( value ) . substr ( 2 ) ;
var l = Math . floor ( ( result . length + 63 ) / 64 ) ;
result = utils . padRight ( result , l * 64 ) ;
return new SolidityParam ( formatInputInt ( value . length ) . value + result , 32 ) ;
return new SolidityParam ( formatInputInt ( value . length ) . value + result , 32 ) ;
} ;
} ;
@ -450,27 +474,38 @@ var formatOutputBool = function (param) {
} ;
} ;
/ * *
/ * *
* Should be used to format output string
* Should be used to format output byte s
*
*
* @ method formatOutputBytes
* @ method formatOutputBytes
* @ param { SolidityParam } left - aligned hex representation of string
* @ param { SolidityParam } left - aligned hex representation of string
* @ returns { String } ascii string
* @ returns { String } hex string
* /
* /
var formatOutputBytes = function ( param ) {
var formatOutputBytes = function ( param ) {
// length might also be important!
return '0x' + param . staticPart ( ) ;
return utils . toAscii ( param . staticPart ( ) ) ;
} ;
} ;
/ * *
/ * *
* Should be used to format output string
* Should be used to format output byte s
*
*
* @ method formatOutputDynamicBytes
* @ method formatOutputDynamicBytes
* @ param { SolidityParam } left - aligned hex representation of string
* @ param { SolidityParam } left - aligned hex representation of string
* @ returns { String } ascii string
* @ returns { String } hex string
* /
* /
var formatOutputDynamicBytes = function ( param ) {
var formatOutputDynamicBytes = function ( param ) {
// length might also be important!
var length = ( new BigNumber ( param . dynamicPart ( ) . slice ( 0 , 64 ) , 16 ) ) . toNumber ( ) * 2 ;
return utils . toAscii ( param . dynamicPart ( ) . slice ( 64 ) ) ;
return '0x' + param . dynamicPart ( ) . substr ( 64 , length ) ;
} ;
/ * *
* Should be used to format output string
*
* @ method formatOutputString
* @ param { SolidityParam } left - aligned hex representation of string
* @ returns { String } ascii string
* /
var formatOutputString = function ( param ) {
var length = ( new BigNumber ( param . dynamicPart ( ) . slice ( 0 , 64 ) , 16 ) ) . toNumber ( ) * 2 ;
return utils . toAscii ( param . dynamicPart ( ) . substr ( 64 , length ) ) ;
} ;
} ;
/ * *
/ * *
@ -489,6 +524,7 @@ module.exports = {
formatInputInt : formatInputInt ,
formatInputInt : formatInputInt ,
formatInputBytes : formatInputBytes ,
formatInputBytes : formatInputBytes ,
formatInputDynamicBytes : formatInputDynamicBytes ,
formatInputDynamicBytes : formatInputDynamicBytes ,
formatInputString : formatInputString ,
formatInputBool : formatInputBool ,
formatInputBool : formatInputBool ,
formatInputReal : formatInputReal ,
formatInputReal : formatInputReal ,
formatOutputInt : formatOutputInt ,
formatOutputInt : formatOutputInt ,
@ -498,6 +534,7 @@ module.exports = {
formatOutputBool : formatOutputBool ,
formatOutputBool : formatOutputBool ,
formatOutputBytes : formatOutputBytes ,
formatOutputBytes : formatOutputBytes ,
formatOutputDynamicBytes : formatOutputDynamicBytes ,
formatOutputDynamicBytes : formatOutputDynamicBytes ,
formatOutputString : formatOutputString ,
formatOutputAddress : formatOutputAddress
formatOutputAddress : formatOutputAddress
} ;
} ;
@ -687,13 +724,14 @@ var getOffset = function (bytes, index) {
* /
* /
SolidityParam . decodeBytes = function ( bytes , index ) {
SolidityParam . decodeBytes = function ( bytes , index ) {
index = index || 0 ;
index = index || 0 ;
//TODO add support for strings longer than 32 bytes
//var length = parseInt('0x' + bytes.substr(offset * 64, 64));
var offset = getOffset ( bytes , index ) ;
var offset = getOffset ( bytes , index ) ;
// 2 * , cause we also parse length
var l = parseInt ( '0x' + bytes . substr ( offset * 2 , 64 ) ) ;
return new SolidityParam ( bytes . substr ( offset * 2 , 2 * 64 ) , 0 ) ;
l = Math . floor ( ( l + 31 ) / 32 ) ;
// (1 + l) * , cause we also parse length
return new SolidityParam ( bytes . substr ( offset * 2 , ( 1 + l ) * 64 ) , 0 ) ;
} ;
} ;
/ * *
/ * *
@ -846,7 +884,7 @@ module.exports = function (str, isNew) {
} ;
} ;
} , { "./utils" : 7 , "crypto-js/sha3" : 33 } ] , 7 : [ function ( require , module , exports ) {
} , { "./utils" : 7 , "crypto-js/sha3" : 34 } ] , 7 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -924,6 +962,19 @@ var padLeft = function (string, chars, sign) {
return new Array ( chars - string . length + 1 ) . join ( sign ? sign : "0" ) + string ;
return new Array ( chars - string . length + 1 ) . join ( sign ? sign : "0" ) + string ;
} ;
} ;
/ * *
* Should be called to pad string to expected length
*
* @ method padRight
* @ param { String } string to be padded
* @ param { Number } characters that result string should have
* @ param { String } sign , by default 0
* @ returns { String } right aligned string
* /
var padRight = function ( string , chars , sign ) {
return string + ( new Array ( chars - string . length + 1 ) . join ( sign ? sign : "0" ) ) ;
} ;
/ * *
/ * *
* Should be called to get sting from it ' s hex representation
* Should be called to get sting from it ' s hex representation
*
*
@ -940,10 +991,6 @@ var toAscii = function(hex) {
}
}
for ( ; i < l ; i += 2 ) {
for ( ; i < l ; i += 2 ) {
var code = parseInt ( hex . substr ( i , 2 ) , 16 ) ;
var code = parseInt ( hex . substr ( i , 2 ) , 16 ) ;
if ( code === 0 ) {
break ;
}
str += String . fromCharCode ( code ) ;
str += String . fromCharCode ( code ) ;
}
}
@ -1053,7 +1100,7 @@ var fromDecimal = function (value) {
* @ return { String }
* @ return { String }
* /
* /
var toHex = function ( val ) {
var toHex = function ( val ) {
/*jshint maxcomplexity:7 */
/*jshint maxcomplexity: 8 */
if ( isBoolean ( val ) )
if ( isBoolean ( val ) )
return fromDecimal ( + val ) ;
return fromDecimal ( + val ) ;
@ -1067,9 +1114,11 @@ var toHex = function (val) {
// if its a negative number, pass it through fromDecimal
// if its a negative number, pass it through fromDecimal
if ( isString ( val ) ) {
if ( isString ( val ) ) {
if ( val . indexOf ( '-0x' ) === 0 )
if ( val . indexOf ( '-0x' ) === 0 )
return fromDecimal ( val ) ;
return fromDecimal ( val ) ;
else if ( ! isFinite ( val ) )
else if ( ! isFinite ( val ) )
return fromAscii ( val ) ;
return fromAscii ( val ) ;
else if ( val . indexOf ( '0x' ) === 0 )
return val ;
}
}
return fromDecimal ( val ) ;
return fromDecimal ( val ) ;
@ -1320,6 +1369,7 @@ var isIBAN = function (iban) {
module . exports = {
module . exports = {
padLeft : padLeft ,
padLeft : padLeft ,
padRight : padRight ,
toHex : toHex ,
toHex : toHex ,
toDecimal : toDecimal ,
toDecimal : toDecimal ,
fromDecimal : fromDecimal ,
fromDecimal : fromDecimal ,
@ -1348,7 +1398,7 @@ module.exports = {
} , { "bignumber.js" : "bignumber.js" } ] , 8 : [ function ( require , module , exports ) {
} , { "bignumber.js" : "bignumber.js" } ] , 8 : [ function ( require , module , exports ) {
module . exports = {
module . exports = {
"version" : "0.6.0 "
"version" : "0.7.1 "
}
}
} , { } ] , 9 : [ function ( require , module , exports ) {
} , { } ] , 9 : [ function ( require , module , exports ) {
@ -1434,31 +1484,25 @@ var setupProperties = function (obj, properties) {
/// setups web3 object, and it's in-browser executed methods
/// setups web3 object, and it's in-browser executed methods
var web3 = { } ;
var web3 = { } ;
web3 . providers = { } ;
web3 . providers = { } ;
web3 . currentProvider = null ;
web3 . version = { } ;
web3 . version = { } ;
web3 . version . api = version . version ;
web3 . version . api = version . version ;
web3 . eth = { } ;
web3 . eth = { } ;
/*jshint maxparams:4 */
/*jshint maxparams:4 */
web3 . eth . filter = function ( fil , eventParams , options , formatter ) {
web3 . eth . filter = function ( fil , callback ) {
return new Filter ( fil , watches . eth ( ) , formatters . outputLogFormatter , callback ) ;
// if its event, treat it differently
// TODO: simplify and remove
if ( fil . _ isEvent ) {
return fil ( eventParams , options ) ;
}
// output logs works for blockFilter and pendingTransaction filters?
return new Filter ( fil , watches . eth ( ) , formatter || formatters . outputLogFormatter ) ;
} ;
} ;
/*jshint maxparams:3 */
/*jshint maxparams:3 */
web3 . shh = { } ;
web3 . shh = { } ;
web3 . shh . filter = function ( fil ) {
web3 . shh . filter = function ( fil , callback ) {
return new Filter ( fil , watches . shh ( ) , formatters . outputPostFormatter ) ;
return new Filter ( fil , watches . shh ( ) , formatters . outputPostFormatter , callback ) ;
} ;
} ;
web3 . net = { } ;
web3 . net = { } ;
web3 . db = { } ;
web3 . db = { } ;
web3 . setProvider = function ( provider ) {
web3 . setProvider = function ( provider ) {
this . currentProvider = provider ;
RequestManager . getInstance ( ) . setProvider ( provider ) ;
RequestManager . getInstance ( ) . setProvider ( provider ) ;
} ;
} ;
web3 . reset = function ( ) {
web3 . reset = function ( ) {
@ -1531,7 +1575,90 @@ setupMethods(web3.shh, shh.methods);
module . exports = web3 ;
module . exports = web3 ;
} , { "./utils/config" : 5 , "./utils/sha3" : 6 , "./utils/utils" : 7 , "./version.json" : 8 , "./web3/batch" : 10 , "./web3/db" : 12 , "./web3/eth" : 14 , "./web3/filter" : 16 , "./web3/formatters" : 17 , "./web3/method" : 22 , "./web3/net" : 24 , "./web3/property" : 25 , "./web3/requestmanager" : 27 , "./web3/shh" : 28 , "./web3/watches" : 30 } ] , 10 : [ function ( require , module , exports ) {
} , { "./utils/config" : 5 , "./utils/sha3" : 6 , "./utils/utils" : 7 , "./version.json" : 8 , "./web3/batch" : 11 , "./web3/db" : 13 , "./web3/eth" : 15 , "./web3/filter" : 17 , "./web3/formatters" : 18 , "./web3/method" : 23 , "./web3/net" : 25 , "./web3/property" : 26 , "./web3/requestmanager" : 28 , "./web3/shh" : 29 , "./web3/watches" : 31 } ] , 10 : [ function ( require , module , exports ) {
/ *
This file is part of ethereum . js .
ethereum . js is free software : you can redistribute it and / or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
ethereum . js is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
along with ethereum . js . If not , see < http : //www.gnu.org/licenses/>.
* /
/ * *
* @ file allevents . js
* @ author Marek Kotewicz < marek @ ethdev . com >
* @ date 2014
* /
var sha3 = require ( '../utils/sha3' ) ;
var SolidityEvent = require ( './event' ) ;
var formatters = require ( './formatters' ) ;
var utils = require ( '../utils/utils' ) ;
var Filter = require ( './filter' ) ;
var watches = require ( './watches' ) ;
var AllSolidityEvents = function ( json , address ) {
this . _ json = json ;
this . _ address = address ;
} ;
AllSolidityEvents . prototype . encode = function ( options ) {
options = options || { } ;
var result = { } ;
[ 'fromBlock' , 'toBlock' ] . filter ( function ( f ) {
return options [ f ] !== undefined ;
} ) . forEach ( function ( f ) {
result [ f ] = formatters . inputBlockNumberFormatter ( options [ f ] ) ;
} ) ;
result . topics = [ null , null , null , null , null ] ; // match all topics
result . address = this . _ address ;
return result ;
} ;
AllSolidityEvents . prototype . decode = function ( data ) {
data . data = data . data || '' ;
data . topics = data . topics || [ ] ;
var eventTopic = data . topics [ 0 ] . slice ( 2 ) ;
var match = this . _ json . filter ( function ( j ) {
return eventTopic === sha3 ( utils . transformToFullName ( j ) ) ;
} ) [ 0 ] ;
if ( ! match ) { // cannot find matching event?
console . warn ( 'cannot find event for log' ) ;
return data ;
}
var event = new SolidityEvent ( match , this . _ address ) ;
return event . decode ( data ) ;
} ;
AllSolidityEvents . prototype . execute = function ( options , callback ) {
var o = this . encode ( options ) ;
var formatter = this . decode . bind ( this ) ;
return new Filter ( o , watches . eth ( ) , formatter , callback ) ;
} ;
AllSolidityEvents . prototype . attachToContract = function ( contract ) {
var execute = this . execute . bind ( this ) ;
contract . allEvents = execute ;
} ;
module . exports = AllSolidityEvents ;
} , { "../utils/sha3" : 6 , "../utils/utils" : 7 , "./event" : 16 , "./filter" : 17 , "./formatters" : 18 , "./watches" : 31 } ] , 11 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -1594,7 +1721,7 @@ Batch.prototype.execute = function () {
module . exports = Batch ;
module . exports = Batch ;
} , { "./requestmanager" : 27 } ] , 11 : [ function ( require , module , exports ) {
} , { "./requestmanager" : 28 } ] , 12 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -1622,6 +1749,7 @@ var utils = require('../utils/utils');
var coder = require ( '../solidity/coder' ) ;
var coder = require ( '../solidity/coder' ) ;
var SolidityEvent = require ( './event' ) ;
var SolidityEvent = require ( './event' ) ;
var SolidityFunction = require ( './function' ) ;
var SolidityFunction = require ( './function' ) ;
var AllEvents = require ( './allevents' ) ;
/ * *
/ * *
* Should be called to encode constructor params
* Should be called to encode constructor params
@ -1667,9 +1795,14 @@ var addFunctionsToContract = function (contract, abi) {
* @ param { Array } abi
* @ param { Array } abi
* /
* /
var addEventsToContract = function ( contract , abi ) {
var addEventsToContract = function ( contract , abi ) {
abi . filter ( function ( json ) {
var events = abi . filter ( function ( json ) {
return json . type === 'event' ;
return json . type === 'event' ;
} ) . map ( function ( json ) {
} ) ;
var All = new AllEvents ( events , contract . address ) ;
All . attachToContract ( contract ) ;
events . map ( function ( json ) {
return new SolidityEvent ( json , contract . address ) ;
return new SolidityEvent ( json , contract . address ) ;
} ) . forEach ( function ( e ) {
} ) . forEach ( function ( e ) {
e . attachToContract ( contract ) ;
e . attachToContract ( contract ) ;
@ -1776,7 +1909,7 @@ var Contract = function (abi, address) {
module . exports = contract ;
module . exports = contract ;
} , { "../solidity/coder" : 1 , "../utils/utils" : 7 , "../web3" : 9 , "./event" : 15 , "./function" : 18 } ] , 12 : [ function ( require , module , exports ) {
} , { "../solidity/coder" : 1 , "../utils/utils" : 7 , "../web3" : 9 , "./all events " : 10 , "./event" : 16 , "./function" : 19 } ] , 13 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -1834,7 +1967,7 @@ module.exports = {
methods : methods
methods : methods
} ;
} ;
} , { "./method" : 22 } ] , 13 : [ function ( require , module , exports ) {
} , { "./method" : 23 } ] , 14 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -1874,7 +2007,7 @@ module.exports = {
} ;
} ;
} , { } ] , 14 : [ function ( require , module , exports ) {
} , { } ] , 15 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -2159,7 +2292,7 @@ module.exports = {
} ;
} ;
} , { "../utils/utils" : 7 , "./formatters" : 17 , "./method" : 22 , "./property" : 25 } ] , 15 : [ function ( require , module , exports ) {
} , { "../utils/utils" : 7 , "./formatters" : 18 , "./method" : 23 , "./property" : 26 } ] , 16 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -2184,9 +2317,10 @@ module.exports = {
var utils = require ( '../utils/utils' ) ;
var utils = require ( '../utils/utils' ) ;
var coder = require ( '../solidity/coder' ) ;
var coder = require ( '../solidity/coder' ) ;
var web3 = require ( '../web3' ) ;
var formatters = require ( './formatters' ) ;
var formatters = require ( './formatters' ) ;
var sha3 = require ( '../utils/sha3' ) ;
var sha3 = require ( '../utils/sha3' ) ;
var Filter = require ( './filter' ) ;
var watches = require ( './watches' ) ;
/ * *
/ * *
* This prototype should be used to create event filters
* This prototype should be used to create event filters
@ -2332,10 +2466,21 @@ SolidityEvent.prototype.decode = function (data) {
* @ param { Object } options
* @ param { Object } options
* @ return { Object } filter object
* @ return { Object } filter object
* /
* /
SolidityEvent . prototype . execute = function ( indexed , options ) {
SolidityEvent . prototype . execute = function ( indexed , options , callback ) {
if ( utils . isFunction ( arguments [ arguments . length - 1 ] ) ) {
callback = arguments [ arguments . length - 1 ] ;
if ( arguments . length === 2 )
options = null ;
if ( arguments . length === 1 ) {
options = null ;
indexed = { } ;
}
}
var o = this . encode ( indexed , options ) ;
var o = this . encode ( indexed , options ) ;
var formatter = this . decode . bind ( this ) ;
var formatter = this . decode . bind ( this ) ;
return web3 . eth . filter ( o , undefined , undefined , formatter ) ;
return new Filter ( o , watches . eth ( ) , formatter , callback ) ;
} ;
} ;
/ * *
/ * *
@ -2356,7 +2501,7 @@ SolidityEvent.prototype.attachToContract = function (contract) {
module . exports = SolidityEvent ;
module . exports = SolidityEvent ;
} , { "../solidity/coder" : 1 , "../utils/sha3" : 6 , "../utils/utils" : 7 , "../web3" : 9 , "./formatters" : 17 } ] , 16 : [ function ( require , module , exports ) {
} , { "../solidity/coder" : 1 , "../utils/sha3" : 6 , "../utils/utils" : 7 , "./filter" : 17 , "./formatters" : 18 , "./watches" : 31 } ] , 17 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -2486,7 +2631,7 @@ var pollFilter = function(self) {
} ;
} ;
var Filter = function ( options , methods , formatter ) {
var Filter = function ( options , methods , formatter , callback ) {
var self = this ;
var self = this ;
var implementation = { } ;
var implementation = { } ;
methods . forEach ( function ( method ) {
methods . forEach ( function ( method ) {
@ -2494,23 +2639,32 @@ var Filter = function (options, methods, formatter) {
} ) ;
} ) ;
this . options = getOptions ( options ) ;
this . options = getOptions ( options ) ;
this . implementation = implementation ;
this . implementation = implementation ;
this . filterId = null ;
this . callbacks = [ ] ;
this . callbacks = [ ] ;
this . pollFilters = [ ] ;
this . pollFilters = [ ] ;
this . formatter = formatter ;
this . formatter = formatter ;
this . implementation . newFilter ( this . options , function ( error , id ) {
this . implementation . newFilter ( this . options , function ( error , id ) {
if ( error ) {
if ( error ) {
self . callbacks . forEach ( function ( call back ) {
self . callbacks . forEach ( function ( cb ) {
call back ( error ) ;
cb ( error ) ;
} ) ;
} ) ;
} else {
} else {
self . filterId = id ;
self . filterId = id ;
// get filter logs at start
self . callbacks . forEach ( function ( callback ) {
// get filter logs for the already existing watch calls
getLogsAtStart ( self , callback ) ;
self . callbacks . forEach ( function ( cb ) {
getLogsAtStart ( self , cb ) ;
} ) ;
} ) ;
pollFilter ( self ) ;
if ( self . callbacks . length > 0 )
pollFilter ( self ) ;
// start to watch immediately
if ( callback ) {
return self . watch ( callback ) ;
}
}
}
} ) ;
} ) ;
} ;
} ;
Filter . prototype . watch = function ( callback ) {
Filter . prototype . watch = function ( callback ) {
@ -2556,7 +2710,7 @@ Filter.prototype.get = function (callback) {
module . exports = Filter ;
module . exports = Filter ;
} , { "../utils/utils" : 7 , "./formatters" : 17 , "./requestmanager" : 27 } ] , 17 : [ function ( require , module , exports ) {
} , { "../utils/utils" : 7 , "./formatters" : 18 , "./requestmanager" : 28 } ] , 18 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -2778,7 +2932,7 @@ module.exports = {
} ;
} ;
} , { "../utils/config" : 5 , "../utils/utils" : 7 } ] , 18 : [ function ( require , module , exports ) {
} , { "../utils/config" : 5 , "../utils/utils" : 7 } ] , 19 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -2969,8 +3123,9 @@ SolidityFunction.prototype.request = function () {
var format = this . unpackOutput . bind ( this ) ;
var format = this . unpackOutput . bind ( this ) ;
return {
return {
method : this . _ constant ? 'eth_call' : 'eth_sendTransaction' ,
callback : callback ,
callback : callback ,
payload : payload ,
params : [ payload ] ,
format : format
format : format
} ;
} ;
} ;
} ;
@ -3014,7 +3169,7 @@ SolidityFunction.prototype.attachToContract = function (contract) {
module . exports = SolidityFunction ;
module . exports = SolidityFunction ;
} , { "../solidity/coder" : 1 , "../utils/sha3" : 6 , "../utils/utils" : 7 , "../web3" : 9 , "./formatters" : 17 } ] , 19 : [ function ( require , module , exports ) {
} , { "../solidity/coder" : 1 , "../utils/sha3" : 6 , "../utils/utils" : 7 , "../web3" : 9 , "./formatters" : 18 } ] , 20 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -3041,7 +3196,8 @@ module.exports = SolidityFunction;
"use strict" ;
"use strict" ;
var XMLHttpRequest = require ( 'xmlhttprequest' ) . XMLHttpRequest ; // jshint ignore:line
// resolves the problem for electron/atom shell environments, which use node integration, but have no process variable available
var XMLHttpRequest = ( typeof window !== 'undefined' && window . XMLHttpRequest ) ? window . XMLHttpRequest : require ( 'xmlhttprequest' ) . XMLHttpRequest ; // jshint ignore:line
var errors = require ( './errors' ) ;
var errors = require ( './errors' ) ;
var HttpProvider = function ( host ) {
var HttpProvider = function ( host ) {
@ -3108,7 +3264,7 @@ HttpProvider.prototype.sendAsync = function (payload, callback) {
module . exports = HttpProvider ;
module . exports = HttpProvider ;
} , { "./errors" : 13 , "xmlhttprequest" : 4 } ] , 20 : [ function ( require , module , exports ) {
} , { "./errors" : 14 , "xmlhttprequest" : 4 } ] , 21 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -3218,7 +3374,7 @@ ICAP.prototype.address = function () {
module . exports = ICAP ;
module . exports = ICAP ;
} , { "../utils/utils" : 7 } ] , 21 : [ function ( require , module , exports ) {
} , { "../utils/utils" : 7 } ] , 22 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -3311,7 +3467,7 @@ Jsonrpc.prototype.toBatchPayload = function (messages) {
module . exports = Jsonrpc ;
module . exports = Jsonrpc ;
} , { } ] , 22 : [ function ( require , module , exports ) {
} , { } ] , 23 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -3485,7 +3641,7 @@ Method.prototype.send = function () {
module . exports = Method ;
module . exports = Method ;
} , { "../utils/utils" : 7 , "./errors" : 13 , "./requestmanager" : 27 } ] , 23 : [ function ( require , module , exports ) {
} , { "../utils/utils" : 7 , "./errors" : 14 , "./requestmanager" : 28 } ] , 24 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -3533,7 +3689,7 @@ var abi = [
module . exports = contract ( abi ) . at ( address ) ;
module . exports = contract ( abi ) . at ( address ) ;
} , { "./contract" : 11 } ] , 24 : [ function ( require , module , exports ) {
} , { "./contract" : 12 } ] , 25 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -3583,7 +3739,7 @@ module.exports = {
} ;
} ;
} , { "../utils/utils" : 7 , "./property" : 25 } ] , 25 : [ function ( require , module , exports ) {
} , { "../utils/utils" : 7 , "./property" : 26 } ] , 26 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -3701,7 +3857,7 @@ Property.prototype.getAsync = function (callback) {
module . exports = Property ;
module . exports = Property ;
} , { "./requestmanager" : 27 } ] , 26 : [ function ( require , module , exports ) {
} , { "./requestmanager" : 28 } ] , 27 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -3736,7 +3892,7 @@ QtSyncProvider.prototype.send = function (payload) {
module . exports = QtSyncProvider ;
module . exports = QtSyncProvider ;
} , { } ] , 27 : [ function ( require , module , exports ) {
} , { } ] , 28 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -4001,7 +4157,7 @@ RequestManager.prototype.poll = function () {
module . exports = RequestManager ;
module . exports = RequestManager ;
} , { "../utils/config" : 5 , "../utils/utils" : 7 , "./errors" : 13 , "./jsonrpc" : 21 } ] , 28 : [ function ( require , module , exports ) {
} , { "../utils/config" : 5 , "../utils/utils" : 7 , "./errors" : 14 , "./jsonrpc" : 22 } ] , 29 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -4071,7 +4227,7 @@ module.exports = {
} ;
} ;
} , { "./formatters" : 17 , "./method" : 22 } ] , 29 : [ function ( require , module , exports ) {
} , { "./formatters" : 18 , "./method" : 23 } ] , 30 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -4167,7 +4323,7 @@ var deposit = function (from, address, value, client, callback) {
module . exports = transfer ;
module . exports = transfer ;
} , { "../web3" : 9 , "./contract" : 11 , "./icap" : 20 , "./namereg" : 23 } ] , 30 : [ function ( require , module , exports ) {
} , { "../web3" : 9 , "./contract" : 12 , "./icap" : 21 , "./namereg" : 24 } ] , 31 : [ function ( require , module , exports ) {
/ *
/ *
This file is part of ethereum . js .
This file is part of ethereum . js .
@ -4283,9 +4439,9 @@ module.exports = {
} ;
} ;
} , { "./method" : 22 } ] , 31 : [ function ( require , module , exports ) {
} , { "./method" : 23 } ] , 32 : [ function ( require , module , exports ) {
} , { } ] , 32 : [ function ( require , module , exports ) {
} , { } ] , 33 : [ function ( require , module , exports ) {
; ( function ( root , factory ) {
; ( function ( root , factory ) {
if ( typeof exports === "object" ) {
if ( typeof exports === "object" ) {
// CommonJS
// CommonJS
@ -5028,7 +5184,7 @@ module.exports = {
return CryptoJS ;
return CryptoJS ;
} ) ) ;
} ) ) ;
} , { } ] , 33 : [ function ( require , module , exports ) {
} , { } ] , 34 : [ function ( require , module , exports ) {
; ( function ( root , factory , undef ) {
; ( function ( root , factory , undef ) {
if ( typeof exports === "object" ) {
if ( typeof exports === "object" ) {
// CommonJS
// CommonJS
@ -5352,7 +5508,7 @@ module.exports = {
return CryptoJS . SHA3 ;
return CryptoJS . SHA3 ;
} ) ) ;
} ) ) ;
} , { "./core" : 32 , "./x64-core" : 34 } ] , 34 : [ function ( require , module , exports ) {
} , { "./core" : 33 , "./x64-core" : 35 } ] , 35 : [ function ( require , module , exports ) {
; ( function ( root , factory ) {
; ( function ( root , factory ) {
if ( typeof exports === "object" ) {
if ( typeof exports === "object" ) {
// CommonJS
// CommonJS
@ -5657,7 +5813,7 @@ module.exports = {
return CryptoJS ;
return CryptoJS ;
} ) ) ;
} ) ) ;
} , { "./core" : 32 } ] , "bignumber.js" : [ function ( require , module , exports ) {
} , { "./core" : 33 } ] , "bignumber.js" : [ function ( require , module , exports ) {
/*! bignumber.js v2.0.7 https://github.com/MikeMcl/bignumber.js/LICENCE */
/*! bignumber.js v2.0.7 https://github.com/MikeMcl/bignumber.js/LICENCE */
; ( function ( global ) {
; ( function ( global ) {
@ -8342,7 +8498,7 @@ module.exports = {
}
}
} ) ( this ) ;
} ) ( this ) ;
} , { "crypto" : 31 } ] , "web3" : [ function ( require , module , exports ) {
} , { "crypto" : 32 } ] , "web3" : [ function ( require , module , exports ) {
var web3 = require ( './lib/web3' ) ;
var web3 = require ( './lib/web3' ) ;
web3 . providers . HttpProvider = require ( './lib/web3/httpprovider' ) ;
web3 . providers . HttpProvider = require ( './lib/web3/httpprovider' ) ;
web3 . providers . QtSyncProvider = require ( './lib/web3/qtsync' ) ;
web3 . providers . QtSyncProvider = require ( './lib/web3/qtsync' ) ;
@ -8358,5 +8514,5 @@ if (typeof window !== 'undefined' && typeof window.web3 === 'undefined') {
module . exports = web3 ;
module . exports = web3 ;
} , { "./lib/web3" : 9 , "./lib/web3/contract" : 11 , "./lib/web3/httpprovider" : 19 , "./lib/web3/namereg" : 23 , "./lib/web3/qtsync" : 26 , "./lib/web3/transfer" : 29 } ] } , { } , [ "web3" ] )
} , { "./lib/web3" : 9 , "./lib/web3/contract" : 12 , "./lib/web3/httpprovider" : 20 , "./lib/web3/namereg" : 24 , "./lib/web3/qtsync" : 27 , "./lib/web3/transfer" : 30 } ] } , { } , [ "web3" ] )
//# sourceMappingURL=web3.js.map
//# sourceMappingURL=web3.js.map