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
01729394
Commit
01729394
authored
Jan 16, 2015
by
Marek Kotewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed #28 and other small node.js issues
parent
2c36d5ff
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
39 additions
and
60 deletions
+39
-60
ethereum.js
dist/ethereum.js
+18
-29
ethereum.js.map
dist/ethereum.js.map
+7
-7
ethereum.min.js
dist/ethereum.min.js
+1
-1
contract.html
example/contract.html
+1
-0
index.js
index.js
+3
-0
abi.js
lib/abi.js
+2
-2
contract.js
lib/contract.js
+1
-5
filter.js
lib/filter.js
+1
-4
providermanager.js
lib/providermanager.js
+1
-3
web3.js
lib/web3.js
+4
-9
No files found.
dist/ethereum.js
View file @
01729394
...
@@ -24,10 +24,10 @@ require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof requ
...
@@ -24,10 +24,10 @@ require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof requ
// TODO: is these line is supposed to be here?
// TODO: is these line is supposed to be here?
if
(
"build"
!==
'build'
)
{
/*
if
(
"build"
!==
'build'
)
{
/*
var
web3 = require('./web3
'); // jshint ignore:line
var
BigNumber = require('bignumber.js
'); // jshint ignore:line
*/
}
*/
}
var
BigNumber
=
require
(
'bignumber.js'
);
var
web3
=
require
(
'./web3'
);
// jshint ignore:line
// TODO: make these be actually accurate instead of falling back onto JS's doubles.
// TODO: make these be actually accurate instead of falling back onto JS's doubles.
var
hexToDec
=
function
(
hex
)
{
var
hexToDec
=
function
(
hex
)
{
...
@@ -308,7 +308,7 @@ module.exports = {
...
@@ -308,7 +308,7 @@ module.exports = {
};
};
},{
"
bignumber.js"
:
undefined
}],
2
:[
function
(
require
,
module
,
exports
){
},{
"
./web3"
:
8
}],
2
:[
function
(
require
,
module
,
exports
){
/*
/*
This file is part of ethereum.js.
This file is part of ethereum.js.
...
@@ -448,11 +448,7 @@ module.exports = AutoProvider;
...
@@ -448,11 +448,7 @@ module.exports = AutoProvider;
* @date 2014
* @date 2014
*/
*/
// TODO: is these line is supposed to be here?
var
web3
=
require
(
'./web3'
);
// jshint ignore:line
if
(
"build"
!==
'build'
)
{
/*
var web3 = require('./web3'); // jshint ignore:line
*/
}
var
abi
=
require
(
'./abi'
);
var
abi
=
require
(
'./abi'
);
/// method signature length in bytes
/// method signature length in bytes
...
@@ -520,7 +516,7 @@ var contract = function (address, desc) {
...
@@ -520,7 +516,7 @@ var contract = function (address, desc) {
module
.
exports
=
contract
;
module
.
exports
=
contract
;
},{
"./abi"
:
1
}],
4
:[
function
(
require
,
module
,
exports
){
},{
"./abi"
:
1
,
"./web3"
:
8
}],
4
:[
function
(
require
,
module
,
exports
){
/*
/*
This file is part of ethereum.js.
This file is part of ethereum.js.
...
@@ -546,10 +542,7 @@ module.exports = contract;
...
@@ -546,10 +542,7 @@ module.exports = contract;
* @date 2014
* @date 2014
*/
*/
// TODO: is these line is supposed to be here?
var
web3
=
require
(
'./web3'
);
// jshint ignore:line
if
(
"build"
!==
'build'
)
{
/*
var web3 = require('./web3'); // jshint ignore:line
*/
}
/// should be used when we want to watch something
/// should be used when we want to watch something
/// it's using inner polling mechanism and is notified about changes
/// it's using inner polling mechanism and is notified about changes
...
@@ -611,7 +604,7 @@ Filter.prototype.logs = function () {
...
@@ -611,7 +604,7 @@ Filter.prototype.logs = function () {
module
.
exports
=
Filter
;
module
.
exports
=
Filter
;
},{}],
5
:[
function
(
require
,
module
,
exports
){
},{
"./web3"
:
8
}],
5
:[
function
(
require
,
module
,
exports
){
/*
/*
This file is part of ethereum.js.
This file is part of ethereum.js.
...
@@ -766,9 +759,7 @@ module.exports = HttpRpcProvider;
...
@@ -766,9 +759,7 @@ module.exports = HttpRpcProvider;
*/
*/
// TODO: is these line is supposed to be here?
// TODO: is these line is supposed to be here?
if
(
"build"
!==
'build'
)
{
/*
var
web3
=
require
(
'./web3'
);
// jshint ignore:line
var web3 = require('./web3'); // jshint ignore:line
*/
}
/**
/**
* Provider manager object prototype
* Provider manager object prototype
...
@@ -863,7 +854,7 @@ ProviderManager.prototype.stopPolling = function (pollId) {
...
@@ -863,7 +854,7 @@ ProviderManager.prototype.stopPolling = function (pollId) {
module
.
exports
=
ProviderManager
;
module
.
exports
=
ProviderManager
;
},{}],
7
:[
function
(
require
,
module
,
exports
){
},{
"./web3"
:
8
}],
7
:[
function
(
require
,
module
,
exports
){
/*
/*
This file is part of ethereum.js.
This file is part of ethereum.js.
...
@@ -948,9 +939,6 @@ module.exports = QtProvider;
...
@@ -948,9 +939,6 @@ module.exports = QtProvider;
* @date 2014
* @date 2014
*/
*/
var
Filter
=
require
(
'./filter'
);
var
ProviderManager
=
require
(
'./providermanager'
);
/// Recursively resolves all promises in given object and replaces the resolved values with promises
/// Recursively resolves all promises in given object and replaces the resolved values with promises
/// @param any object/array/promise/anything else..
/// @param any object/array/promise/anything else..
/// @returns (resolves) object with replaced promises with their result
/// @returns (resolves) object with replaced promises with their result
...
@@ -1244,7 +1232,7 @@ var web3 = {
...
@@ -1244,7 +1232,7 @@ var web3 = {
/// eth object prototype
/// eth object prototype
eth
:
{
eth
:
{
watch
:
function
(
params
)
{
watch
:
function
(
params
)
{
return
new
F
ilter
(
params
,
ethWatch
);
return
new
web3
.
f
ilter
(
params
,
ethWatch
);
}
}
},
},
...
@@ -1254,7 +1242,7 @@ var web3 = {
...
@@ -1254,7 +1242,7 @@ var web3 = {
/// shh object prototype
/// shh object prototype
shh
:
{
shh
:
{
watch
:
function
(
params
)
{
watch
:
function
(
params
)
{
return
new
F
ilter
(
params
,
shhWatch
);
return
new
web3
.
f
ilter
(
params
,
shhWatch
);
}
}
},
},
...
@@ -1312,8 +1300,6 @@ var shhWatch = {
...
@@ -1312,8 +1300,6 @@ var shhWatch = {
setupMethods
(
shhWatch
,
shhWatchMethods
());
setupMethods
(
shhWatch
,
shhWatchMethods
());
web3
.
provider
=
new
ProviderManager
();
web3
.
setProvider
=
function
(
provider
)
{
web3
.
setProvider
=
function
(
provider
)
{
provider
.
onmessage
=
messageHandler
;
provider
.
onmessage
=
messageHandler
;
web3
.
provider
.
set
(
provider
);
web3
.
provider
.
set
(
provider
);
...
@@ -1336,10 +1322,10 @@ function messageHandler(data) {
...
@@ -1336,10 +1322,10 @@ function messageHandler(data) {
}
}
}
}
if
(
typeof
(
module
)
!==
"undefined"
)
module
.
exports
=
web3
;
module
.
exports
=
web3
;
},{
"./filter"
:
4
,
"./providermanager"
:
6
}],
9
:[
function
(
require
,
module
,
exports
){
},{}],
9
:[
function
(
require
,
module
,
exports
){
/*
/*
This file is part of ethereum.js.
This file is part of ethereum.js.
...
@@ -1441,6 +1427,9 @@ if (typeof(module) !== "undefined")
...
@@ -1441,6 +1427,9 @@ if (typeof(module) !== "undefined")
},{}],
"web3"
:[
function
(
require
,
module
,
exports
){
},{}],
"web3"
:[
function
(
require
,
module
,
exports
){
var
web3
=
require
(
'./lib/web3'
);
var
web3
=
require
(
'./lib/web3'
);
var
ProviderManager
=
require
(
'./lib/providermanager'
);
web3
.
provider
=
new
ProviderManager
();
web3
.
filter
=
require
(
'./lib/filter'
);
web3
.
providers
.
WebSocketProvider
=
require
(
'./lib/websocket'
);
web3
.
providers
.
WebSocketProvider
=
require
(
'./lib/websocket'
);
web3
.
providers
.
HttpRpcProvider
=
require
(
'./lib/httprpc'
);
web3
.
providers
.
HttpRpcProvider
=
require
(
'./lib/httprpc'
);
web3
.
providers
.
QtProvider
=
require
(
'./lib/qt'
);
web3
.
providers
.
QtProvider
=
require
(
'./lib/qt'
);
...
@@ -1449,7 +1438,7 @@ web3.eth.contract = require('./lib/contract');
...
@@ -1449,7 +1438,7 @@ web3.eth.contract = require('./lib/contract');
module
.
exports
=
web3
;
module
.
exports
=
web3
;
},{
"./lib/autoprovider"
:
2
,
"./lib/contract"
:
3
,
"./lib/
httprpc"
:
5
,
"./lib/qt"
:
7
,
"./lib/web3"
:
8
,
"./lib/websocket"
:
9
}]},{},[
"web3"
])
},{
"./lib/autoprovider"
:
2
,
"./lib/contract"
:
3
,
"./lib/
filter"
:
4
,
"./lib/httprpc"
:
5
,
"./lib/providermanager"
:
6
,
"./lib/qt"
:
7
,
"./lib/web3"
:
8
,
"./lib/websocket"
:
9
}]},{},[
"web3"
])
//# sourceMappingURL=ethereum.js.map
//# sourceMappingURL=ethereum.js.map
\ No newline at end of file
dist/ethereum.js.map
View file @
01729394
This diff is collapsed.
Click to expand it.
dist/ethereum.min.js
View file @
01729394
This diff is collapsed.
Click to expand it.
example/contract.html
View file @
01729394
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
<head>
<head>
<script
type=
"text/javascript"
src=
"js/es6-promise/promise.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/es6-promise/promise.min.js"
></script>
<script
type=
"text/javascript"
src=
"../node_modules/bignumber.js/bignumber.min.js"
></script>
<script
type=
"text/javascript"
src=
"../dist/ethereum.js"
></script>
<script
type=
"text/javascript"
src=
"../dist/ethereum.js"
></script>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
...
...
index.js
View file @
01729394
var
web3
=
require
(
'./lib/web3'
);
var
web3
=
require
(
'./lib/web3'
);
var
ProviderManager
=
require
(
'./lib/providermanager'
);
web3
.
provider
=
new
ProviderManager
();
web3
.
filter
=
require
(
'./lib/filter'
);
web3
.
providers
.
WebSocketProvider
=
require
(
'./lib/websocket'
);
web3
.
providers
.
WebSocketProvider
=
require
(
'./lib/websocket'
);
web3
.
providers
.
HttpRpcProvider
=
require
(
'./lib/httprpc'
);
web3
.
providers
.
HttpRpcProvider
=
require
(
'./lib/httprpc'
);
web3
.
providers
.
QtProvider
=
require
(
'./lib/qt'
);
web3
.
providers
.
QtProvider
=
require
(
'./lib/qt'
);
...
...
lib/abi.js
View file @
01729394
...
@@ -23,10 +23,10 @@
...
@@ -23,10 +23,10 @@
// TODO: is these line is supposed to be here?
// TODO: is these line is supposed to be here?
if
(
process
.
env
.
NODE_ENV
!==
'build'
)
{
if
(
process
.
env
.
NODE_ENV
!==
'build'
)
{
var
web3
=
require
(
'./web3
'
);
// jshint ignore:line
var
BigNumber
=
require
(
'bignumber.js
'
);
// jshint ignore:line
}
}
var
BigNumber
=
require
(
'bignumber.js'
);
var
web3
=
require
(
'./web3'
);
// jshint ignore:line
// TODO: make these be actually accurate instead of falling back onto JS's doubles.
// TODO: make these be actually accurate instead of falling back onto JS's doubles.
var
hexToDec
=
function
(
hex
)
{
var
hexToDec
=
function
(
hex
)
{
...
...
lib/contract.js
View file @
01729394
...
@@ -20,11 +20,7 @@
...
@@ -20,11 +20,7 @@
* @date 2014
* @date 2014
*/
*/
// TODO: is these line is supposed to be here?
var
web3
=
require
(
'./web3'
);
// jshint ignore:line
if
(
process
.
env
.
NODE_ENV
!==
'build'
)
{
var
web3
=
require
(
'./web3'
);
// jshint ignore:line
}
var
abi
=
require
(
'./abi'
);
var
abi
=
require
(
'./abi'
);
/// method signature length in bytes
/// method signature length in bytes
...
...
lib/filter.js
View file @
01729394
...
@@ -23,10 +23,7 @@
...
@@ -23,10 +23,7 @@
* @date 2014
* @date 2014
*/
*/
// TODO: is these line is supposed to be here?
var
web3
=
require
(
'./web3'
);
// jshint ignore:line
if
(
process
.
env
.
NODE_ENV
!==
'build'
)
{
var
web3
=
require
(
'./web3'
);
// jshint ignore:line
}
/// should be used when we want to watch something
/// should be used when we want to watch something
/// it's using inner polling mechanism and is notified about changes
/// it's using inner polling mechanism and is notified about changes
...
...
lib/providermanager.js
View file @
01729394
...
@@ -24,9 +24,7 @@
...
@@ -24,9 +24,7 @@
*/
*/
// TODO: is these line is supposed to be here?
// TODO: is these line is supposed to be here?
if
(
process
.
env
.
NODE_ENV
!==
'build'
)
{
var
web3
=
require
(
'./web3'
);
// jshint ignore:line
var
web3
=
require
(
'./web3'
);
// jshint ignore:line
}
/**
/**
* Provider manager object prototype
* Provider manager object prototype
...
...
lib/web3.js
View file @
01729394
...
@@ -23,9 +23,6 @@
...
@@ -23,9 +23,6 @@
* @date 2014
* @date 2014
*/
*/
var
Filter
=
require
(
'./filter'
);
var
ProviderManager
=
require
(
'./providermanager'
);
/// Recursively resolves all promises in given object and replaces the resolved values with promises
/// Recursively resolves all promises in given object and replaces the resolved values with promises
/// @param any object/array/promise/anything else..
/// @param any object/array/promise/anything else..
/// @returns (resolves) object with replaced promises with their result
/// @returns (resolves) object with replaced promises with their result
...
@@ -319,7 +316,7 @@ var web3 = {
...
@@ -319,7 +316,7 @@ var web3 = {
/// eth object prototype
/// eth object prototype
eth
:
{
eth
:
{
watch
:
function
(
params
)
{
watch
:
function
(
params
)
{
return
new
F
ilter
(
params
,
ethWatch
);
return
new
web3
.
f
ilter
(
params
,
ethWatch
);
}
}
},
},
...
@@ -329,7 +326,7 @@ var web3 = {
...
@@ -329,7 +326,7 @@ var web3 = {
/// shh object prototype
/// shh object prototype
shh
:
{
shh
:
{
watch
:
function
(
params
)
{
watch
:
function
(
params
)
{
return
new
F
ilter
(
params
,
shhWatch
);
return
new
web3
.
f
ilter
(
params
,
shhWatch
);
}
}
},
},
...
@@ -387,8 +384,6 @@ var shhWatch = {
...
@@ -387,8 +384,6 @@ var shhWatch = {
setupMethods
(
shhWatch
,
shhWatchMethods
());
setupMethods
(
shhWatch
,
shhWatchMethods
());
web3
.
provider
=
new
ProviderManager
();
web3
.
setProvider
=
function
(
provider
)
{
web3
.
setProvider
=
function
(
provider
)
{
provider
.
onmessage
=
messageHandler
;
provider
.
onmessage
=
messageHandler
;
web3
.
provider
.
set
(
provider
);
web3
.
provider
.
set
(
provider
);
...
@@ -411,5 +406,5 @@ function messageHandler(data) {
...
@@ -411,5 +406,5 @@ function messageHandler(data) {
}
}
}
}
if
(
typeof
(
module
)
!==
"undefined"
)
module
.
exports
=
web3
;
module
.
exports
=
web3
;
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