@whisk/steakhouse 0.1.0 → 0.1.1
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/metadata/address-registry.d.ts +9 -0
- package/dist/metadata/address-registry.js +20 -0
- package/dist/metadata/address-registry.js.map +1 -0
- package/dist/metadata/index.d.ts +1 -0
- package/dist/metadata/index.js +3 -1
- package/dist/metadata/index.js.map +1 -1
- package/package.json +3 -2
- package/src/metadata/address-registry.ts +23 -0
- package/src/metadata/index.ts +1 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getAddress } from "viem";
|
|
2
|
+
import { arbitrum, base, mainnet } from "viem/chains";
|
|
3
|
+
const addressesRegistry = {
|
|
4
|
+
[mainnet.id]: {
|
|
5
|
+
boxFactory: getAddress("0xcF23d316e7C415a70836Ec9E68568C3cD82EBFc4")
|
|
6
|
+
},
|
|
7
|
+
[base.id]: {
|
|
8
|
+
boxFactory: getAddress("0x846365F9A09aeB7005127C6060876C82F7F70c0b")
|
|
9
|
+
},
|
|
10
|
+
[arbitrum.id]: {
|
|
11
|
+
boxFactory: getAddress("0x72576c537e25AeCb3026E5c8EF4B90436E22A333")
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
function getChainAddresses(chainId) {
|
|
15
|
+
return addressesRegistry[chainId] ?? {};
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
getChainAddresses
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=address-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/metadata/address-registry.ts"],"sourcesContent":["import { getAddress } from \"viem\"\nimport { arbitrum, base, mainnet } from \"viem/chains\"\nimport type { Address } from \"./types.js\"\n\nexport interface ChainAddresses {\n readonly boxFactory?: Address\n}\n\nconst addressesRegistry: Record<number, ChainAddresses> = {\n [mainnet.id]: {\n boxFactory: getAddress(\"0xcF23d316e7C415a70836Ec9E68568C3cD82EBFc4\"),\n },\n [base.id]: {\n boxFactory: getAddress(\"0x846365F9A09aeB7005127C6060876C82F7F70c0b\"),\n },\n [arbitrum.id]: {\n boxFactory: getAddress(\"0x72576c537e25AeCb3026E5c8EF4B90436E22A333\"),\n },\n}\n\nexport function getChainAddresses(chainId: number): ChainAddresses {\n return addressesRegistry[chainId] ?? {}\n}\n"],"mappings":"AAAA,SAAS,kBAAkB;AAC3B,SAAS,UAAU,MAAM,eAAe;AAOxC,MAAM,oBAAoD;AAAA,EACxD,CAAC,QAAQ,EAAE,GAAG;AAAA,IACZ,YAAY,WAAW,4CAA4C;AAAA,EACrE;AAAA,EACA,CAAC,KAAK,EAAE,GAAG;AAAA,IACT,YAAY,WAAW,4CAA4C;AAAA,EACrE;AAAA,EACA,CAAC,SAAS,EAAE,GAAG;AAAA,IACb,YAAY,WAAW,4CAA4C;AAAA,EACrE;AACF;AAEO,SAAS,kBAAkB,SAAiC;AACjE,SAAO,kBAAkB,OAAO,KAAK,CAAC;AACxC;","names":[]}
|
package/dist/metadata/index.d.ts
CHANGED
package/dist/metadata/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/metadata/index.ts"],"sourcesContent":["export { STEAKHOUSE_VAULTS } from \"./generated/vaults.js\"\nexport type { VaultConfig } from \"./types.js\"\n"],"mappings":"AAAA,SAAS,yBAAyB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/metadata/index.ts"],"sourcesContent":["export { type ChainAddresses, getChainAddresses } from \"./address-registry.js\"\nexport { STEAKHOUSE_VAULTS } from \"./generated/vaults.js\"\nexport type { VaultConfig } from \"./types.js\"\n"],"mappings":"AAAA,SAA8B,yBAAyB;AACvD,SAAS,yBAAyB;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whisk/steakhouse",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/office-supply-ventures/whisk-sdk.git",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
"@tanstack/react-query": ">=5",
|
|
44
44
|
"graphql": ">=16",
|
|
45
45
|
"react": ">=18",
|
|
46
|
-
"react-dom": ">=18"
|
|
46
|
+
"react-dom": ">=18",
|
|
47
|
+
"viem": ">=2"
|
|
47
48
|
},
|
|
48
49
|
"peerDependenciesMeta": {
|
|
49
50
|
"react": {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getAddress } from "viem"
|
|
2
|
+
import { arbitrum, base, mainnet } from "viem/chains"
|
|
3
|
+
import type { Address } from "./types.js"
|
|
4
|
+
|
|
5
|
+
export interface ChainAddresses {
|
|
6
|
+
readonly boxFactory?: Address
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const addressesRegistry: Record<number, ChainAddresses> = {
|
|
10
|
+
[mainnet.id]: {
|
|
11
|
+
boxFactory: getAddress("0xcF23d316e7C415a70836Ec9E68568C3cD82EBFc4"),
|
|
12
|
+
},
|
|
13
|
+
[base.id]: {
|
|
14
|
+
boxFactory: getAddress("0x846365F9A09aeB7005127C6060876C82F7F70c0b"),
|
|
15
|
+
},
|
|
16
|
+
[arbitrum.id]: {
|
|
17
|
+
boxFactory: getAddress("0x72576c537e25AeCb3026E5c8EF4B90436E22A333"),
|
|
18
|
+
},
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function getChainAddresses(chainId: number): ChainAddresses {
|
|
22
|
+
return addressesRegistry[chainId] ?? {}
|
|
23
|
+
}
|
package/src/metadata/index.ts
CHANGED