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
3fd42b3b
Commit
3fd42b3b
authored
Sep 10, 2020
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pass the current file path to 'deployMetadataOf'
parent
c547c45d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
compiler-metadata.js
apps/remix-ide/src/app/files/compiler-metadata.js
+10
-2
contractDropdown.js
apps/remix-ide/src/app/tabs/runTab/contractDropdown.js
+1
-1
No files found.
apps/remix-ide/src/app/files/compiler-metadata.js
View file @
3fd42b3b
...
...
@@ -90,10 +90,18 @@ class CompilerMetadata extends Plugin {
}
// TODO: is only called by dropdownLogic and can be moved there
deployMetadataOf
(
contractName
)
{
deployMetadataOf
(
contractName
,
fileLocation
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
provider
=
this
.
fileManager
.
currentFileProvider
()
var
path
=
this
.
fileManager
.
currentPath
()
let
path
if
(
fileLocation
)
{
path
=
fileLocation
.
split
(
'/'
)
path
.
pop
()
path
=
path
.
join
(
'/'
)
}
else
{
path
=
this
.
fileManager
.
currentPath
()
}
if
(
provider
&&
path
)
{
this
.
blockchain
.
detectNetwork
((
err
,
{
id
,
name
}
=
{})
=>
{
if
(
err
)
{
...
...
apps/remix-ide/src/app/tabs/runTab/contractDropdown.js
View file @
3fd42b3b
...
...
@@ -249,7 +249,7 @@ class ContractDropdownUI {
let
contractMetadata
try
{
contractMetadata
=
await
this
.
runView
.
call
(
'compilerMetadata'
,
'deployMetadataOf'
,
selectedContract
.
name
)
contractMetadata
=
await
this
.
runView
.
call
(
'compilerMetadata'
,
'deployMetadataOf'
,
selectedContract
.
name
,
selectedContract
.
contract
.
file
)
}
catch
(
error
)
{
return
statusCb
(
`creation of
${
selectedContract
.
name
}
errored: `
+
(
error
.
message
?
error
.
message
:
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