aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src
diff options
context:
space:
mode:
authorF. Eugene Aumson <gene@aumson.org>2018-08-16 02:21:46 +0800
committerF. Eugene Aumson <gene@aumson.org>2018-08-16 02:21:46 +0800
commitd744468479bf88c89412115860e0b8c4cf2a48c1 (patch)
tree70b8da9e2bc2498b18b839657c02c282ca97e40b /packages/sol-compiler/src
parentc01810f0d755bdb3fa7b4b224a5a0d0493cd38a7 (diff)
downloaddexon-sol-tools-d744468479bf88c89412115860e0b8c4cf2a48c1.tar
dexon-sol-tools-d744468479bf88c89412115860e0b8c4cf2a48c1.tar.gz
dexon-sol-tools-d744468479bf88c89412115860e0b8c4cf2a48c1.tar.bz2
dexon-sol-tools-d744468479bf88c89412115860e0b8c4cf2a48c1.tar.lz
dexon-sol-tools-d744468479bf88c89412115860e0b8c4cf2a48c1.tar.xz
dexon-sol-tools-d744468479bf88c89412115860e0b8c4cf2a48c1.tar.zst
dexon-sol-tools-d744468479bf88c89412115860e0b8c4cf2a48c1.zip
rename variable inputsByVersion to versionToInputs
Diffstat (limited to 'packages/sol-compiler/src')
-rw-r--r--packages/sol-compiler/src/compiler.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts
index c62a4c0ca..0de8b8cad 100644
--- a/packages/sol-compiler/src/compiler.ts
+++ b/packages/sol-compiler/src/compiler.ts
@@ -114,7 +114,7 @@ export class Compiler {
* @param fileName Name of contract with '.sol' extension.
*/
private async _compileContractsAsync(contractNames: string[]): Promise<void> {
- const inputsByVersion: {
+ const versionToInputs: {
[solcVersion: string]: {
standardInput: solc.StandardInput;
contractsToCompile: string[];
@@ -158,8 +158,8 @@ export class Compiler {
const availableCompilerVersions = _.keys(binPaths);
solcVersion = semver.maxSatisfying(availableCompilerVersions, solcVersionRange);
}
- if (_.isUndefined(inputsByVersion[solcVersion])) {
- inputsByVersion[solcVersion] = {
+ if (_.isUndefined(versionToInputs[solcVersion])) {
+ versionToInputs[solcVersion] = {
standardInput: {
language: 'Solidity',
sources: {},
@@ -168,18 +168,18 @@ export class Compiler {
contractsToCompile: [],
};
}
- inputsByVersion[solcVersion].standardInput.sources[contractSource.path] = {
+ versionToInputs[solcVersion].standardInput.sources[contractSource.path] = {
content: contractSource.source,
};
- inputsByVersion[solcVersion].contractsToCompile.push(contractSource.path);
+ versionToInputs[solcVersion].contractsToCompile.push(contractSource.path);
}
- for (const solcVersion in inputsByVersion) {
- if (!inputsByVersion.hasOwnProperty(solcVersion)) {
+ for (const solcVersion in versionToInputs) {
+ if (!versionToInputs.hasOwnProperty(solcVersion)) {
continue;
}
- const input = inputsByVersion[solcVersion];
+ const input = versionToInputs[solcVersion];
logUtils.log(
`Compiling ${input.contractsToCompile.length} contracts (${
input.contractsToCompile