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
be8fedb6
Unverified
Commit
be8fedb6
authored
Jun 29, 2021
by
yann300
Committed by
GitHub
Jun 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ignore mapping if struct in memory (#1308)
fix
https://github.com/ethereum/remix-project/issues/271
parent
360ddee8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
Mapping.ts
libs/remix-debug/src/solidity-decoder/types/Mapping.ts
+1
-1
Struct.ts
libs/remix-debug/src/solidity-decoder/types/Struct.ts
+2
-1
No files found.
libs/remix-debug/src/solidity-decoder/types/Mapping.ts
View file @
be8fedb6
...
@@ -38,7 +38,7 @@ export class Mapping extends RefType {
...
@@ -38,7 +38,7 @@ export class Mapping extends RefType {
decodeFromMemoryInternal
(
offset
,
memory
)
{
decodeFromMemoryInternal
(
offset
,
memory
)
{
// mappings can only exist in storage and not in memory
// mappings can only exist in storage and not in memory
// so this should never be called
// so this should never be called
return
{
value
:
'
<not implemented>'
,
length
:
'0x
'
,
type
:
this
.
typeName
}
return
{
value
:
'
'
,
length
:
'0x0
'
,
type
:
this
.
typeName
}
}
}
async
decodeMappingsLocation
(
preimages
,
location
,
storageResolver
)
{
async
decodeMappingsLocation
(
preimages
,
location
,
storageResolver
)
{
...
...
libs/remix-debug/src/solidity-decoder/types/Struct.ts
View file @
be8fedb6
'use strict'
'use strict'
import
{
add
}
from
'./util'
import
{
add
}
from
'./util'
import
{
RefType
}
from
'./RefType'
import
{
RefType
}
from
'./RefType'
import
{
Mapping
}
from
'./Mapping'
export
class
Struct
extends
RefType
{
export
class
Struct
extends
RefType
{
members
members
...
@@ -33,7 +34,7 @@ export class Struct extends RefType {
...
@@ -33,7 +34,7 @@ export class Struct extends RefType {
var
contentOffset
=
offset
var
contentOffset
=
offset
var
member
=
item
.
type
.
decodeFromMemory
(
contentOffset
,
memory
)
var
member
=
item
.
type
.
decodeFromMemory
(
contentOffset
,
memory
)
ret
[
item
.
name
]
=
member
ret
[
item
.
name
]
=
member
offset
+=
32
if
(
!
(
item
.
type
instanceof
Mapping
))
offset
+=
32
})
})
return
{
value
:
ret
,
type
:
this
.
typeName
}
return
{
value
:
ret
,
type
:
this
.
typeName
}
}
}
...
...
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