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
6195a1fb
Commit
6195a1fb
authored
Aug 19, 2021
by
yann300
Committed by
davidzagi93@gmail.com
Sep 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make sure compile-logic do not use call directly
parent
10a68f7a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
compiler-api.ts
apps/solidity-compiler/src/app/compiler-api.ts
+12
-0
compileTabLogic.ts
...mix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts
+4
-4
No files found.
apps/solidity-compiler/src/app/compiler-api.ts
View file @
6195a1fb
...
@@ -38,6 +38,18 @@ export const CompilerApiMixin = (Base) => class extends Base {
...
@@ -38,6 +38,18 @@ export const CompilerApiMixin = (Base) => class extends Base {
this
.
call
(
'manager'
,
'deactivatePlugin'
,
'solidity-logic'
)
this
.
call
(
'manager'
,
'deactivatePlugin'
,
'solidity-logic'
)
}
}
resolveContentAndSave
(
url
)
{
return
this
.
call
(
'contentImport'
,
'resolveAndSave'
,
url
)
}
compileWithHardhat
(
configFile
)
{
return
this
.
call
(
'hardhat'
,
'compile'
,
configFile
)
}
logToTerminal
(
content
)
{
return
this
.
call
(
'terminal'
,
'log'
,
content
)
}
setHardHatCompilation
(
value
)
{
setHardHatCompilation
(
value
)
{
this
.
hhCompilation
=
value
this
.
hhCompilation
=
value
}
}
...
...
libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts
View file @
6195a1fb
...
@@ -29,7 +29,7 @@ export class CompileTab extends Plugin {
...
@@ -29,7 +29,7 @@ export class CompileTab extends Plugin {
constructor
(
public
api
,
public
contentImport
)
{
constructor
(
public
api
,
public
contentImport
)
{
super
(
profile
)
super
(
profile
)
this
.
event
=
new
EventEmitter
()
this
.
event
=
new
EventEmitter
()
this
.
compiler
=
new
Compiler
((
url
,
cb
)
=>
this
.
call
(
'contentImport'
,
'resolveAndSave'
,
url
).
then
((
result
)
=>
cb
(
null
,
result
)).
catch
((
error
)
=>
cb
(
error
.
message
)))
this
.
compiler
=
new
Compiler
((
url
,
cb
)
=>
api
.
resolveContentAndSave
(
url
).
then
((
result
)
=>
cb
(
null
,
result
)).
catch
((
error
)
=>
cb
(
error
.
message
)))
}
}
init
()
{
init
()
{
...
@@ -123,10 +123,10 @@ export class CompileTab extends Plugin {
...
@@ -123,10 +123,10 @@ export class CompileTab extends Plugin {
const
configFilePath
=
'remix-compiler.config.js'
const
configFilePath
=
'remix-compiler.config.js'
this
.
api
.
writeFile
(
configFilePath
,
fileContent
)
this
.
api
.
writeFile
(
configFilePath
,
fileContent
)
_paq
.
push
([
'trackEvent'
,
'compiler'
,
'compileWithHardhat'
])
_paq
.
push
([
'trackEvent'
,
'compiler'
,
'compileWithHardhat'
])
this
.
call
(
'hardhat'
,
'compile'
,
configFilePath
).
then
((
result
)
=>
{
this
.
api
.
compileWithHardhat
(
configFilePath
).
then
((
result
)
=>
{
this
.
call
(
'terminal'
,
'log'
,
{
type
:
'info'
,
value
:
result
})
this
.
api
.
logToTerminal
(
{
type
:
'info'
,
value
:
result
})
}).
catch
((
error
)
=>
{
}).
catch
((
error
)
=>
{
this
.
call
(
'terminal'
,
'log'
,
{
type
:
'error'
,
value
:
error
})
this
.
api
.
logToTerminal
(
{
type
:
'error'
,
value
:
error
})
})
})
}
}
}
}
...
...
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