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
543a87c6
Commit
543a87c6
authored
Jan 09, 2015
by
Marek Kotewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
method signature length defined
parent
a5907a82
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
9 deletions
+17
-9
ethereum.js
dist/ethereum.js
+8
-3
ethereum.js.map
dist/ethereum.js.map
+4
-4
ethereum.min.js
dist/ethereum.min.js
+1
-1
contract.js
lib/contract.js
+4
-1
No files found.
dist/ethereum.js
View file @
543a87c6
...
@@ -411,6 +411,9 @@ if ("build" !== 'build') {/*
...
@@ -411,6 +411,9 @@ if ("build" !== 'build') {/*
var
abi
=
require
(
'./abi'
);
var
abi
=
require
(
'./abi'
);
// method signature length in bytes
var
ETH_METHOD_SIGNATURE_LENGTH
=
4
;
var
contract
=
function
(
address
,
desc
)
{
var
contract
=
function
(
address
,
desc
)
{
var
inputParser
=
abi
.
inputParser
(
desc
);
var
inputParser
=
abi
.
inputParser
(
desc
);
var
outputParser
=
abi
.
outputParser
(
desc
);
var
outputParser
=
abi
.
outputParser
(
desc
);
...
@@ -431,7 +434,7 @@ var contract = function (address, desc) {
...
@@ -431,7 +434,7 @@ var contract = function (address, desc) {
extra
=
extra
||
{};
extra
=
extra
||
{};
extra
.
to
=
address
;
extra
.
to
=
address
;
return
abi
.
methodSignature
(
desc
,
method
.
name
).
then
(
function
(
signature
)
{
return
abi
.
methodSignature
(
desc
,
method
.
name
).
then
(
function
(
signature
)
{
extra
.
data
=
signature
.
slice
(
0
,
10
)
+
parsed
;
extra
.
data
=
signature
.
slice
(
0
,
2
+
ETH_METHOD_SIGNATURE_LENGTH
*
2
)
+
parsed
;
return
web3
.
eth
.
call
(
extra
).
then
(
onSuccess
);
return
web3
.
eth
.
call
(
extra
).
then
(
onSuccess
);
});
});
},
},
...
@@ -1101,7 +1104,8 @@ function messageHandler(data) {
...
@@ -1101,7 +1104,8 @@ function messageHandler(data) {
}
}
}
}
module
.
exports
=
web3
;
if
(
typeof
(
module
)
!==
"undefined"
)
module
.
exports
=
web3
;
},{}],
7
:[
function
(
require
,
module
,
exports
){
},{}],
7
:[
function
(
require
,
module
,
exports
){
/*
/*
...
@@ -1180,7 +1184,8 @@ Object.defineProperty(WebSocketProvider.prototype, "onmessage", {
...
@@ -1180,7 +1184,8 @@ Object.defineProperty(WebSocketProvider.prototype, "onmessage", {
set
:
function
(
provider
)
{
this
.
onMessage
(
provider
);
}
set
:
function
(
provider
)
{
this
.
onMessage
(
provider
);
}
});
});
module
.
exports
=
WebSocketProvider
;
if
(
typeof
(
module
)
!==
"undefined"
)
module
.
exports
=
WebSocketProvider
;
},{}],
"web3"
:[
function
(
require
,
module
,
exports
){
},{}],
"web3"
:[
function
(
require
,
module
,
exports
){
var
web3
=
require
(
'./lib/web3'
);
var
web3
=
require
(
'./lib/web3'
);
...
...
dist/ethereum.js.map
View file @
543a87c6
This diff is collapsed.
Click to expand it.
dist/ethereum.min.js
View file @
543a87c6
This diff is collapsed.
Click to expand it.
lib/contract.js
View file @
543a87c6
...
@@ -27,6 +27,9 @@ if (process.env.NODE_ENV !== 'build') {
...
@@ -27,6 +27,9 @@ if (process.env.NODE_ENV !== 'build') {
var
abi
=
require
(
'./abi'
);
var
abi
=
require
(
'./abi'
);
// method signature length in bytes
var
ETH_METHOD_SIGNATURE_LENGTH
=
4
;
var
contract
=
function
(
address
,
desc
)
{
var
contract
=
function
(
address
,
desc
)
{
var
inputParser
=
abi
.
inputParser
(
desc
);
var
inputParser
=
abi
.
inputParser
(
desc
);
var
outputParser
=
abi
.
outputParser
(
desc
);
var
outputParser
=
abi
.
outputParser
(
desc
);
...
@@ -47,7 +50,7 @@ var contract = function (address, desc) {
...
@@ -47,7 +50,7 @@ var contract = function (address, desc) {
extra
=
extra
||
{};
extra
=
extra
||
{};
extra
.
to
=
address
;
extra
.
to
=
address
;
return
abi
.
methodSignature
(
desc
,
method
.
name
).
then
(
function
(
signature
)
{
return
abi
.
methodSignature
(
desc
,
method
.
name
).
then
(
function
(
signature
)
{
extra
.
data
=
signature
.
slice
(
0
,
10
)
+
parsed
;
extra
.
data
=
signature
.
slice
(
0
,
2
+
ETH_METHOD_SIGNATURE_LENGTH
*
2
)
+
parsed
;
return
web3
.
eth
.
call
(
extra
).
then
(
onSuccess
);
return
web3
.
eth
.
call
(
extra
).
then
(
onSuccess
);
});
});
},
},
...
...
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