Stargaze smart contract bindings
npm install @stargaze-zone/contracts
All contracts are scoped under the contracts
object:
import { contracts } from '@stargaze-zone/contracts';
const {
SG721Base,
VendingFactory,
VendingMinter,
Whitelist
} = contracts;
Then each contract will have clients, for example for Whitelist
:
const {
WhitelistClient,
WhitelistMessageComposer,
WhitelistQueryClient
} = Whitelist;
const queryClient = new WhitelistQueryClient(wasmClient, contractAddress);
const hasStarted = await queryClient.hasStarted()
const members = await queryClient.members({limit: 10})
const client = new WhitelistClient(signingWasmClient, sender, contractAddress);
await client.addMembers({
toAdd: ['name1', 'name2']
})
🛠 Built by Cosmology — if you like our tools, please consider delegating to our validator ⚛️
Code built with the help of these related projects:
- @cosmwasm/ts-codegen for generated CosmWasm contract Typescript classes