Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#98 Allow for descriminate-types options and other typechain flags #99

Merged
merged 10 commits into from
May 15, 2022

Conversation

ShravanSunder
Copy link
Contributor

@ShravanSunder ShravanSunder commented May 13, 2022

# Conflicts:
#	packages/eth-sdk/src/client/generateTsClient.ts
#	packages/eth-sdk/src/client/generateTypes.ts
@changeset-bot
Copy link

changeset-bot bot commented May 13, 2022

🦋 Changeset detected

Latest commit: 8a74669

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ShravanSunder ShravanSunder marked this pull request as ready for review May 13, 2022 12:12
@ShravanSunder
Copy link
Contributor Author

cc: @krzkaczor

@ShravanSunder ShravanSunder changed the title #98 inital flags #98 Allow for descriminate-types options and other typechain flags May 13, 2022
Copy link
Member

@krzkaczor krzkaczor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if you want to make tweak to TypeChain or do you want to merge this as it is -- we can always tweak default flags sometime later.

packages/eth-sdk/src/config/types.ts Outdated Show resolved Hide resolved
@@ -19,7 +20,17 @@ export async function generateSdk(ctx: EthSdkCtx): Promise<void> {
const outputToAbiRelativePath = relative(outputPath, abisRoot).replace(/\\/g, '/')

const randomTmpDir = await fs.tmpDir('eth-sdk')
await generateTsClient(contracts, abisRoot, randomTmpDir, outputToAbiRelativePath, fs)

const shapedFlag: CodegenConfig = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that we provide defaults for the second time here. Could you make a PR to TypeChain that would export DEFAULT_FLAGS? Then we could simply use them here and add only user provided flags

@ShravanSunder
Copy link
Contributor Author

@krzkaczor i'm unable to develop typechain due to pnpm issues, maybe we can mere this as is and make another PR for the default flags? I'll push change to the name of the flag

@ShravanSunder
Copy link
Contributor Author

@krzkaczor made the change you suggested, if possible lets do the default change in a seperate PR? :)

@krzkaczor
Copy link
Member

@ShravanSunder yes we can merge this but build failed. Can you take a look. And please pull before fixing it because I pushed changeset fix.

@ShravanSunder
Copy link
Contributor Author

@krzkaczor fixed! 🙏🏽

@krzkaczor krzkaczor merged commit cd56037 into dethcrypto:master May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants