diff --git a/content/src/Environment.ts b/content/src/Environment.ts index 72dd0163e..f04133961 100644 --- a/content/src/Environment.ts +++ b/content/src/Environment.ts @@ -124,6 +124,7 @@ export enum EnvironmentConfig { LOG_REQUESTS, UPDATE_FROM_DAO_INTERVAL, DECENTRALAND_ADDRESS, + ADDITIONAL_DECENTRALAND_ADDRESS, DEPLOYMENTS_DEFAULT_RATE_LIMIT_TTL, DEPLOYMENTS_DEFAULT_RATE_LIMIT_MAX, ETH_NETWORK, @@ -232,6 +233,11 @@ export class EnvironmentBuilder { () => process.env.UPDATE_FROM_DAO_INTERVAL ?? ms('30m') ) this.registerConfigIfNotAlreadySet(env, EnvironmentConfig.DECENTRALAND_ADDRESS, () => DECENTRALAND_ADDRESS) + this.registerConfigIfNotAlreadySet( + env, + EnvironmentConfig.ADDITIONAL_DECENTRALAND_ADDRESS, + () => process.env.ADDITIONAL_DECENTRALAND_ADDRESS ?? undefined + ) this.registerConfigIfNotAlreadySet(env, EnvironmentConfig.DEPLOYMENTS_DEFAULT_RATE_LIMIT_TTL, () => Math.floor(ms((process.env.DEPLOYMENTS_DEFAULT_RATE_LIMIT_TTL ?? '1m') as string) / 1000) ) diff --git a/content/src/components.ts b/content/src/components.ts index 8af85eb25..40907ff41 100644 --- a/content/src/components.ts +++ b/content/src/components.ts @@ -1,6 +1,6 @@ import { createFolderBasedFileSystemContentStorage, createFsComponent } from '@dcl/catalyst-storage' import { ValidateFn } from '@dcl/content-validator' -import { EntityType } from '@dcl/schemas' +import { EntityType, EthAddress } from '@dcl/schemas' import { createSynchronizer } from '@dcl/snapshots-fetcher' import { createJobQueue } from '@dcl/snapshots-fetcher/dist/job-queue-port' import { createFetchComponent } from '@well-known-components/fetch-component' @@ -108,7 +108,13 @@ export async function initComponentsWithEnv(env: Environment): Promise dclAddress.toLowerCase() === address.toLowerCase()) } /** Validate that the signature belongs to the Ethereum address */ diff --git a/content/test/unit/ports/activeEntities.spec.ts b/content/test/unit/ports/activeEntities.spec.ts index 165cb196c..7d18ab8fc 100644 --- a/content/test/unit/ports/activeEntities.spec.ts +++ b/content/test/unit/ports/activeEntities.spec.ts @@ -359,7 +359,7 @@ async function buildComponents() { const pointerManager = NoOpPointerManager.build() const authenticator = new ContentAuthenticator( new HTTPProvider('https://rpc.decentraland.org/mainnet?project=catalyst-ci'), - DECENTRALAND_ADDRESS + [DECENTRALAND_ADDRESS] ) const deployedEntitiesBloomFilter = createDeployedEntitiesBloomFilter({ database, logs, clock }) env.setConfig(EnvironmentConfig.ENTITIES_CACHE_SIZE, DEFAULT_ENTITIES_CACHE_SIZE) diff --git a/content/test/unit/ports/deployer.spec.ts b/content/test/unit/ports/deployer.spec.ts index 4136296ac..b2dd456d7 100644 --- a/content/test/unit/ports/deployer.spec.ts +++ b/content/test/unit/ports/deployer.spec.ts @@ -211,7 +211,7 @@ describe('Deployer', function () { const pointerManager = NoOpPointerManager.build() const authenticator = new ContentAuthenticator( new HTTPProvider('https://rpc.decentraland.org/mainnet?project=catalyst-ci'), - DECENTRALAND_ADDRESS + [DECENTRALAND_ADDRESS] ) const deployedEntitiesBloomFilter = createDeployedEntitiesBloomFilter({ database, logs, clock }) env.setConfig(EnvironmentConfig.ENTITIES_CACHE_SIZE, DEFAULT_ENTITIES_CACHE_SIZE) diff --git a/yarn.lock b/yarn.lock index 8f17a524a..5e5a39604 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2711,7 +2711,7 @@ destroy@1.2.0, destroy@^1.2.0: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== -detect-libc@^2.0.0, detect-libc@^2.0.1, detect-libc@^2.0.2: +detect-libc@^2.0.0, detect-libc@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== @@ -4949,11 +4949,6 @@ node-abi@^3.3.0: dependencies: semver "^7.3.5" -node-addon-api@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-5.0.0.tgz#7d7e6f9ef89043befdb20c1989c905ebde18c501" - integrity sha512-CvkDw2OEnme7ybCykJpVcKH+uAOLV2qLqiyla128dN9TkEWfrYmxG6C2boDe5KcNQqZF3orkqzGgOMvZ/JNekA== - node-addon-api@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-6.1.0.tgz#ac8470034e58e67d0c6f1204a18ae6995d9c0d76" @@ -5853,18 +5848,18 @@ setprototypeof@1.2.0: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== -sharp@0.30.7: - version "0.30.7" - resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.30.7.tgz#7862bda98804fdd1f0d5659c85e3324b90d94c7c" - integrity sha512-G+MY2YW33jgflKPTXXptVO28HvNOo9G3j0MybYAHeEmby+QuD2U98dT6ueht9cv/XDqZspSpIhoSW+BAKJ7Hig== +sharp@0.32.6: + version "0.32.6" + resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.32.6.tgz#6ad30c0b7cd910df65d5f355f774aa4fce45732a" + integrity sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w== dependencies: color "^4.2.3" - detect-libc "^2.0.1" - node-addon-api "^5.0.0" + detect-libc "^2.0.2" + node-addon-api "^6.1.0" prebuild-install "^7.1.1" - semver "^7.3.7" + semver "^7.5.4" simple-get "^4.0.1" - tar-fs "^2.1.1" + tar-fs "^3.0.4" tunnel-agent "^0.6.0" sharp@^0.32.0: