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
c2e117d0
Commit
c2e117d0
authored
Mar 28, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix test
parent
97ee2523
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
txFormat.js
remix-lib/src/execution/txFormat.js
+3
-3
txFormat.js
remix-lib/test/txFormat.js
+6
-6
No files found.
remix-lib/src/execution/txFormat.js
View file @
c2e117d0
...
...
@@ -90,7 +90,7 @@ module.exports = {
bytecodeToDeploy
=
bytecode
+
dataHex
return
callback
(
null
,
{
dataHex
:
bytecodeToDeploy
,
funAbi
,
funArgs
,
contractBytecode
,
contractName
:
contractName
})
}
},
callbackStep
)
},
callbackStep
,
callbackDeployLibrary
)
return
}
else
{
dataHex
=
bytecodeToDeploy
+
dataHex
...
...
@@ -170,9 +170,9 @@ module.exports = {
return
callback
(
null
,
contract
.
evm
.
bytecode
.
object
)
}
if
(
contract
.
evm
.
bytecode
.
linkReferences
&&
Object
.
keys
(
contract
.
evm
.
bytecode
.
linkReferences
).
length
)
{
this
.
linkBytecodeStandard
(
contract
,
contracts
,
callback
,
callbackStep
)
this
.
linkBytecodeStandard
(
contract
,
contracts
,
callback
,
callbackStep
,
callbackDeployLibrary
)
}
else
{
this
.
linkBytecodeLegacy
(
contract
,
contracts
,
callback
,
callbackStep
)
this
.
linkBytecodeLegacy
(
contract
,
contracts
,
callback
,
callbackStep
,
callbackDeployLibrary
)
}
},
...
...
remix-lib/test/txFormat.js
View file @
c2e117d0
...
...
@@ -39,21 +39,21 @@ tape('ContractParameters - (TxFormat.buildData) - link Libraries', function (t)
lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2
:
'0xf7a10e525d4b168f45f74db1b61f63d3e7619e33'
,
testContractLinkLibrary
:
'0xf7a10e525d4b168f45f74db1b61f63d3e7619e22'
}
var
udapp
=
{
runTx
:
(
param
,
callback
)
=>
{
var
callbackDeployLibraries
=
(
param
,
callback
)
=>
{
callback
(
null
,
{
result
:
{
createdAddress
:
fakeDeployedContracts
[
param
.
data
.
contractName
]
}
})
}
}
// fake
context
=
{
output
,
contract
,
udapp
}
}
// fake
context
=
{
output
,
contract
}
t
.
test
(
'(TxFormat.buildData and link library (standard way))'
,
function
(
st
)
{
st
.
plan
(
6
)
testLinkLibrary
(
st
,
fakeDeployedContracts
)
testLinkLibrary
(
st
,
fakeDeployedContracts
,
callbackDeployLibraries
)
})
})
function
testLinkLibrary
(
st
,
fakeDeployedContracts
)
{
function
testLinkLibrary
(
st
,
fakeDeployedContracts
,
callbackDeployLibraries
)
{
var
deployMsg
=
[
'creation of library test.sol:lib1 pending...'
,
'creation of library test.sol:lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2_lib2 pending...'
]
txFormat
.
buildData
(
'testContractLinkLibrary'
,
context
.
contract
,
context
.
output
.
contracts
,
true
,
context
.
contract
.
abi
[
0
],
''
,
(
error
,
data
)
=>
{
...
...
@@ -70,7 +70,7 @@ function testLinkLibrary (st, fakeDeployedContracts) {
},
(
msg
)
=>
{
st
.
equal
(
msg
,
deployMsg
[
0
])
deployMsg
.
shift
()
},
()
=>
{}
)
},
callbackDeployLibraries
)
}
var
uintContract
=
`contract uintContractTest {
...
...
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