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
fcc623bf
Commit
fcc623bf
authored
Nov 14, 2018
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed solc.compileStandardWrapper to solc.compile
parent
96083a48
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
23 additions
and
23 deletions
+23
-23
staticAnalysisIntegration-test.js
...-analyzer/test/analysis/staticAnalysisIntegration-test.js
+1
-1
staticAnalysisIssues-test.js
remix-analyzer/test/analysis/staticAnalysisIssues-test.js
+1
-1
decodeInfo.js
remix-debug/test/decoder/decodeInfo.js
+2
-2
localDecoder.js
remix-debug/test/decoder/localDecoder.js
+4
-4
mapping.js
remix-debug/test/decoder/stateTests/mapping.js
+1
-1
storageDecoder.js
remix-debug/test/decoder/storageDecoder.js
+3
-3
storageLocation.js
remix-debug/test/decoder/storageLocation.js
+1
-1
tests.js
remix-debug/test/tests.js
+1
-1
sourceMappingDecoder.js
remix-lib/test/sourceMappingDecoder.js
+1
-1
txFormat.js
remix-lib/test/txFormat.js
+6
-6
compiler-worker.js
remix-solidity/src/compiler/compiler-worker.js
+1
-1
compiler.js
remix-solidity/src/compiler/compiler.js
+1
-1
No files found.
remix-analyzer/test/analysis/staticAnalysisIntegration-test.js
View file @
fcc623bf
...
@@ -41,7 +41,7 @@ var testFileAsts = {}
...
@@ -41,7 +41,7 @@ var testFileAsts = {}
testFiles
.
forEach
((
fileName
)
=>
{
testFiles
.
forEach
((
fileName
)
=>
{
var
content
=
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'test-contracts'
,
fileName
),
'utf8'
)
var
content
=
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'test-contracts'
,
fileName
),
'utf8'
)
testFileAsts
[
fileName
]
=
JSON
.
parse
(
compiler
.
compile
StandardWrapper
(
compilerInput
(
content
)))
testFileAsts
[
fileName
]
=
JSON
.
parse
(
compiler
.
compile
(
compilerInput
(
content
)))
})
})
test
(
'Integration test thisLocal.js'
,
function
(
t
)
{
test
(
'Integration test thisLocal.js'
,
function
(
t
)
{
...
...
remix-analyzer/test/analysis/staticAnalysisIssues-test.js
View file @
fcc623bf
...
@@ -11,7 +11,7 @@ var path = require('path')
...
@@ -11,7 +11,7 @@ var path = require('path')
function
compile
(
fileName
)
{
function
compile
(
fileName
)
{
var
content
=
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'test-contracts'
,
fileName
),
'utf8'
)
var
content
=
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'test-contracts'
,
fileName
),
'utf8'
)
return
JSON
.
parse
(
compiler
.
compile
StandardWrapper
(
compilerInput
(
content
)))
return
JSON
.
parse
(
compiler
.
compile
(
compilerInput
(
content
)))
}
}
test
(
'staticAnalysisIssues.functionParameterPassingError'
,
function
(
t
)
{
test
(
'staticAnalysisIssues.functionParameterPassingError'
,
function
(
t
)
{
...
...
remix-debug/test/decoder/decodeInfo.js
View file @
fcc623bf
...
@@ -12,7 +12,7 @@ var util = require('../../src/solidity-decoder/types/util')
...
@@ -12,7 +12,7 @@ var util = require('../../src/solidity-decoder/types/util')
tape
(
'solidity'
,
function
(
t
)
{
tape
(
'solidity'
,
function
(
t
)
{
t
.
test
(
'astHelper, decodeInfo'
,
function
(
st
)
{
t
.
test
(
'astHelper, decodeInfo'
,
function
(
st
)
{
var
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
contracts
))
var
output
=
compiler
.
compile
(
compilerInput
(
contracts
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
var
state
=
astHelper
.
extractStateDefinitions
(
'test.sol:contractUint'
,
output
.
sources
)
var
state
=
astHelper
.
extractStateDefinitions
(
'test.sol:contractUint'
,
output
.
sources
)
...
@@ -65,7 +65,7 @@ tape('solidity', function (t) {
...
@@ -65,7 +65,7 @@ tape('solidity', function (t) {
parsedType
=
decodeInfo
.
parseType
(
stateDef
[
5
].
attributes
.
type
,
states
,
'contractSmallVariable'
,
util
.
extractLocationFromAstVariable
(
stateDef
[
5
]))
parsedType
=
decodeInfo
.
parseType
(
stateDef
[
5
].
attributes
.
type
,
states
,
'contractSmallVariable'
,
util
.
extractLocationFromAstVariable
(
stateDef
[
5
]))
checkDecodeInfo
(
st
,
parsedType
,
1
,
2
,
'int16'
)
checkDecodeInfo
(
st
,
parsedType
,
1
,
2
,
'int16'
)
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
simplecontracts
))
output
=
compiler
.
compile
(
compilerInput
(
simplecontracts
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
state
=
astHelper
.
extractStateDefinitions
(
'test.sol:simpleContract'
,
output
.
sources
)
state
=
astHelper
.
extractStateDefinitions
(
'test.sol:simpleContract'
,
output
.
sources
)
...
...
remix-debug/test/decoder/localDecoder.js
View file @
fcc623bf
...
@@ -21,16 +21,16 @@ tape('solidity', function (t) {
...
@@ -21,16 +21,16 @@ tape('solidity', function (t) {
})
})
function
test
(
st
,
vm
,
privateKey
)
{
function
test
(
st
,
vm
,
privateKey
)
{
var
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
intLocal
.
contract
))
var
output
=
compiler
.
compile
(
compilerInput
(
intLocal
.
contract
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
intLocalTest
(
st
,
vm
,
privateKey
,
output
.
contracts
[
'test.sol'
][
'intLocal'
].
evm
.
bytecode
.
object
,
output
,
function
()
{
intLocalTest
(
st
,
vm
,
privateKey
,
output
.
contracts
[
'test.sol'
][
'intLocal'
].
evm
.
bytecode
.
object
,
output
,
function
()
{
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
miscLocal
.
contract
))
output
=
compiler
.
compile
(
compilerInput
(
miscLocal
.
contract
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
miscLocalTest
(
st
,
vm
,
privateKey
,
output
.
contracts
[
'test.sol'
][
'miscLocal'
].
evm
.
bytecode
.
object
,
output
,
function
()
{
miscLocalTest
(
st
,
vm
,
privateKey
,
output
.
contracts
[
'test.sol'
][
'miscLocal'
].
evm
.
bytecode
.
object
,
output
,
function
()
{
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
miscLocal
.
contract
))
output
=
compiler
.
compile
(
compilerInput
(
miscLocal
.
contract
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
misc2LocalTest
(
st
,
vm
,
privateKey
,
output
.
contracts
[
'test.sol'
][
'miscLocal2'
].
evm
.
bytecode
.
object
,
output
,
function
()
{
misc2LocalTest
(
st
,
vm
,
privateKey
,
output
.
contracts
[
'test.sol'
][
'miscLocal2'
].
evm
.
bytecode
.
object
,
output
,
function
()
{
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
structArrayLocal
.
contract
))
output
=
compiler
.
compile
(
compilerInput
(
structArrayLocal
.
contract
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
structArrayLocalTest
(
st
,
vm
,
privateKey
,
output
.
contracts
[
'test.sol'
][
'structArrayLocal'
].
evm
.
bytecode
.
object
,
output
,
function
()
{
structArrayLocalTest
(
st
,
vm
,
privateKey
,
output
.
contracts
[
'test.sol'
][
'structArrayLocal'
].
evm
.
bytecode
.
object
,
output
,
function
()
{
st
.
end
()
st
.
end
()
...
...
remix-debug/test/decoder/stateTests/mapping.js
View file @
fcc623bf
...
@@ -13,7 +13,7 @@ module.exports = function testMappingStorage (st, cb) {
...
@@ -13,7 +13,7 @@ module.exports = function testMappingStorage (st, cb) {
var
mappingStorage
=
require
(
'../contracts/mappingStorage'
)
var
mappingStorage
=
require
(
'../contracts/mappingStorage'
)
var
privateKey
=
Buffer
.
from
(
'dae9801649ba2d95a21e688b56f77905e5667c44ce868ec83f82e838712a2c7a'
,
'hex'
)
var
privateKey
=
Buffer
.
from
(
'dae9801649ba2d95a21e688b56f77905e5667c44ce868ec83f82e838712a2c7a'
,
'hex'
)
var
vm
=
vmCall
.
initVM
(
st
,
privateKey
)
var
vm
=
vmCall
.
initVM
(
st
,
privateKey
)
var
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
mappingStorage
.
contract
))
var
output
=
compiler
.
compile
(
compilerInput
(
mappingStorage
.
contract
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
vmCall
.
sendTx
(
vm
,
{
nonce
:
0
,
privateKey
:
privateKey
},
null
,
0
,
output
.
contracts
[
'test.sol'
][
'SimpleMappingState'
].
evm
.
bytecode
.
object
,
function
(
error
,
txHash
)
{
vmCall
.
sendTx
(
vm
,
{
nonce
:
0
,
privateKey
:
privateKey
},
null
,
0
,
output
.
contracts
[
'test.sol'
][
'SimpleMappingState'
].
evm
.
bytecode
.
object
,
function
(
error
,
txHash
)
{
if
(
error
)
{
if
(
error
)
{
...
...
remix-debug/test/decoder/storageDecoder.js
View file @
fcc623bf
...
@@ -23,7 +23,7 @@ tape('solidity', function (t) {
...
@@ -23,7 +23,7 @@ tape('solidity', function (t) {
function
testIntStorage
(
st
,
cb
)
{
function
testIntStorage
(
st
,
cb
)
{
var
intStorage
=
require
(
'./contracts/intStorage'
)
var
intStorage
=
require
(
'./contracts/intStorage'
)
var
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
intStorage
.
contract
))
var
output
=
compiler
.
compile
(
compilerInput
(
intStorage
.
contract
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
var
mockStorageResolver
var
mockStorageResolver
for
(
var
storage
of
[
intStorage
.
fullStorage
,
shrinkStorage
(
intStorage
.
fullStorage
)])
{
for
(
var
storage
of
[
intStorage
.
fullStorage
,
shrinkStorage
(
intStorage
.
fullStorage
)])
{
...
@@ -70,7 +70,7 @@ function testIntStorage (st, cb) {
...
@@ -70,7 +70,7 @@ function testIntStorage (st, cb) {
function
testByteStorage
(
st
,
cb
)
{
function
testByteStorage
(
st
,
cb
)
{
var
byteStorage
=
require
(
'./contracts/byteStorage'
)
var
byteStorage
=
require
(
'./contracts/byteStorage'
)
var
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
byteStorage
.
contract
))
var
output
=
compiler
.
compile
(
compilerInput
(
byteStorage
.
contract
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
var
mockStorageResolver
var
mockStorageResolver
for
(
var
storage
of
[
byteStorage
.
storage
,
shrinkStorage
(
byteStorage
.
storage
)])
{
for
(
var
storage
of
[
byteStorage
.
storage
,
shrinkStorage
(
byteStorage
.
storage
)])
{
...
@@ -183,7 +183,7 @@ function shrinkStorage (storage) {
...
@@ -183,7 +183,7 @@ function shrinkStorage (storage) {
function
testStructArrayStorage
(
st
,
cb
)
{
function
testStructArrayStorage
(
st
,
cb
)
{
var
structArrayStorage
=
require
(
'./contracts/structArrayStorage'
)
var
structArrayStorage
=
require
(
'./contracts/structArrayStorage'
)
var
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
structArrayStorage
.
contract
))
var
output
=
compiler
.
compile
(
compilerInput
(
structArrayStorage
.
contract
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
var
mockStorageResolver
=
new
MockStorageResolver
(
structArrayStorage
.
storage
)
var
mockStorageResolver
=
new
MockStorageResolver
(
structArrayStorage
.
storage
)
stateDecoder
.
solidityState
(
mockStorageResolver
,
output
.
sources
,
'structArrayStorage'
).
then
((
decoded
)
=>
{
stateDecoder
.
solidityState
(
mockStorageResolver
,
output
.
sources
,
'structArrayStorage'
).
then
((
decoded
)
=>
{
...
...
remix-debug/test/decoder/storageLocation.js
View file @
fcc623bf
...
@@ -8,7 +8,7 @@ var compilerInput = remixLib.helpers.compiler.compilerInput
...
@@ -8,7 +8,7 @@ var compilerInput = remixLib.helpers.compiler.compilerInput
tape
(
'solidity'
,
function
(
t
)
{
tape
(
'solidity'
,
function
(
t
)
{
t
.
test
(
'storage location'
,
function
(
st
)
{
t
.
test
(
'storage location'
,
function
(
st
)
{
var
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
contracts
))
var
output
=
compiler
.
compile
(
compilerInput
(
contracts
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
var
stateDec
=
stateDecoder
.
extractStateVariables
(
'contractUint'
,
output
.
sources
)
var
stateDec
=
stateDecoder
.
extractStateVariables
(
'contractUint'
,
output
.
sources
)
checkLocation
(
st
,
stateDec
[
0
].
storagelocation
,
0
,
0
)
checkLocation
(
st
,
stateDec
[
0
].
storagelocation
,
0
,
0
)
...
...
remix-debug/test/tests.js
View file @
fcc623bf
...
@@ -17,7 +17,7 @@ tape('debug contract', function (t) {
...
@@ -17,7 +17,7 @@ tape('debug contract', function (t) {
t
.
plan
(
12
)
t
.
plan
(
12
)
var
privateKey
=
Buffer
.
from
(
'dae9801649ba2d95a21e688b56f77905e5667c44ce868ec83f82e838712a2c7a'
,
'hex'
)
var
privateKey
=
Buffer
.
from
(
'dae9801649ba2d95a21e688b56f77905e5667c44ce868ec83f82e838712a2c7a'
,
'hex'
)
var
vm
=
vmCall
.
initVM
(
t
,
privateKey
)
var
vm
=
vmCall
.
initVM
(
t
,
privateKey
)
var
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
ballot
))
var
output
=
compiler
.
compile
(
compilerInput
(
ballot
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
var
web3VM
=
new
remixLib
.
vm
.
Web3VMProvider
()
var
web3VM
=
new
remixLib
.
vm
.
Web3VMProvider
()
web3VM
.
setVM
(
vm
)
web3VM
.
setVM
(
vm
)
...
...
remix-lib/test/sourceMappingDecoder.js
View file @
fcc623bf
...
@@ -7,7 +7,7 @@ var compilerInput = require('../src/helpers/compilerHelper').compilerInput
...
@@ -7,7 +7,7 @@ var compilerInput = require('../src/helpers/compilerHelper').compilerInput
tape
(
'SourceMappingDecoder'
,
function
(
t
)
{
tape
(
'SourceMappingDecoder'
,
function
(
t
)
{
t
.
test
(
'SourceMappingDecoder.findNodeAtInstructionIndex'
,
function
(
st
)
{
t
.
test
(
'SourceMappingDecoder.findNodeAtInstructionIndex'
,
function
(
st
)
{
var
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
contracts
))
var
output
=
compiler
.
compile
(
compilerInput
(
contracts
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
var
sourceMappingDecoder
=
new
SourceMappingDecoder
()
var
sourceMappingDecoder
=
new
SourceMappingDecoder
()
var
node
=
sourceMappingDecoder
.
findNodeAtInstructionIndex
(
'FunctionDefinition'
,
2
,
output
.
contracts
[
'test.sol'
][
'test'
].
evm
.
deployedBytecode
.
sourceMap
,
output
.
sources
[
'test.sol'
])
var
node
=
sourceMappingDecoder
.
findNodeAtInstructionIndex
(
'FunctionDefinition'
,
2
,
output
.
contracts
[
'test.sol'
][
'test'
].
evm
.
deployedBytecode
.
sourceMap
,
output
.
sources
[
'test.sol'
])
...
...
remix-lib/test/txFormat.js
View file @
fcc623bf
...
@@ -11,7 +11,7 @@ var executionContext = require('../src/execution/execution-context')
...
@@ -11,7 +11,7 @@ var executionContext = require('../src/execution/execution-context')
var
context
var
context
tape
(
'ContractParameters - (TxFormat.buildData) - format input parameters'
,
function
(
t
)
{
tape
(
'ContractParameters - (TxFormat.buildData) - format input parameters'
,
function
(
t
)
{
var
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
uintContract
))
var
output
=
compiler
.
compile
(
compilerInput
(
uintContract
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
var
contract
=
output
.
contracts
[
'test.sol'
][
'uintContractTest'
]
var
contract
=
output
.
contracts
[
'test.sol'
][
'uintContractTest'
]
context
=
{
output
,
contract
}
context
=
{
output
,
contract
}
...
@@ -37,7 +37,7 @@ function testWithInput (st, params, expected) {
...
@@ -37,7 +37,7 @@ function testWithInput (st, params, expected) {
tape
(
'ContractParameters - (TxFormat.buildData) - link Libraries'
,
function
(
t
)
{
tape
(
'ContractParameters - (TxFormat.buildData) - link Libraries'
,
function
(
t
)
{
executionContext
.
setContext
(
'vm'
)
executionContext
.
setContext
(
'vm'
)
var
compileData
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
deploySimpleLib
))
var
compileData
=
compiler
.
compile
(
compilerInput
(
deploySimpleLib
))
var
fakeDeployedContracts
=
{
var
fakeDeployedContracts
=
{
lib1
:
'0xf7a10e525d4b168f45f74db1b61f63d3e7619e11'
,
lib1
:
'0xf7a10e525d4b168f45f74db1b61f63d3e7619e11'
,
...
@@ -140,7 +140,7 @@ tape('EncodeParameter', function (t) {
...
@@ -140,7 +140,7 @@ tape('EncodeParameter', function (t) {
})
})
function
encodeFunctionCallTest
(
st
)
{
function
encodeFunctionCallTest
(
st
)
{
var
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
encodeFunctionCall
))
var
output
=
compiler
.
compile
(
compilerInput
(
encodeFunctionCall
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
var
contract
=
output
.
contracts
[
'test.sol'
][
'testContractLinkLibrary'
]
var
contract
=
output
.
contracts
[
'test.sol'
][
'testContractLinkLibrary'
]
txFormat
.
encodeFunctionCall
(
'123, "test string"'
,
contract
.
abi
[
0
],
(
error
,
encoded
)
=>
{
txFormat
.
encodeFunctionCall
(
'123, "test string"'
,
contract
.
abi
[
0
],
(
error
,
encoded
)
=>
{
...
@@ -154,7 +154,7 @@ function encodeFunctionCallTest (st) {
...
@@ -154,7 +154,7 @@ function encodeFunctionCallTest (st) {
tape
(
'test fallback function'
,
function
(
t
)
{
tape
(
'test fallback function'
,
function
(
t
)
{
t
.
test
(
'(fallback)'
,
function
(
st
)
{
t
.
test
(
'(fallback)'
,
function
(
st
)
{
st
.
plan
(
2
)
st
.
plan
(
2
)
var
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
fallbackFunction
))
var
output
=
compiler
.
compile
(
compilerInput
(
fallbackFunction
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
var
contract
=
output
.
contracts
[
'test.sol'
][
'fallbackFunctionContract'
]
var
contract
=
output
.
contracts
[
'test.sol'
][
'fallbackFunctionContract'
]
st
.
equal
(
txHelper
.
encodeFunctionId
(
contract
.
abi
[
0
]),
'0x805da4ad'
)
st
.
equal
(
txHelper
.
encodeFunctionId
(
contract
.
abi
[
0
]),
'0x805da4ad'
)
...
@@ -171,7 +171,7 @@ tape('test abiEncoderV2', function (t) {
...
@@ -171,7 +171,7 @@ tape('test abiEncoderV2', function (t) {
var
decodedData
=
`[
${
value1
}
,
${
value2
}
, "
${
value3
}
"], 23`
var
decodedData
=
`[
${
value1
}
,
${
value2
}
, "
${
value3
}
"], 23`
t
.
test
(
'(abiEncoderV2)'
,
function
(
st
)
{
t
.
test
(
'(abiEncoderV2)'
,
function
(
st
)
{
st
.
plan
(
2
)
st
.
plan
(
2
)
var
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
abiEncoderV2
))
var
output
=
compiler
.
compile
(
compilerInput
(
abiEncoderV2
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
var
contract
=
output
.
contracts
[
'test.sol'
][
'test'
]
var
contract
=
output
.
contracts
[
'test.sol'
][
'test'
]
txFormat
.
encodeFunctionCall
(
decodedData
,
contract
.
abi
[
0
],
(
error
,
encoded
)
=>
{
txFormat
.
encodeFunctionCall
(
decodedData
,
contract
.
abi
[
0
],
(
error
,
encoded
)
=>
{
...
@@ -194,7 +194,7 @@ tape('test abiEncoderV2 array of tuple', function (t) {
...
@@ -194,7 +194,7 @@ tape('test abiEncoderV2 array of tuple', function (t) {
*/
*/
st
.
plan
(
2
)
st
.
plan
(
2
)
var
output
=
compiler
.
compile
StandardWrapper
(
compilerInput
(
abiEncoderV2ArrayOfTuple
))
var
output
=
compiler
.
compile
(
compilerInput
(
abiEncoderV2ArrayOfTuple
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
var
contract
=
output
.
contracts
[
'test.sol'
][
'test'
]
var
contract
=
output
.
contracts
[
'test.sol'
][
'test'
]
txFormat
.
encodeParams
(
'[34, "test"]'
,
contract
.
abi
[
0
],
(
error
,
encoded
)
=>
{
txFormat
.
encodeParams
(
'[34, "test"]'
,
contract
.
abi
[
0
],
(
error
,
encoded
)
=>
{
...
...
remix-solidity/src/compiler/compiler-worker.js
View file @
fcc623bf
...
@@ -22,7 +22,7 @@ module.exports = function (self) {
...
@@ -22,7 +22,7 @@ module.exports = function (self) {
compileJSON
=
function
(
input
)
{
compileJSON
=
function
(
input
)
{
try
{
try
{
return
compiler
.
compile
StandardWrapper
(
input
,
function
(
path
)
{
return
compiler
.
compile
(
input
,
function
(
path
)
{
missingInputs
.
push
(
path
)
missingInputs
.
push
(
path
)
return
{
'error'
:
'Deferred import'
}
return
{
'error'
:
'Deferred import'
}
})
})
...
...
remix-solidity/src/compiler/compiler.js
View file @
fcc623bf
...
@@ -90,7 +90,7 @@ function Compiler (handleImportCall) {
...
@@ -90,7 +90,7 @@ function Compiler (handleImportCall) {
var
result
var
result
try
{
try
{
var
input
=
compilerInput
(
source
.
sources
,
{
optimize
:
optimize
,
target
:
source
.
target
})
var
input
=
compilerInput
(
source
.
sources
,
{
optimize
:
optimize
,
target
:
source
.
target
})
result
=
compiler
.
compile
StandardWrapper
(
input
,
missingInputsCallback
)
result
=
compiler
.
compile
(
input
,
missingInputsCallback
)
result
=
JSON
.
parse
(
result
)
result
=
JSON
.
parse
(
result
)
}
catch
(
exception
)
{
}
catch
(
exception
)
{
result
=
{
error
:
{
formattedMessage
:
'Uncaught JavaScript exception:
\
n'
+
exception
,
severity
:
'error'
,
mode
:
'panic'
}
}
result
=
{
error
:
{
formattedMessage
:
'Uncaught JavaScript exception:
\
n'
+
exception
,
severity
:
'error'
,
mode
:
'panic'
}
}
...
...
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