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
8ae7227d
Unverified
Commit
8ae7227d
authored
Jan 14, 2021
by
EthereumRemix
Committed by
GitHub
Jan 14, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into fixRecorderTest
parents
fad190e1
33d9cebc
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
82 additions
and
33 deletions
+82
-33
autosquash.yml
.github/workflows/autosquash.yml
+34
-0
build_and_publish_docker_images.sh
apps/remix-ide/ci/build_and_publish_docker_images.sh
+1
-1
compiler-artefacts.js
apps/remix-ide/src/app/compiler/compiler-artefacts.js
+5
-0
compiler-sourceVerifier-fetchAndCompile.js
...c/app/compiler/compiler-sourceVerifier-fetchAndCompile.js
+1
-1
terminal.js
apps/remix-ide/src/app/panels/terminal.js
+1
-1
contractDropdown.js
apps/remix-ide/src/app/tabs/runTab/contractDropdown.js
+18
-12
recorder.js
apps/remix-ide/src/app/tabs/runTab/model/recorder.js
+3
-17
txLogger.js
apps/remix-ide/src/app/ui/txLogger.js
+8
-1
helper.js
apps/remix-ide/src/lib/helper.js
+11
-0
No files found.
.github/workflows/autosquash.yml
0 → 100644
View file @
8ae7227d
name
:
Autosquash
on
:
check_run
:
types
:
# Check runs completing successfully can unblock the corresponding pull requests and make them mergeable.
-
completed
pull_request
:
types
:
# A closed pull request makes the checks on the other pull request on the same base outdated.
-
closed
# Adding the autosquash label to a pull request can trigger an update or a merge.
-
labeled
pull_request_review
:
types
:
# Review approvals can unblock the pull request and make it mergeable.
-
submitted
# Success statuses can unblock the corresponding pull requests and make them mergeable.
status
:
{}
jobs
:
autosquash
:
name
:
Autosquash
runs-on
:
ubuntu-18.04
steps
:
-
uses
:
tibdex/autosquash@v2
with
:
# The built-in secrets.GITHUB_TOKEN cannot yet be used because of this limitation:
# https://github.community/t5/GitHub-Actions/Triggering-a-new-workflow-from-another-workflow/td-p/31676
# In the meantime, use a token granting write access on the repo:
# - a GitHub App token
# See https://github.com/marketplace/actions/github-app-token.
# - a personal access token
# See https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line.
github_token
:
${{ secrets.AUTOSQUASH_TOKEN }}
apps/remix-ide/ci/build_and_publish_docker_images.sh
View file @
8ae7227d
...
@@ -5,7 +5,7 @@ if [ "$CIRCLE_BRANCH" == "master" ];
...
@@ -5,7 +5,7 @@ if [ "$CIRCLE_BRANCH" == "master" ];
then
then
export
TAG
=
"latest"
;
export
TAG
=
"latest"
;
else
else
export
TAG
=
$(
sed
's/
#
/-/g'
<<<
$CIRCLE_BRANCH
)
export
TAG
=
$(
sed
's/
[#\/]
/-/g'
<<<
$CIRCLE_BRANCH
)
fi
fi
docker login
--username
$DOCKER_USER
--password
$DOCKER_PASS
docker login
--username
$DOCKER_USER
--password
$DOCKER_PASS
...
...
apps/remix-ide/src/app/compiler/compiler-artefacts.js
View file @
8ae7227d
...
@@ -67,6 +67,11 @@ module.exports = class CompilerArtefacts extends Plugin {
...
@@ -67,6 +67,11 @@ module.exports = class CompilerArtefacts extends Plugin {
return
contractsData
return
contractsData
}
}
getCompilerAbstract
(
file
)
{
return
this
.
compilersArtefactsPerFile
[
file
]
}
// compilerData is a CompilerAbstract object
addResolvedContract
(
address
,
compilerData
)
{
addResolvedContract
(
address
,
compilerData
)
{
this
.
compilersArtefacts
[
address
]
=
compilerData
this
.
compilersArtefacts
[
address
]
=
compilerData
}
}
...
...
apps/remix-ide/src/app/compiler/compiler-sourceVerifier-fetchAndCompile.js
View file @
8ae7227d
...
@@ -33,7 +33,7 @@ export default class FetchAndCompile extends Plugin {
...
@@ -33,7 +33,7 @@ export default class FetchAndCompile extends Plugin {
contractAddress
=
ethutil
.
toChecksumAddress
(
contractAddress
)
contractAddress
=
ethutil
.
toChecksumAddress
(
contractAddress
)
const
compilersartefacts
=
globalRegistry
.
get
(
'compilersartefacts'
).
api
const
compilersartefacts
=
globalRegistry
.
get
(
'compilersartefacts'
).
api
const
localCompilation
=
()
=>
compilersartefacts
.
get
(
'__last'
)
?
compilersartefacts
.
get
(
'__last'
)
:
null
const
localCompilation
=
()
=>
compilersartefacts
.
get
(
contractAddress
)
?
compilersartefacts
.
get
(
contractAddress
)
:
compilersartefacts
.
get
(
'__last'
)
?
compilersartefacts
.
get
(
'__last'
)
:
null
const
resolved
=
compilersartefacts
.
get
(
contractAddress
)
const
resolved
=
compilersartefacts
.
get
(
contractAddress
)
if
(
resolved
)
return
resolved
if
(
resolved
)
return
resolved
...
...
apps/remix-ide/src/app/panels/terminal.js
View file @
8ae7227d
...
@@ -478,8 +478,8 @@ class Terminal extends Plugin {
...
@@ -478,8 +478,8 @@ class Terminal extends Plugin {
self
.
_components
.
txLogger
.
event
.
register
(
'debuggingRequested'
,
async
(
hash
)
=>
{
self
.
_components
.
txLogger
.
event
.
register
(
'debuggingRequested'
,
async
(
hash
)
=>
{
// TODO should probably be in the run module
// TODO should probably be in the run module
if
(
!
await
self
.
_opts
.
appManager
.
isActive
(
'debugger'
))
await
self
.
_opts
.
appManager
.
activatePlugin
(
'debugger'
)
if
(
!
await
self
.
_opts
.
appManager
.
isActive
(
'debugger'
))
await
self
.
_opts
.
appManager
.
activatePlugin
(
'debugger'
)
this
.
call
(
'debugger'
,
'debug'
,
hash
)
this
.
call
(
'menuicons'
,
'select'
,
'debugger'
)
this
.
call
(
'menuicons'
,
'select'
,
'debugger'
)
this
.
call
(
'debugger'
,
'debug'
,
hash
)
})
})
return
self
.
_view
.
el
return
self
.
_view
.
el
...
...
apps/remix-ide/src/app/tabs/runTab/contractDropdown.js
View file @
8ae7227d
import
publishToStorage
from
'../../../publishToStorage'
import
publishToStorage
from
'../../../publishToStorage'
var
yo
=
require
(
'yo-yo'
)
const
yo
=
require
(
'yo-yo'
)
var
css
=
require
(
'../styles/run-tab-styles'
)
const
css
=
require
(
'../styles/run-tab-styles'
)
var
modalDialogCustom
=
require
(
'../../ui/modal-dialog-custom'
)
const
modalDialogCustom
=
require
(
'../../ui/modal-dialog-custom'
)
var
remixLib
=
require
(
'@remix-project/remix-lib'
)
const
remixLib
=
require
(
'@remix-project/remix-lib'
)
var
EventManager
=
remixLib
.
EventManager
const
EventManager
=
remixLib
.
EventManager
var
confirmDialog
=
require
(
'../../ui/confirmDialog'
)
const
confirmDialog
=
require
(
'../../ui/confirmDialog'
)
var
modalDialog
=
require
(
'../../ui/modaldialog'
)
const
modalDialog
=
require
(
'../../ui/modaldialog'
)
var
MultiParamManager
=
require
(
'../../ui/multiParamManager'
)
const
MultiParamManager
=
require
(
'../../ui/multiParamManager'
)
const
helper
=
require
(
'../../../lib/helper'
)
class
ContractDropdownUI
{
class
ContractDropdownUI
{
constructor
(
blockchain
,
dropdownLogic
,
logCallback
,
runView
)
{
constructor
(
blockchain
,
dropdownLogic
,
logCallback
,
runView
)
{
...
@@ -279,6 +280,8 @@ class ContractDropdownUI {
...
@@ -279,6 +280,8 @@ class ContractDropdownUI {
}
}
}
}
const
self
=
this
var
promptCb
=
(
okCb
,
cancelCb
)
=>
{
var
promptCb
=
(
okCb
,
cancelCb
)
=>
{
modalDialogCustom
.
promptPassphrase
(
'Passphrase requested'
,
'Personal mode is enabled. Please provide passphrase of account'
,
''
,
okCb
,
cancelCb
)
modalDialogCustom
.
promptPassphrase
(
'Passphrase requested'
,
'Personal mode is enabled. Please provide passphrase of account'
,
''
,
okCb
,
cancelCb
)
}
}
...
@@ -288,15 +291,18 @@ class ContractDropdownUI {
...
@@ -288,15 +291,18 @@ class ContractDropdownUI {
}
}
var
finalCb
=
(
error
,
contractObject
,
address
)
=>
{
var
finalCb
=
(
error
,
contractObject
,
address
)
=>
{
this
.
event
.
trigger
(
'clearInstance'
)
self
.
event
.
trigger
(
'clearInstance'
)
if
(
error
)
{
if
(
error
)
{
return
this
.
logCallback
(
error
)
return
this
.
logCallback
(
error
)
}
}
this
.
event
.
trigger
(
'newContractInstanceAdded'
,
[
contractObject
,
address
,
contractObject
.
name
])
self
.
event
.
trigger
(
'newContractInstanceAdded'
,
[
contractObject
,
address
,
contractObject
.
name
])
if
(
this
.
ipfsCheckedState
)
{
publishToStorage
(
'ipfs'
,
this
.
runView
.
fileProvider
,
this
.
runView
.
fileManager
,
selectedContract
)
const
data
=
self
.
runView
.
compilersArtefacts
.
getCompilerAbstract
(
contractObject
.
contract
.
file
)
self
.
runView
.
compilersArtefacts
.
addResolvedContract
(
helper
.
addressToString
(
address
),
data
)
if
(
self
.
ipfsCheckedState
)
{
publishToStorage
(
'ipfs'
,
self
.
runView
.
fileProvider
,
self
.
runView
.
fileManager
,
selectedContract
)
}
}
}
}
...
...
apps/remix-ide/src/app/tabs/runTab/model/recorder.js
View file @
8ae7227d
...
@@ -4,11 +4,10 @@ var remixLib = require('@remix-project/remix-lib')
...
@@ -4,11 +4,10 @@ var remixLib = require('@remix-project/remix-lib')
var
EventManager
=
remixLib
.
EventManager
var
EventManager
=
remixLib
.
EventManager
var
format
=
remixLib
.
execution
.
txFormat
var
format
=
remixLib
.
execution
.
txFormat
var
txHelper
=
remixLib
.
execution
.
txHelper
var
txHelper
=
remixLib
.
execution
.
txHelper
const
helper
=
require
(
'../../../../lib/helper'
)
/**
/**
* Record transaction as long as the user create them.
* Record transaction as long as the user create them.
*
*
*/
*/
class
Recorder
{
class
Recorder
{
constructor
(
blockchain
)
{
constructor
(
blockchain
)
{
...
@@ -69,8 +68,7 @@ class Recorder {
...
@@ -69,8 +68,7 @@ class Recorder {
if
(
call
)
return
if
(
call
)
return
if
(
!
rawAddress
)
return
// not a contract creation
if
(
!
rawAddress
)
return
// not a contract creation
const
stringAddress
=
this
.
addressToString
(
rawAddress
)
const
address
=
helper
.
addressToString
(
rawAddress
)
const
address
=
ethutil
.
toChecksumAddress
(
stringAddress
)
// save back created addresses for the convertion from tokens to real adresses
// save back created addresses for the convertion from tokens to real adresses
this
.
data
.
_createdContracts
[
address
]
=
timestamp
this
.
data
.
_createdContracts
[
address
]
=
timestamp
this
.
data
.
_createdContractsReverse
[
timestamp
]
=
address
this
.
data
.
_createdContractsReverse
[
timestamp
]
=
address
...
@@ -252,8 +250,7 @@ class Recorder {
...
@@ -252,8 +250,7 @@ class Recorder {
return
logCallBack
(
err
+
'. Execution failed at '
+
index
)
return
logCallBack
(
err
+
'. Execution failed at '
+
index
)
}
}
if
(
rawAddress
)
{
if
(
rawAddress
)
{
const
stringAddress
=
self
.
addressToString
(
rawAddress
)
const
address
=
helper
.
addressToString
(
rawAddress
)
const
address
=
ethutil
.
toChecksumAddress
(
stringAddress
)
// save back created addresses for the convertion from tokens to real adresses
// save back created addresses for the convertion from tokens to real adresses
self
.
data
.
_createdContracts
[
address
]
=
tx
.
timestamp
self
.
data
.
_createdContracts
[
address
]
=
tx
.
timestamp
self
.
data
.
_createdContractsReverse
[
tx
.
timestamp
]
=
address
self
.
data
.
_createdContractsReverse
[
tx
.
timestamp
]
=
address
...
@@ -265,17 +262,6 @@ class Recorder {
...
@@ -265,17 +262,6 @@ class Recorder {
},
()
=>
{
self
.
setListen
(
true
);
self
.
clearAll
()
})
},
()
=>
{
self
.
setListen
(
true
);
self
.
clearAll
()
})
}
}
addressToString
(
address
)
{
if
(
!
address
)
return
null
if
(
typeof
address
!==
'string'
)
{
address
=
address
.
toString
(
'hex'
)
}
if
(
address
.
indexOf
(
'0x'
)
===
-
1
)
{
address
=
'0x'
+
address
}
return
address
}
runScenario
(
json
,
continueCb
,
promptCb
,
alertCb
,
confirmationCb
,
logCallBack
,
cb
)
{
runScenario
(
json
,
continueCb
,
promptCb
,
alertCb
,
confirmationCb
,
logCallBack
,
cb
)
{
if
(
!
json
)
{
if
(
!
json
)
{
return
cb
(
'a json content must be provided'
)
return
cb
(
'a json content must be provided'
)
...
...
apps/remix-ide/src/app/ui/txLogger.js
View file @
8ae7227d
...
@@ -215,7 +215,14 @@ function renderKnownTransaction (self, data, blockchain) {
...
@@ -215,7 +215,14 @@ function renderKnownTransaction (self, data, blockchain) {
${
checkTxStatus
(
data
.
receipt
,
txType
)}
${
checkTxStatus
(
data
.
receipt
,
txType
)}
${
context
(
self
,
{
from
,
to
,
data
},
blockchain
)}
${
context
(
self
,
{
from
,
to
,
data
},
blockchain
)}
<div class=
${
css
.
buttons
}
>
<div class=
${
css
.
buttons
}
>
<button class="
${
css
.
debug
}
btn btn-primary btn-sm" data-shared="txLoggerDebugButton" data-id="txLoggerDebugButton
${
data
.
tx
.
hash
}
" onclick=
${(
e
)
=>
debug
(
e
,
data
,
self
)}
>Debug</div>
<button
class="
${
css
.
debug
}
btn btn-primary btn-sm"
data-shared="txLoggerDebugButton"
data-id="txLoggerDebugButton
${
data
.
tx
.
hash
}
"
onclick=
${(
e
)
=>
debug
(
e
,
data
,
self
)}
>
Debug
</div>
</div>
</div>
<i class="
${
css
.
arrow
}
fas fa-angle-down"></i>
<i class="
${
css
.
arrow
}
fas fa-angle-down"></i>
</div>
</div>
...
...
apps/remix-ide/src/lib/helper.js
View file @
8ae7227d
var
async
=
require
(
'async'
)
var
async
=
require
(
'async'
)
const
ethJSUtil
=
require
(
'ethereumjs-util'
)
module
.
exports
=
{
module
.
exports
=
{
shortenAddress
:
function
(
address
,
etherBalance
)
{
shortenAddress
:
function
(
address
,
etherBalance
)
{
var
len
=
address
.
length
var
len
=
address
.
length
return
address
.
slice
(
0
,
5
)
+
'...'
+
address
.
slice
(
len
-
5
,
len
)
+
(
etherBalance
?
' ('
+
etherBalance
.
toString
()
+
' ether)'
:
''
)
return
address
.
slice
(
0
,
5
)
+
'...'
+
address
.
slice
(
len
-
5
,
len
)
+
(
etherBalance
?
' ('
+
etherBalance
.
toString
()
+
' ether)'
:
''
)
},
},
addressToString
:
function
(
address
)
{
if
(
!
address
)
return
null
if
(
typeof
address
!==
'string'
)
{
address
=
address
.
toString
(
'hex'
)
}
if
(
address
.
indexOf
(
'0x'
)
===
-
1
)
{
address
=
'0x'
+
address
}
return
ethJSUtil
.
toChecksumAddress
(
address
)
},
shortenHexData
:
function
(
data
)
{
shortenHexData
:
function
(
data
)
{
if
(
!
data
)
return
''
if
(
!
data
)
return
''
if
(
data
.
length
<
5
)
return
data
if
(
data
.
length
<
5
)
return
data
...
...
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