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
304c674f
Unverified
Commit
304c674f
authored
May 12, 2021
by
David Zagi
Committed by
GitHub
May 12, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into refactoring-static-analyser
parents
05698e2d
aecbc846
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
5 deletions
+17
-5
contractDropdown.js
apps/remix-ide/src/app/tabs/runTab/contractDropdown.js
+5
-1
dropdownlogic.js
apps/remix-ide/src/app/tabs/runTab/model/dropdownlogic.js
+7
-4
run-tab.js
apps/remix-ide/src/app/udapp/run-tab.js
+2
-0
universal-dapp-ui.js
apps/remix-ide/src/app/ui/universal-dapp-ui.js
+3
-0
No files found.
apps/remix-ide/src/app/tabs/runTab/contractDropdown.js
View file @
304c674f
...
@@ -9,6 +9,7 @@ const confirmDialog = require('../../ui/confirmDialog')
...
@@ -9,6 +9,7 @@ const confirmDialog = require('../../ui/confirmDialog')
const
modalDialog
=
require
(
'../../ui/modaldialog'
)
const
modalDialog
=
require
(
'../../ui/modaldialog'
)
const
MultiParamManager
=
require
(
'../../ui/multiParamManager'
)
const
MultiParamManager
=
require
(
'../../ui/multiParamManager'
)
const
helper
=
require
(
'../../../lib/helper'
)
const
helper
=
require
(
'../../../lib/helper'
)
const
_paq
=
window
.
_paq
=
window
.
_paq
||
[]
class
ContractDropdownUI
{
class
ContractDropdownUI
{
constructor
(
blockchain
,
dropdownLogic
,
logCallback
,
runView
)
{
constructor
(
blockchain
,
dropdownLogic
,
logCallback
,
runView
)
{
...
@@ -300,13 +301,15 @@ class ContractDropdownUI {
...
@@ -300,13 +301,15 @@ class ContractDropdownUI {
if
(
error
)
{
if
(
error
)
{
return
this
.
logCallback
(
error
)
return
this
.
logCallback
(
error
)
}
}
self
.
event
.
trigger
(
'newContractInstanceAdded'
,
[
contractObject
,
address
,
contractObject
.
name
])
self
.
event
.
trigger
(
'newContractInstanceAdded'
,
[
contractObject
,
address
,
contractObject
.
name
])
const
data
=
self
.
runView
.
compilersArtefacts
.
getCompilerAbstract
(
contractObject
.
contract
.
file
)
const
data
=
self
.
runView
.
compilersArtefacts
.
getCompilerAbstract
(
contractObject
.
contract
.
file
)
self
.
runView
.
compilersArtefacts
.
addResolvedContract
(
helper
.
addressToString
(
address
),
data
)
self
.
runView
.
compilersArtefacts
.
addResolvedContract
(
helper
.
addressToString
(
address
),
data
)
if
(
self
.
ipfsCheckedState
)
{
if
(
self
.
ipfsCheckedState
)
{
_paq
.
push
([
'trackEvent'
,
'udapp'
,
`DeployAndPublish_
${
this
.
networkName
}
`
])
publishToStorage
(
'ipfs'
,
self
.
runView
.
fileProvider
,
self
.
runView
.
fileManager
,
selectedContract
)
publishToStorage
(
'ipfs'
,
self
.
runView
.
fileProvider
,
self
.
runView
.
fileManager
,
selectedContract
)
}
else
{
_paq
.
push
([
'trackEvent'
,
'udapp'
,
`DeployOnly_
${
this
.
networkName
}
`
])
}
}
}
}
...
@@ -340,6 +343,7 @@ class ContractDropdownUI {
...
@@ -340,6 +343,7 @@ class ContractDropdownUI {
}
}
deployContract
(
selectedContract
,
args
,
contractMetadata
,
compilerContracts
,
callbacks
,
confirmationCb
)
{
deployContract
(
selectedContract
,
args
,
contractMetadata
,
compilerContracts
,
callbacks
,
confirmationCb
)
{
_paq
.
push
([
'trackEvent'
,
'udapp'
,
'DeployContractTo'
,
this
.
networkName
])
const
{
statusCb
}
=
callbacks
const
{
statusCb
}
=
callbacks
if
(
!
contractMetadata
||
(
contractMetadata
&&
contractMetadata
.
autoDeployLib
))
{
if
(
!
contractMetadata
||
(
contractMetadata
&&
contractMetadata
.
autoDeployLib
))
{
return
this
.
blockchain
.
deployContractAndLibraries
(
selectedContract
,
args
,
contractMetadata
,
compilerContracts
,
callbacks
,
confirmationCb
)
return
this
.
blockchain
.
deployContractAndLibraries
(
selectedContract
,
args
,
contractMetadata
,
compilerContracts
,
callbacks
,
confirmationCb
)
...
...
apps/remix-ide/src/app/tabs/runTab/model/dropdownlogic.js
View file @
304c674f
var
remixLib
=
require
(
'@remix-project/remix-lib'
)
const
remixLib
=
require
(
'@remix-project/remix-lib'
)
var
txHelper
=
remixLib
.
execution
.
txHelper
const
txHelper
=
remixLib
.
execution
.
txHelper
var
CompilerAbstract
=
require
(
'../../../compiler/compiler-abstract'
)
const
CompilerAbstract
=
require
(
'../../../compiler/compiler-abstract'
)
var
EventManager
=
remixLib
.
EventManager
const
EventManager
=
remixLib
.
EventManager
const
_paq
=
window
.
_paq
=
window
.
_paq
||
[]
class
DropdownLogic
{
class
DropdownLogic
{
constructor
(
compilersArtefacts
,
config
,
editor
,
runView
)
{
constructor
(
compilersArtefacts
,
config
,
editor
,
runView
)
{
...
@@ -50,9 +51,11 @@ class DropdownLogic {
...
@@ -50,9 +51,11 @@ class DropdownLogic {
}
catch
(
e
)
{
}
catch
(
e
)
{
return
cb
(
'Failed to parse the current file as JSON ABI.'
)
return
cb
(
'Failed to parse the current file as JSON ABI.'
)
}
}
_paq
.
push
([
'trackEvent'
,
'udapp'
,
'AtAddressLoadWithABI'
])
cb
(
null
,
'abi'
,
abi
)
cb
(
null
,
'abi'
,
abi
)
})
})
}
else
{
}
else
{
_paq
.
push
([
'trackEvent'
,
'udapp'
,
'AtAddressLoadWithInstance'
])
cb
(
null
,
'instance'
)
cb
(
null
,
'instance'
)
}
}
}
}
...
...
apps/remix-ide/src/app/udapp/run-tab.js
View file @
304c674f
...
@@ -15,6 +15,7 @@ const RecorderUI = require('../tabs/runTab/recorder.js')
...
@@ -15,6 +15,7 @@ const RecorderUI = require('../tabs/runTab/recorder.js')
const
DropdownLogic
=
require
(
'../tabs/runTab/model/dropdownlogic.js'
)
const
DropdownLogic
=
require
(
'../tabs/runTab/model/dropdownlogic.js'
)
const
ContractDropdownUI
=
require
(
'../tabs/runTab/contractDropdown.js'
)
const
ContractDropdownUI
=
require
(
'../tabs/runTab/contractDropdown.js'
)
const
toaster
=
require
(
'../ui/tooltip'
)
const
toaster
=
require
(
'../ui/tooltip'
)
const
_paq
=
window
.
_paq
=
window
.
_paq
||
[]
const
UniversalDAppUI
=
require
(
'../ui/universal-dapp-ui'
)
const
UniversalDAppUI
=
require
(
'../ui/universal-dapp-ui'
)
...
@@ -91,6 +92,7 @@ export class RunTab extends ViewPlugin {
...
@@ -91,6 +92,7 @@ export class RunTab extends ViewPlugin {
}
}
sendTransaction
(
tx
)
{
sendTransaction
(
tx
)
{
_paq
.
push
([
'trackEvent'
,
'udapp'
,
'sendTx'
])
return
this
.
blockchain
.
sendTransaction
(
tx
)
return
this
.
blockchain
.
sendTransaction
(
tx
)
}
}
...
...
apps/remix-ide/src/app/ui/universal-dapp-ui.js
View file @
304c674f
...
@@ -14,6 +14,7 @@ var txFormat = remixLib.execution.txFormat
...
@@ -14,6 +14,7 @@ var txFormat = remixLib.execution.txFormat
const
txHelper
=
remixLib
.
execution
.
txHelper
const
txHelper
=
remixLib
.
execution
.
txHelper
var
TreeView
=
require
(
'./TreeView'
)
var
TreeView
=
require
(
'./TreeView'
)
var
txCallBacks
=
require
(
'./sendTxCallbacks'
)
var
txCallBacks
=
require
(
'./sendTxCallbacks'
)
const
_paq
=
window
.
_paq
=
window
.
_paq
||
[]
function
UniversalDAppUI
(
blockchain
,
logCallback
)
{
function
UniversalDAppUI
(
blockchain
,
logCallback
)
{
this
.
blockchain
=
blockchain
this
.
blockchain
=
blockchain
...
@@ -243,6 +244,8 @@ UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, i
...
@@ -243,6 +244,8 @@ UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, i
outputOverride
.
appendChild
(
decoded
)
outputOverride
.
appendChild
(
decoded
)
}
}
}
}
const
info
=
`
${
lookupOnly
?
'call'
:
args
.
funABI
.
type
!==
'fallback'
?
'lowLevelInteracions'
:
'transact'
}
_
${
this
.
blockchain
.
executionContext
.
executionContext
}
`
_paq
.
push
([
'trackEvent'
,
'udapp'
,
info
])
const
params
=
args
.
funABI
.
type
!==
'fallback'
?
inputsValues
:
''
const
params
=
args
.
funABI
.
type
!==
'fallback'
?
inputsValues
:
''
this
.
blockchain
.
runOrCallContractMethod
(
this
.
blockchain
.
runOrCallContractMethod
(
args
.
contractName
,
args
.
contractName
,
...
...
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