aboutsummaryrefslogtreecommitdiffstats
path: root/packages/abi-gen
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-06-29 16:04:06 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-06-29 22:52:54 +0800
commitf02ada2d11b5dec6bc4615cba43a932821501473 (patch)
treed509f8c0ec2d301e891ef8a501f9dc9e66e41fd5 /packages/abi-gen
parent48970d34241f2197ab74d88bf4abb8764fdd0cd3 (diff)
downloaddexon-0x-contracts-f02ada2d11b5dec6bc4615cba43a932821501473.tar.gz
dexon-0x-contracts-f02ada2d11b5dec6bc4615cba43a932821501473.tar.zst
dexon-0x-contracts-f02ada2d11b5dec6bc4615cba43a932821501473.zip
Add a hack comment
Diffstat (limited to 'packages/abi-gen')
-rw-r--r--packages/abi-gen/src/index.ts2
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);