Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
1860b3df
Commit
1860b3df
authored
Feb 03, 2015
by
Marek Kotewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gulp
parent
03faec9d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
5 deletions
+35
-5
ethereum.js
dist/ethereum.js
+32
-2
ethereum.js.map
dist/ethereum.js.map
+2
-2
ethereum.min.js
dist/ethereum.min.js
+1
-1
No files found.
dist/ethereum.js
View file @
1860b3df
...
@@ -510,7 +510,7 @@ var utils = require('./utils');
...
@@ -510,7 +510,7 @@ var utils = require('./utils');
/// @returns array of (not?) indexed params
/// @returns array of (not?) indexed params
var
filterInputs
=
function
(
inputs
,
indexed
)
{
var
filterInputs
=
function
(
inputs
,
indexed
)
{
return
inputs
.
filter
(
function
(
current
)
{
return
inputs
.
filter
(
function
(
current
)
{
return
inputs
.
indexed
===
indexed
;
return
current
.
indexed
===
indexed
;
});
});
};
};
...
@@ -556,10 +556,40 @@ var inputParser = function (address, signature, event) {
...
@@ -556,10 +556,40 @@ var inputParser = function (address, signature, event) {
};
};
};
};
var
getArgumentsObject
=
function
(
inputs
,
indexed
,
notIndexed
)
{
var
indexedCopy
=
indexed
.
slice
();
var
notIndexedCopy
=
notIndexed
.
slice
();
return
inputs
.
reduce
(
function
(
acc
,
current
)
{
var
value
;
if
(
current
.
indexed
)
value
=
indexed
.
splice
(
0
,
1
)[
0
];
else
value
=
notIndexed
.
splice
(
0
,
1
)[
0
];
acc
[
current
.
name
]
=
value
;
return
acc
;
},
{});
};
var
outputParser
=
function
(
event
)
{
var
outputParser
=
function
(
event
)
{
return
function
(
output
)
{
return
function
(
output
)
{
var
result
=
{
event
:
utils
.
extractDisplayName
(
event
.
name
),
number
:
output
.
number
};
var
indexedOutputs
=
filterInputs
(
event
.
inputs
,
true
);
var
indexedData
=
"0x"
+
output
.
topic
.
slice
(
1
,
output
.
topic
.
length
).
map
(
function
(
topic
)
{
return
topic
.
slice
(
2
);
}).
join
(
""
);
var
indexedRes
=
abi
.
formatOutput
(
indexedOutputs
,
indexedData
);
var
notIndexedOutputs
=
filterInputs
(
event
.
inputs
,
false
);
var
notIndexedRes
=
abi
.
formatOutput
(
notIndexedOutputs
,
output
.
data
);
result
.
args
=
getArgumentsObject
(
event
.
inputs
,
indexedRes
,
notIndexedRes
);
return
result
;
};
};
};
};
...
...
dist/ethereum.js.map
View file @
1860b3df
This diff is collapsed.
Click to expand it.
dist/ethereum.min.js
View file @
1860b3df
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment