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
21e7ff4b
Commit
21e7ff4b
authored
Dec 02, 2020
by
aniket-engg
Committed by
Aniket
Dec 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build working fine
parent
2e9b7148
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
19 deletions
+19
-19
execution-context.ts
libs/remix-lib/src/execution/execution-context.ts
+2
-2
txHelper.ts
libs/remix-lib/src/execution/txHelper.ts
+1
-1
txRunner.ts
libs/remix-lib/src/execution/txRunner.ts
+4
-4
web3VmProvider.ts
libs/remix-lib/src/web3Provider/web3VmProvider.ts
+12
-12
No files found.
libs/remix-lib/src/execution/execution-context.ts
View file @
21e7ff4b
...
@@ -11,8 +11,8 @@ const LogsManager = require('./logsManager.js')
...
@@ -11,8 +11,8 @@ const LogsManager = require('./logsManager.js')
declare
let
ethereum
:
any
declare
let
ethereum
:
any
let
web3
let
web3
if
(
typeof
window
!==
'undefined'
&&
typeof
window
.
ethereum
!==
'undefined'
)
{
if
(
typeof
window
!==
'undefined'
&&
typeof
window
[
'ethereum'
]
!==
'undefined'
)
{
var
injectedProvider
=
window
.
ethereum
var
injectedProvider
=
window
[
'ethereum'
]
web3
=
new
Web3
(
injectedProvider
)
web3
=
new
Web3
(
injectedProvider
)
}
else
{
}
else
{
web3
=
new
Web3
(
new
Web3
.
providers
.
HttpProvider
(
'http://localhost:8545'
))
web3
=
new
Web3
(
new
Web3
.
providers
.
HttpProvider
(
'http://localhost:8545'
))
...
...
libs/remix-lib/src/execution/txHelper.ts
View file @
21e7ff4b
...
@@ -75,7 +75,7 @@ export function getConstructorInterface (abi) {
...
@@ -75,7 +75,7 @@ export function getConstructorInterface (abi) {
if
(
abi
[
i
].
type
===
'constructor'
)
{
if
(
abi
[
i
].
type
===
'constructor'
)
{
funABI
.
inputs
=
abi
[
i
].
inputs
||
[]
funABI
.
inputs
=
abi
[
i
].
inputs
||
[]
funABI
.
payable
=
abi
[
i
].
payable
funABI
.
payable
=
abi
[
i
].
payable
funABI
.
stateMutability
=
abi
[
i
].
stateMutability
funABI
[
'stateMutability'
]
=
abi
[
i
].
stateMutability
break
break
}
}
}
}
...
...
libs/remix-lib/src/execution/txRunner.ts
View file @
21e7ff4b
...
@@ -72,7 +72,7 @@ export class TxRunner {
...
@@ -72,7 +72,7 @@ export class TxRunner {
resolve
({
resolve
({
result
,
result
,
tx
,
tx
,
transactionHash
:
result
?
result
.
transactionHash
:
null
transactionHash
:
result
?
result
[
'transactionHash'
]
:
null
})
})
})
})
}
}
...
@@ -176,7 +176,7 @@ export class TxRunner {
...
@@ -176,7 +176,7 @@ export class TxRunner {
const
tx
=
{
from
:
from
,
to
:
to
,
data
:
data
,
value
:
value
}
const
tx
=
{
from
:
from
,
to
:
to
,
data
:
data
,
value
:
value
}
if
(
useCall
)
{
if
(
useCall
)
{
tx
.
gas
=
gasLimit
tx
[
'gas'
]
=
gasLimit
return
this
.
executionContext
.
web3
().
eth
.
call
(
tx
,
function
(
error
,
result
)
{
return
this
.
executionContext
.
web3
().
eth
.
call
(
tx
,
function
(
error
,
result
)
{
callback
(
error
,
{
callback
(
error
,
{
result
:
result
,
result
:
result
,
...
@@ -191,7 +191,7 @@ export class TxRunner {
...
@@ -191,7 +191,7 @@ export class TxRunner {
}
}
gasEstimationForceSend
(
err
,
()
=>
{
gasEstimationForceSend
(
err
,
()
=>
{
// callback is called whenever no error
// callback is called whenever no error
tx
.
gas
=
!
gasEstimation
?
gasLimit
:
gasEstimation
tx
[
'gas'
]
=
!
gasEstimation
?
gasLimit
:
gasEstimation
if
(
this
.
_api
.
config
.
getUnpersistedProperty
(
'doNotShowTransactionConfirmationAgain'
))
{
if
(
this
.
_api
.
config
.
getUnpersistedProperty
(
'doNotShowTransactionConfirmationAgain'
))
{
return
this
.
_executeTx
(
tx
,
null
,
this
.
_api
,
promptCb
,
callback
)
return
this
.
_executeTx
(
tx
,
null
,
this
.
_api
,
promptCb
,
callback
)
...
@@ -203,7 +203,7 @@ export class TxRunner {
...
@@ -203,7 +203,7 @@ export class TxRunner {
return
return
}
}
confirmCb
(
network
,
tx
,
tx
.
gas
,
(
gasPrice
)
=>
{
confirmCb
(
network
,
tx
,
tx
[
'gas'
]
,
(
gasPrice
)
=>
{
return
this
.
_executeTx
(
tx
,
gasPrice
,
this
.
_api
,
promptCb
,
callback
)
return
this
.
_executeTx
(
tx
,
gasPrice
,
this
.
_api
,
promptCb
,
callback
)
},
(
error
)
=>
{
},
(
error
)
=>
{
callback
(
error
)
callback
(
error
)
...
...
libs/remix-lib/src/web3Provider/web3VmProvider.ts
View file @
21e7ff4b
...
@@ -100,26 +100,26 @@ export class Web3VmProvider {
...
@@ -100,26 +100,26 @@ export class Web3VmProvider {
structLogs
:
[]
structLogs
:
[]
}
}
const
tx
=
{}
const
tx
=
{}
tx
.
hash
=
self
.
processingHash
tx
[
'hash'
]
=
self
.
processingHash
tx
.
from
=
toChecksumAddress
(
hexConvert
(
data
.
getSenderAddress
()))
tx
[
'from'
]
=
toChecksumAddress
(
hexConvert
(
data
.
getSenderAddress
()))
if
(
data
.
to
&&
data
.
to
.
length
)
{
if
(
data
.
to
&&
data
.
to
.
length
)
{
tx
.
to
=
toChecksumAddress
(
hexConvert
(
data
.
to
))
tx
[
'to'
]
=
toChecksumAddress
(
hexConvert
(
data
.
to
))
}
}
this
.
processingAddress
=
tx
.
to
this
.
processingAddress
=
tx
[
'to'
]
tx
.
data
=
hexConvert
(
data
.
data
)
tx
[
'data'
]
=
hexConvert
(
data
.
data
)
tx
.
input
=
hexConvert
(
data
.
input
)
tx
[
'input'
]
=
hexConvert
(
data
.
input
)
tx
.
gas
=
(
new
BN
(
hexConvert
(
data
.
gas
).
replace
(
'0x'
,
''
),
16
)).
toString
(
10
)
tx
[
'gas'
]
=
(
new
BN
(
hexConvert
(
data
.
gas
).
replace
(
'0x'
,
''
),
16
)).
toString
(
10
)
if
(
data
.
value
)
{
if
(
data
.
value
)
{
tx
.
value
=
hexConvert
(
data
.
value
)
tx
[
'value'
]
=
hexConvert
(
data
.
value
)
}
}
self
.
txs
[
self
.
processingHash
]
=
tx
self
.
txs
[
self
.
processingHash
]
=
tx
self
.
txsReceipt
[
self
.
processingHash
]
=
tx
self
.
txsReceipt
[
self
.
processingHash
]
=
tx
self
.
storageCache
[
self
.
processingHash
]
=
{}
self
.
storageCache
[
self
.
processingHash
]
=
{}
if
(
tx
.
to
)
{
if
(
tx
[
'to'
]
)
{
const
account
=
toBuffer
(
tx
.
to
)
const
account
=
toBuffer
(
tx
[
'to'
]
)
self
.
vm
.
stateManager
.
dumpStorage
(
account
,
(
storage
)
=>
{
self
.
vm
.
stateManager
.
dumpStorage
(
account
,
(
storage
)
=>
{
self
.
storageCache
[
self
.
processingHash
][
tx
.
to
]
=
storage
self
.
storageCache
[
self
.
processingHash
][
tx
[
'to'
]
]
=
storage
self
.
lastProcessedStorageTxHash
[
tx
.
to
]
=
self
.
processingHash
self
.
lastProcessedStorageTxHash
[
tx
[
'to'
]
]
=
self
.
processingHash
})
})
}
}
this
.
processingIndex
=
0
this
.
processingIndex
=
0
...
...
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