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
d2f744aa
Commit
d2f744aa
authored
Dec 04, 2020
by
aniket-engg
Committed by
Aniket
Dec 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing any type
parent
122a8dc3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
txFormat.ts
libs/remix-lib/src/execution/txFormat.ts
+6
-6
util.ts
libs/remix-lib/src/util.ts
+3
-3
No files found.
libs/remix-lib/src/execution/txFormat.ts
View file @
d2f744aa
...
...
@@ -36,8 +36,8 @@ export function encodeData (funABI, values, contractbyteCode) {
* @param {Function} callback - callback
*/
export
function
encodeParams
(
params
,
funAbi
,
callback
)
{
let
data
:
any
=
''
let
dataHex
=
''
let
data
:
Buffer
|
string
=
''
let
dataHex
:
string
=
''
let
funArgs
if
(
params
.
indexOf
(
'raw:0x'
)
===
0
)
{
// in that case we consider that the input is already encoded and *does not* contain the method signature
...
...
@@ -54,7 +54,7 @@ export function encodeParams (params, funAbi, callback) {
if
(
funArgs
.
length
>
0
)
{
try
{
data
=
encodeParamsHelper
(
funAbi
,
funArgs
)
dataHex
=
data
.
toString
(
'hex'
)
dataHex
=
data
.
toString
()
}
catch
(
e
)
{
return
callback
(
'Error encoding arguments: '
+
e
)
}
...
...
@@ -166,8 +166,8 @@ export function encodeConstructorCallAndDeployLibraries (contractName, contract,
*/
export
function
buildData
(
contractName
,
contract
,
contracts
,
isConstructor
,
funAbi
,
params
,
callback
,
callbackStep
,
callbackDeployLibrary
)
{
let
funArgs
=
[]
let
data
:
any
=
''
let
dataHex
=
''
let
data
:
Buffer
|
string
=
''
let
dataHex
:
string
=
''
if
(
params
.
indexOf
(
'raw:0x'
)
===
0
)
{
// in that case we consider that the input is already encoded and *does not* contain the method signature
...
...
@@ -183,7 +183,7 @@ export function buildData (contractName, contract, contracts, isConstructor, fun
}
try
{
data
=
encodeParamsHelper
(
funAbi
,
funArgs
)
dataHex
=
data
.
toString
(
'hex'
)
dataHex
=
data
.
toString
()
}
catch
(
e
)
{
return
callback
(
'Error encoding arguments: '
+
e
)
}
...
...
libs/remix-lib/src/util.ts
View file @
d2f744aa
...
...
@@ -167,9 +167,9 @@ export function sha3_256 (value) {
if
(
typeof
value
===
'string'
&&
value
.
indexOf
(
'0x'
)
!==
0
)
{
value
=
'0x'
+
value
}
let
ret
:
any
=
bufferToHex
(
setLengthLeft
(
value
,
32
))
ret
=
keccak
(
ret
)
return
bufferToHex
(
ret
)
const
ret
:
string
=
bufferToHex
(
setLengthLeft
(
value
,
32
))
const
retInBuffer
:
Buffer
=
keccak
(
ret
)
return
bufferToHex
(
ret
InBuffer
)
}
/**
...
...
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