-
Notifications
You must be signed in to change notification settings - Fork 3
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
Creating 1155 Watcher - inputConfig.contracts.map is not a function #223
Comments
The above error is thrown because of a missing The config used:
Note: The contract restricts the Solidity version between
You don't need to manually create the watcher folder, code generator does it for you. I ran the generated watcher as a
Response:
|
Hi @prathamesh0. Thank you for the PR and all the detail on how to get the BAYC watcher to a completion point. The next, broader question I have is with respect to the dependency management issue. As I understand it, we have a divergence in this repo's codegen code versus the BAYC solidity files (because their libraries are pinned to a specific range). If we fast forward 5+ years from now, this type of problem will become more and more prevalent. Watcher data will need to address many historic contracts, but the watcher codebase will continue to evolve. Manually moving the dependency version numbers is both manual and will create breaking changes versus the evolving codebase. Overarching strategies would be:
To proceed with option 2, we would need to be stricter in our codegen/package.json and yarn.lock file to not allow minor or major increments, and instead only allow patch upgrades. So we would want to use ~ vs ^. Then we would need to have some form of detector that would default to using the latest version of codegen, but flagging projects that were too old and recommending a tagged version that meets the range within the solidity file. I suggest we do this in three phases:
I'm happy to take on item 2. |
We don't need to do any of this. It's just a solc tooling issue... there are several ways to address these Ethereum tooling problems, I think talking about 5 years from now is way out of scope. When we have random people using the SDK, we'll solve this issue by integrating with https://github.com/foundry-rs/foundry, https://github.com/ApeWorX/ape, https://github.com/NomicFoundation/hardhat, etc. We don't even have an SDK at the moment. |
resolved |
Here is my config file:
I have made the folder in the folder above (mkdir ../bayc-watcher) and the BAYC.sol file is in the same folder as the config. To see the BAYC contract file (flattened), visit: https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code#L1.
The error when trying to run with the config is as follows:
The text was updated successfully, but these errors were encountered: