@nadohq/shared 0.1.0-alpha.41 → 0.1.0-alpha.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/consts/chainEnvToChain.cjs.map +1 -1
- package/dist/consts/chainEnvToChain.js +1 -1
- package/dist/consts/chainEnvToChain.js.map +1 -1
- package/dist/deployments/index.cjs +1 -1
- package/dist/deployments/index.cjs.map +1 -1
- package/dist/deployments/index.js +1 -1
- package/dist/deployments/index.js.map +1 -1
- package/package.json +2 -2
- package/src/consts/chainEnvToChain.ts +1 -1
- package/src/deployments/index.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/consts/chainEnvToChain.ts"],"sourcesContent":["import { Chain } from 'viem';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/consts/chainEnvToChain.ts"],"sourcesContent":["import { Chain } from 'viem';\nimport { ink, inkSepolia, localhost } from 'viem/chains';\nimport { ChainEnv } from '../types';\n\nexport const CHAIN_ENV_TO_CHAIN = {\n local: localhost,\n inkTestnet: inkSepolia,\n inkMainnet: ink,\n} as const satisfies Record<ChainEnv, Chain>;\n\nexport const CHAIN_ID_TO_CHAIN_ENV = Object.fromEntries(\n Object.entries(CHAIN_ENV_TO_CHAIN).map(([chainEnv, chain]) => [\n chain.id,\n chainEnv,\n ]),\n) as Record<number, ChainEnv>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA2C;AAGpC,IAAM,qBAAqB;AAAA,EAChC,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,YAAY;AACd;AAEO,IAAM,wBAAwB,OAAO;AAAA,EAC1C,OAAO,QAAQ,kBAAkB,EAAE,IAAI,CAAC,CAAC,UAAU,KAAK,MAAM;AAAA,IAC5D,MAAM;AAAA,IACN;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/consts/chainEnvToChain.ts"],"sourcesContent":["import { Chain } from 'viem';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/consts/chainEnvToChain.ts"],"sourcesContent":["import { Chain } from 'viem';\nimport { ink, inkSepolia, localhost } from 'viem/chains';\nimport { ChainEnv } from '../types';\n\nexport const CHAIN_ENV_TO_CHAIN = {\n local: localhost,\n inkTestnet: inkSepolia,\n inkMainnet: ink,\n} as const satisfies Record<ChainEnv, Chain>;\n\nexport const CHAIN_ID_TO_CHAIN_ENV = Object.fromEntries(\n Object.entries(CHAIN_ENV_TO_CHAIN).map(([chainEnv, chain]) => [\n chain.id,\n chainEnv,\n ]),\n) as Record<number, ChainEnv>;\n"],"mappings":";;;AACA,SAAS,KAAK,YAAY,iBAAiB;AAGpC,IAAM,qBAAqB;AAAA,EAChC,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,YAAY;AACd;AAEO,IAAM,wBAAwB,OAAO;AAAA,EAC1C,OAAO,QAAQ,kBAAkB,EAAE,IAAI,CAAC,CAAC,UAAU,KAAK,MAAM;AAAA,IAC5D,MAAM;AAAA,IACN;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -34,8 +34,8 @@ __export(deployments_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(deployments_exports);
|
|
36
36
|
var import_getValidatedAddress = require("../utils/getValidatedAddress.cjs");
|
|
37
|
-
var import_deployment_inkSepolia = __toESM(require("./core/deployment.inkSepolia.json"), 1);
|
|
38
37
|
var import_deployment_inkMainnet = __toESM(require("./core/deployment.inkMainnet.json"), 1);
|
|
38
|
+
var import_deployment_inkSepolia = __toESM(require("./core/deployment.inkSepolia.json"), 1);
|
|
39
39
|
var import_deployment_localhost = __toESM(require("./core/deployment.localhost.json"), 1);
|
|
40
40
|
var NADO_DEPLOYMENTS = {
|
|
41
41
|
inkTestnet: validateDeployment({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/deployments/index.ts"],"sourcesContent":["import { Address } from 'viem';\nimport { NadoContractName } from '../abis/nadoAbis';\n\nimport { ChainEnv } from '../types';\nimport { getValidatedAddress } from '../utils/getValidatedAddress';\nimport
|
|
1
|
+
{"version":3,"sources":["../../src/deployments/index.ts"],"sourcesContent":["import { Address } from 'viem';\nimport { NadoContractName } from '../abis/nadoAbis';\n\nimport { ChainEnv } from '../types';\nimport { getValidatedAddress } from '../utils/getValidatedAddress';\nimport InkMainnetCoreDeployment from './core/deployment.inkMainnet.json' with { type: 'json' };\nimport InkSepoliaCoreDeployment from './core/deployment.inkSepolia.json' with { type: 'json' };\nimport LocalCoreDeployment from './core/deployment.localhost.json' with { type: 'json' };\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 inkTestnet: validateDeployment({\n ...InkSepoliaCoreDeployment,\n }),\n inkMainnet: validateDeployment({\n ...InkMainnetCoreDeployment,\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;AAIA,iCAAoC;AACpC,mCAAqC;AACrC,mCAAqC;AACrC,kCAAgC;AASzB,IAAM,mBAA8D;AAAA,EACzE,YAAY,mBAAmB;AAAA,IAC7B,GAAG,6BAAAA;AAAA,EACL,CAAC;AAAA,EACD,YAAY,mBAAmB;AAAA,IAC7B,GAAG,6BAAAC;AAAA,EACL,CAAC;AAAA,EACD,OAAO,mBAAmB;AAAA,IACxB,GAAG,4BAAAC;AAAA,EACL,CAAC;AACH;AAEA,SAAS,mBACP,YACmC;AACnC,SAAO;AAAA,IACL,mBAAe,gDAAoB,WAAW,aAAa;AAAA,IAC3D,cAAU,gDAAoB,WAAW,QAAQ;AAAA,IACjD,gBAAY,gDAAoB,WAAW,UAAU;AAAA,IACrD,aAAS,gDAAoB,WAAW,OAAO;AAAA,IAC/C,gBAAY,gDAAoB,WAAW,UAAU;AAAA,IACrD,kBAAc,gDAAoB,WAAW,YAAY;AAAA,EAC3D;AACF;","names":["InkSepoliaCoreDeployment","InkMainnetCoreDeployment","LocalCoreDeployment"]}
|
|
@@ -2,8 +2,8 @@ import "../chunk-5WRI5ZAA.js";
|
|
|
2
2
|
|
|
3
3
|
// src/deployments/index.ts
|
|
4
4
|
import { getValidatedAddress } from "../utils/getValidatedAddress.js";
|
|
5
|
-
import InkSepoliaCoreDeployment from "./core/deployment.inkSepolia.json" with { type: "json" };
|
|
6
5
|
import InkMainnetCoreDeployment from "./core/deployment.inkMainnet.json" with { type: "json" };
|
|
6
|
+
import InkSepoliaCoreDeployment from "./core/deployment.inkSepolia.json" with { type: "json" };
|
|
7
7
|
import LocalCoreDeployment from "./core/deployment.localhost.json" with { type: "json" };
|
|
8
8
|
var NADO_DEPLOYMENTS = {
|
|
9
9
|
inkTestnet: validateDeployment({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/deployments/index.ts"],"sourcesContent":["import { Address } from 'viem';\nimport { NadoContractName } from '../abis/nadoAbis';\n\nimport { ChainEnv } from '../types';\nimport { getValidatedAddress } from '../utils/getValidatedAddress';\nimport
|
|
1
|
+
{"version":3,"sources":["../../src/deployments/index.ts"],"sourcesContent":["import { Address } from 'viem';\nimport { NadoContractName } from '../abis/nadoAbis';\n\nimport { ChainEnv } from '../types';\nimport { getValidatedAddress } from '../utils/getValidatedAddress';\nimport InkMainnetCoreDeployment from './core/deployment.inkMainnet.json' with { type: 'json' };\nimport InkSepoliaCoreDeployment from './core/deployment.inkSepolia.json' with { type: 'json' };\nimport LocalCoreDeployment from './core/deployment.localhost.json' with { type: 'json' };\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 inkTestnet: validateDeployment({\n ...InkSepoliaCoreDeployment,\n }),\n inkMainnet: validateDeployment({\n ...InkMainnetCoreDeployment,\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":";;;AAIA,SAAS,2BAA2B;AACpC,OAAO,8BAA8B,oCAAoC,KAAK,EAAE,MAAM,OAAO;AAC7F,OAAO,8BAA8B,oCAAoC,KAAK,EAAE,MAAM,OAAO;AAC7F,OAAO,yBAAyB,mCAAmC,KAAK,EAAE,MAAM,OAAO;AAShF,IAAM,mBAA8D;AAAA,EACzE,YAAY,mBAAmB;AAAA,IAC7B,GAAG;AAAA,EACL,CAAC;AAAA,EACD,YAAY,mBAAmB;AAAA,IAC7B,GAAG;AAAA,EACL,CAAC;AAAA,EACD,OAAO,mBAAmB;AAAA,IACxB,GAAG;AAAA,EACL,CAAC;AACH;AAEA,SAAS,mBACP,YACmC;AACnC,SAAO;AAAA,IACL,eAAe,oBAAoB,WAAW,aAAa;AAAA,IAC3D,UAAU,oBAAoB,WAAW,QAAQ;AAAA,IACjD,YAAY,oBAAoB,WAAW,UAAU;AAAA,IACrD,SAAS,oBAAoB,WAAW,OAAO;AAAA,IAC/C,YAAY,oBAAoB,WAAW,UAAU;AAAA,IACrD,cAAc,oBAAoB,WAAW,YAAY;AAAA,EAC3D;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadohq/shared",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.44",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Shared utilities, types, and contract helpers for Nado SDK",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"bignumber.js": "^9.3.0",
|
|
50
50
|
"viem": "*"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "d2c756b567391feadc7653e5454b98c7563dd596"
|
|
53
53
|
}
|
package/src/deployments/index.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { NadoContractName } from '../abis/nadoAbis';
|
|
|
3
3
|
|
|
4
4
|
import { ChainEnv } from '../types';
|
|
5
5
|
import { getValidatedAddress } from '../utils/getValidatedAddress';
|
|
6
|
-
import InkSepoliaCoreDeployment from './core/deployment.inkSepolia.json' with { type: 'json' };
|
|
7
6
|
import InkMainnetCoreDeployment from './core/deployment.inkMainnet.json' with { type: 'json' };
|
|
7
|
+
import InkSepoliaCoreDeployment from './core/deployment.inkSepolia.json' with { type: 'json' };
|
|
8
8
|
import LocalCoreDeployment from './core/deployment.localhost.json' with { type: 'json' };
|
|
9
9
|
|
|
10
10
|
export type NadoDeploymentAddresses = {
|