Closed codespool closed 1 year ago
What's the distinction between
contractName
andmoduleName
?
I noticed on imported contracts that directory name (used for contractName
) is often different than [package] name =
value. (used now for moduleName
)
Typechain used that package name value when creating it's directory structure and file names, so bugs were popping up when contactName
was used in constructing the paths for artifacts, tests etc.
I believe that was also the cause of some of the bugs reported.
What's the distinction between
contractName
andmoduleName
?I noticed on imported contracts that directory name (used for
contractName
) is often different than[package] name =
value. (used now formoduleName
) Typechain used that package name value when creating it's directory structure and file names, so bugs were popping up whencontactName
was used in constructing the paths for artifacts, tests etc. I believe that was also the cause of some of the bugs reported.
I see, And when user name contract with Camel case, compile fails, this should be fixed in future PRs https://github.com/AstarNetwork/swanky-cli/issues/151
Oh, this is actually a bug in this PR, good catch! When generated, the moduleName should be snake_case. I'll fix it right away. (that'll close #151 )
Main feature is introducing a
--convert
flag toinit
command. (#111 ) Also handled are #113 and #83 .Some changes to how
init
works are introduced:To test:
swanky init proj_name --convert path_to_existing_project
workspace
members
andexclude
fieldsmembers
are contracts, andexclude
are extra cratesNote: the converted project is not expected to work out-of-the-box when converted, but should require minimum adjustments.