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
b6c0e53d
Commit
b6c0e53d
authored
Jan 13, 2015
by
Gav Wood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Auto-generated commits, too.
parent
e95bb34e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
14 deletions
+18
-14
ethereum.js
dist/ethereum.js
+15
-11
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 @
b6c0e53d
...
@@ -85,6 +85,18 @@ var calcRealPadding = function (type, expected) {
...
@@ -85,6 +85,18 @@ var calcRealPadding = function (type, expected) {
var
setupInputTypes
=
function
()
{
var
setupInputTypes
=
function
()
{
// convert from int, decimal-string, prefixed hex string whatever into a bare hex string.
var
formatStandard
=
function
(
value
)
{
if
(
typeof
value
===
"number"
)
return
value
.
toString
(
16
);
else
if
(
typeof
value
===
"string"
&&
value
.
indexOf
(
'0x'
)
===
0
)
return
value
.
substr
(
2
);
else
if
(
typeof
value
===
"string"
)
return
web3
.
toHex
(
value
);
else
return
(
+
value
).
toString
(
16
);
};
var
prefixedType
=
function
(
prefix
,
calcPadding
)
{
var
prefixedType
=
function
(
prefix
,
calcPadding
)
{
return
function
(
type
,
value
)
{
return
function
(
type
,
value
)
{
var
expected
=
prefix
;
var
expected
=
prefix
;
...
@@ -99,15 +111,7 @@ var setupInputTypes = function () {
...
@@ -99,15 +111,7 @@ var setupInputTypes = function () {
if
(
prefix
===
"string"
)
if
(
prefix
===
"string"
)
return
web3
.
fromAscii
(
value
,
padding
).
substr
(
2
);
return
web3
.
fromAscii
(
value
,
padding
).
substr
(
2
);
if
(
typeof
value
===
"number"
)
return
padLeft
(
formatStandard
(
value
),
padding
*
2
);
value
=
value
.
toString
(
16
);
else
if
(
typeof
value
===
"string"
)
value
=
web3
.
toHex
(
value
);
else
if
(
value
.
indexOf
(
'0x'
)
===
0
)
value
=
value
.
substr
(
2
);
else
value
=
(
+
value
).
toString
(
16
);
return
padLeft
(
value
,
padding
*
2
);
};
};
};
};
...
@@ -124,7 +128,7 @@ var setupInputTypes = function () {
...
@@ -124,7 +128,7 @@ var setupInputTypes = function () {
};
};
var
formatBool
=
function
(
value
)
{
var
formatBool
=
function
(
value
)
{
return
value
?
'0
x1'
:
'0x
0'
;
return
value
?
'0
1'
:
'0
0'
;
};
};
return
[
return
[
...
@@ -134,7 +138,7 @@ var setupInputTypes = function () {
...
@@ -134,7 +138,7 @@ var setupInputTypes = function () {
prefixedType
(
'string'
,
calcBytePadding
),
prefixedType
(
'string'
,
calcBytePadding
),
prefixedType
(
'real'
,
calcRealPadding
),
prefixedType
(
'real'
,
calcRealPadding
),
prefixedType
(
'ureal'
,
calcRealPadding
),
prefixedType
(
'ureal'
,
calcRealPadding
),
namedType
(
'address'
,
20
),
namedType
(
'address'
,
20
,
formatStandard
),
namedType
(
'bool'
,
1
,
formatBool
),
namedType
(
'bool'
,
1
,
formatBool
),
];
];
};
};
...
...
dist/ethereum.js.map
View file @
b6c0e53d
This diff is collapsed.
Click to expand it.
dist/ethereum.min.js
View file @
b6c0e53d
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