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
d6a92b18
Commit
d6a92b18
authored
Jan 22, 2015
by
Marek Kotewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed natspec example
parent
5e623f14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
natspec_contract.html
example/natspec_contract.html
+8
-9
No files found.
example/natspec_contract.html
View file @
d6a92b18
...
...
@@ -9,7 +9,7 @@
<script
type=
"text/javascript"
>
var
web3
=
require
(
'web3'
);
web3
.
setProvider
(
new
web3
.
providers
.
Auto
Provider
());
web3
.
setProvider
(
new
web3
.
providers
.
QtSync
Provider
());
// solidity source code
var
source
=
""
+
...
...
@@ -45,20 +45,19 @@
document
.
getElementById
(
'source'
).
innerText
=
source
;
// create contract
web3
.
eth
.
transact
({
code
:
web3
.
eth
.
solidity
(
source
)}).
then
(
function
(
address
)
{
contract
=
web3
.
eth
.
contract
(
address
,
desc
);
document
.
getElementById
(
'call'
).
style
.
visibility
=
'visible'
;
});
var
address
=
web3
.
eth
.
transact
({
code
:
web3
.
eth
.
solidity
(
source
)});
contract
=
web3
.
eth
.
contract
(
address
,
desc
);
document
.
getElementById
(
'call'
).
style
.
visibility
=
'visible'
;
}
function
callExampleContract
()
{
// this should be generated by ethereum
var
param
=
parseInt
(
document
.
getElementById
(
'value'
).
value
);
//
call the contract
contract
.
multiply
(
param
).
transact
().
then
(
function
(
res
)
{
document
.
getElementById
(
'result'
).
innerText
=
res
[
0
]
;
})
;
//
transaction does not return any result, cause it's not synchronous and we don't know,
// when it will be processed
contract
.
multiply
(
param
).
transact
()
;
document
.
getElementById
(
'result'
).
innerText
=
'transaction made'
;
}
</script>
...
...
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