Skip to content

Commit

Permalink
chore: nits
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbate committed Oct 1, 2024
1 parent 73b69e0 commit f3bbde7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/fuels/src/cli/commands/deploy/deployContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { WalletUnlocked } from '@fuel-ts/account';
import { ContractFactory } from '@fuel-ts/contract';
import type { DeployContractOptions } from '@fuel-ts/contract';
import { Contract } from '@fuel-ts/program';
import { concat } from '@fuel-ts/utils';

Check warning on line 5 in packages/fuels/src/cli/commands/deploy/deployContract.ts

View workflow job for this annotation

GitHub Actions / Lint

'concat' is defined but never used
import { existsSync, readFileSync } from 'fs';

import { setForcTomlProxyAddress, type ForcToml } from '../../config/forcUtils';
Expand All @@ -28,11 +29,11 @@ export async function deployContract(

const targetBytecode = readFileSync(binaryPath);
const targetAbi = JSON.parse(readFileSync(abiPath, 'utf-8'));
const targetStorageSlots = deployConfig.storageSlots;
const targetStorageSlots = deployConfig.storageSlots ?? [];

const proxyBytecode = Src14OwnedProxyFactory.bytecode;
const proxyAbi = Src14OwnedProxy.abi;
const proxyStorageSlots = Src14OwnedProxy.storageSlots;
const proxyStorageSlots = Src14OwnedProxy.storageSlots ?? [];

const isProxyEnabled = tomlContents?.proxy?.enabled;
const proxyAddress = tomlContents?.proxy?.address;
Expand Down Expand Up @@ -84,7 +85,7 @@ export async function deployContract(
// b. Deploy the SR-C14 Compliant / Proxy Contract
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { storageSlots, stateRoot, ...commonDeployConfig } = deployConfig;
const mergedStorageSlots = [...(targetStorageSlots || []), ...(proxyStorageSlots || [])];
const mergedStorageSlots = targetStorageSlots.concat(proxyStorageSlots);

const proxyDeployConfig: DeployContractOptions = {
...commonDeployConfig,
Expand Down

0 comments on commit f3bbde7

Please sign in to comment.