diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-06-29 16:04:06 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-06-29 22:52:54 +0800 |
commit | f02ada2d11b5dec6bc4615cba43a932821501473 (patch) | |
tree | d509f8c0ec2d301e891ef8a501f9dc9e66e41fd5 /packages/abi-gen | |
parent | 48970d34241f2197ab74d88bf4abb8764fdd0cd3 (diff) | |
download | dexon-sol-tools-f02ada2d11b5dec6bc4615cba43a932821501473.tar dexon-sol-tools-f02ada2d11b5dec6bc4615cba43a932821501473.tar.gz dexon-sol-tools-f02ada2d11b5dec6bc4615cba43a932821501473.tar.bz2 dexon-sol-tools-f02ada2d11b5dec6bc4615cba43a932821501473.tar.lz dexon-sol-tools-f02ada2d11b5dec6bc4615cba43a932821501473.tar.xz dexon-sol-tools-f02ada2d11b5dec6bc4615cba43a932821501473.tar.zst dexon-sol-tools-f02ada2d11b5dec6bc4615cba43a932821501473.zip |
Add a hack comment
Diffstat (limited to 'packages/abi-gen')
-rw-r--r-- | packages/abi-gen/src/index.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/abi-gen/src/index.ts b/packages/abi-gen/src/index.ts index c49f9dfa7..47f2c404b 100644 --- a/packages/abi-gen/src/index.ts +++ b/packages/abi-gen/src/index.ts @@ -73,6 +73,8 @@ function registerPartials(partialsGlob: string): void { function writeOutputFile(name: string, renderedTsCode: string): void { let fileName = toSnakeCase(name); + // HACK: Snake case doesn't make a lot of sense for abbreviated names but we can't reliably detect abbreviations + // so we special-case the abbreviations we use. fileName = fileName.replace('z_r_x', 'zrx').replace('e_r_c', 'erc'); const filePath = `${args.output}/${fileName}.ts`; fs.writeFileSync(filePath, renderedTsCode); |