clean var name (linkBytecode)

pull/1/head
yann300 7 years ago
parent 922fc5d8a3
commit 183b79c64c
  1. 6
      src/app/execution/txFormat.js

@ -73,11 +73,11 @@ module.exports = {
if (bytecode.indexOf('_') < 0) {
return callback(null, bytecode)
}
var m = bytecode.match(/__([^_]{1,36})__/)
if (!m) {
var libraryRefMatch = bytecode.match(/__([^_]{1,36})__/)
if (!libraryRefMatch) {
return callback('Invalid bytecode format.')
}
var libraryName = m[1]
var libraryName = libraryRefMatch[1]
var libraryabi = helper.getContractByName(libraryName, contracts)
if (!libraryabi) {
return callback('Library ' + libraryName + ' not found.')

Loading…
Cancel
Save