-
Notifications
You must be signed in to change notification settings - Fork 43
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
F/OS-1184 generate viem ABIs #574
Conversation
packages/abi/src/v1_0_0.ts
Outdated
// Addresslist | ||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
export const addresslistAbi = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move this to a root/generated/ for example
packages/abi/wagmi.config.v1_0_0.ts
Outdated
import {defineConfig} from '@wagmi/cli'; | ||
import {hardhat} from '@wagmi/cli/plugins'; | ||
|
||
export default defineConfig({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to /configs folder
packages/abi/scripts/generate-abi.sh
Outdated
@@ -0,0 +1,10 @@ | |||
#!/bin/bash | |||
## Build the contracts | |||
yarn build:contracts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran this locally, it reverts in one of the scripts if the ALCHEMY KEY is not set in the .env
but then continues anyway. It should probably revert and exit. Same thing for requiring a private key to be set. I think that's because you put build contracts here instead of in the package.json so:
"generate:abi": "yarn build:contracts && ./script"
Would terminate the script if you have reverts in the prior stages. It's also a bit easier to see what's happening.
packages/abi/scripts/publish.sh
Outdated
@@ -0,0 +1,22 @@ | |||
#!/bin/bash | |||
yarn generate:abi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this should be here, even if it fails it will continue? Same as above basically
For the time being, we need some additional thought on bytecode artifacts and packages but the viem stuff is good we should keep the branch |
Description
This creates a package that generates viem ABIs with wagmi.
This is just a quick POC.
Things that may be missing:
Task ID: OS-1184
Type of change
See the framework lifecycle in
packages/contracts/docs/framework-lifecycle
to decide what kind of change this pull request is.Checklist:
CHANGELOG.md
file in the root folder.DEPLOYMENT_CHECKLIST
file in the root folder.UPDATE_CHECKLIST
file in the root folder.