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
5fc82dd4
Commit
5fc82dd4
authored
Aug 19, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix usage of solidity logic
parent
64dac247
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
25 deletions
+9
-25
app.js
apps/remix-ide/src/app.js
+0
-1
compile-tab.js
apps/remix-ide/src/app/tabs/compile-tab.js
+1
-1
compiler-api.ts
apps/solidity-compiler/src/app/compiler-api.ts
+3
-6
compiler.ts
apps/solidity-compiler/src/app/compiler.ts
+1
-1
publish-to-storage.tsx
...emix-ui/publish-to-storage/src/lib/publish-to-storage.tsx
+2
-2
icompiler-api.ts
libs/remix-ui/solidity-compiler/src/lib/icompiler-api.ts
+0
-1
compileTabLogic.ts
...mix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts
+1
-12
remix-ui-static-analyser.tsx
...x-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx
+1
-1
No files found.
apps/remix-ide/src/app.js
View file @
5fc82dd4
...
...
@@ -450,7 +450,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
engine
.
register
([
compileTab
,
compileTab
.
compileTabLogic
,
run
,
debug
,
analysis
,
...
...
apps/remix-ide/src/app/tabs/compile-tab.js
View file @
5fc82dd4
...
...
@@ -25,7 +25,7 @@ const profile = {
location
:
'sidePanel'
,
documentation
:
'https://remix-ide.readthedocs.io/en/latest/solidity_editor.html'
,
version
:
packageJson
.
version
,
methods
:
[
'getCompilationResult'
,
'compile'
,
'compileWithParameters'
,
'setCompilerConfig'
,
'compileFile'
]
methods
:
[
'getCompilationResult'
,
'compile'
,
'compileWithParameters'
,
'setCompilerConfig'
,
'compileFile'
,
'getCompilerState'
]
}
// EditorApi:
...
...
apps/solidity-compiler/src/app/compiler-api.ts
View file @
5fc82dd4
...
...
@@ -30,13 +30,10 @@ export const CompilerApiMixin = (Base) => class extends Base {
}
onActivation
()
{
this
.
call
(
'manager'
,
'activatePlugin'
,
'solidity-logic'
)
this
.
listenToEvents
()
}
onDeactivation
()
{
this
.
call
(
'manager'
,
'deactivatePlugin'
,
'solidity-logic'
)
}
onDeactivation
()
{}
resolveContentAndSave
(
url
)
{
return
this
.
call
(
'contentImport'
,
'resolveAndSave'
,
url
)
...
...
@@ -62,8 +59,8 @@ export const CompilerApiMixin = (Base) => class extends Base {
return
this
.
compileTabLogic
.
compiler
.
state
.
lastCompilationResult
}
addExternalFile
(
fileName
,
content
)
{
this
.
fileProvider
.
addExternal
(
fileName
,
content
)
getCompilerState
(
)
{
return
this
.
compileTabLogic
.
getCompilerState
(
)
}
/**
...
...
apps/solidity-compiler/src/app/compiler.ts
View file @
5fc82dd4
...
...
@@ -12,7 +12,7 @@ const profile = {
location
:
'sidePanel'
,
documentation
:
'https://remix-ide.readthedocs.io/en/latest/solidity_editor.html'
,
version
:
'0.0.1'
,
methods
:
[
'getCompilationResult'
,
'compile'
,
'compileWithParameters'
,
'setCompilerConfig'
,
'compileFile'
]
methods
:
[
'getCompilationResult'
,
'compile'
,
'compileWithParameters'
,
'setCompilerConfig'
,
'compileFile'
,
'getCompilerState'
]
}
export
interface
ConfigurationSettings
{
...
...
libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx
View file @
5fc82dd4
...
...
@@ -29,7 +29,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => {
modal
(
`Published
${
contract
.
name
}
's Metadata`
,
publishMessage
(
result
.
uploaded
))
// triggered each time there's a new verified publish (means hash correspond)
api
.
addExternal
File
(
'swarm/'
+
result
.
item
.
hash
,
result
.
item
.
content
)
api
.
write
File
(
'swarm/'
+
result
.
item
.
hash
,
result
.
item
.
content
)
}
catch
(
err
)
{
let
parseError
=
err
try
{
...
...
@@ -43,7 +43,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => {
modal
(
`Published
${
contract
.
name
}
's Metadata`
,
publishMessage
(
result
.
uploaded
))
// triggered each time there's a new verified publish (means hash correspond)
api
.
addExternal
File
(
'ipfs/'
+
result
.
item
.
hash
,
result
.
item
.
content
)
api
.
write
File
(
'ipfs/'
+
result
.
item
.
hash
,
result
.
item
.
content
)
}
catch
(
err
)
{
modal
(
'IPFS Publish Failed'
,
publishMessageFailed
(
storage
,
err
))
}
...
...
libs/remix-ui/solidity-compiler/src/lib/icompiler-api.ts
View file @
5fc82dd4
...
...
@@ -23,6 +23,5 @@ export interface ICompilerApi {
writeFile
:
(
file
:
string
,
content
:
string
)
=>
Promise
<
void
>
readFile
:
(
file
:
string
)
=>
Promise
<
string
>
open
:
(
file
:
string
)
=>
void
addExternalFile
:
(
file
:
string
,
content
:
string
)
=>
void
onCurrentFileChanged
:
(
listener
:
onCurrentFileChanged
)
=>
void
}
libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts
View file @
5fc82dd4
import
{
Plugin
}
from
'@remixproject/engine'
const
packageJson
=
require
(
'../../../../../../package.json'
)
const
Compiler
=
require
(
'@remix-project/remix-solidity'
).
Compiler
const
EventEmitter
=
require
(
'events'
)
const
profile
=
{
name
:
'solidity-logic'
,
displayName
:
'Solidity compiler logic'
,
description
:
'Compile solidity contracts - Logic'
,
methods
:
[
'getCompilerState'
],
version
:
packageJson
.
version
}
declare
global
{
interface
Window
{
...
...
@@ -18,7 +8,7 @@ declare global {
}
const
_paq
=
window
.
_paq
=
window
.
_paq
||
[]
//eslint-disable-line
export
class
CompileTab
extends
Plugin
{
export
class
CompileTab
{
public
compiler
public
optimize
public
runs
...
...
@@ -27,7 +17,6 @@ export class CompileTab extends Plugin {
public
event
constructor
(
public
api
,
public
contentImport
)
{
super
(
profile
)
this
.
event
=
new
EventEmitter
()
this
.
compiler
=
new
Compiler
((
url
,
cb
)
=>
api
.
resolveContentAndSave
(
url
).
then
((
result
)
=>
cb
(
null
,
result
)).
catch
((
error
)
=>
cb
(
error
.
message
)))
}
...
...
libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx
View file @
5fc82dd4
...
...
@@ -217,7 +217,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
})
// Slither Analysis
if
(
slitherEnabled
)
{
props
.
analysisModule
.
call
(
'solidity
-logic'
,
'getCompilerState'
).
then
(
async
(
compilerState
)
=>
{
props
.
analysisModule
.
call
(
'solidity
'
,
'getCompilerState'
).
then
(
(
compilerState
)
=>
{
const
{
currentVersion
,
optimize
,
evmVersion
}
=
compilerState
props
.
analysisModule
.
call
(
'terminal'
,
'log'
,
{
type
:
'info'
,
value
:
'[Slither Analysis]: Running...'
})
_paq
.
push
([
'trackEvent'
,
'solidityStaticAnalyzer'
,
'analyzeWithSlither'
])
...
...
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