Files
js/lib/thirdweb-client.ts
T
Nacho IacovinoandJonas Daniels ee6c3a35ff Remove old registry and use v5 (#2266)
* Remove old registry

* also this one

* Not removing from old registry anymore

* merge registry files

* wip works

* Refactor city

* Fix build

* One more thing

* Prettier?

* ???

* This should work

* My prettier is broken

* Can't live like this

* Resolve comments

* Abstract

* Sure

* Should use this

* Remove unused

* change approach

* Delete graphql/generated.ts

Signed-off-by: Nacho Iacovino <[email protected]>

* also remove deprecated mainnets

* Wip - failed build

* Define dashboard chain

* format

* Latest

* latest

* Remove log

* Not sure why we need this

* Back to this

---------

Signed-off-by: Nacho Iacovino <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2024-03-08 20:06:12 +00:00

23 lines
529 B
TypeScript

import { createThirdwebClient, defineChain } from "thirdweb";
import {
DASHBOARD_THIRDWEB_CLIENT_ID,
PROD_OR_DEV_URL,
} from "../constants/rpc";
import { IPFS_GATEWAY_URL } from "./sdk";
export const thirdwebClient = createThirdwebClient({
clientId: DASHBOARD_THIRDWEB_CLIENT_ID,
config: {
storage: {
gatewayUrl: IPFS_GATEWAY_URL,
},
},
});
export const defineDashboardChain = (chainId: number) => {
return defineChain({
id: chainId,
rpc: `https://${chainId}.rpc.${PROD_OR_DEV_URL}`,
});
};