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
00d9214c
Commit
00d9214c
authored
Jan 08, 2020
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove callfunction method
parent
a24a1c19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
blockchain.js
src/blockchain/blockchain.js
+3
-14
No files found.
src/blockchain/blockchain.js
View file @
00d9214c
...
...
@@ -251,7 +251,9 @@ class Blockchain {
logCallback
(
`
${
logMsg
}
`
)
}
if
(
funABI
.
type
===
'fallback'
)
data
.
dataHex
=
value
this
.
callFunction
(
address
,
data
,
funABI
,
confirmationCb
,
continueCb
,
promptCb
,
(
error
,
txResult
,
_address
,
returnValue
)
=>
{
const
useCall
=
funABI
.
stateMutability
===
'view'
||
funABI
.
stateMutability
===
'pure'
this
.
runTx
({
address
,
data
,
useCall
},
confirmationCb
,
continueCb
,
promptCb
,
(
error
,
txResult
,
_address
,
returnValue
)
=>
{
if
(
error
)
{
return
logCallback
(
`
${
logMsg
}
errored:
${
error
}
`
)
}
...
...
@@ -342,19 +344,6 @@ class Blockchain {
}
/**
* call the current given contract
*
* @param {String} to - address of the contract to call.
* @param {String} data - data to send with the transaction ( return of txFormat.buildData(...) ).
* @param {Object} funAbi - abi definition of the function to call.
* @param {Function} callback - callback.
*/
callFunction
(
to
,
data
,
funAbi
,
confirmationCb
,
continueCb
,
promptCb
,
callback
)
{
const
useCall
=
funAbi
.
stateMutability
===
'view'
||
funAbi
.
stateMutability
===
'pure'
this
.
runTx
({
to
,
data
,
useCall
},
confirmationCb
,
continueCb
,
promptCb
,
callback
)
}
/**
* This function send a tx only to javascript VM or testnet, will return an error for the mainnet
* SHOULD BE TAKEN CAREFULLY!
*
...
...
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