-
Notifications
You must be signed in to change notification settings - Fork 2
contracts deployment with network compose files and fixes for gasless sequencer execution #5
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
Conversation
09694f8 to
bd6fc25
Compare
| const cloneAddress = await proxyCloneFactory.predictDeterministicAddress(vaultImplAddress, ethers.ZeroHash); | ||
|
|
||
| // Get the StakeManager contract instance | ||
| const stakeManager = await ethers.getContractAt("StakeManager", stakeManagerAddress); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
The fix involves removing the declaration of the unused variable stakeManager from line 68 in contracts/deploy/14_deploy_StatusNetwork_VaultFactory.ts. This is a single-line removal, and no further changes or modifications are needed since the variable is not referenced elsewhere in the active code. No additional imports, definitions, or dependencies are required. It is also not necessary to modify the commented-out code unless you intend to use stakeManager now.
| @@ -65,7 +65,6 @@ | ||
| const cloneAddress = await proxyCloneFactory.predictDeterministicAddress(vaultImplAddress, ethers.ZeroHash); | ||
|
|
||
| // Get the StakeManager contract instance | ||
| const stakeManager = await ethers.getContractAt("StakeManager", stakeManagerAddress); | ||
|
|
||
| // Set trusted codehash (this would need to be called by the owner/deployer) | ||
| console.log(`Setting trusted codehash for vault at ${cloneAddress}`); |
| import { | ||
| tryVerifyContractWithConstructorArgs, | ||
| getDeployedContractAddress, | ||
| tryStoreAddress, | ||
| getRequiredEnvVar, | ||
| LogContractDeployment, | ||
| } from "../common/helpers"; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
The best way to fix the unused import is to remove getRequiredEnvVar from the named import list on line 10 in the file contracts/deploy/17_deploy_StatusNetwork_KarmaNFT.ts. This change will reduce clutter, improve code understanding, and slightly decrease bundle size (if present). No other code modifications, module changes, or dependency updates are necessary.
| @@ -7,7 +7,6 @@ | ||
| tryVerifyContractWithConstructorArgs, | ||
| getDeployedContractAddress, | ||
| tryStoreAddress, | ||
| getRequiredEnvVar, | ||
| LogContractDeployment, | ||
| } from "../common/helpers"; | ||
|
|
| import fs from "fs"; | ||
| import path from "path"; | ||
| import * as dotenv from "dotenv"; | ||
| import { getEnvVarOrDefault, getRequiredEnvVar } from "../common/helpers/environment"; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the unused import issue, we should remove getRequiredEnvVar from the import statement on line 5 of contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts. Only getEnvVarOrDefault should remain imported, as this is the only function used from that module. No other changes are needed.
-
Copy modified line R5
| @@ -2,7 +2,7 @@ | ||
| import fs from "fs"; | ||
| import path from "path"; | ||
| import * as dotenv from "dotenv"; | ||
| import { getEnvVarOrDefault, getRequiredEnvVar } from "../common/helpers/environment"; | ||
| import { getEnvVarOrDefault } from "../common/helpers/environment"; | ||
| import { deployContractFromArtifacts, getInitializerData } from "../common/helpers/deployments"; | ||
| import { get1559Fees } from "../scripts/utils"; | ||
|
|
| import path from "path"; | ||
| import * as dotenv from "dotenv"; | ||
| import { getEnvVarOrDefault, getRequiredEnvVar } from "../common/helpers/environment"; | ||
| import { deployContractFromArtifacts, getInitializerData } from "../common/helpers/deployments"; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, the two unused imports (deployContractFromArtifacts, getInitializerData) should be removed from the import statement on line 6 in contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts. The modified import should only contain what is actually needed from ../common/helpers/deployments (if anything); if nothing is used, the import line should be removed entirely. This change should not affect any existing functionality, since neither import is used anywhere in the file.
There are no further code changes necessary. No external dependencies or definitions are involved.
-
Copy modified line R6
| @@ -3,7 +3,7 @@ | ||
| import path from "path"; | ||
| import * as dotenv from "dotenv"; | ||
| import { getEnvVarOrDefault, getRequiredEnvVar } from "../common/helpers/environment"; | ||
| import { deployContractFromArtifacts, getInitializerData } from "../common/helpers/deployments"; | ||
| // import from "../common/helpers/deployments" removed: unused imports (deployContractFromArtifacts, getInitializerData) | ||
| import { get1559Fees } from "../scripts/utils"; | ||
|
|
||
| dotenv.config(); |
| const provider = new ethers.JsonRpcProvider(process.env.RPC_URL || "http://localhost:8545"); | ||
| const wallet = new ethers.Wallet(process.env.PRIVATE_KEY || process.env.L2_PRIVATE_KEY!, provider); | ||
|
|
||
| const { gasPrice } = await get1559Fees(provider); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To resolve the error, simply remove the unused gasPrice variable assignment from line 31. This requires changing line 31 from:
const { gasPrice } = await get1559Fees(provider);to:
await get1559Fees(provider);This way, the call to get1559Fees(provider) remains (in case it has side effects or is required in some way), but no unnecessary variable is created.
No further changes are needed in the code, as there are no usages of gasPrice elsewhere in the file.
-
Copy modified line R31
| @@ -28,7 +28,7 @@ | ||
| const provider = new ethers.JsonRpcProvider(process.env.RPC_URL || "http://localhost:8545"); | ||
| const wallet = new ethers.Wallet(process.env.PRIVATE_KEY || process.env.L2_PRIVATE_KEY!, provider); | ||
|
|
||
| const { gasPrice } = await get1559Fees(provider); | ||
| await get1559Fees(provider); | ||
| let walletNonce = await wallet.getNonce(); | ||
|
|
||
| console.log(`Deployer: ${deployer}`); |
| const wallet = new ethers.Wallet(process.env.PRIVATE_KEY || process.env.L2_PRIVATE_KEY!, provider); | ||
|
|
||
| const { gasPrice } = await get1559Fees(provider); | ||
| let walletNonce = await wallet.getNonce(); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem without affecting any functionality, simply remove the line where the unused variable walletNonce is assigned. Specifically, delete the line:
32: let walletNonce = await wallet.getNonce();
from contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts. This edit removes a redundant operation and variable, improving code clarity and avoiding an unnecessary asynchronous call.
| @@ -29,7 +29,6 @@ | ||
| const wallet = new ethers.Wallet(process.env.PRIVATE_KEY || process.env.L2_PRIVATE_KEY!, provider); | ||
|
|
||
| const { gasPrice } = await get1559Fees(provider); | ||
| let walletNonce = await wallet.getNonce(); | ||
|
|
||
| console.log(`Deployer: ${deployer}`); | ||
| console.log(`Staking Token: ${stakingToken}`); |
3128e64 to
f994cca
Compare
# This is the 1st commit message: feat(RewardsStreamerMP.t): improve fuzz tests to test revert cases fix(StakeMath): prevent uint256 overflow error fix(StakeMath): prevent unstaking zero # This is the commit message #2: fix(StakeMath): prevent unstaking zero # This is the commit message #3: refactor(fuzz-tests): enhance readibility + test for unstake # This is the commit message #4: chore(tests): add compoud fuzz test # This is the commit message #5: chore(tests): Add Compound Fuzz Test # This is the commit message #6: chore (tests): fix fuzz test Unstake to always call compound function before unstake.
- Add Hardhat deployment scripts for Status Network contracts (StakeManager, VaultFactory, Karma, RLN, KarmaNFT) - Update Makefile targets to support STATUS_NETWORK_CONTRACTS_ENABLED flag - Add conditional deployment of Status Network contracts in start-env-with-rln - Create TypeScript deployment script for local development - Add comprehensive documentation for Status Network deployment The Status Network contracts (from status-network-contracts branch) are now integrated into the gasless RLN deployment flow and will deploy alongside Linea contracts when enabled.
- Add Hardhat deployment script for KarmaTiers contract - Update makefile-contracts.mk to include KarmaTiers in deployment tags - Update TypeScript deployment script to include KarmaTiers - Update documentation to include KarmaTiers in contract list and deployment order KarmaTiers is now fully integrated into the Status Network deployment flow.
- Replace Consensys-specific GitHub token with standard GITHUB_TOKEN - Update ubuntu runner to use ubuntu-latest instead of ubuntu-24.04 - Add fallback values for workflow inputs to prevent type errors - Add missing newline to main.yml
4bb29fe to
166a12f
Compare
Uh oh!
There was an error while loading. Please reload this page.