feat(smart-contracts): BatchConversionContract 0.2.0 mainnet artifact#1743
Conversation
Greptile SummaryThis PR adds the
Confidence Score: 4/5Safe to merge after addressing or accepting the WEB3_PROVIDER_URL logging concern; the artifact addition and deploy loop fixes are correct. The artifact addition and loop-control fixes are solid. One concrete finding remains: a new console.warn logs WEB3_PROVIDER_URL verbatim, which can expose embedded API keys (e.g., Infura/Alchemy project secrets) in CI/CD logs. Whether that risk is acceptable in a deployer-only script is a judgment call, but it is a real credential-exposure path introduced by this PR. packages/smart-contracts/scripts-create2/compute-one-address.ts — the new console.warn on error logs the full WEB3_PROVIDER_URL, including any embedded API key. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[deployWithCreate2FromList] --> B{for each contract}
B --> C[deployOneWithCreate2]
C --> D[xdeploy - CREATE2]
D --> E{deployment result}
E -->|deployed=true| F[deployed = 'success']
E -->|already on-chain| G[deployed = 'yes']
E -->|error| H[deployed stays 'no']
F & G --> I{deployed !== 'no'?}
H --> I
I -->|yes| J[setupContract]
I -->|no - continue| B
J --> B
B -->|done| K[Complete]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[deployWithCreate2FromList] --> B{for each contract}
B --> C[deployOneWithCreate2]
C --> D[xdeploy - CREATE2]
D --> E{deployment result}
E -->|deployed=true| F[deployed = 'success']
E -->|already on-chain| G[deployed = 'yes']
E -->|error| H[deployed stays 'no']
F & G --> I{deployed !== 'no'?}
H --> I
I -->|yes| J[setupContract]
I -->|no - continue| B
J --> B
B -->|done| K[Complete]
Reviews (8): Last reviewed commit: "compute-one-address warning cleanup" | Re-trigger Greptile |
2223de5 to
88abae0
Compare
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
88abae0 to
2c936eb
Compare
MantisClone
left a comment
There was a problem hiding this comment.
Approved 👍 pending the small comment below 👇 🚧
I traced the SDK path: v0.2.0 is registered, and payment + approval both use the same version option.
Main note: this is opt-in. Default is still v0.1.0, so RF needs to pass version: '0.2.0' to use the new mainnet contract.
Small ops note: manual setup reruns also need the v0.2.0 address passed explicitly, otherwise the fallback points at v0.1.0.
I agree with Greptile’s warning here:
compute-one-address.ts— the catch block emits a misleading "Unknown error" warning for intentional validation failures, which could slow down debugging of deployment issues.
I checked the code too: the catch also wraps known config/validation errors like missing salt, missing deployer address, or invalid initcode as “Unknown error.”
Description of the changes
Main addition:
The code changes only affect local commands:
yarn hardhat deploy-contracts-through-deployer:ADMIN_PRIVATE_KEYyarn hardhat verify-contract-from-deployer