Skip to content

Conversation

@nadeemb53
Copy link
Member

@nadeemb53 nadeemb53 commented Aug 24, 2025

  • PR has rln services and SN contract deployment scripts
  • Tested to be working

@nadeemb53 nadeemb53 force-pushed the feat/gasless-docker-orchestration branch from 09694f8 to bd6fc25 Compare August 26, 2025 11:57
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

Unused variable stakeManager.

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.

Suggested changeset 1
contracts/deploy/14_deploy_StatusNetwork_VaultFactory.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/contracts/deploy/14_deploy_StatusNetwork_VaultFactory.ts b/contracts/deploy/14_deploy_StatusNetwork_VaultFactory.ts
--- a/contracts/deploy/14_deploy_StatusNetwork_VaultFactory.ts
+++ b/contracts/deploy/14_deploy_StatusNetwork_VaultFactory.ts
@@ -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}`);
EOF
@@ -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}`);
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Comment on lines 6 to 12
import {
tryVerifyContractWithConstructorArgs,
getDeployedContractAddress,
tryStoreAddress,
getRequiredEnvVar,
LogContractDeployment,
} from "../common/helpers";

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused import getRequiredEnvVar.

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.

Suggested changeset 1
contracts/deploy/17_deploy_StatusNetwork_KarmaNFT.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/contracts/deploy/17_deploy_StatusNetwork_KarmaNFT.ts b/contracts/deploy/17_deploy_StatusNetwork_KarmaNFT.ts
--- a/contracts/deploy/17_deploy_StatusNetwork_KarmaNFT.ts
+++ b/contracts/deploy/17_deploy_StatusNetwork_KarmaNFT.ts
@@ -7,7 +7,6 @@
   tryVerifyContractWithConstructorArgs,
   getDeployedContractAddress,
   tryStoreAddress,
-  getRequiredEnvVar,
   LogContractDeployment,
 } from "../common/helpers";
 
EOF
@@ -7,7 +7,6 @@
tryVerifyContractWithConstructorArgs,
getDeployedContractAddress,
tryStoreAddress,
getRequiredEnvVar,
LogContractDeployment,
} from "../common/helpers";

Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
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

Unused import getRequiredEnvVar.

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.


Suggested changeset 1
contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts b/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts
--- a/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts
+++ b/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts
@@ -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";
 
EOF
@@ -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";

Copilot is powered by AI and may make mistakes. Always verify output.
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

Unused imports deployContractFromArtifacts, getInitializerData.

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.


Suggested changeset 1
contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts b/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts
--- a/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts
+++ b/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts
@@ -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();
EOF
@@ -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();
Copilot is powered by AI and may make mistakes. Always verify output.
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

Unused variable gasPrice.

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.


Suggested changeset 1
contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts b/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts
--- a/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts
+++ b/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts
@@ -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}`);
EOF
@@ -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}`);
Copilot is powered by AI and may make mistakes. Always verify output.
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

Unused variable walletNonce.

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.

Suggested changeset 1
contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts b/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts
--- a/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts
+++ b/contracts/local-deployments-artifacts/deployStatusNetworkContracts.ts
@@ -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}`);
EOF
@@ -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}`);
Copilot is powered by AI and may make mistakes. Always verify output.
@nadeemb53 nadeemb53 force-pushed the feat/gasless-docker-orchestration branch from 3128e64 to f994cca Compare August 26, 2025 12:51
nadeemb53 pushed a commit that referenced this pull request Aug 27, 2025
# 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
@nadeemb53 nadeemb53 force-pushed the feat/gasless-docker-orchestration branch from 4bb29fe to 166a12f Compare September 14, 2025 12:32
@nadeemb53 nadeemb53 changed the title Gasless module deployment files contracts deployment with network compose files and fixes for gasless sequencer execution Sep 14, 2025
@nadeemb53 nadeemb53 merged commit 6e0f7b1 into develop Sep 14, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant