@oddmaki-protocol/sdk 0.6.0 → 1.0.0

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/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { parseEther, formatEther, stringToHex, erc20Abi, custom, http, createPublicClient, createWalletClient } from 'viem';
2
- import { baseSepolia } from 'viem/chains';
2
+ import { base, baseSepolia } from 'viem/chains';
3
3
  import { gql, GraphQLClient } from 'graphql-request';
4
4
 
5
5
  // src/client.ts
@@ -9,9 +9,15 @@ var CONTRACT_ADDRESSES = {
9
9
  conditionalTokens: "0x7364747372Ac4a175B5326f5B2C9CB1C271d32e8",
10
10
  usdc: "0x1d3caa0156e8e573814b78766ba7958d7e11488b",
11
11
  subgraph: "https://api.studio.thegraph.com/query/1716020/oddmaki/version/latest"
12
+ },
13
+ [base.id]: {
14
+ diamond: "0x025d086a62d93e24f3cb3f161612ca8e9530127d",
15
+ conditionalTokens: "0x3e2ae408ca03f27849edff32d107c7b8ea5c87b4",
16
+ usdc: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
17
+ subgraph: "https://api.studio.thegraph.com/query/1716020/oddmaki-base/version/latest"
12
18
  }
13
19
  };
14
- var DEFAULT_CHAIN = baseSepolia;
20
+ var DEFAULT_CHAIN = base;
15
21
  var SubgraphClient = class {
16
22
  constructor(endpoint) {
17
23
  this.client = new GraphQLClient(endpoint);
@@ -11294,8 +11300,8 @@ function resolveIPFSUri(uri, gateway) {
11294
11300
  if (!uri) return "";
11295
11301
  const gw = gateway || DEFAULT_IPFS_GATEWAY;
11296
11302
  if (uri.startsWith("ipfs://")) {
11297
- const base = gw.endsWith("/") ? gw : `${gw}/`;
11298
- const gateway2 = base.includes("/ipfs/") ? base : `${base}ipfs/`;
11303
+ const base2 = gw.endsWith("/") ? gw : `${gw}/`;
11304
+ const gateway2 = base2.includes("/ipfs/") ? base2 : `${base2}ipfs/`;
11299
11305
  return `${gateway2}${uri.slice(7)}`;
11300
11306
  }
11301
11307
  return uri;