{"version":3,"sources":["../../../src/common/deployments/index.ts"],"sourcesContent":["import { getValidatedAddress } from '@nadohq/utils';\nimport { Address } from 'viem';\nimport ArbitrumOneCoreDeployment from './core/deployment.arbitrumOne.json' with { type: 'json' };\nimport ArbitrumSepoliaCoreDeployment from './core/deployment.arbitrumSepolia.json' with { type: 'json' };\nimport LocalCoreDeployment from './core/deployment.localhost.json' with { type: 'json' };\n\nimport { ChainEnv } from '../types';\nimport { NadoContractName } from '../nadoAbis';\n\nexport type NadoDeploymentAddresses = {\n  [name in NadoContractName]: Address;\n};\n\n/**\n * Known deployment addresses for the Nado contracts\n */\nexport const NADO_DEPLOYMENTS: Record<ChainEnv, NadoDeploymentAddresses> = {\n  arbitrumTestnet: validateDeployment({\n    ...ArbitrumSepoliaCoreDeployment,\n  }),\n  arbitrum: validateDeployment({\n    ...ArbitrumOneCoreDeployment,\n  }),\n  local: validateDeployment({\n    ...LocalCoreDeployment,\n  }),\n};\n\nfunction validateDeployment(\n  deployment: Record<NadoContractName, string>,\n): Record<NadoContractName, Address> {\n  return {\n    clearinghouse: getValidatedAddress(deployment.clearinghouse),\n    endpoint: getValidatedAddress(deployment.endpoint),\n    perpEngine: getValidatedAddress(deployment.perpEngine),\n    querier: getValidatedAddress(deployment.querier),\n    spotEngine: getValidatedAddress(deployment.spotEngine),\n    withdrawPool: getValidatedAddress(deployment.withdrawPool),\n  };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAoC;AAEpC,oCAAsC;AACtC,wCAA0C;AAC1C,kCAAgC;AAYzB,IAAM,mBAA8D;AAAA,EACzE,iBAAiB,mBAAmB;AAAA,IAClC,GAAG,kCAAAA;AAAA,EACL,CAAC;AAAA,EACD,UAAU,mBAAmB;AAAA,IAC3B,GAAG,8BAAAC;AAAA,EACL,CAAC;AAAA,EACD,OAAO,mBAAmB;AAAA,IACxB,GAAG,4BAAAC;AAAA,EACL,CAAC;AACH;AAEA,SAAS,mBACP,YACmC;AACnC,SAAO;AAAA,IACL,mBAAe,kCAAoB,WAAW,aAAa;AAAA,IAC3D,cAAU,kCAAoB,WAAW,QAAQ;AAAA,IACjD,gBAAY,kCAAoB,WAAW,UAAU;AAAA,IACrD,aAAS,kCAAoB,WAAW,OAAO;AAAA,IAC/C,gBAAY,kCAAoB,WAAW,UAAU;AAAA,IACrD,kBAAc,kCAAoB,WAAW,YAAY;AAAA,EAC3D;AACF;","names":["ArbitrumSepoliaCoreDeployment","ArbitrumOneCoreDeployment","LocalCoreDeployment"]}