Commit c08508a0 authored by yann300's avatar yann300

string decoding

parent fbe4b47a
...@@ -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 = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment