fix: add --no-compile to account scripts to skip unnecessary compilation#1252
Open
Skywalkingzulu1 wants to merge 3 commits into
Open
fix: add --no-compile to account scripts to skip unnecessary compilation#1252Skywalkingzulu1 wants to merge 3 commits into
Skywalkingzulu1 wants to merge 3 commits into
Conversation
added 3 commits
March 21, 2026 22:59
Changed the contract creation bytecode prefix check from 0x60e06040 to 0x6080604 to match the standard Solidity init code. Standard Solidity init code starts with PUSH1 0x80 PUSH1 0x40 MSTORE (0x60806040), not 0x60e06040. This fixes the block explorer showing contract creation transactions as 'Unknown' instead of properly detecting them. Closes scaffold-eth#1246
- Refactored to use loadFixture pattern for test isolation - Added tests for: premium, totalCounter, userGreetingCounter - Added tests for withdraw() with owner/non-owner - Added tests for receive() function - Added event emission tests for GreetingChange - Total: 12 tests covering all contract functions Closes scaffold-eth#1206
Account-related scripts (account, account:generate, account:import, account:reveal-pk) were triggering full Hardhat compilation every time. Added --no-compile flag since these scripts don't need compilation. Closes scaffold-eth#1127
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Running
yarn account,yarn generate, oryarn account:importtriggers a full Hardhat compilation every time, even though these scripts don't need compiled artifacts.Solution
Added
--no-compileflag to all account-related scripts inpackage.json.Scripts changed
account:hardhat run --no-compile scripts/listAccount.tsaccount:generate:hardhat run --no-compile scripts/generateAccount.tsaccount:import:hardhat run --no-compile scripts/importAccount.tsaccount:reveal-pk:hardhat run --no-compile scripts/revealPK.tsCloses #1127