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
0071cd2d
Commit
0071cd2d
authored
Nov 30, 2020
by
aniket-engg
Committed by
Aniket
Dec 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
srcinTs
parent
8dc31f40
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
45 additions
and
22 deletions
+45
-22
eventManager.ts
libs/remix-lib/src/eventManager.ts
+0
-0
eventsDecoder.ts
libs/remix-lib/src/execution/eventsDecoder.ts
+3
-1
execution-context.ts
libs/remix-lib/src/execution/execution-context.ts
+3
-3
logsManager.ts
libs/remix-lib/src/execution/logsManager.ts
+0
-0
txExecution.ts
libs/remix-lib/src/execution/txExecution.ts
+1
-1
txFormat.ts
libs/remix-lib/src/execution/txFormat.ts
+0
-0
txHelper.ts
libs/remix-lib/src/execution/txHelper.ts
+2
-2
txListener.ts
libs/remix-lib/src/execution/txListener.ts
+13
-2
txRunner.ts
libs/remix-lib/src/execution/txRunner.ts
+17
-7
typeConversion.ts
libs/remix-lib/src/execution/typeConversion.ts
+0
-0
compilerHelper.ts
libs/remix-lib/src/helpers/compilerHelper.ts
+0
-0
txResultHelper.ts
libs/remix-lib/src/helpers/txResultHelper.ts
+0
-0
uiHelper.ts
libs/remix-lib/src/helpers/uiHelper.ts
+0
-0
init.ts
libs/remix-lib/src/init.ts
+0
-0
storage.ts
libs/remix-lib/src/storage.ts
+0
-0
universalDapp.ts
libs/remix-lib/src/universalDapp.ts
+0
-0
util.ts
libs/remix-lib/src/util.ts
+6
-6
dummyProvider.ts
libs/remix-lib/src/web3Provider/dummyProvider.ts
+0
-0
web3Providers.ts
libs/remix-lib/src/web3Provider/web3Providers.ts
+0
-0
web3VmProvider.ts
libs/remix-lib/src/web3Provider/web3VmProvider.ts
+0
-0
No files found.
libs/remix-lib/src/eventManager.
j
s
→
libs/remix-lib/src/eventManager.
t
s
View file @
0071cd2d
File moved
libs/remix-lib/src/execution/eventsDecoder.
j
s
→
libs/remix-lib/src/execution/eventsDecoder.
t
s
View file @
0071cd2d
'use strict'
const
ethers
=
require
(
'ethers'
)
import
{
ethers
}
from
'ethers'
const
txHelper
=
require
(
'./txHelper'
)
/**
...
...
@@ -7,6 +7,8 @@ const txHelper = require('./txHelper')
*
*/
class
EventsDecoder
{
resolveReceipt
constructor
({
resolveReceipt
})
{
this
.
resolveReceipt
=
resolveReceipt
}
...
...
libs/remix-lib/src/execution/execution-context.
j
s
→
libs/remix-lib/src/execution/execution-context.
t
s
View file @
0071cd2d
/* global ethereum */
'use strict'
const
Web3
=
require
(
'web3'
)
import
Web3
from
'web3'
const
EventManager
=
require
(
'../eventManager'
)
const
EthJSVM
=
require
(
'ethereumjs-vm'
).
default
const
ethUtil
=
require
(
'ethereumjs-util'
)
...
...
@@ -12,8 +12,8 @@ const LogsManager = require('./logsManager.js')
const
rlp
=
ethUtil
.
rlp
let
web3
if
(
typeof
window
!==
'undefined'
&&
typeof
window
.
ethereum
!==
'undefined'
)
{
var
injectedProvider
=
window
.
ethereum
if
(
typeof
window
!==
'undefined'
&&
typeof
window
[
'ethereum'
]
!==
'undefined'
)
{
var
injectedProvider
=
window
[
'ethereum'
]
web3
=
new
Web3
(
injectedProvider
)
}
else
{
web3
=
new
Web3
(
new
Web3
.
providers
.
HttpProvider
(
'http://localhost:8545'
))
...
...
libs/remix-lib/src/execution/logsManager.
j
s
→
libs/remix-lib/src/execution/logsManager.
t
s
View file @
0071cd2d
File moved
libs/remix-lib/src/execution/txExecution.
j
s
→
libs/remix-lib/src/execution/txExecution.
t
s
View file @
0071cd2d
'use strict'
const
ethers
=
require
(
'ethers'
)
import
{
ethers
}
from
'ethers'
module
.
exports
=
{
/**
...
...
libs/remix-lib/src/execution/txFormat.
j
s
→
libs/remix-lib/src/execution/txFormat.
t
s
View file @
0071cd2d
File moved
libs/remix-lib/src/execution/txHelper.
j
s
→
libs/remix-lib/src/execution/txHelper.
t
s
View file @
0071cd2d
'use strict'
const
ethers
=
require
(
'ethers'
)
import
{
ethers
}
from
'ethers'
module
.
exports
=
{
makeFullTypeDefinition
:
function
(
typeDef
)
{
...
...
@@ -76,7 +76,7 @@ module.exports = {
if
(
abi
[
i
].
type
===
'constructor'
)
{
funABI
.
inputs
=
abi
[
i
].
inputs
||
[]
funABI
.
payable
=
abi
[
i
].
payable
funABI
.
stateMutability
=
abi
[
i
].
stateMutability
funABI
[
'stateMutability'
]
=
abi
[
i
].
stateMutability
break
}
}
...
...
libs/remix-lib/src/execution/txListener.
j
s
→
libs/remix-lib/src/execution/txListener.
t
s
View file @
0071cd2d
'use strict'
const
async
=
require
(
'async'
)
const
ethers
=
require
(
'ethers'
)
import
async
from
'async'
import
{
ethers
}
from
'ethers'
const
ethJSUtil
=
require
(
'ethereumjs-util'
)
const
EventManager
=
require
(
'../eventManager'
)
const
codeUtil
=
require
(
'../util'
)
...
...
@@ -28,6 +28,17 @@ function addExecutionCosts(txResult, tx) {
*/
class
TxListener
{
event
executionContext
_resolvedTransactions
_api
_resolvedContracts
_isListening
:
boolean
_listenOnNetwork
:
boolean
_loopId
blocks
lastBlock
constructor
(
opt
,
executionContext
)
{
this
.
event
=
new
EventManager
()
// has a default for now for backwards compatability
...
...
libs/remix-lib/src/execution/txRunner.
j
s
→
libs/remix-lib/src/execution/txRunner.
t
s
View file @
0071cd2d
'use strict'
const
EthJSTX
=
require
(
'ethereumjs-tx'
).
Transaction
const
EthJSBlock
=
require
(
'ethereumjs-block'
)
const
ethJSUtil
=
require
(
'ethereumjs-util'
)
const
BN
=
ethJSUtil
.
BN
import
{
BN
}
from
'ethereumjs-util'
const
defaultExecutionContext
=
require
(
'./execution-context'
)
const
EventManager
=
require
(
'../eventManager'
)
class
TxRunner
{
event
executionContext
_api
blockNumber
runAsync
pendingTxs
vmaccounts
queusTxs
blocks
constructor
(
vmaccounts
,
api
,
executionContext
)
{
this
.
event
=
new
EventManager
()
// has a default for now for backwards compatability
...
...
@@ -63,7 +73,7 @@ class TxRunner {
resolve
({
result
,
tx
,
transactionHash
:
result
?
result
.
transactionHash
:
null
transactionHash
:
result
?
result
[
'transactionHash'
]
:
null
})
})
}
...
...
@@ -167,7 +177,7 @@ class TxRunner {
const
tx
=
{
from
:
from
,
to
:
to
,
data
:
data
,
value
:
value
}
if
(
useCall
)
{
tx
.
gas
=
gasLimit
tx
[
'gas'
]
=
gasLimit
return
this
.
executionContext
.
web3
().
eth
.
call
(
tx
,
function
(
error
,
result
)
{
callback
(
error
,
{
result
:
result
,
...
...
@@ -182,7 +192,7 @@ class TxRunner {
}
gasEstimationForceSend
(
err
,
()
=>
{
// callback is called whenever no error
tx
.
gas
=
!
gasEstimation
?
gasLimit
:
gasEstimation
tx
[
'gas'
]
=
!
gasEstimation
?
gasLimit
:
gasEstimation
if
(
this
.
_api
.
config
.
getUnpersistedProperty
(
'doNotShowTransactionConfirmationAgain'
))
{
return
this
.
_executeTx
(
tx
,
null
,
this
.
_api
,
promptCb
,
callback
)
...
...
@@ -194,7 +204,7 @@ class TxRunner {
return
}
confirmCb
(
network
,
tx
,
tx
.
gas
,
(
gasPrice
)
=>
{
confirmCb
(
network
,
tx
,
tx
[
'gas'
]
,
(
gasPrice
)
=>
{
return
this
.
_executeTx
(
tx
,
gasPrice
,
this
.
_api
,
promptCb
,
callback
)
},
(
error
)
=>
{
callback
(
error
)
...
...
@@ -248,7 +258,7 @@ async function tryTillTxAvailable (txhash, executionContext) {
async
function
pause
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(
resolve
,
500
)
})
}
function
run
(
self
,
tx
,
stamp
,
confirmationCb
,
gasEstimationForceSend
,
promptCb
,
callback
)
{
function
run
(
self
,
tx
,
stamp
,
confirmationCb
,
gasEstimationForceSend
=
null
,
promptCb
=
null
,
callback
=
null
)
{
if
(
!
self
.
runAsync
&&
Object
.
keys
(
self
.
pendingTxs
).
length
)
{
return
self
.
queusTxs
.
push
({
tx
,
stamp
,
callback
})
}
...
...
libs/remix-lib/src/execution/typeConversion.
j
s
→
libs/remix-lib/src/execution/typeConversion.
t
s
View file @
0071cd2d
File moved
libs/remix-lib/src/helpers/compilerHelper.
j
s
→
libs/remix-lib/src/helpers/compilerHelper.
t
s
View file @
0071cd2d
File moved
libs/remix-lib/src/helpers/txResultHelper.
j
s
→
libs/remix-lib/src/helpers/txResultHelper.
t
s
View file @
0071cd2d
File moved
libs/remix-lib/src/helpers/uiHelper.
j
s
→
libs/remix-lib/src/helpers/uiHelper.
t
s
View file @
0071cd2d
File moved
libs/remix-lib/src/init.
j
s
→
libs/remix-lib/src/init.
t
s
View file @
0071cd2d
File moved
libs/remix-lib/src/storage.
j
s
→
libs/remix-lib/src/storage.
t
s
View file @
0071cd2d
File moved
libs/remix-lib/src/universalDapp.
j
s
→
libs/remix-lib/src/universalDapp.
t
s
View file @
0071cd2d
File moved
libs/remix-lib/src/util.
j
s
→
libs/remix-lib/src/util.
t
s
View file @
0071cd2d
'use strict'
const
ethutil
=
require
(
'ethereumjs-util'
)
import
{
BN
,
bufferToHex
,
keccak
,
setLengthLeft
}
from
'ethereumjs-util'
/*
contains misc util: @TODO should be splitted
...
...
@@ -48,10 +48,10 @@ module.exports = {
const
ret
=
[]
for
(
let
k
in
bnList
)
{
const
v
=
bnList
[
k
]
if
(
ethutil
.
BN
.
isBN
(
v
))
{
if
(
BN
.
isBN
(
v
))
{
ret
.
push
(
'0x'
+
v
.
toString
(
'hex'
,
64
))
}
else
{
ret
.
push
(
'0x'
+
(
new
ethutil
.
BN
(
v
)).
toString
(
'hex'
,
64
))
// TEMP FIX TO REMOVE ONCE https://github.com/ethereumjs/ethereumjs-vm/pull/293 is released
ret
.
push
(
'0x'
+
(
new
BN
(
v
)).
toString
(
'hex'
,
64
))
// TEMP FIX TO REMOVE ONCE https://github.com/ethereumjs/ethereumjs-vm/pull/293 is released
}
}
return
ret
...
...
@@ -161,9 +161,9 @@ module.exports = {
if
(
typeof
value
===
'string'
&&
value
.
indexOf
(
'0x'
)
!==
0
)
{
value
=
'0x'
+
value
}
let
ret
=
ethutil
.
bufferToHex
(
ethutil
.
setLengthLeft
(
value
,
32
))
ret
=
ethutil
.
keccak
(
ret
)
return
ethutil
.
bufferToHex
(
ret
)
let
ret
:
any
=
bufferToHex
(
setLengthLeft
(
value
,
32
))
ret
=
keccak
(
ret
)
return
bufferToHex
(
ret
)
},
/**
...
...
libs/remix-lib/src/web3Provider/dummyProvider.
j
s
→
libs/remix-lib/src/web3Provider/dummyProvider.
t
s
View file @
0071cd2d
File moved
libs/remix-lib/src/web3Provider/web3Providers.
j
s
→
libs/remix-lib/src/web3Provider/web3Providers.
t
s
View file @
0071cd2d
File moved
libs/remix-lib/src/web3Provider/web3VmProvider.
j
s
→
libs/remix-lib/src/web3Provider/web3VmProvider.
t
s
View file @
0071cd2d
File moved
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