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
7869294a
Commit
7869294a
authored
Jan 25, 2015
by
Gav Wood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes to ethereum.js and standard.js.
parent
61a01588
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
5 deletions
+29
-5
ethereum.js
dist/ethereum.js
+13
-1
ethereum.js.map
dist/ethereum.js.map
+2
-2
ethereum.min.js
dist/ethereum.min.js
+1
-1
contract.js
lib/contract.js
+13
-1
No files found.
dist/ethereum.js
View file @
7869294a
...
...
@@ -448,7 +448,7 @@ var abi = require('./abi');
* var myContract = web3.eth.contract('0x0123123121', abi); // creation of contract object
*
* myContract.myMethod('this is test string param for call'); // myMethod call (implicit, default)
* myContract.
myMethod('this is test string param for call').call(
); // myMethod call (explicit)
* myContract.
call().myMethod('this is test string param for call'
); // myMethod call (explicit)
* myContract.transact().myMethod('this is test string param for transact'); // myMethod transact
*
* @param address - address of the contract, which should be called
...
...
@@ -457,6 +457,18 @@ var abi = require('./abi');
*/
var
contract
=
function
(
address
,
desc
)
{
desc
.
forEach
(
function
(
method
)
{
// workaround for invalid assumption that method.name is the full anonymous prototype of the method.
// it's not. it's just the name. the rest of the code assumes it's actually the anonymous
// prototype, so we make it so as a workaround.
if
(
method
.
name
.
indexOf
(
'('
)
===
-
1
)
{
var
displayName
=
method
.
name
;
var
typeName
=
method
.
inputs
.
map
(
function
(
i
){
return
i
.
type
}).
join
();
method
.
name
=
displayName
+
'('
+
typeName
+
')'
;
}
});
var
inputParser
=
abi
.
inputParser
(
desc
);
var
outputParser
=
abi
.
outputParser
(
desc
);
...
...
dist/ethereum.js.map
View file @
7869294a
This diff is collapsed.
Click to expand it.
dist/ethereum.min.js
View file @
7869294a
This diff is collapsed.
Click to expand it.
lib/contract.js
View file @
7869294a
...
...
@@ -37,7 +37,7 @@ var abi = require('./abi');
* var myContract = web3.eth.contract('0x0123123121', abi); // creation of contract object
*
* myContract.myMethod('this is test string param for call'); // myMethod call (implicit, default)
* myContract.
myMethod('this is test string param for call').call(
); // myMethod call (explicit)
* myContract.
call().myMethod('this is test string param for call'
); // myMethod call (explicit)
* myContract.transact().myMethod('this is test string param for transact'); // myMethod transact
*
* @param address - address of the contract, which should be called
...
...
@@ -46,6 +46,18 @@ var abi = require('./abi');
*/
var
contract
=
function
(
address
,
desc
)
{
desc
.
forEach
(
function
(
method
)
{
// workaround for invalid assumption that method.name is the full anonymous prototype of the method.
// it's not. it's just the name. the rest of the code assumes it's actually the anonymous
// prototype, so we make it so as a workaround.
if
(
method
.
name
.
indexOf
(
'('
)
===
-
1
)
{
var
displayName
=
method
.
name
;
var
typeName
=
method
.
inputs
.
map
(
function
(
i
){
return
i
.
type
}).
join
();
method
.
name
=
displayName
+
'('
+
typeName
+
')'
;
}
});
var
inputParser
=
abi
.
inputParser
(
desc
);
var
outputParser
=
abi
.
outputParser
(
desc
);
...
...
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