diff --git a/src/components/Proposals/MultisigProposalDetails/TxActions.tsx b/src/components/Proposals/MultisigProposalDetails/TxActions.tsx index 9a3b96255e..bee16e30f1 100644 --- a/src/components/Proposals/MultisigProposalDetails/TxActions.tsx +++ b/src/components/Proposals/MultisigProposalDetails/TxActions.tsx @@ -5,7 +5,7 @@ import { MultisigFreezeGuard } from '@fractal-framework/fractal-contracts'; import { SafeMultisigTransactionWithTransfersResponse } from '@safe-global/safe-service-client'; import { Signer } from 'ethers'; import { useTranslation } from 'react-i18next'; -import { GnosisSafeL2__factory } from '../../../assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts'; +import { SafeL2__factory } from '../../../assets/typechain-types/safe/factories/contracts'; import { BACKGROUND_SEMI_TRANSPARENT } from '../../../constants/common'; import { buildSafeTransaction, buildSignatureBytes, EIP712_SAFE_TX_TYPE } from '../../../helpers'; import { logError } from '../../../helpers/errorLogging'; @@ -122,7 +122,7 @@ export function TxActions({ if (!signerOrProvider || !safe?.address || !multisigTx.confirmations) { return; } - const safeContract = GnosisSafeL2__factory.connect(safe.address, signerOrProvider); + const safeContract = SafeL2__factory.connect(safe.address, signerOrProvider); const safeTx = buildSafeTransaction({ ...multisigTx, }); diff --git a/src/hooks/DAO/loaders/useFractalFreeze.ts b/src/hooks/DAO/loaders/useFractalFreeze.ts index 3309a382c5..fccdb6b3bb 100644 --- a/src/hooks/DAO/loaders/useFractalFreeze.ts +++ b/src/hooks/DAO/loaders/useFractalFreeze.ts @@ -101,7 +101,7 @@ export const useFractalFreeze = ({ await (freezeVotingContract!.asProvider as MultisigFreezeVoting).parentGnosisSafe(), ); const owners = await safeContract.getOwners(); - userHasVotes = owners.find(owner => owner === account) !== undefined; + userHasVotes = owners.find((owner: string) => owner === account) !== undefined; } else if (freezeVotingType === FreezeVotingType.ERC20) { const votesTokenContract = votesTokenMasterCopyContract!.asProvider.attach( await (freezeVotingContract!.asProvider as ERC20FreezeVoting).votesERC20(), diff --git a/src/hooks/DAO/proposal/useSubmitProposal.ts b/src/hooks/DAO/proposal/useSubmitProposal.ts index 49be918ada..58d22a84ee 100644 --- a/src/hooks/DAO/proposal/useSubmitProposal.ts +++ b/src/hooks/DAO/proposal/useSubmitProposal.ts @@ -5,7 +5,7 @@ import { BigNumber, Signer, utils } from 'ethers'; import { getAddress, isAddress } from 'ethers/lib/utils'; import { useCallback, useMemo, useState, useEffect } from 'react'; import { toast } from 'react-toastify'; -import { GnosisSafeL2__factory } from '../../../assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts'; +import { SafeL2__factory } from '../../../assets/typechain-types/safe/factories/contracts'; import { ADDRESS_MULTISIG_METADATA } from '../../../constants/common'; import { buildSafeAPIPost, encodeMultiSend } from '../../../helpers'; import { logError } from '../../../helpers/errorLogging'; @@ -248,7 +248,7 @@ export default function useSubmitProposal() { operation = 0; } - const safeContract = GnosisSafeL2__factory.connect(safeAddress, signerOrProvider); + const safeContract = SafeL2__factory.connect(safeAddress, signerOrProvider); await axios.post( buildSafeApiUrl(safeBaseURL, `/safes/${safeAddress}/multisig-transactions/`), await buildSafeAPIPost( diff --git a/src/hooks/safe/useSafeContracts.ts b/src/hooks/safe/useSafeContracts.ts index 2ad2d8ee4a..b8606f5b57 100644 --- a/src/hooks/safe/useSafeContracts.ts +++ b/src/hooks/safe/useSafeContracts.ts @@ -17,8 +17,8 @@ import { ERC721FreezeVoting__factory, } from '@fractal-framework/fractal-contracts'; import { useMemo } from 'react'; +import { SafeL2__factory } from '../../assets/typechain-types/safe/factories/contracts'; import { MultiSend__factory } from '../../assets/typechain-types/usul'; -import { GnosisSafeL2__factory } from '../../assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts'; import { useEthersProvider } from '../../providers/Ethers/hooks/useEthersProvider'; import { useNetworkConfig } from '../../providers/NetworkConfig/NetworkConfigProvider'; import useSignerOrProvider from '../utils/useSignerOrProvider'; @@ -79,8 +79,8 @@ export default function useSafeContracts() { }; const safeSingletonContract = { - asSigner: GnosisSafeL2__factory.connect(safe, signerOrProvider), - asProvider: GnosisSafeL2__factory.connect(safe, provider), + asSigner: SafeL2__factory.connect(safe, signerOrProvider), + asProvider: SafeL2__factory.connect(safe, provider), }; const zodiacModuleProxyFactoryContract = { diff --git a/src/models/AzoriusTxBuilder.ts b/src/models/AzoriusTxBuilder.ts index 068635e96b..78f16c4b18 100644 --- a/src/models/AzoriusTxBuilder.ts +++ b/src/models/AzoriusTxBuilder.ts @@ -10,7 +10,7 @@ import { } from '@fractal-framework/fractal-contracts'; import { BigNumber } from 'ethers'; import { defaultAbiCoder, getCreate2Address, solidityKeccak256 } from 'ethers/lib/utils'; -import { GnosisSafeL2 } from '../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; +import { SafeL2 } from '../assets/typechain-types/safe/contracts'; import { buildContractCall, getRandomBytes } from '../helpers'; import { BaseContracts, @@ -25,7 +25,7 @@ import { BaseTxBuilder } from './BaseTxBuilder'; import { generateContractByteCodeLinear, generateSalt } from './helpers/utils'; export class AzoriusTxBuilder extends BaseTxBuilder { - private readonly safeContract: GnosisSafeL2; + private readonly safeContract: SafeL2; private readonly predictedSafeAddress: string; private encodedSetupTokenData: string | undefined; @@ -54,7 +54,7 @@ export class AzoriusTxBuilder extends BaseTxBuilder { baseContracts: BaseContracts, azoriusContracts: AzoriusContracts, daoData: AzoriusERC20DAO | AzoriusERC721DAO, - safeContract: GnosisSafeL2, + safeContract: SafeL2, predictedSafeAddress: string, parentAddress?: string, parentTokenAddress?: string, diff --git a/src/models/DaoTxBuilder.ts b/src/models/DaoTxBuilder.ts index 1290235ed0..bb104cd2bb 100644 --- a/src/models/DaoTxBuilder.ts +++ b/src/models/DaoTxBuilder.ts @@ -1,5 +1,5 @@ import { ethers } from 'ethers'; -import { GnosisSafeL2 } from '../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; +import { SafeL2 } from '../assets/typechain-types/safe/contracts'; import { buildContractCall, encodeMultiSend } from '../helpers'; import { BaseContracts, @@ -24,7 +24,7 @@ export class DaoTxBuilder extends BaseTxBuilder { // Safe Data private predictedSafeAddress: string; private readonly createSafeTx: SafeTransaction; - private readonly safeContract: GnosisSafeL2; + private readonly safeContract: SafeL2; private readonly parentStrategyType?: VotingStrategyType; private readonly parentStrategyAddress?: string; @@ -42,7 +42,7 @@ export class DaoTxBuilder extends BaseTxBuilder { saltNum: string, predictedSafeAddress: string, createSafeTx: SafeTransaction, - safeContract: GnosisSafeL2, + safeContract: SafeL2, txBuilderFactory: TxBuilderFactory, parentAddress?: string, parentTokenAddress?: string, diff --git a/src/models/FreezeGuardTxBuilder.ts b/src/models/FreezeGuardTxBuilder.ts index 666c531c86..5a99accbc1 100644 --- a/src/models/FreezeGuardTxBuilder.ts +++ b/src/models/FreezeGuardTxBuilder.ts @@ -11,7 +11,7 @@ import { } from '@fractal-framework/fractal-contracts'; import { ethers } from 'ethers'; import { getCreate2Address, solidityKeccak256 } from 'ethers/lib/utils'; -import { GnosisSafeL2 } from '../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; +import { SafeL2 } from '../assets/typechain-types/safe/contracts'; import { buildContractCall } from '../helpers'; import { BaseContracts, @@ -33,7 +33,7 @@ export class FreezeGuardTxBuilder extends BaseTxBuilder { private readonly saltNum; // Safe Data - private readonly safeContract: GnosisSafeL2; + private readonly safeContract: SafeL2; // Freeze Voting Data private freezeVotingType: any; @@ -55,7 +55,7 @@ export class FreezeGuardTxBuilder extends BaseTxBuilder { signerOrProvider: any, baseContracts: BaseContracts, daoData: SubDAO, - safeContract: GnosisSafeL2, + safeContract: SafeL2, saltNum: string, parentAddress: string, parentTokenAddress?: string, @@ -134,7 +134,7 @@ export class FreezeGuardTxBuilder extends BaseTxBuilder { ); } - public buildSetGuardTx(contract: GnosisSafeL2 | Azorius): SafeTransaction { + public buildSetGuardTx(contract: SafeL2 | Azorius): SafeTransaction { return buildContractCall(contract, 'setGuard', [this.freezeGuardAddress], 0, false); } diff --git a/src/models/MultisigTxBuilder.ts b/src/models/MultisigTxBuilder.ts index 89cac1fd6c..d09218c3e5 100644 --- a/src/models/MultisigTxBuilder.ts +++ b/src/models/MultisigTxBuilder.ts @@ -1,13 +1,13 @@ -import { GnosisSafeL2 } from '../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; +import { SafeL2 } from '../assets/typechain-types/safe/contracts'; import { buildContractCall } from '../helpers'; import { BaseContracts, SafeMultisigDAO, SafeTransaction } from '../types'; export class MultisigTxBuilder { private baseContracts: BaseContracts; private readonly daoData: SafeMultisigDAO; - private readonly safeContract: GnosisSafeL2; + private readonly safeContract: SafeL2; - constructor(baseContracts: BaseContracts, daoData: SafeMultisigDAO, safeContract: GnosisSafeL2) { + constructor(baseContracts: BaseContracts, daoData: SafeMultisigDAO, safeContract: SafeL2) { this.baseContracts = baseContracts; this.daoData = daoData; this.safeContract = safeContract; diff --git a/src/models/TxBuilderFactory.ts b/src/models/TxBuilderFactory.ts index 392452bb2d..6dde88091d 100644 --- a/src/models/TxBuilderFactory.ts +++ b/src/models/TxBuilderFactory.ts @@ -1,6 +1,6 @@ import { ethers } from 'ethers'; -import { GnosisSafeL2 } from '../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; -import { GnosisSafeL2__factory } from '../assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts'; +import { SafeL2 } from '../assets/typechain-types/safe/contracts'; +import { SafeL2__factory } from '../assets/typechain-types/safe/factories/contracts'; import { getRandomBytes } from '../helpers'; import { BaseContracts, @@ -25,7 +25,7 @@ export class TxBuilderFactory extends BaseTxBuilder { // Safe Data public predictedSafeAddress: string | undefined; public createSafeTx: SafeTransaction | undefined; - private safeContract: GnosisSafeL2 | undefined; + private safeContract: SafeL2 | undefined; public fallbackHandler: string; constructor( @@ -51,7 +51,7 @@ export class TxBuilderFactory extends BaseTxBuilder { } public setSafeContract(safeAddress: string) { - const safeContract = GnosisSafeL2__factory.connect(safeAddress, this.signerOrProvider); + const safeContract = SafeL2__factory.connect(safeAddress, this.signerOrProvider); this.safeContract = safeContract; } diff --git a/src/models/helpers/fractalModuleData.ts b/src/models/helpers/fractalModuleData.ts index 9d4ede6e69..2f0dd55fc0 100644 --- a/src/models/helpers/fractalModuleData.ts +++ b/src/models/helpers/fractalModuleData.ts @@ -4,7 +4,7 @@ import { ModuleProxyFactory, } from '@fractal-framework/fractal-contracts'; import { ethers } from 'ethers'; -import { GnosisSafeL2 } from '../../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; +import { SafeL2 } from '../../assets/typechain-types/safe/contracts'; import { buildContractCall } from '../../helpers/crypto'; import { SafeTransaction } from '../../types'; import { @@ -23,7 +23,7 @@ export interface FractalModuleData { export const fractalModuleData = ( fractalModuleMasterCopyContract: FractalModule, zodiacModuleProxyFactoryContract: ModuleProxyFactory, - safeContract: GnosisSafeL2, + safeContract: SafeL2, saltNum: string, parentAddress?: string, ): FractalModuleData => { diff --git a/src/models/helpers/safeData.ts b/src/models/helpers/safeData.ts index bfbcbf432c..13e00a7518 100644 --- a/src/models/helpers/safeData.ts +++ b/src/models/helpers/safeData.ts @@ -1,8 +1,8 @@ import { GnosisSafeProxyFactory } from '@fractal-framework/fractal-contracts'; import { ethers } from 'ethers'; import { getCreate2Address, solidityKeccak256 } from 'ethers/lib/utils'; +import { SafeL2 } from '../../assets/typechain-types/safe/contracts'; import { MultiSend } from '../../assets/typechain-types/usul'; -import { GnosisSafeL2 } from '../../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; import { buildContractCall } from '../../helpers/crypto'; import { SafeMultisigDAO } from '../../types'; const { AddressZero, HashZero } = ethers.constants; @@ -10,7 +10,7 @@ const { AddressZero, HashZero } = ethers.constants; export const safeData = async ( multiSendContract: MultiSend, safeFactoryContract: GnosisSafeProxyFactory, - safeSingletonContract: GnosisSafeL2, + safeSingletonContract: SafeL2, daoData: SafeMultisigDAO, saltNum: string, fallbackHandler: string, diff --git a/src/types/contract.ts b/src/types/contract.ts index 59c1b54b0b..63189f6b4e 100644 --- a/src/types/contract.ts +++ b/src/types/contract.ts @@ -14,8 +14,8 @@ import { KeyValuePairs, ERC721FreezeVoting, } from '@fractal-framework/fractal-contracts'; +import { SafeL2 } from '../assets/typechain-types/safe/contracts'; import { MultiSend } from '../assets/typechain-types/usul'; -import { GnosisSafeL2 } from '../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; export interface ContractEvent { blockTimestamp: number; @@ -31,7 +31,7 @@ export interface DAOContracts { safeFactoryContract: ContractConnection; fractalAzoriusMasterCopyContract: ContractConnection; linearVotingMasterCopyContract: ContractConnection; - safeSingletonContract: ContractConnection; + safeSingletonContract: ContractConnection; zodiacModuleProxyFactoryContract: ContractConnection; fractalModuleMasterCopyContract: ContractConnection; fractalRegistryContract: ContractConnection; @@ -48,7 +48,7 @@ export interface BaseContracts { fractalModuleMasterCopyContract: FractalModule; fractalRegistryContract: FractalRegistry; safeFactoryContract: GnosisSafeProxyFactory; - safeSingletonContract: GnosisSafeL2; + safeSingletonContract: SafeL2; multisigFreezeGuardMasterCopyContract: MultisigFreezeGuard; multiSendContract: MultiSend; freezeERC20VotingMasterCopyContract: ERC20FreezeVoting; diff --git a/src/types/fractal.ts b/src/types/fractal.ts index 9d8d5899fa..721a7d57ab 100644 --- a/src/types/fractal.ts +++ b/src/types/fractal.ts @@ -25,8 +25,8 @@ import { } from '@safe-global/safe-service-client'; import { BigNumber } from 'ethers'; import { Dispatch } from 'react'; +import { SafeL2 } from '../assets/typechain-types/safe/contracts'; import { MultiSend } from '../assets/typechain-types/usul'; -import { GnosisSafeL2 } from '../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; import { FractalGovernanceActions } from '../providers/App/governance/action'; import { GovernanceContractActions } from '../providers/App/governanceContracts/action'; import { FractalGuardActions } from '../providers/App/guard/action'; @@ -346,7 +346,7 @@ export interface FractalContracts { fractalAzoriusMasterCopyContract: ContractConnection; linearVotingMasterCopyContract: ContractConnection; linearVotingERC721MasterCopyContract: ContractConnection; - safeSingletonContract: ContractConnection; + safeSingletonContract: ContractConnection; zodiacModuleProxyFactoryContract: ContractConnection; fractalModuleMasterCopyContract: ContractConnection; fractalRegistryContract: ContractConnection;