![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@abstract-money/core
Advanced tools
This repository holds the type declarations and interfaces for our smart contracts in CosmWasm. Autogenerated contracts lie in generated and those that are "fixed" are placed in src/contracts.
pnpm build
: Generate the typespnpm fix
: Temporary fixes for the autogenerated contracts (TODO)pnpm format
: Run prettierpnpm lint
: Run linterpnpm lint:fix
: Attempt linter fixespnpm install @abstract-money/core
AbstractQueryClient
for the chain on which you're using Abstract.import { AbstractQueryClient } from '@abstract-money/core'
const CHAIN_NAME = "juno"
const getAbstract = async () => {
const abstractQueryClient = await AbtsractQueryClient.connectToChain(CHAIN_NAME)
}
pnpm install graphql-request@5
To allow for strongly-typing the schemas, we recommend setting up code generation.
See https://www.apollographql.com/docs/ios/code-generation/codegen-configuration/ for alternative options.
The following uses the-guild's graphql codegen as a typescript preset. See https://the-guild.dev/graphql/codegen/plugins/presets/preset-client for client options.
pnpm install -D @graphql-codegen/cli @graphql-codegen/client-preset @graphql-typed-document-node/core
codegen.yml
. This allows for auto type generation.
Seeschema: "<API_URL>" # This can be the API URL or the schema document
documents: ['./src/**/*.{tsx,ts}', '!src/__generated__/gql/**/*']
generates:
./src/__generated__/gql/:
preset: client
presetConfig:
gqlTagName: gql
immutableTypes: true
config:
immutableTypes: true
useTypeImports: true
scalars:
# Temporarily map to any, see DAT-16
JSON: any
Semver: string
Bech32Address: string
SafeInt: number
codegen
command to package.json
{
"scripts": {
"codegen": "graphql-codegen --config codegen.yml",
"codegen:watch": "graphql-codegen --config codegen.yml --watch"
}
}
NOTE: The first time you generate the types you will not import gql
from the generated folder, rather just including the string in the file!
The following example shows how to query the Abstract API for the value of a given account.
import { gql } from '__generated__/gql'
import { type AccountValueQuery } from '__generated__/gql/graphql'
import { AbstractAccountId, abstractApiRequest } from '@abstract-money/core'
const accountValueQuery = gql(/* GraphQL */ `
query AccountValue($accountId: AccountIdInput!, $chain: ID!) {
account(chain: $chain, accountId: $accountId) {
vault {
baseAsset
value
}
}
}
`)
const CHAIN_NAME = "juno"
const getAccountValue = async (accountId: AbstractAccountId) => {
// This type is auto-generated and inferred by graphql-codegen, we are typing it for exemplary purposes
const result: AccountValueQuery = await abstractApiRequest(
accountValueQuery,
// query variables are also strongly-typed!
{
chain: CHAIN_NAME,
accountId: accountId.toApi(),
}
)
return result.account.value
}
We recommend installing the graphql plugins for the ides, where you can also include a link to the Abstract API URL for auto recognition of the schemas.
FAQs
Typings for Abstract smart contracts
The npm package @abstract-money/core receives a total of 15 weekly downloads. As such, @abstract-money/core popularity was classified as not popular.
We found that @abstract-money/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
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.