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
c5722689
Unverified
Commit
c5722689
authored
Feb 28, 2018
by
yann300
Committed by
GitHub
Feb 28, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #710 from ethereum/yann300-patch-1
use solc for linking library
parents
00629a0b
33c1dd1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
txFormat.js
remix-lib/src/execution/txFormat.js
+3
-8
No files found.
remix-lib/src/execution/txFormat.js
View file @
c5722689
...
...
@@ -3,6 +3,8 @@ var ethJSABI = require('ethereumjs-abi')
var
helper
=
require
(
'./txHelper'
)
var
executionContext
=
require
(
'./execution-context'
)
var
asyncJS
=
require
(
'async'
)
var
solcLinker
=
require
(
'solc/linker'
)
var
ethJSUtil
=
require
(
'ethereumjs-util'
)
module
.
exports
=
{
...
...
@@ -226,14 +228,7 @@ module.exports = {
},
linkLibrary
:
function
(
libraryName
,
address
,
bytecodeToLink
)
{
var
libLabel
=
'__'
+
libraryName
+
Array
(
39
-
libraryName
.
length
).
join
(
'_'
)
if
(
bytecodeToLink
.
indexOf
(
libLabel
)
===
-
1
)
return
bytecodeToLink
address
=
Array
(
40
-
address
.
length
+
1
).
join
(
'0'
)
+
address
while
(
bytecodeToLink
.
indexOf
(
libLabel
)
>=
0
)
{
bytecodeToLink
=
bytecodeToLink
.
replace
(
libLabel
,
address
)
}
return
bytecodeToLink
return
solcLinker
.
linkBytecode
(
bytecodeToLink
,
{
[
libraryName
]:
ethJSUtil
.
addHexPrefix
(
address
)
})
},
decodeResponse
:
function
(
response
,
fnabi
)
{
...
...
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