Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
b0d2e867
Commit
b0d2e867
authored
Oct 08, 2015
by
d11e9
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arg trying to get vm to work
parent
477b7660
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
index.html
index.html
+0
-2
universal-dapp.js
libs/universal-dapp.js
+2
-2
No files found.
index.html
View file @
b0d2e867
...
...
@@ -42,8 +42,6 @@ THE SOFTWARE.
<script
src=
"libs/mode-solidity.js"
></script>
<script
src=
"bin/soljson-latest.js"
></script>
<script
src=
"libs/ethereumjs-vm.js"
></script>
<script
src=
"libs/ethereumjs-account.js"
></script>
<script
src=
"libs/ethereumjs-tx.js"
></script>
<script
src=
"libs/universal-dapp.js"
></script>
<script
src=
"libs/web3.min.js"
></script>
<script
src=
"ballot.sol.js"
></script>
...
...
libs/universal-dapp.js
View file @
b0d2e867
...
...
@@ -15,7 +15,7 @@ function UniversalDApp (contracts, options) {
this
.
secretKey
=
'3cd7232cd6f3fc66a57a6bedc1a8ed6c228fff0a327e169c2bcc5e869ed49511'
this
.
publicKey
=
'0406cc661590d48ee972944b35ad13ff03c7876eae3fd191e8a2f77311b0a3c6613407b5005e63d7d8d76b89d5f900cde691497688bb281e07a5052ff61edebdc0'
this
.
address
=
ethUtil
.
pubToAddress
(
new
Buffer
(
this
.
publicKey
,
'hex'
));
this
.
account
=
new
Eth
Account
();
this
.
account
=
new
Account
();
this
.
account
.
balance
=
'f00000000000000001'
;
this
.
nonce
=
0
;
this
.
vm
.
stateManager
.
trie
.
put
(
this
.
address
,
this
.
account
.
serialize
());
...
...
@@ -406,7 +406,7 @@ UniversalDApp.prototype.runTx = function( data, args, cb) {
}
}
else
{
try
{
var
tx
=
new
Eth
Tx
({
var
tx
=
new
Tx
({
nonce
:
new
Buffer
([
this
.
nonce
++
]),
//@todo count beyond 255
gasPrice
:
'01'
,
gasLimit
:
'3000000000'
,
//plenty
...
...
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