![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@abstract-money/abstract.js-react
Advanced tools
Typings for Abstract smart contracts with react query
pnpm install @abstract-money/abstract.js-react
AbstractProvider
to the root providers in your app.const App = () => (
<ChakraProvider theme={theme}>
+ <AbstractProvider>
<Router>
<Layout>
<Routings />
</Layout>
</Router>
+ </AbstractProvider>
</ChakraProvider>
);
Install the necessary packages (see https://github.com/AbstractSDK/frontend/)
Create a query hook and connect your component to it:
import {
AbstractAccountId,
useApiQuery,
} from "@abstract-money/abstract.js-react";
import { gql } from "../__generated__/gql";
const accountInfoQuery = gql(/* GraphQL */ `
query AccountsByIds($ids: [AccountIdWithChain!]!) {
accountsByIds(ids: $ids) {
info {
name
chainId
governance {
governanceType
owner
}
description
link
}
}
}
`);
const useAccountInfoQuery = ({ accountId }: { accountId: string }) => {
const accountIdDecoded = AbstractAccountId.fromStringId(accountId);
return useApiQuery(
{
select: (data) => data.accountsByIds[0].info,
queryKey: ["api", "accountInfo", accountIdDecoded],
},
accountInfoQuery,
{ ids: [accountIdDecoded.toApi()] }
);
};
export const DashboardPage = () => {
const { data, error, isError, isLoading } = useAccountInfoQuery({
accountId: "kujiratestnet-20",
});
return data === undefined ? (
<>
{isLoading ? <div>Loading...</div> : null}
{isError ? <div>{error.message}</div> : null}
</>
) : (
<div>
<h1>{data.name}</h1>
<p>{data.chainId}</p>
<span>{data.governance.owner}</span>
<p>{data.description}</p>
</div>
);
};
pnpm install @cosmos-kit/react @cosmos-kit/keplr chain-registry
See the cosmos-kit getting started guide for further details:
pnpm install @tanstack/react-query@v4 @tanstack/react-query-devtools
If you're using Vite, you'll have to polyfill the common modules.
pnpm install rollup-plugin-node-polyfills @esbuild-plugins/node-globals-polyfill
// vite.config.ts
import rollupNodePolyFill from "rollup-plugin-node-polyfills";
export default defineConfig({
build: {
rollupOptions: {
plugins: [
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
rollupNodePolyFill(),
],
},
},
optimizeDeps: {
esbuildOptions: {
// Node.js global to browser globalThis
define: {
global: "globalThis",
},
plugins: [
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
NodeGlobalsPolyfillPlugin({
process: true,
buffer: true,
}),
],
},
},
});
FAQs
Typings for Abstract smart contracts with react query
The npm package @abstract-money/abstract.js-react receives a total of 2 weekly downloads. As such, @abstract-money/abstract.js-react popularity was classified as not popular.
We found that @abstract-money/abstract.js-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.