Skip to content

Conversation

@mazhutoanton
Copy link
Contributor

No description provided.

# Conflicts:
#	CHANGELOG.md
#	examples/cli/CHANGELOG.md
#	examples/node/CHANGELOG.md
#	packages/blockchain/CHANGELOG.md
#	packages/changelog-preset/CHANGELOG.md
#	packages/cli/CHANGELOG.md
#	packages/ddc-client/CHANGELOG.md
#	packages/ddc/CHANGELOG.md
#	packages/eslint-config/CHANGELOG.md
#	packages/file-storage/CHANGELOG.md
#	packages/typedoc-config/CHANGELOG.md
#	playground/CHANGELOG.md
#	tests/CHANGELOG.md
@mazhutoanton mazhutoanton marked this pull request as ready for review August 14, 2025 13:55
@mazhutoanton mazhutoanton requested a review from spoluyan as a code owner August 14, 2025 13:55
import { Blockchain } from '@cere-ddc-sdk/blockchain';

async function main() {
console.log('🚀 Пример использования DDC Client со смарт-контрактами');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this file needed? if yes, please change comments and log messages to english.

also, make sure that this example style is aligned with other examples we have

@@ -0,0 +1,139 @@
# DDC Client со смарт-контрактами

Этот пример демонстрирует использование DDC Client с новой архитектурой на основе смарт-контрактов customer deposit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same


export const deposit = async (client: DdcClient, amount: number, options: DepositOptions) => {
await client.depositBalance(options.clusterId, BigInt(amount * CERE), options);
await client.depositBalance(BigInt(amount * CERE));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should there be clusterId param?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we have per cluster contracts (so there is no need to specify cluster id anymore), i wonder why in guides and examples we have

// Депозит средств
await client.depositBalance(clusterId, amount);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, the contract is deployed separately for each cluster

@mazhutoanton mazhutoanton requested a review from upalinski August 15, 2025 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants