mirror of
https://github.com/status-im/web3.js.git
synced 2025-02-23 19:48:13 +00:00
fixed encoding of empty arrays
This commit is contained in:
parent
16861fc194
commit
9abf38a349
2
dist/web3-light.js
vendored
2
dist/web3-light.js
vendored
@ -577,7 +577,7 @@ SolidityParam.prototype.combine = function (param) {
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
SolidityParam.prototype.isDynamic = function () {
|
||||
return this.value.length > 64;
|
||||
return this.value.length > 64 || this.offset;
|
||||
};
|
||||
|
||||
/**
|
||||
|
2
dist/web3-light.js.map
vendored
2
dist/web3-light.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/web3-light.min.js
vendored
2
dist/web3-light.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/web3.js
vendored
2
dist/web3.js
vendored
@ -577,7 +577,7 @@ SolidityParam.prototype.combine = function (param) {
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
SolidityParam.prototype.isDynamic = function () {
|
||||
return this.value.length > 64;
|
||||
return this.value.length > 64 || this.offset;
|
||||
};
|
||||
|
||||
/**
|
||||
|
2
dist/web3.js.map
vendored
2
dist/web3.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/web3.min.js
vendored
2
dist/web3.min.js
vendored
File diff suppressed because one or more lines are too long
@ -72,7 +72,7 @@ SolidityParam.prototype.combine = function (param) {
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
SolidityParam.prototype.isDynamic = function () {
|
||||
return this.value.length > 64;
|
||||
return this.value.length > 64 || this.offset;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -24,6 +24,8 @@ describe('lib/solidity/coder', function () {
|
||||
test({ type: 'bytes', value: 'gavofyork', expected: '0000000000000000000000000000000000000000000000000000000000000020' +
|
||||
'0000000000000000000000000000000000000000000000000000000000000009' +
|
||||
'6761766f66796f726b0000000000000000000000000000000000000000000000'});
|
||||
test({ type: 'int[]', value: [], expected: '0000000000000000000000000000000000000000000000000000000000000020' +
|
||||
'0000000000000000000000000000000000000000000000000000000000000000'});
|
||||
test({ type: 'int[]', value: [3], expected: '0000000000000000000000000000000000000000000000000000000000000020' +
|
||||
'0000000000000000000000000000000000000000000000000000000000000001' +
|
||||
'0000000000000000000000000000000000000000000000000000000000000003'});
|
||||
|
Loading…
x
Reference in New Issue
Block a user