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
d5166918
Commit
d5166918
authored
Jan 31, 2015
by
Marek Kotewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed event signatures
parent
e6c0ec72
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
10 deletions
+20
-10
ethereum.js
dist/ethereum.js
+8
-3
ethereum.js.map
dist/ethereum.js.map
+3
-3
ethereum.min.js
dist/ethereum.min.js
+1
-1
abi.js
lib/abi.js
+6
-1
contract.js
lib/contract.js
+2
-2
No files found.
dist/ethereum.js
View file @
d5166918
...
@@ -196,12 +196,17 @@ var signatureFromAscii = function (name) {
...
@@ -196,12 +196,17 @@ var signatureFromAscii = function (name) {
return
web3
.
sha3
(
web3
.
fromAscii
(
name
)).
slice
(
0
,
2
+
c
.
ETH_SIGNATURE_LENGTH
*
2
);
return
web3
.
sha3
(
web3
.
fromAscii
(
name
)).
slice
(
0
,
2
+
c
.
ETH_SIGNATURE_LENGTH
*
2
);
};
};
var
eventSignatureFromAscii
=
function
(
name
)
{
return
web3
.
sha3
(
web3
.
fromAscii
(
name
));
};
module
.
exports
=
{
module
.
exports
=
{
inputParser
:
inputParser
,
inputParser
:
inputParser
,
outputParser
:
outputParser
,
outputParser
:
outputParser
,
formatInput
:
formatInput
,
formatInput
:
formatInput
,
formatOutput
:
formatOutput
,
formatOutput
:
formatOutput
,
signatureFromAscii
:
signatureFromAscii
signatureFromAscii
:
signatureFromAscii
,
eventSignatureFromAscii
:
eventSignatureFromAscii
};
};
...
@@ -367,7 +372,7 @@ var addEventRelatedPropertiesToContract = function (contract, desc, address) {
...
@@ -367,7 +372,7 @@ var addEventRelatedPropertiesToContract = function (contract, desc, address) {
Object
.
defineProperty
(
contract
,
'topic'
,
{
Object
.
defineProperty
(
contract
,
'topic'
,
{
get
:
function
()
{
get
:
function
()
{
return
utils
.
filterEvents
(
desc
).
map
(
function
(
e
)
{
return
utils
.
filterEvents
(
desc
).
map
(
function
(
e
)
{
return
abi
.
s
ignatureFromAscii
(
e
.
name
);
return
abi
.
eventS
ignatureFromAscii
(
e
.
name
);
});
});
}
}
});
});
...
@@ -380,7 +385,7 @@ var addEventsToContract = function (contract, desc, address) {
...
@@ -380,7 +385,7 @@ var addEventsToContract = function (contract, desc, address) {
var
impl
=
function
()
{
var
impl
=
function
()
{
var
params
=
Array
.
prototype
.
slice
.
call
(
arguments
);
var
params
=
Array
.
prototype
.
slice
.
call
(
arguments
);
var
signature
=
abi
.
s
ignatureFromAscii
(
e
.
name
);
var
signature
=
abi
.
eventS
ignatureFromAscii
(
e
.
name
);
var
event
=
eventImpl
(
address
,
signature
,
e
);
var
event
=
eventImpl
(
address
,
signature
,
e
);
var
o
=
event
.
apply
(
null
,
params
);
var
o
=
event
.
apply
(
null
,
params
);
return
web3
.
eth
.
watch
(
o
);
return
web3
.
eth
.
watch
(
o
);
...
...
dist/ethereum.js.map
View file @
d5166918
This diff is collapsed.
Click to expand it.
dist/ethereum.min.js
View file @
d5166918
This diff is collapsed.
Click to expand it.
lib/abi.js
View file @
d5166918
...
@@ -195,11 +195,16 @@ var signatureFromAscii = function (name) {
...
@@ -195,11 +195,16 @@ var signatureFromAscii = function (name) {
return
web3
.
sha3
(
web3
.
fromAscii
(
name
)).
slice
(
0
,
2
+
c
.
ETH_SIGNATURE_LENGTH
*
2
);
return
web3
.
sha3
(
web3
.
fromAscii
(
name
)).
slice
(
0
,
2
+
c
.
ETH_SIGNATURE_LENGTH
*
2
);
};
};
var
eventSignatureFromAscii
=
function
(
name
)
{
return
web3
.
sha3
(
web3
.
fromAscii
(
name
));
};
module
.
exports
=
{
module
.
exports
=
{
inputParser
:
inputParser
,
inputParser
:
inputParser
,
outputParser
:
outputParser
,
outputParser
:
outputParser
,
formatInput
:
formatInput
,
formatInput
:
formatInput
,
formatOutput
:
formatOutput
,
formatOutput
:
formatOutput
,
signatureFromAscii
:
signatureFromAscii
signatureFromAscii
:
signatureFromAscii
,
eventSignatureFromAscii
:
eventSignatureFromAscii
};
};
lib/contract.js
View file @
d5166918
...
@@ -124,7 +124,7 @@ var addEventRelatedPropertiesToContract = function (contract, desc, address) {
...
@@ -124,7 +124,7 @@ var addEventRelatedPropertiesToContract = function (contract, desc, address) {
Object
.
defineProperty
(
contract
,
'topic'
,
{
Object
.
defineProperty
(
contract
,
'topic'
,
{
get
:
function
()
{
get
:
function
()
{
return
utils
.
filterEvents
(
desc
).
map
(
function
(
e
)
{
return
utils
.
filterEvents
(
desc
).
map
(
function
(
e
)
{
return
abi
.
s
ignatureFromAscii
(
e
.
name
);
return
abi
.
eventS
ignatureFromAscii
(
e
.
name
);
});
});
}
}
});
});
...
@@ -137,7 +137,7 @@ var addEventsToContract = function (contract, desc, address) {
...
@@ -137,7 +137,7 @@ var addEventsToContract = function (contract, desc, address) {
var
impl
=
function
()
{
var
impl
=
function
()
{
var
params
=
Array
.
prototype
.
slice
.
call
(
arguments
);
var
params
=
Array
.
prototype
.
slice
.
call
(
arguments
);
var
signature
=
abi
.
s
ignatureFromAscii
(
e
.
name
);
var
signature
=
abi
.
eventS
ignatureFromAscii
(
e
.
name
);
var
event
=
eventImpl
(
address
,
signature
,
e
);
var
event
=
eventImpl
(
address
,
signature
,
e
);
var
o
=
event
.
apply
(
null
,
params
);
var
o
=
event
.
apply
(
null
,
params
);
return
web3
.
eth
.
watch
(
o
);
return
web3
.
eth
.
watch
(
o
);
...
...
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