diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-08 04:11:09 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-10 23:46:57 +0800 |
commit | 3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4 (patch) | |
tree | 5cff4a892b4094b972b59f119cb2998088fcea76 /packages/deployer/src | |
parent | c64ad1af28ef116e210aafb3ea6ad2138361cd7c (diff) | |
download | dexon-0x-contracts-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar.gz dexon-0x-contracts-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar.zst dexon-0x-contracts-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.zip |
Remove deployer from metacoin and contract tests
Diffstat (limited to 'packages/deployer/src')
-rw-r--r-- | packages/deployer/src/compiler.ts | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/packages/deployer/src/compiler.ts b/packages/deployer/src/compiler.ts index e81df3c0a..efb30091b 100644 --- a/packages/deployer/src/compiler.ts +++ b/packages/deployer/src/compiler.ts @@ -134,7 +134,7 @@ export class Compiler { const isUserOnLatestVersion = currentArtifact.schemaVersion === constants.LATEST_ARTIFACT_VERSION; const didCompilerSettingsChange = !_.isEqual(currentArtifact.compiler.settings, this._compilerSettings); const didSourceChange = currentArtifact.sourceTreeHashHex !== sourceTreeHashHex; - shouldCompile = isUserOnLatestVersion || didCompilerSettingsChange || didSourceChange; + shouldCompile = !isUserOnLatestVersion || didCompilerSettingsChange || didSourceChange; } if (!shouldCompile) { return; @@ -203,6 +203,20 @@ export class Compiler { }. Please make sure your contract has the same name as it's file name`, ); } + if (!_.isUndefined(compiledData.evm)) { + if (!_.isUndefined(compiledData.evm.bytecode) && !_.isUndefined(compiledData.evm.bytecode.object)) { + compiledData.evm.bytecode.object = ethUtil.addHexPrefix(compiledData.evm.bytecode.object); + } + if ( + !_.isUndefined(compiledData.evm.deployedBytecode) && + !_.isUndefined(compiledData.evm.deployedBytecode.object) + ) { + compiledData.evm.deployedBytecode.object = ethUtil.addHexPrefix( + compiledData.evm.deployedBytecode.object, + ); + } + } + const sourceCodes = _.mapValues( compiled.sources, (_1, sourceFilePath) => this._resolver.resolve(sourceFilePath).source, |