argotorg / argotorg/solc-js

CLI generates weird names for smart contract files

Open
#219 0 comments 3 reactions 0 assignees View on GitHub
good first issue low effort low impact nice to have refactor
Dominant language
TypeScript
Stars
1.5k
Forks
349
Avg merge
8m
Merged PRs (30d)
1

Description

Command: `solcjs --overwrite --abi --bin -o ./test/contract-artifacts ./test/contracts/*`

When using native `solc`, generated files have reasonable names like `DumbContract.abi`, `DumbContract.bin` (same as original). With solcjs filenames contain full path like: `__test_contracts_DumbContract_sol_DumbContract.abi`

Is this behaviour intended? It makes it painful to work with generated files. We do it in integration tests for one of my projects and its super weird to work with these files later: https://github.com/Neufund/TypeChain/blob/master/test/integration/DumbContract.spec.ts#L5

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the solcjs CLI path that generates output filenames and compare its naming behavior with native solc. Use the TypeChain integration reference in test/integration/DumbContract.spec.ts to understand how the artifacts are consumed; done should mean generated ABI and binary files use the contract names without the full source path, with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity, typescript
Domain
cli, compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.