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
b7b3249b
Commit
b7b3249b
authored
Dec 14, 2016
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decodeFromMemory DynamicByteArray
parent
185f2ff3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
DynamicByteArray.js
src/solidity/types/DynamicByteArray.js
+11
-7
No files found.
src/solidity/types/DynamicByteArray.js
View file @
b7b3249b
...
...
@@ -39,17 +39,21 @@ DynamicByteArray.prototype.decodeLocals = function (stackHeight, stack, memory)
if
(
stack
.
length
-
1
<
stackHeight
)
{
return
{
value
:
'0x'
,
length
:
'0x'
length
:
'0x
0
'
}
}
else
{
var
offset
=
stack
[
stack
.
length
-
1
-
stackHeight
]
offset
=
2
*
parseInt
(
offset
,
16
)
var
length
=
memory
.
substr
(
offset
,
64
)
length
=
parseInt
(
length
,
16
)
return
{
length
:
2
*
length
,
value
:
'0x'
+
memory
.
substr
(
offset
+
64
,
2
*
length
)
}
return
this
.
decodeFromMemory
(
offset
,
memory
)
}
}
DynamicByteArray
.
prototype
.
decodeFromMemory
=
function
(
offset
,
memory
)
{
var
length
=
memory
.
substr
(
offset
,
64
)
length
=
2
*
parseInt
(
length
,
16
)
return
{
length
:
'0x'
+
length
.
toString
(
16
),
value
:
'0x'
+
memory
.
substr
(
offset
+
64
,
length
)
}
}
...
...
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