From 6ff94feda28281d9da208010491c39eb1ce3b62f Mon Sep 17 00:00:00 2001 From: Cherik Date: Tue, 20 Aug 2024 18:42:52 +0330 Subject: [PATCH 1/4] use sepolia instead of goerli --- config/example.env | 2 +- config/test.env | 2 +- migration/data/seedTokens.ts | 19 ++++++------------- src/provider.ts | 18 +++++++++--------- src/repositories/projectRepository.test.ts | 2 +- src/resolvers/donationResolver.test.ts | 8 ++++---- src/resolvers/donationResolver.ts | 2 +- .../projectResolver.allProject.test.ts | 8 ++++---- src/resolvers/projectResolver.ts | 2 +- .../projectVerificationFormResolver.test.ts | 2 +- .../tabs/components/ListProjectAddresses.tsx | 2 +- src/server/adminJs/tabs/donationTab.ts | 2 +- src/server/adminJs/tabs/qfRoundTab.ts | 2 +- src/server/adminJs/tabs/tokenTab.ts | 2 +- src/utils/networksConfig.ts | 4 ++-- .../validators/graphqlQueryValidators.ts | 2 +- test/pre-test-scripts.ts | 4 ++-- test/testUtils.ts | 17 ++++++----------- 18 files changed, 44 insertions(+), 56 deletions(-) diff --git a/config/example.env b/config/example.env index c523aab8c..8ced2d861 100644 --- a/config/example.env +++ b/config/example.env @@ -27,7 +27,7 @@ BCRYPT_SALT=$2b$10$44gNUOnBXavOBMPOqzd48e XDAI_NODE_HTTP_URL=https://xxxxxx.xdai.quiknode.pro/ ETHERSCAN_MAINNET_API_URL=https://api.etherscan.io/api ETHERSCAN_ROPSTEN_API_URL=https://api-ropsten.etherscan.io/api -ETHERSCAN_GOERLI_API_URL=https://api-goerli.etherscan.io/api +ETHERSCAN_SEPOLIA_API_URL=https://api-sepolia.etherscan.io/api POLYGON_SCAN_API_URL=https://api.polygonscan.com/api POLYGON_SCAN_API_KEY=0000000000000000000000000000000000 OPTIMISTIC_SCAN_API_URL=https://api-optimistic.etherscan.io/api diff --git a/config/test.env b/config/test.env index fda9292b1..81a76ad6e 100644 --- a/config/test.env +++ b/config/test.env @@ -37,7 +37,7 @@ MAINNET_NODE_WS_URL=xxx INFURA_ID=xxx ETHERSCAN_MAINNET_API_URL=https://api.etherscan.io/api ETHERSCAN_ROPSTEN_API_URL=https://api-ropsten.etherscan.io/api -ETHERSCAN_GOERLI_API_URL=https://api-goerli.etherscan.io/api +ETHERSCAN_SEPOLIA_API_URL=https://api-sepolia.etherscan.io/api POLYGON_SCAN_API_URL=https://api.polygonscan.com/api OPTIMISTIC_SCAN_API_URL=https://api-optimistic.etherscan.io/api OPTIMISTIC_SEPOLIA_SCAN_API_URL=https://api-sepolia-optimistic.etherscan.io/api diff --git a/migration/data/seedTokens.ts b/migration/data/seedTokens.ts index be553842b..c01b513ea 100644 --- a/migration/data/seedTokens.ts +++ b/migration/data/seedTokens.ts @@ -1023,27 +1023,20 @@ const seedTokens: ITokenData[] = [ networkId: 100, }, - // Goerli tokens + // Sepolia tokens { name: 'Ethereum native token', symbol: 'ETH', address: '0x0000000000000000000000000000000000000000', decimals: 18, - networkId: 5, + networkId: 11155111, }, { - address: '0xdc31Ee1784292379Fbb2964b3B9C4124D8F89C60', - symbol: 'DAI', - name: 'DAI Goerli', - decimals: 18, - networkId: 5, - }, - { - address: '0xA2470F25bb8b53Bd3924C7AC0C68d32BF2aBd5be', - symbol: 'DRGIV3', - name: 'GIV test', + address: '0xfff9976782d46cc05630d1f6ebab18b2324d6b14', + symbol: 'WETH', + name: 'Wrapped Ether', decimals: 18, - networkId: 5, + networkId: 11155111, }, // POLYGON tokens diff --git a/src/provider.ts b/src/provider.ts index a4e60766e..93b190f0c 100644 --- a/src/provider.ts +++ b/src/provider.ts @@ -8,7 +8,7 @@ const INFURA_ID = config.get('INFURA_ID'); export const NETWORK_IDS = { MAIN_NET: 1, ROPSTEN: 3, - GOERLI: 5, + SEPOLIA: 11155111, XDAI: 100, POLYGON: 137, OPTIMISTIC: 10, @@ -134,7 +134,7 @@ export const superTokens = [ export const NETWORKS_IDS_TO_NAME = { 1: 'MAIN_NET', 3: 'ROPSTEN', - 5: 'GOERLI', + 11155111: 'SEPOLIA', 100: 'GNOSIS', 56: 'BSC', 137: 'POLYGON', @@ -165,7 +165,7 @@ const NETWORK_NAMES = { XDAI: 'xdaichain', MAINNET: 'mainnet', ROPSTEN: 'ropsten', - GOERLI: 'goerli', + SEPOLIA: 'sepolia', POLYGON: 'polygon-mainnet', OPTIMISTIC: 'optimistic-mainnet', OPTIMISM_SEPOLIA: 'optimism-sepolia-testnet', @@ -189,7 +189,7 @@ const NETWORK_NATIVE_TOKENS = { XDAI: 'XDAI', MAINNET: 'ETH', ROPSTEN: 'ETH', - GOERLI: 'ETH', + SEPOLIA: 'ETH', POLYGON: 'MATIC', OPTIMISTIC: 'ETH', OPTIMISM_SEPOLIA: 'ETH', @@ -228,9 +228,9 @@ const networkNativeTokensList = [ nativeToken: NETWORK_NATIVE_TOKENS.ROPSTEN, }, { - networkName: NETWORK_NAMES.GOERLI, - networkId: NETWORK_IDS.GOERLI, - nativeToken: NETWORK_NATIVE_TOKENS.GOERLI, + networkName: NETWORK_NAMES.SEPOLIA, + networkId: NETWORK_IDS.SEPOLIA, + nativeToken: NETWORK_NATIVE_TOKENS.SEPOLIA, }, { networkName: NETWORK_NAMES.POLYGON, @@ -453,8 +453,8 @@ export function getBlockExplorerApiUrl(networkId: number): string { apiUrl = config.get('ETHERSCAN_ROPSTEN_API_URL'); apiKey = config.get('ETHERSCAN_API_KEY'); break; - case NETWORK_IDS.GOERLI: - apiUrl = config.get('ETHERSCAN_GOERLI_API_URL'); + case NETWORK_IDS.SEPOLIA: + apiUrl = config.get('ETHERSCAN_SEPOLIA_API_URL'); apiKey = config.get('ETHERSCAN_API_KEY'); break; case NETWORK_IDS.POLYGON: diff --git a/src/repositories/projectRepository.test.ts b/src/repositories/projectRepository.test.ts index 78c5ab1d2..6af02d8ea 100644 --- a/src/repositories/projectRepository.test.ts +++ b/src/repositories/projectRepository.test.ts @@ -271,7 +271,7 @@ function updateProjectWithVerificationFormTestCases() { ...createProjectData(), adminUserId: user.id, verified: false, - networkId: NETWORK_IDS.GOERLI, + networkId: NETWORK_IDS.SEPOLIA, }); const fetchedProject = await findProjectById(project.id); assert.equal(fetchedProject?.addresses?.length, 1); diff --git a/src/resolvers/donationResolver.test.ts b/src/resolvers/donationResolver.test.ts index c9fb7228f..643ccc944 100644 --- a/src/resolvers/donationResolver.test.ts +++ b/src/resolvers/donationResolver.test.ts @@ -1990,7 +1990,7 @@ function createDonationTestCases() { ); assert.isOk(saveDonationResponse.data.data.createDonation); }); - it('should create ETH donation for CHANGE project on goerli successfully', async () => { + it('should create ETH donation for CHANGE project on sepolia successfully', async () => { const project = await saveProjectDirectlyToDb({ ...createProjectData(), organizationLabel: ORGANIZATION_LABELS.CHANGE, @@ -2003,7 +2003,7 @@ function createDonationTestCases() { query: createDonationMutation, variables: { projectId: project.id, - transactionNetworkId: NETWORK_IDS.GOERLI, + transactionNetworkId: NETWORK_IDS.SEPOLIA, transactionId: generateRandomEvmTxHash(), amount: 10, nonce: 11, @@ -4519,8 +4519,8 @@ function donationsToWalletsTestCases() { // errorMessages.TRANSACTION_FROM_ADDRESS_IS_DIFFERENT_FROM_SENT_FROM_ADDRESS, // ); // }); -// // ROPSTEN CHAIN DECOMMISSIONED use goerli -// // TODO: Rewrite this test with goerli. +// // ROPSTEN CHAIN DECOMMISSIONED use sepolia +// // TODO: Rewrite this test with sepolia. // // it('should update donation status to failed when tx is failed on network ', async () => { // // // https://ropsten.etherscan.io/tx/0x66a7902f3dad318e8d075454e26ee829e9832db0b20922cfd9d916fb792ff724 // // const transactionInfo = { diff --git a/src/resolvers/donationResolver.ts b/src/resolvers/donationResolver.ts index 594a63826..f972f47a3 100644 --- a/src/resolvers/donationResolver.ts +++ b/src/resolvers/donationResolver.ts @@ -919,7 +919,7 @@ export class DonationResolver { case NETWORK_IDS.ROPSTEN: priceChainId = NETWORK_IDS.MAIN_NET; break; - case NETWORK_IDS.GOERLI: + case NETWORK_IDS.SEPOLIA: priceChainId = NETWORK_IDS.MAIN_NET; break; case NETWORK_IDS.OPTIMISM_SEPOLIA: diff --git a/src/resolvers/projectResolver.allProject.test.ts b/src/resolvers/projectResolver.allProject.test.ts index ae44a029b..080bcd417 100644 --- a/src/resolvers/projectResolver.allProject.test.ts +++ b/src/resolvers/projectResolver.allProject.test.ts @@ -1220,7 +1220,7 @@ function allProjectsTestCases() { address => address.isRecipient === true && (address.networkId === NETWORK_IDS.MAIN_NET || - address.networkId === NETWORK_IDS.GOERLI) && + address.networkId === NETWORK_IDS.SEPOLIA) && address.chainType === ChainType.EVM, ), ); @@ -1331,12 +1331,12 @@ function allProjectsTestCases() { ); }); - it('should return projects, filter by accept donation on GOERLI', async () => { + it('should return projects, filter by accept donation on SEPOLIA', async () => { const savedProject = await saveProjectDirectlyToDb({ ...createProjectData(), title: String(new Date().getTime()), slug: String(new Date().getTime()), - networkId: NETWORK_IDS.GOERLI, + networkId: NETWORK_IDS.SEPOLIA, }); const result = await axios.post(graphqlUrl, { query: fetchMultiFilterAllProjectsQuery, @@ -1352,7 +1352,7 @@ function allProjectsTestCases() { address => (address.isRecipient === true && address.networkId === NETWORK_IDS.MAIN_NET) || - address.networkId === NETWORK_IDS.GOERLI, + address.networkId === NETWORK_IDS.SEPOLIA, ), ); }); diff --git a/src/resolvers/projectResolver.ts b/src/resolvers/projectResolver.ts index c7513b4b4..088a70bfe 100644 --- a/src/resolvers/projectResolver.ts +++ b/src/resolvers/projectResolver.ts @@ -517,7 +517,7 @@ export class ProjectResolver { networkIds.push(NETWORK_IDS.MAIN_NET); // Add this to make sure works on Staging - networkIds.push(NETWORK_IDS.GOERLI); + networkIds.push(NETWORK_IDS.SEPOLIA); return; case FilterField.AcceptFundOnCelo: networkIds.push(NETWORK_IDS.CELO); diff --git a/src/resolvers/projectVerificationFormResolver.test.ts b/src/resolvers/projectVerificationFormResolver.test.ts index ef45cf510..f13c94e67 100644 --- a/src/resolvers/projectVerificationFormResolver.test.ts +++ b/src/resolvers/projectVerificationFormResolver.test.ts @@ -279,7 +279,7 @@ function updateProjectVerificationFormMutationTestCases() { }, { address: generateRandomEtheriumAddress(), - networkId: NETWORK_IDS.GOERLI, + networkId: NETWORK_IDS.SEPOLIA, title: 'test title', }, { diff --git a/src/server/adminJs/tabs/components/ListProjectAddresses.tsx b/src/server/adminJs/tabs/components/ListProjectAddresses.tsx index 15d769a7f..c4a94a1f7 100644 --- a/src/server/adminJs/tabs/components/ListProjectAddresses.tsx +++ b/src/server/adminJs/tabs/components/ListProjectAddresses.tsx @@ -6,7 +6,7 @@ import { Label, Section } from '@adminjs/design-system'; const NETWORKS_IDS_TO_NAME = { 1: 'MAIN_NET', 3: 'ROPSTEN', - 5: 'GOERLI', + 11155111: 'SEPOLIA', 100: 'GNOSIS', 56: 'BSC', 137: 'POLYGON', diff --git a/src/server/adminJs/tabs/donationTab.ts b/src/server/adminJs/tabs/donationTab.ts index a2eb3779d..e99fa5f9b 100644 --- a/src/server/adminJs/tabs/donationTab.ts +++ b/src/server/adminJs/tabs/donationTab.ts @@ -664,7 +664,7 @@ export const donationTab = { availableValues: [ { value: NETWORK_IDS.MAIN_NET, label: 'Mainnet' }, { value: NETWORK_IDS.XDAI, label: 'Xdai' }, - { value: NETWORK_IDS.GOERLI, label: 'Goerli' }, + { value: NETWORK_IDS.SEPOLIA, label: 'sepolia' }, { value: NETWORK_IDS.POLYGON, label: 'Polygon' }, { value: NETWORK_IDS.CELO, label: 'Celo' }, { value: NETWORK_IDS.CELO_ALFAJORES, label: 'Alfajores' }, diff --git a/src/server/adminJs/tabs/qfRoundTab.ts b/src/server/adminJs/tabs/qfRoundTab.ts index c570ce37f..5555f9cb1 100644 --- a/src/server/adminJs/tabs/qfRoundTab.ts +++ b/src/server/adminJs/tabs/qfRoundTab.ts @@ -202,7 +202,7 @@ async function validateQfRound(payload: { const availableNetworkValues = [ { value: NETWORK_IDS.MAIN_NET, label: 'MAINNET' }, { value: NETWORK_IDS.ROPSTEN, label: 'ROPSTEN' }, - { value: NETWORK_IDS.GOERLI, label: 'GOERLI' }, + { value: NETWORK_IDS.SEPOLIA, label: 'SEPOLIA' }, { value: NETWORK_IDS.POLYGON, label: 'POLYGON' }, { value: NETWORK_IDS.OPTIMISTIC, label: 'OPTIMISTIC' }, { value: NETWORK_IDS.ETC, label: 'ETC' }, diff --git a/src/server/adminJs/tabs/tokenTab.ts b/src/server/adminJs/tabs/tokenTab.ts index 937e4ecbf..9c328557b 100644 --- a/src/server/adminJs/tabs/tokenTab.ts +++ b/src/server/adminJs/tabs/tokenTab.ts @@ -188,7 +188,7 @@ export const generateTokenTab = async () => { availableValues: [ { value: NETWORK_IDS.MAIN_NET, label: 'MAINNET' }, { value: NETWORK_IDS.ROPSTEN, label: 'ROPSTEN' }, - { value: NETWORK_IDS.GOERLI, label: 'GOERLI' }, + { value: NETWORK_IDS.SEPOLIA, label: 'SEPOLIA' }, { value: NETWORK_IDS.POLYGON, label: 'POLYGON' }, { value: NETWORK_IDS.OPTIMISTIC, label: 'OPTIMISTIC' }, { value: NETWORK_IDS.OPTIMISM_SEPOLIA, label: 'OPTIMISM SEPOLIA' }, diff --git a/src/utils/networksConfig.ts b/src/utils/networksConfig.ts index 1069d967d..785e70178 100644 --- a/src/utils/networksConfig.ts +++ b/src/utils/networksConfig.ts @@ -2,8 +2,8 @@ const networksConfig = { '1': { blockExplorer: 'https://etherscan.io/', }, - '5': { - blockExplorer: 'https://goerli.etherscan.io/', + '11155111': { + blockExplorer: 'https://sepolia.etherscan.io/', }, '10': { blockExplorer: 'https://optimistic.etherscan.io/', diff --git a/src/utils/validators/graphqlQueryValidators.ts b/src/utils/validators/graphqlQueryValidators.ts index 072f62a31..069b760f0 100644 --- a/src/utils/validators/graphqlQueryValidators.ts +++ b/src/utils/validators/graphqlQueryValidators.ts @@ -249,7 +249,7 @@ const managingFundsValidator = Joi.object({ NETWORK_IDS.SOLANA_TESTNET, // Solana NETWORK_IDS.MAIN_NET, NETWORK_IDS.ROPSTEN, - NETWORK_IDS.GOERLI, + NETWORK_IDS.SEPOLIA, NETWORK_IDS.POLYGON, NETWORK_IDS.CELO, NETWORK_IDS.CELO_ALFAJORES, diff --git a/test/pre-test-scripts.ts b/test/pre-test-scripts.ts index e5316236c..4f9c21347 100644 --- a/test/pre-test-scripts.ts +++ b/test/pre-test-scripts.ts @@ -99,7 +99,7 @@ async function seedTokens() { } await Token.create(tokenData as Token).save(); } - for (const token of SEED_DATA.TOKENS.goerli) { + for (const token of SEED_DATA.TOKENS.sepolia) { const tokenData = { ...token, networkId: 5, @@ -386,7 +386,7 @@ async function relateOrganizationsToTokens() { where: [ { symbol: 'ETH', networkId: NETWORK_IDS.MAIN_NET }, { symbol: 'ETH', networkId: NETWORK_IDS.ROPSTEN }, - { symbol: 'ETH', networkId: NETWORK_IDS.GOERLI }, + { symbol: 'ETH', networkId: NETWORK_IDS.SEPOLIA }, ], }); change.tokens = changeTokens; diff --git a/test/testUtils.ts b/test/testUtils.ts index 3c3f923d5..74fc6c447 100644 --- a/test/testUtils.ts +++ b/test/testUtils.ts @@ -1526,25 +1526,20 @@ export const SEED_DATA = { decimals: 9, }, ], - goerli: [ + sepolia: [ { name: 'Ethereum native token', symbol: 'ETH', address: '0x0000000000000000000000000000000000000000', decimals: 18, + networkId: 11155111, }, { - address: '0xdc31Ee1784292379Fbb2964b3B9C4124D8F89C60', - symbol: 'DAI', - name: 'DAI Goerli', - decimals: 18, - isStableCoin: true, - }, - { - address: '0xA2470F25bb8b53Bd3924C7AC0C68d32BF2aBd5be', - symbol: 'DRGIV3', - name: 'GIV test', + address: '0xfff9976782d46cc05630d1f6ebab18b2324d6b14', + symbol: 'WETH', + name: 'Wrapped Ether', decimals: 18, + networkId: 11155111, }, ], xdai: [ From 9bd361a56f6a667770e345738c366a5a83a94683 Mon Sep 17 00:00:00 2001 From: Cherik Date: Wed, 21 Aug 2024 10:18:57 +0330 Subject: [PATCH 2/4] add AddSepoliaToken1724166731604 migration --- migration/1724166731604-addSepoliaToken.ts | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 migration/1724166731604-addSepoliaToken.ts diff --git a/migration/1724166731604-addSepoliaToken.ts b/migration/1724166731604-addSepoliaToken.ts new file mode 100644 index 000000000..f0b3679bc --- /dev/null +++ b/migration/1724166731604-addSepoliaToken.ts @@ -0,0 +1,57 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; +import { Token } from '../src/entities/token'; +import { NETWORK_IDS } from '../src/provider'; +import seedTokens from './data/seedTokens'; + +export class AddSepoliaToken1724166731604 implements MigrationInterface { + async up(queryRunner: QueryRunner): Promise { + await queryRunner.manager.save( + Token, + seedTokens + .filter(token => token.networkId === NETWORK_IDS.SEPOLIA) + .map(token => { + const t = { + ...token, + }; + t.address = t.address?.toLowerCase(); + delete t.chainType; + return t; + }), + ); + + const tokens = await queryRunner.query(` + SELECT * FROM token + WHERE "networkId" = ${NETWORK_IDS.SEPOLIA} + `); + + const givethOrganization = ( + await queryRunner.query(`SELECT * FROM organization + WHERE label='giveth'`) + )[0]; + + const traceOrganization = ( + await queryRunner.query(`SELECT * FROM organization + WHERE label='trace'`) + )[0]; + + for (const token of tokens) { + await queryRunner.query(`INSERT INTO organization_tokens_token ("tokenId","organizationId") VALUES + (${token.id}, ${givethOrganization.id}), + (${token.id}, ${traceOrganization.id}) + ;`); + } + } + + async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(` + DELETE FROM organization_tokens_token + WHERE "tokenId" IN ( + SELECT id FROM token WHERE "networkId" = ${NETWORK_IDS.SEPOLIA} + ); + `); + + await queryRunner.query(` + DELETE FROM token WHERE "networkId" = ${NETWORK_IDS.SEPOLIA}; + `); + } +} From d63954f5c6555d5dd44a255f74d48f2316887784 Mon Sep 17 00:00:00 2001 From: Cherik Date: Wed, 21 Aug 2024 10:20:50 +0330 Subject: [PATCH 3/4] add ChangeProjectAddressToSepolia1724168597216 migration --- ...168597216-ChangeProjectAddressToSepolia.ts | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 migration/1724168597216-ChangeProjectAddressToSepolia.ts diff --git a/migration/1724168597216-ChangeProjectAddressToSepolia.ts b/migration/1724168597216-ChangeProjectAddressToSepolia.ts new file mode 100644 index 000000000..2b046e890 --- /dev/null +++ b/migration/1724168597216-ChangeProjectAddressToSepolia.ts @@ -0,0 +1,35 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; + +export class ChangeProjectAddressToSepolia1724168597216 + implements MigrationInterface +{ + async up(queryRunner: QueryRunner): Promise { + const projectAddressTableExists = + await queryRunner.hasTable('project_address'); + if (!projectAddressTableExists) { + // eslint-disable-next-line no-console + console.log('The project_address table doesn’t exist'); + return; + } + await queryRunner.query(` + UPDATE project_address + SET "networkId" = 11155111 + WHERE "networkId" = 5 + `); + } + + async down(queryRunner: QueryRunner): Promise { + const projectAddressTableExists = + await queryRunner.hasTable('project_address'); + if (!projectAddressTableExists) { + // eslint-disable-next-line no-console + console.log('The project_address table doesn’t exist'); + return; + } + await queryRunner.query(` + UPDATE project_address + SET "networkId" = 5 + WHERE "networkId" = 11155111 + `); + } +} From 24a9640ad6ef4beda66e2b077b7350264fe2eab4 Mon Sep 17 00:00:00 2001 From: Cherik Date: Wed, 21 Aug 2024 11:06:28 +0330 Subject: [PATCH 4/4] only add sepolia token on development env --- migration/1724166731604-addSepoliaToken.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/migration/1724166731604-addSepoliaToken.ts b/migration/1724166731604-addSepoliaToken.ts index f0b3679bc..bb15e94c8 100644 --- a/migration/1724166731604-addSepoliaToken.ts +++ b/migration/1724166731604-addSepoliaToken.ts @@ -2,9 +2,14 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; import { Token } from '../src/entities/token'; import { NETWORK_IDS } from '../src/provider'; import seedTokens from './data/seedTokens'; +import config from '../src/config'; export class AddSepoliaToken1724166731604 implements MigrationInterface { async up(queryRunner: QueryRunner): Promise { + const environment = config.get('ENVIRONMENT') as string; + // We don't add sepolia tokens in production ENV + if (environment === 'production') return; + await queryRunner.manager.save( Token, seedTokens @@ -43,6 +48,9 @@ export class AddSepoliaToken1724166731604 implements MigrationInterface { } async down(queryRunner: QueryRunner): Promise { + const environment = config.get('ENVIRONMENT') as string; + // We don't add sepolia tokens in production ENV + if (environment === 'production') return; await queryRunner.query(` DELETE FROM organization_tokens_token WHERE "tokenId" IN (