Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
/*
|
|
|
|
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 coder.js
|
|
|
|
* @author Marek Kotewicz <marek@ethdev.com>
|
|
|
|
* @date 2015
|
|
|
|
*/
|
|
|
|
|
|
|
|
var BigNumber = require('bignumber.js');
|
|
|
|
var utils = require('../utils/utils');
|
|
|
|
var f = require('./formatters');
|
|
|
|
var SolidityParam = require('./param');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Should be used to check if a type is an array type
|
|
|
|
*
|
|
|
|
* @method isArrayType
|
|
|
|
* @param {String} type
|
|
|
|
* @return {Bool} true is the type is an array, otherwise false
|
|
|
|
*/
|
|
|
|
var isArrayType = function (type) {
|
|
|
|
return type.slice(-2) === '[]';
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SolidityType prototype is used to encode/decode solidity params of certain type
|
|
|
|
*/
|
|
|
|
var SolidityType = function (config) {
|
|
|
|
this._name = config.name;
|
|
|
|
this._match = config.match;
|
|
|
|
this._mode = config.mode;
|
|
|
|
this._inputFormatter = config.inputFormatter;
|
|
|
|
this._outputFormatter = config.outputFormatter;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Should be used to determine if this SolidityType do match given type
|
|
|
|
*
|
|
|
|
* @method isType
|
|
|
|
* @param {String} name
|
|
|
|
* @return {Bool} true if type match this SolidityType, otherwise false
|
|
|
|
*/
|
|
|
|
SolidityType.prototype.isType = function (name) {
|
|
|
|
if (this._match === 'strict') {
|
|
|
|
return this._name === name || (name.indexOf(this._name) === 0 && name.slice(this._name.length) === '[]');
|
|
|
|
} else if (this._match === 'prefix') {
|
|
|
|
// TODO better type detection!
|
|
|
|
return name.indexOf(this._name) === 0;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Should be used to transform plain param to SolidityParam object
|
|
|
|
*
|
|
|
|
* @method formatInput
|
|
|
|
* @param {Object} param - plain object, or an array of objects
|
|
|
|
* @param {Bool} arrayType - true if a param should be encoded as an array
|
|
|
|
* @return {SolidityParam} encoded param wrapped in SolidityParam object
|
|
|
|
*/
|
|
|
|
SolidityType.prototype.formatInput = function (param, arrayType) {
|
|
|
|
if (utils.isArray(param) && arrayType) { // TODO: should fail if this two are not the same
|
|
|
|
var self = this;
|
|
|
|
return param.map(function (p) {
|
|
|
|
return self._inputFormatter(p);
|
|
|
|
}).reduce(function (acc, current) {
|
|
|
|
return acc.combine(current);
|
|
|
|
}, f.formatInputInt(param.length)).withOffset(32);
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
}
|
|
|
|
return this._inputFormatter(param);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Should be used to transoform SolidityParam to plain param
|
|
|
|
*
|
|
|
|
* @method formatOutput
|
|
|
|
* @param {SolidityParam} byteArray
|
|
|
|
* @param {Bool} arrayType - true if a param should be decoded as an array
|
|
|
|
* @return {Object} plain decoded param
|
|
|
|
*/
|
|
|
|
SolidityType.prototype.formatOutput = function (param, arrayType) {
|
|
|
|
if (arrayType) {
|
|
|
|
// let's assume, that we solidity will never return long arrays :P
|
|
|
|
var result = [];
|
|
|
|
var length = new BigNumber(param.dynamicPart().slice(0, 64), 16);
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
for (var i = 0; i < length * 64; i += 64) {
|
|
|
|
result.push(this._outputFormatter(new SolidityParam(param.dynamicPart().substr(i + 64, 64))));
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
return this._outputFormatter(param);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Should be used to slice single param from bytes
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
*
|
|
|
|
* @method sliceParam
|
|
|
|
* @param {String} bytes
|
|
|
|
* @param {Number} index of param to slice
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
* @param {String} type
|
|
|
|
* @returns {SolidityParam} param
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
*/
|
|
|
|
SolidityType.prototype.sliceParam = function (bytes, index, type) {
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
if (this._mode === 'bytes') {
|
|
|
|
return SolidityParam.decodeBytes(bytes, index);
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
} else if (isArrayType(type)) {
|
|
|
|
return SolidityParam.decodeArray(bytes, index);
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
}
|
|
|
|
return SolidityParam.decodeParam(bytes, index);
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SolidityCoder prototype should be used to encode/decode solidity params of any type
|
|
|
|
*/
|
|
|
|
var SolidityCoder = function (types) {
|
|
|
|
this._types = types;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This method should be used to transform type to SolidityType
|
|
|
|
*
|
|
|
|
* @method _requireType
|
|
|
|
* @param {String} type
|
|
|
|
* @returns {SolidityType}
|
|
|
|
* @throws {Error} throws if no matching type is found
|
|
|
|
*/
|
|
|
|
SolidityCoder.prototype._requireType = function (type) {
|
|
|
|
var solidityType = this._types.filter(function (t) {
|
|
|
|
return t.isType(type);
|
|
|
|
})[0];
|
|
|
|
|
|
|
|
if (!solidityType) {
|
|
|
|
throw Error('invalid solidity type!: ' + type);
|
|
|
|
}
|
|
|
|
|
|
|
|
return solidityType;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Should be used to transform plain param of given type to SolidityParam
|
|
|
|
*
|
|
|
|
* @method _formatInput
|
|
|
|
* @param {String} type of param
|
|
|
|
* @param {Object} plain param
|
|
|
|
* @return {SolidityParam}
|
|
|
|
*/
|
|
|
|
SolidityCoder.prototype._formatInput = function (type, param) {
|
|
|
|
return this._requireType(type).formatInput(param, isArrayType(type));
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Should be used to encode plain param
|
|
|
|
*
|
|
|
|
* @method encodeParam
|
|
|
|
* @param {String} type
|
|
|
|
* @param {Object} plain param
|
|
|
|
* @return {String} encoded plain param
|
|
|
|
*/
|
|
|
|
SolidityCoder.prototype.encodeParam = function (type, param) {
|
|
|
|
return this._formatInput(type, param).encode();
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Should be used to encode list of params
|
|
|
|
*
|
|
|
|
* @method encodeParams
|
|
|
|
* @param {Array} types
|
|
|
|
* @param {Array} params
|
|
|
|
* @return {String} encoded list of params
|
|
|
|
*/
|
|
|
|
SolidityCoder.prototype.encodeParams = function (types, params) {
|
|
|
|
var self = this;
|
|
|
|
var solidityParams = types.map(function (type, index) {
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
return self._formatInput(type, params[index]);
|
|
|
|
});
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
|
|
|
|
return SolidityParam.encodeList(solidityParams);
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Should be used to decode bytes to plain param
|
|
|
|
*
|
|
|
|
* @method decodeParam
|
|
|
|
* @param {String} type
|
|
|
|
* @param {String} bytes
|
|
|
|
* @return {Object} plain param
|
|
|
|
*/
|
|
|
|
SolidityCoder.prototype.decodeParam = function (type, bytes) {
|
|
|
|
return this.decodeParams([type], bytes)[0];
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Should be used to decode list of params
|
|
|
|
*
|
|
|
|
* @method decodeParam
|
|
|
|
* @param {Array} types
|
|
|
|
* @param {String} bytes
|
|
|
|
* @return {Array} array of plain params
|
|
|
|
*/
|
|
|
|
SolidityCoder.prototype.decodeParams = function (types, bytes) {
|
|
|
|
var self = this;
|
|
|
|
return types.map(function (type, index) {
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
var solidityType = self._requireType(type);
|
|
|
|
var p = solidityType.sliceParam(bytes, index, type);
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
return solidityType.formatOutput(p, isArrayType(type));
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
var coder = new SolidityCoder([
|
|
|
|
new SolidityType({
|
|
|
|
name: 'address',
|
|
|
|
match: 'strict',
|
|
|
|
mode: 'value',
|
|
|
|
inputFormatter: f.formatInputInt,
|
|
|
|
outputFormatter: f.formatOutputAddress
|
|
|
|
}),
|
|
|
|
new SolidityType({
|
|
|
|
name: 'bool',
|
|
|
|
match: 'strict',
|
|
|
|
mode: 'value',
|
|
|
|
inputFormatter: f.formatInputBool,
|
|
|
|
outputFormatter: f.formatOutputBool
|
|
|
|
}),
|
|
|
|
new SolidityType({
|
|
|
|
name: 'int',
|
|
|
|
match: 'prefix',
|
|
|
|
mode: 'value',
|
|
|
|
inputFormatter: f.formatInputInt,
|
|
|
|
outputFormatter: f.formatOutputInt,
|
|
|
|
}),
|
|
|
|
new SolidityType({
|
|
|
|
name: 'uint',
|
|
|
|
match: 'prefix',
|
|
|
|
mode: 'value',
|
|
|
|
inputFormatter: f.formatInputInt,
|
|
|
|
outputFormatter: f.formatOutputUInt
|
|
|
|
}),
|
|
|
|
new SolidityType({
|
|
|
|
name: 'bytes',
|
|
|
|
match: 'strict',
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
mode: 'bytes',
|
|
|
|
inputFormatter: f.formatInputDynamicBytes,
|
|
|
|
outputFormatter: f.formatOutputDynamicBytes
|
|
|
|
}),
|
|
|
|
new SolidityType({
|
|
|
|
name: 'bytes',
|
|
|
|
match: 'prefix',
|
|
|
|
mode: 'value',
|
Squashed 'libjsqrc/ethereumjs/' changes from 4def095..f8a43ed
f8a43ed Merge pull request #180 from ethereum/develop
4dc6e23 realease version 0.3.1
ee0ec4b Merge branch 'master' of github.com:ethereum/web3.js into develop
08dc2b2 add missing inputBlockNumberFormatter
99e89a1 Merge pull request #179 from ethereum/latest_pending
dfbad66 add pending and latest to getBlockTransactionCount and getUncle
dbf3ff0 latest and pending as possible blockNumber arg everywhere
3897bc2 version 0.3.0
d2068eb improved solidity event decoding
11f23ce Merge pull request #178 from ethereum/stringTopics
50f4a2b add new test filter
40c5c9e merged develop
c9cd31b add test for the new toTopic filter
e21ee7a Merge pull request #174 from ethereum/events_refactor
960e9c9 test for explicit sendTransaction && call
a6ac6ed add new toTopic formatter in filters
3d3db61 tests for decoding event logs
7c16dbf one additional test for event encode
9f7d6a9 anonymous events implementation && tests
b5eabd8 proper formatting event options
93b323f removed unused function findIndex from utils
9158ac7 removed unused function
1ac1ef9 cleaned event.encode test
5f2eb33 fixed filters encoding null
4482d5b Merge branch 'develop' into events_refactor
76ced9a basic tests for event encoding
f767a9a removed unused formatOutputHash, renamed formatXXXString to formatXXXBytes
888a970 coder.encodeParam, coder.decodeParam tests template
983e4b1 removed signature.js
f37057e Merge branch 'develop' of github.com:ethereum/web3.js into develop
c8f4226 add possible 2d topic arrays fixes #175
e910736 eth_filter complex topics, #175
836529a Merge branch 'develop' into events_refactor
42e759e 0.10 on travis is painfully slow, lets remove it
d411492 call && sendTransaction
f84a68c changed the way functions are being called
c8e5768 fixed log fields
d38f5a2 Merge branch 'develop' into events_refactor
a5c1bcc changed default providor port to 8545 closes #160
9e8cb8d removed non existing eth.flush method
eeb0bc0 Merge branch 'develop' into events_refactor
cdf02ec Merge pull request #173 from ethereum/failing_develop
501e3bc utils cleanup
a88be00 docs
9d8a51d event.js refactored
ea6bda4 event refactor in progress
a827076 fixed tx/block return value tests
99a3696 events refactor, function.js
04cdb6c format also tx nonce to number
385cc2c removed minGasPrice from blocks
c06d75b Merge pull request #170 from ethereum/abi_refactor
e80ff10 Merge branch 'master' into abi_refactor
38641df fixed #154
1c8cd7d web3.eth.defaultAccount property, updated event_inc example, fixed #96
4aeba40 fixed event_inc example
5362e2a Merge branch 'develop' into abi_refactor
2a11852 Merge branch 'master' into develop
ea413a8 updated gitter badge
a46b9ea Merge branch 'develop' into abi_refactor
779a608 documentation
941535f SolidityParam moved to its own file && documented
18cef7c removed *collapse in contrat, gulp
677bb68 add bundle version
135b044 Merge pull request #164 from karalabe/empty-topics-fix
b326202 formatters/whisper: polish corner case handling code
0567ba1 outputParser do not require 0x prefix before hash
b5c6aa6 little cleanup && renaming
dccfca1 solidity abi refactor in progress
6a058b6 Allow unset topics in posts too.
af443f2 Fix #162: allow empty topic list in messages
d643d06 solidity abi refactor in progress
271b00f bumped version
f4cf699 rebuild
4eeaf19 rebuild
20fb2e3 Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop
ac69640 Merge pull request #158 from ethereum/watchImprovement2
96b4468 fixed #161, web3.ssh.post
a320ef8 fixed coverage, unified creating errors
364eab7 add callback for async error
c62f817 picked watch change3
56d13f7 picked watch change2
2215e7c picked watch change
dc0f231 merged meteor package fixes
c89ad86 renamed meteor package
a0709f3 fixed meteor package
1a8032c version 0.2.7
dfb8dea gulp
b1ada8d gulp
a25a9e1 Merge branch 'master' of https://github.com/ethereum/ethereum.js
05343ea use version of bignumber.js without lookaheads
2651fd8 Update README.md
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f8a43eddfb450d0e0ba1669a6916babe0ea43642
10 years ago
|
|
|
inputFormatter: f.formatInputBytes,
|
|
|
|
outputFormatter: f.formatOutputBytes
|
|
|
|
}),
|
|
|
|
new SolidityType({
|
|
|
|
name: 'real',
|
|
|
|
match: 'prefix',
|
|
|
|
mode: 'value',
|
|
|
|
inputFormatter: f.formatInputReal,
|
|
|
|
outputFormatter: f.formatOutputReal
|
|
|
|
}),
|
|
|
|
new SolidityType({
|
|
|
|
name: 'ureal',
|
|
|
|
match: 'prefix',
|
|
|
|
mode: 'value',
|
|
|
|
inputFormatter: f.formatInputReal,
|
|
|
|
outputFormatter: f.formatOutputUReal
|
|
|
|
})
|
|
|
|
]);
|
|
|
|
|
|
|
|
module.exports = coder;
|
|
|
|
|