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 | |
parent | c64ad1af28ef116e210aafb3ea6ad2138361cd7c (diff) | |
download | dexon-sol-tools-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar dexon-sol-tools-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar.gz dexon-sol-tools-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar.bz2 dexon-sol-tools-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar.lz dexon-sol-tools-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar.xz dexon-sol-tools-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar.zst dexon-sol-tools-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.zip |
Remove deployer from metacoin and contract tests
Diffstat (limited to 'packages/deployer')
-rw-r--r-- | packages/deployer/README.md | 3 | ||||
-rw-r--r-- | packages/deployer/src/compiler.ts | 16 |
2 files changed, 16 insertions, 3 deletions
diff --git a/packages/deployer/README.md b/packages/deployer/README.md index ef0ddd59d..4c7de2cb0 100644 --- a/packages/deployer/README.md +++ b/packages/deployer/README.md @@ -29,13 +29,12 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol **Import** ```typescript -import { Deployer, Compiler } from '@0xproject/deployer'; +import { Compiler } from '@0xproject/deployer'; ``` or ```javascript -var Deployer = require('@0xproject/deployer').Deployer; var Compiler = require('@0xproject/deployer').Compiler; ``` 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, |