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
c08508a0
Commit
c08508a0
authored
Dec 13, 2016
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
string decoding
parent
fbe4b47a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
StringType.js
src/solidity/types/StringType.js
+9
-0
No files found.
src/solidity/types/StringType.js
View file @
c08508a0
...
@@ -10,6 +10,15 @@ function StringType () {
...
@@ -10,6 +10,15 @@ function StringType () {
StringType
.
prototype
.
decodeFromStorage
=
function
(
location
,
storageContent
)
{
StringType
.
prototype
.
decodeFromStorage
=
function
(
location
,
storageContent
)
{
var
decoded
=
this
.
dynamicBytes
.
decodeFromStorage
(
location
,
storageContent
)
var
decoded
=
this
.
dynamicBytes
.
decodeFromStorage
(
location
,
storageContent
)
return
format
(
decoded
)
}
StringType
.
prototype
.
decodeLocals
=
function
(
stackHeight
,
stack
,
memory
)
{
var
decoded
=
this
.
dynamicBytes
.
decodeLocals
(
stackHeight
,
stack
,
memory
)
return
format
(
decoded
)
}
function
format
(
decoded
)
{
var
value
=
decoded
.
value
var
value
=
decoded
.
value
value
=
value
.
replace
(
'0x'
,
''
).
replace
(
/
(
..
)
/g
,
'%$1'
)
value
=
value
.
replace
(
'0x'
,
''
).
replace
(
/
(
..
)
/g
,
'%$1'
)
var
ret
=
{
var
ret
=
{
...
...
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