Skip to content
Open
4 changes: 2 additions & 2 deletions examples/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@cere-ddc-sdk/cli-examples",
"version": "2.15.0",
"version": "2.16.0",
"private": true,
"dependencies": {
"@cere-ddc-sdk/cli": "2.15.0"
"@cere-ddc-sdk/cli": "2.16.0"
}
}
6 changes: 3 additions & 3 deletions examples/node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cere-ddc-sdk/node-examples",
"version": "2.15.0",
"version": "2.16.0",
"private": true,
"type": "module",
"scripts": {
Expand All @@ -14,8 +14,8 @@
"example:8": "ts-node --esm ./8-sudo-batch-remove-buckets/index.ts"
},
"dependencies": {
"@cere-ddc-sdk/blockchain": "2.15.0",
"@cere-ddc-sdk/ddc-client": "2.15.0",
"@cere-ddc-sdk/blockchain": "2.16.0",
"@cere-ddc-sdk/ddc-client": "2.16.0",
"@types/json-bigint": "^1.0.4",
"json-bigint": "^1.0.0",
"ts-node": "^10.9.2"
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "2.15.0",
"version": "2.16.0",
"command": {
"publish": {
"directory": "{workspaceRoot}/{projectRoot}/package"
Expand Down
58 changes: 29 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/blockchain/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cere-ddc-sdk/blockchain",
"version": "2.15.0",
"version": "2.16.0",
"description": "Cere Blockchain client",
"type": "module",
"main": "dist/index.cjs",
Expand Down
18 changes: 18 additions & 0 deletions packages/blockchain/src/Blockchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { DDCClustersPallet } from './DDCClustersPallet';
import { DDCStakingPallet } from './DDCStakingPallet';
import { DDCCustomersPallet } from './DDCCustomersPallet';
import { DDCClustersGovPallet } from './DDCClustersGovPallet';
import { CustomerDepositContract } from './CustomerDepositContract';

export type SendOptions = Pick<Partial<SignerOptions>, 'nonce' | 'signer'> & {
account: AddressOrPair | Signer;
Expand Down Expand Up @@ -332,6 +333,23 @@ export class Blockchain {
const { number } = await this.api.rpc.chain.getHeader();
return number.toNumber();
}

/**
* Creates an instance of CustomerDepositContract to work with the deposit smart contract.
*
* @param contractAddress - Address of the deployed smart contract customer deposit
* @returns Instance of CustomerDepositContract
*
* @example
* ```typescript
* const contractAddress = '5GBWmgdFAMqm8ZgAHGobqDqX6tjLxJhv53ygjNtaaAn3sjeZ';
* const contract = blockchain.getCustomerDepositContract(contractAddress);
* const balance = await contract.getBalance('5D5PhZQNJzcJXVBxwJxZcsutjKPqUPydrvpu6HeiBfMae2Qu');
* ```
*/
getCustomerDepositContract(contractAddress: string): CustomerDepositContract {
return new CustomerDepositContract(this.api, contractAddress);
}
}

export type Sendable = SubmittableExtrinsic<'promise'>;
Expand Down
Loading
Loading