@coolcatchain/contracts
v0.8.0
Published
CoolCat contracts
Downloads
35
Readme
@coolcatchain/contracts
CoolCat smart contract interface.
yarn add @coolcatchain/contracts
CoolCat Contracts
Clients
All contracts are scoped under the contracts
object:
import { contracts } from '@coolcatchain/contracts';
const {
CWAdminFactory,
CWCore,
CWNativeBalanceStake,
CWNamesRegistry,
CWSingleProposalVote
} = contracts;
Then each contract will have clients, for example for CWNamesRegistry
:
const {
CWNamesRegistryClient,
CWNamesRegistryMessageComposer,
CWNamesRegistryQueryClient
} = CWNamesRegistry;
Queries
const queryClient = new CWNamesRegistryQueryClient(wasmClient, contractAddress);
const isNameTaken = await queryClient.isNameTaken('CoolCat Clowder');
const members = await queryClient.ClowderByName('CoolCat Clowder');
Mutations
const client = new CWSingleProposalVote(
signingWasmClient,
sender,
contractAddress
);
await client.createProposal(msg);
Credits
🛠 Built by Digital Kitchen, based on Cosmology ⚛️ goodness!
Using CosmWasm TS Codegen:
- @cosmwasm/ts-codegen for generated CosmWasm contract Typescript classes