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
fb84fed8
Commit
fb84fed8
authored
Jan 10, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename decodeLocals decodeFromStack
parent
e7c45d29
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
13 additions
and
13 deletions
+13
-13
localDecoder.js
src/solidity/localDecoder.js
+2
-2
Address.js
src/solidity/types/Address.js
+1
-1
ArrayType.js
src/solidity/types/ArrayType.js
+1
-1
Bool.js
src/solidity/types/Bool.js
+1
-1
DynamicByteArray.js
src/solidity/types/DynamicByteArray.js
+1
-1
Enum.js
src/solidity/types/Enum.js
+1
-1
FixedByteArray.js
src/solidity/types/FixedByteArray.js
+1
-1
Int.js
src/solidity/types/Int.js
+1
-1
StringType.js
src/solidity/types/StringType.js
+2
-2
Struct.js
src/solidity/types/Struct.js
+1
-1
Uint.js
src/solidity/types/Uint.js
+1
-1
No files found.
src/solidity/localDecoder.js
View file @
fb84fed8
...
@@ -9,8 +9,8 @@ function solidityLocals (vmtraceIndex, internalTreeCall, stack, memory) {
...
@@ -9,8 +9,8 @@ function solidityLocals (vmtraceIndex, internalTreeCall, stack, memory) {
memory
=
formatMemory
(
memory
)
memory
=
formatMemory
(
memory
)
for
(
var
local
in
scope
.
locals
)
{
for
(
var
local
in
scope
.
locals
)
{
let
variable
=
scope
.
locals
[
local
]
let
variable
=
scope
.
locals
[
local
]
if
(
variable
.
type
.
decode
Locals
)
{
if
(
variable
.
type
.
decode
FromStack
)
{
locals
[
variable
.
name
]
=
variable
.
type
.
decode
Locals
(
variable
.
stackDepth
,
stack
,
memory
)
locals
[
variable
.
name
]
=
variable
.
type
.
decode
FromStack
(
variable
.
stackDepth
,
stack
,
memory
)
}
else
{
}
else
{
locals
[
variable
.
name
]
=
''
locals
[
variable
.
name
]
=
''
}
}
...
...
src/solidity/types/Address.js
View file @
fb84fed8
...
@@ -12,7 +12,7 @@ class Address extends ValueType {
...
@@ -12,7 +12,7 @@ class Address extends ValueType {
return
'0x'
+
value
.
toUpperCase
()
return
'0x'
+
value
.
toUpperCase
()
}
}
decode
Locals
(
stackDepth
,
stack
,
memory
)
{
decode
FromStack
(
stackDepth
,
stack
,
memory
)
{
if
(
stackDepth
>=
stack
.
length
)
{
if
(
stackDepth
>=
stack
.
length
)
{
return
'0x0000000000000000000000000000000000000000'
return
'0x0000000000000000000000000000000000000000'
}
else
{
}
else
{
...
...
src/solidity/types/ArrayType.js
View file @
fb84fed8
...
@@ -56,7 +56,7 @@ class ArrayType {
...
@@ -56,7 +56,7 @@ class ArrayType {
}
}
}
}
decode
Locals
(
stackDepth
,
stack
,
memory
)
{
decode
FromStack
(
stackDepth
,
stack
,
memory
)
{
if
(
stack
.
length
-
1
<
stackDepth
)
{
if
(
stack
.
length
-
1
<
stackDepth
)
{
return
[]
return
[]
}
else
{
// TODO manage decoding locals from storage
}
else
{
// TODO manage decoding locals from storage
...
...
src/solidity/types/Bool.js
View file @
fb84fed8
...
@@ -13,7 +13,7 @@ Bool.prototype.decodeFromStorage = function (location, storageContent) {
...
@@ -13,7 +13,7 @@ Bool.prototype.decodeFromStorage = function (location, storageContent) {
return
value
!==
'00'
return
value
!==
'00'
}
}
Bool
.
prototype
.
decode
Locals
=
function
(
stackDepth
,
stack
,
memory
)
{
Bool
.
prototype
.
decode
FromStack
=
function
(
stackDepth
,
stack
,
memory
)
{
if
(
stack
.
length
-
1
<
stackDepth
)
{
if
(
stack
.
length
-
1
<
stackDepth
)
{
return
false
return
false
}
else
{
}
else
{
...
...
src/solidity/types/DynamicByteArray.js
View file @
fb84fed8
...
@@ -35,7 +35,7 @@ class DynamicByteArray extends ValueType {
...
@@ -35,7 +35,7 @@ class DynamicByteArray extends ValueType {
}
}
}
}
decode
Locals
(
stackDepth
,
stack
,
memory
)
{
decode
FromStack
(
stackDepth
,
stack
,
memory
)
{
if
(
stack
.
length
-
1
<
stackDepth
)
{
if
(
stack
.
length
-
1
<
stackDepth
)
{
return
{
return
{
value
:
'0x'
,
value
:
'0x'
,
...
...
src/solidity/types/Enum.js
View file @
fb84fed8
...
@@ -21,7 +21,7 @@ Enum.prototype.decodeFromStorage = function (location, storageContent) {
...
@@ -21,7 +21,7 @@ Enum.prototype.decodeFromStorage = function (location, storageContent) {
return
output
(
value
,
this
.
enumDef
)
return
output
(
value
,
this
.
enumDef
)
}
}
Enum
.
prototype
.
decode
Locals
=
function
(
stackDepth
,
stack
,
memory
)
{
Enum
.
prototype
.
decode
FromStack
=
function
(
stackDepth
,
stack
,
memory
)
{
var
defaultValue
=
0
var
defaultValue
=
0
if
(
stack
.
length
-
1
<
stackDepth
)
{
if
(
stack
.
length
-
1
<
stackDepth
)
{
defaultValue
=
0
defaultValue
=
0
...
...
src/solidity/types/FixedByteArray.js
View file @
fb84fed8
...
@@ -12,7 +12,7 @@ class FixedByteArray extends ValueType {
...
@@ -12,7 +12,7 @@ class FixedByteArray extends ValueType {
return
'0x'
+
value
.
toUpperCase
()
return
'0x'
+
value
.
toUpperCase
()
}
}
decode
Locals
(
stackDepth
,
stack
,
memory
)
{
decode
FromStack
(
stackDepth
,
stack
,
memory
)
{
if
(
stack
.
length
-
1
<
stackDepth
)
{
if
(
stack
.
length
-
1
<
stackDepth
)
{
return
'0x'
return
'0x'
}
else
{
}
else
{
...
...
src/solidity/types/Int.js
View file @
fb84fed8
...
@@ -12,7 +12,7 @@ Int.prototype.decodeFromStorage = function (location, storageContent) {
...
@@ -12,7 +12,7 @@ Int.prototype.decodeFromStorage = function (location, storageContent) {
return
util
.
decodeInt
(
location
,
storageContent
,
this
.
storageBytes
,
true
)
return
util
.
decodeInt
(
location
,
storageContent
,
this
.
storageBytes
,
true
)
}
}
Int
.
prototype
.
decode
Locals
=
function
(
stackDepth
,
stack
,
memory
)
{
Int
.
prototype
.
decode
FromStack
=
function
(
stackDepth
,
stack
,
memory
)
{
if
(
stackDepth
>=
stack
.
length
)
{
if
(
stackDepth
>=
stack
.
length
)
{
return
'0'
return
'0'
}
else
{
}
else
{
...
...
src/solidity/types/StringType.js
View file @
fb84fed8
...
@@ -12,8 +12,8 @@ class StringType extends DynamicBytes {
...
@@ -12,8 +12,8 @@ class StringType extends DynamicBytes {
return
format
(
decoded
)
return
format
(
decoded
)
}
}
decode
Locals
(
stackDepth
,
stack
,
memory
)
{
decode
FromStack
(
stackDepth
,
stack
,
memory
)
{
var
decoded
=
super
.
decode
Locals
(
stackDepth
,
stack
,
memory
)
var
decoded
=
super
.
decode
FromStack
(
stackDepth
,
stack
,
memory
)
return
format
(
decoded
)
return
format
(
decoded
)
}
}
...
...
src/solidity/types/Struct.js
View file @
fb84fed8
...
@@ -21,7 +21,7 @@ class Struct {
...
@@ -21,7 +21,7 @@ class Struct {
return
ret
return
ret
}
}
decode
Locals
(
stackDepth
,
stack
,
memory
)
{
decode
FromStack
(
stackDepth
,
stack
,
memory
)
{
if
(
stack
.
length
-
1
<
stackDepth
)
{
if
(
stack
.
length
-
1
<
stackDepth
)
{
return
{}
return
{}
}
else
{
// TODO manage decoding locals from storage
}
else
{
// TODO manage decoding locals from storage
...
...
src/solidity/types/Uint.js
View file @
fb84fed8
...
@@ -12,7 +12,7 @@ Uint.prototype.decodeFromStorage = function (location, storageContent) {
...
@@ -12,7 +12,7 @@ Uint.prototype.decodeFromStorage = function (location, storageContent) {
return
util
.
decodeInt
(
location
,
storageContent
,
this
.
storageBytes
,
false
)
return
util
.
decodeInt
(
location
,
storageContent
,
this
.
storageBytes
,
false
)
}
}
Uint
.
prototype
.
decode
Locals
=
function
(
stackDepth
,
stack
,
memory
)
{
Uint
.
prototype
.
decode
FromStack
=
function
(
stackDepth
,
stack
,
memory
)
{
if
(
stackDepth
>=
stack
.
length
)
{
if
(
stackDepth
>=
stack
.
length
)
{
return
'0'
return
'0'
}
else
{
}
else
{
...
...
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