2015-02-03 22:14:19 +00:00
|
|
|
var assert = require('assert');
|
|
|
|
var BigNumber = require('bignumber.js');
|
2015-03-10 16:41:32 +00:00
|
|
|
var abi = require('../lib/solidity/abi.js');
|
2015-02-03 22:14:19 +00:00
|
|
|
var clone = function (object) { return JSON.parse(JSON.stringify(object)); };
|
|
|
|
|
|
|
|
var description = [{
|
|
|
|
"name": "test",
|
|
|
|
"type": "function",
|
|
|
|
"inputs": [{
|
|
|
|
"name": "a",
|
|
|
|
"type": "uint256"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "d",
|
|
|
|
"type": "uint256"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}];
|
|
|
|
|
2015-04-07 02:50:10 +00:00
|
|
|
describe('lib/solidity/abi', function() {
|
2015-02-03 22:14:19 +00:00
|
|
|
describe('outputParser', function() {
|
2015-03-13 15:13:43 +00:00
|
|
|
it('should parse output fixed bytes type', function() {
|
2015-02-03 22:14:19 +00:00
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
|
|
|
|
d[0].outputs = [
|
2015-03-13 15:13:43 +00:00
|
|
|
{ type: "bytes" }
|
2015-02-03 22:14:19 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
|
|
|
assert.equal(
|
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
2015-04-23 10:32:05 +00:00
|
|
|
parser.test(
|
2015-02-03 22:14:19 +00:00
|
|
|
"0000000000000000000000000000000000000000000000000000000000000005" +
|
|
|
|
"68656c6c6f000000000000000000000000000000000000000000000000000000")[0],
|
|
|
|
'hello'
|
|
|
|
);
|
|
|
|
assert.equal(
|
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
2015-04-23 10:32:05 +00:00
|
|
|
parser.test(
|
2015-02-03 22:14:19 +00:00
|
|
|
"0000000000000000000000000000000000000000000000000000000000000005" +
|
|
|
|
"776f726c64000000000000000000000000000000000000000000000000000000")[0],
|
|
|
|
'world'
|
|
|
|
);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should parse output uint', function() {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
|
|
|
|
d[0].outputs = [
|
|
|
|
{ type: 'uint' }
|
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
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
2015-04-23 10:32:05 +00:00
|
|
|
assert.equal(parser.test("0000000000000000000000000000000000000000000000000000000000000001")[0], 1);
|
|
|
|
assert.equal(parser.test("000000000000000000000000000000000000000000000000000000000000000a")[0], 10);
|
2015-02-03 22:14:19 +00:00
|
|
|
assert.equal(
|
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
2015-04-23 10:32:05 +00:00
|
|
|
parser.test("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")[0].toString(10),
|
2015-02-03 22:14:19 +00:00
|
|
|
new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", 16).toString(10)
|
|
|
|
);
|
|
|
|
assert.equal(
|
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
2015-04-23 10:32:05 +00:00
|
|
|
parser.test("fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0")[0].toString(10),
|
2015-02-03 22:14:19 +00:00
|
|
|
new BigNumber("fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0", 16).toString(10)
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should parse output uint256', function() {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
|
|
|
|
d[0].outputs = [
|
|
|
|
{ type: 'uint256' }
|
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
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
2015-04-23 10:32:05 +00:00
|
|
|
assert.equal(parser.test("0000000000000000000000000000000000000000000000000000000000000001")[0], 1);
|
|
|
|
assert.equal(parser.test("000000000000000000000000000000000000000000000000000000000000000a")[0], 10);
|
2015-02-03 22:14:19 +00:00
|
|
|
assert.equal(
|
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
2015-04-23 10:32:05 +00:00
|
|
|
parser.test("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")[0].toString(10),
|
2015-02-03 22:14:19 +00:00
|
|
|
new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", 16).toString(10)
|
|
|
|
);
|
|
|
|
assert.equal(
|
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
2015-04-23 10:32:05 +00:00
|
|
|
parser.test("fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0")[0].toString(10),
|
2015-02-03 22:14:19 +00:00
|
|
|
new BigNumber("fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0", 16).toString(10)
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should parse output uint128', function() {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
|
|
|
|
d[0].outputs = [
|
|
|
|
{ type: 'uint128' }
|
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
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
2015-04-23 10:32:05 +00:00
|
|
|
assert.equal(parser.test("0000000000000000000000000000000000000000000000000000000000000001")[0], 1);
|
|
|
|
assert.equal(parser.test("000000000000000000000000000000000000000000000000000000000000000a")[0], 10);
|
2015-02-03 22:14:19 +00:00
|
|
|
assert.equal(
|
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
2015-04-23 10:32:05 +00:00
|
|
|
parser.test("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")[0].toString(10),
|
2015-02-03 22:14:19 +00:00
|
|
|
new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", 16).toString(10)
|
|
|
|
);
|
|
|
|
assert.equal(
|
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
2015-04-23 10:32:05 +00:00
|
|
|
parser.test("fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0")[0].toString(10),
|
2015-02-03 22:14:19 +00:00
|
|
|
new BigNumber("fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0", 16).toString(10)
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should parse output int', function() {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
|
|
|
|
d[0].outputs = [
|
|
|
|
{ type: 'int' }
|
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
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
2015-04-23 10:32:05 +00:00
|
|
|
assert.equal(parser.test("0000000000000000000000000000000000000000000000000000000000000001")[0], 1);
|
|
|
|
assert.equal(parser.test("000000000000000000000000000000000000000000000000000000000000000a")[0], 10);
|
|
|
|
assert.equal(parser.test("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")[0], -1);
|
|
|
|
assert.equal(parser.test("fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0")[0], -16);
|
2015-02-03 22:14:19 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should parse output int256', function() {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
|
|
|
|
d[0].outputs = [
|
|
|
|
{ type: 'int256' }
|
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
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
2015-04-23 10:32:05 +00:00
|
|
|
assert.equal(parser.test("0000000000000000000000000000000000000000000000000000000000000001")[0], 1);
|
|
|
|
assert.equal(parser.test("000000000000000000000000000000000000000000000000000000000000000a")[0], 10);
|
|
|
|
assert.equal(parser.test("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")[0], -1);
|
|
|
|
assert.equal(parser.test("fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0")[0], -16);
|
2015-02-03 22:14:19 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should parse output int128', function() {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
|
|
|
|
d[0].outputs = [
|
|
|
|
{ type: 'int128' }
|
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
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
2015-04-23 10:32:05 +00:00
|
|
|
assert.equal(parser.test("0000000000000000000000000000000000000000000000000000000000000001")[0], 1);
|
|
|
|
assert.equal(parser.test("000000000000000000000000000000000000000000000000000000000000000a")[0], 10);
|
|
|
|
assert.equal(parser.test("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")[0], -1);
|
|
|
|
assert.equal(parser.test("fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0")[0], -16);
|
2015-02-03 22:14:19 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should parse output address', function() {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
|
|
|
|
d[0].outputs = [
|
|
|
|
{ type: 'address' }
|
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
|
|
|
assert.equal(
|
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
2015-04-23 10:32:05 +00:00
|
|
|
parser.test("000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1")[0],
|
2015-02-03 22:14:19 +00:00
|
|
|
"0x407d73d8a49eeb85d32cf465507dd71d507100c1"
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should parse output bool', function() {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
|
|
|
|
d[0].outputs = [
|
|
|
|
{ type: 'bool' }
|
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
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
2015-04-23 10:32:05 +00:00
|
|
|
assert.equal(parser.test("0000000000000000000000000000000000000000000000000000000000000001")[0], true);
|
|
|
|
assert.equal(parser.test("0000000000000000000000000000000000000000000000000000000000000000")[0], false);
|
2015-02-03 22:14:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should parse output real', function() {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
|
|
|
|
d[0].outputs = [
|
|
|
|
{ type: 'real' }
|
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
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
2015-04-23 10:32:05 +00:00
|
|
|
assert.equal(parser.test("0000000000000000000000000000000100000000000000000000000000000000")[0], 1);
|
|
|
|
assert.equal(parser.test("0000000000000000000000000000000220000000000000000000000000000000")[0], 2.125);
|
|
|
|
assert.equal(parser.test("0000000000000000000000000000000880000000000000000000000000000000")[0], 8.5);
|
|
|
|
assert.equal(parser.test("ffffffffffffffffffffffffffffffff00000000000000000000000000000000")[0], -1);
|
2015-02-03 22:14:19 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should parse output ureal', function() {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
|
|
|
|
d[0].outputs = [
|
|
|
|
{ type: 'ureal' }
|
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
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
2015-04-23 10:32:05 +00:00
|
|
|
assert.equal(parser.test("0000000000000000000000000000000100000000000000000000000000000000")[0], 1);
|
|
|
|
assert.equal(parser.test("0000000000000000000000000000000220000000000000000000000000000000")[0], 2.125);
|
|
|
|
assert.equal(parser.test("0000000000000000000000000000000880000000000000000000000000000000")[0], 8.5);
|
2015-02-03 22:14:19 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2015-03-13 15:13:43 +00:00
|
|
|
it('should parse multiple output fixed bytes type', function() {
|
2015-02-03 22:14:19 +00:00
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
|
|
|
|
d[0].outputs = [
|
2015-03-13 15:13:43 +00:00
|
|
|
{ type: "bytes" },
|
|
|
|
{ type: "bytes" }
|
2015-02-03 22:14:19 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
|
|
|
assert.equal(
|
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
2015-04-23 10:32:05 +00:00
|
|
|
parser.test(
|
2015-02-03 22:14:19 +00:00
|
|
|
"0000000000000000000000000000000000000000000000000000000000000005" +
|
|
|
|
"0000000000000000000000000000000000000000000000000000000000000005" +
|
|
|
|
"68656c6c6f000000000000000000000000000000000000000000000000000000" +
|
|
|
|
"776f726c64000000000000000000000000000000000000000000000000000000")[0],
|
|
|
|
'hello'
|
|
|
|
);
|
|
|
|
assert.equal(
|
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
2015-04-23 10:32:05 +00:00
|
|
|
parser.test(
|
2015-02-03 22:14:19 +00:00
|
|
|
"0000000000000000000000000000000000000000000000000000000000000005" +
|
|
|
|
"0000000000000000000000000000000000000000000000000000000000000005" +
|
|
|
|
"68656c6c6f000000000000000000000000000000000000000000000000000000" +
|
|
|
|
"776f726c64000000000000000000000000000000000000000000000000000000")[1],
|
|
|
|
'world'
|
|
|
|
);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should use proper method name', function () {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
d[0].name = 'helloworld(int)';
|
|
|
|
d[0].outputs = [
|
|
|
|
{ type: "int" }
|
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
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
2015-04-23 10:32:05 +00:00
|
|
|
assert.equal(parser.helloworld("0000000000000000000000000000000000000000000000000000000000000001")[0], 1);
|
|
|
|
assert.equal(parser.helloworld['int']("0000000000000000000000000000000000000000000000000000000000000001")[0], 1);
|
2015-02-03 22:14:19 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('should parse multiple methods', function () {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var d = [{
|
|
|
|
name: "test",
|
|
|
|
type: "function",
|
|
|
|
inputs: [{ type: "int" }],
|
|
|
|
outputs: [{ type: "int" }]
|
|
|
|
},{
|
|
|
|
name: "test2",
|
|
|
|
type: "function",
|
2015-03-13 15:13:43 +00:00
|
|
|
inputs: [{ type: "bytes" }],
|
|
|
|
outputs: [{ type: "bytes" }]
|
2015-02-03 22:14:19 +00:00
|
|
|
}];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
//then
|
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
2015-04-23 10:32:05 +00:00
|
|
|
assert.equal(parser.test("00000000000000000000000000000000000000000000000000000000000001")[0], 1);
|
|
|
|
assert.equal(parser.test2(
|
2015-02-03 22:14:19 +00:00
|
|
|
"0000000000000000000000000000000000000000000000000000000000000005" +
|
|
|
|
"68656c6c6f000000000000000000000000000000000000000000000000000000")[0],
|
|
|
|
"hello"
|
|
|
|
);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should parse output array', function () {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
d[0].outputs = [
|
|
|
|
{ type: 'int[]' }
|
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
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
2015-04-23 10:32:05 +00:00
|
|
|
assert.equal(parser.test(
|
2015-02-03 22:14:19 +00:00
|
|
|
"0000000000000000000000000000000000000000000000000000000000000002" +
|
|
|
|
"0000000000000000000000000000000000000000000000000000000000000005" +
|
|
|
|
"0000000000000000000000000000000000000000000000000000000000000006")[0][0],
|
|
|
|
5
|
|
|
|
);
|
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
2015-04-23 10:32:05 +00:00
|
|
|
assert.equal(parser.test(
|
2015-02-03 22:14:19 +00:00
|
|
|
"0000000000000000000000000000000000000000000000000000000000000002" +
|
|
|
|
"0000000000000000000000000000000000000000000000000000000000000005" +
|
|
|
|
"0000000000000000000000000000000000000000000000000000000000000006")[0][1],
|
|
|
|
6
|
|
|
|
);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
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
2015-04-23 10:32:05 +00:00
|
|
|
it('should parse 0x0 value', function () {
|
2015-02-03 22:14:19 +00:00
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
d[0].outputs = [
|
|
|
|
{ type: 'int' }
|
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
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
2015-04-23 10:32:05 +00:00
|
|
|
assert.equal(parser.test("0x0")[0], 0);
|
2015-02-03 22:14:19 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
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
2015-04-23 10:32:05 +00:00
|
|
|
it('should parse 0x0 value', function () {
|
2015-02-03 22:14:19 +00:00
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
d[0].outputs = [
|
|
|
|
{ type: 'uint' }
|
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
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
2015-04-23 10:32:05 +00:00
|
|
|
assert.equal(parser.test("0x0")[0], 0);
|
2015-02-03 22:14:19 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
2015-03-10 16:41:32 +00:00
|
|
|
it('should throw an incorrect type error', function () {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var d = clone(description);
|
|
|
|
d[0].outputs = [
|
|
|
|
{ type: 'uin' }
|
|
|
|
]
|
|
|
|
|
|
|
|
// when
|
|
|
|
var parser = abi.outputParser(d);
|
|
|
|
|
|
|
|
// then
|
|
|
|
assert.throws(function () {parser.test('0x')}, Error);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2015-02-03 22:14:19 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|