Overview
Follow the Step-By-Step Tutorial on how to cover basic operations such as granting and revoking roles, handling funding currencies, and managing fractions.
The CTS SDK is a package designed to facilitate interaction with blockchain contracts and querying of the subgraph for the CTS. This SDK leverages TypeChain and ethers.js libraries to provide seamless access to contract instances, utility functions, and a GraphQL API.
Functions
These methods facilitate interaction with different contract instances, generating FacetCut objects, and handling subgraph queries:
- getSubgraphSDK
- getDiamondFactoryOnChain
- getImplementationContractsOnChain
- getDiamondAsFacets
- getSelectors
- getFacetCutsAdd
Objects
These constants provide crucial information about contract addresses, asset types, roles, states, and GraphQL API endpoints:
- InitSelectors
- CONTRACT_ADDRESSES_NEXERA
- CONTRACT_ADDRESSES_TOKENIZER
- ASSET_TYPE_CODES_WRAPPER
- ROLES
- STATES
- GRAPHQL_APIS
Queries
The CTS Tokenizer SDK includes GraphQL queries that allow users to interact with the subgraph, enabling efficient data retrieval and filtering from the blockchain. Below is a detailed explanation of the available client-side query for the CTS Diamond Factory:
Key Features
- Contract Instances: Easily retrieve instances of deployed contracts, including DiamondFactory and various facets used in the CTS Tokenizer Diamond instances.
- Utility Functions: Useful functions for interacting with contracts, such as retrieving function selectors and generating FacetCut objects.
- GraphQL API: Simplified querying of the subgraph using a GraphQL client, providing access to blockchain data with filtering and pagination capabilities.
Updated 5 months ago