Commit ee63b0a4 authored by yann300's avatar yann300

string decoding

parent 96f8a2f6
......@@ -10,6 +10,15 @@ function StringType () {
StringType.prototype.decodeFromStorage = function (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
value = value.replace('0x', '').replace(/(..)/g, '%$1')
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