-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/smart contract migration #292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
# 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
| import { Blockchain } from '@cere-ddc-sdk/blockchain'; | ||
|
|
||
| async function main() { | ||
| console.log('🚀 Пример использования DDC Client со смарт-контрактами'); |
There was a problem hiding this comment.
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. | |||
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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);
There was a problem hiding this comment.
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
No description provided.