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
7bb65899
Commit
7bb65899
authored
Apr 26, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix debugging
parent
c3bae30a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
util.ts
libs/remix-debug/src/solidity-decoder/types/util.ts
+1
-1
util.ts
libs/remix-lib/src/util.ts
+7
-4
No files found.
libs/remix-debug/src/solidity-decoder/types/util.ts
View file @
7bb65899
...
@@ -57,7 +57,7 @@ export function toBN (value) {
...
@@ -57,7 +57,7 @@ export function toBN (value) {
if
(
value
instanceof
BN
)
{
if
(
value
instanceof
BN
)
{
return
value
return
value
}
else
if
(
value
.
match
&&
value
.
match
(
/^
(
0x
)?([
a-f0-9
]
*
)
$/
))
{
}
else
if
(
value
.
match
&&
value
.
match
(
/^
(
0x
)?([
a-f0-9
]
*
)
$/
))
{
value
=
unpadHexString
(
value
.
replace
(
/^
(
0x
)
/
,
''
)
)
value
=
unpadHexString
(
value
)
value
=
new
BN
(
value
===
''
?
'0'
:
value
,
16
)
value
=
new
BN
(
value
===
''
?
'0'
:
value
,
16
)
}
else
if
(
!
isNaN
(
value
))
{
}
else
if
(
!
isNaN
(
value
))
{
value
=
new
BN
(
value
)
value
=
new
BN
(
value
)
...
...
libs/remix-lib/src/util.ts
View file @
7bb65899
'use strict'
'use strict'
import
{
BN
,
bufferToHex
,
keccak
,
setLengthLeft
}
from
'ethereumjs-util'
import
{
BN
,
bufferToHex
,
keccak
,
setLengthLeft
,
intToBuffer
}
from
'ethereumjs-util'
/*
/*
contains misc util: @TODO should be splitted
contains misc util: @TODO should be splitted
...
@@ -165,10 +165,13 @@ export function buildCallPath (index, rootCall) {
...
@@ -165,10 +165,13 @@ export function buildCallPath (index, rootCall) {
*/
*/
// eslint-disable-next-line camelcase
// eslint-disable-next-line camelcase
export
function
sha3_256
(
value
)
{
export
function
sha3_256
(
value
)
{
if
(
typeof
value
===
'string'
&&
value
.
indexOf
(
'0x'
)
!==
0
)
{
if
(
typeof
value
===
'string'
)
{
value
=
'0x'
+
value
value
=
Buffer
.
from
(
value
.
replace
(
'0x'
,
''
),
'hex'
)
}
}
const
retInBuffer
:
Buffer
=
keccak
(
setLengthLeft
(
Buffer
.
from
(
value
.
replace
(
'0x'
,
''
),
'hex'
),
32
))
if
(
Number
.
isInteger
(
value
))
{
value
=
intToBuffer
(
value
)
}
const
retInBuffer
:
Buffer
=
keccak
(
setLengthLeft
(
value
,
32
))
return
bufferToHex
(
retInBuffer
)
return
bufferToHex
(
retInBuffer
)
}
}
...
...
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