Skip to content
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

[Soroban] Storage example documentation inconsistecy #1176

Open
lijamie98 opened this issue Jan 13, 2025 · 0 comments
Open

[Soroban] Storage example documentation inconsistecy #1176

lijamie98 opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@lijamie98
Copy link
Contributor

What version are you using?

Stellar CLI 22.1.0

What did you do?

In this page: https://developers.stellar.org/docs/build/smart-contracts/getting-started/storing-data

The stellar contract init ./ --with-example increment is no longer available.

error: invalid value 'increment' for '--with-example <WITH_EXAMPLE>': This argument has been removed and will be not be recognized by the future versions of CLI: Adding examples via cli is no longer supported. You can still clone examples from the repo https://github.com/stellar/soroban-examples

For more information, try '--help'.

The documents code: env.storage().instance().extend_ttl(100, 100); is inconsistent with the example.

// The contract instance will be bumped to have a lifetime of at least 100 ledgers if the current expiration lifetime at most 50.
// If the lifetime is already more than 100 ledgers, this is a no-op. Otherwise,
// the lifetime is extended to 100 ledgers. This lifetime bump includes the contract
// instance itself and all entries in storage().instance(), i.e, COUNTER.
env.storage().instance().extend_ttl(50, 100);

What did you expect to see?

Consistency

What did you see instead?

Inconsistency

@lijamie98 lijamie98 added the bug Something isn't working label Jan 13, 2025
@github-project-automation github-project-automation bot moved this to Ideas in Dev Docs Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Ideas
Development

No branches or pull requests

1 participant