Skip to content

Conversation

@lwshang
Copy link
Contributor

@lwshang lwshang commented Jun 20, 2023

SDK-1142

Description

The management canister API takes explicit cycles argument if the call requires payment. No more hard-coded fees.

How Has This Been Tested?

Example and e2e test

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@lwshang lwshang marked this pull request as ready for review June 20, 2023 22:35
@lwshang lwshang requested review from a user and adamspofford-dfinity June 20, 2023 22:35
@lwshang lwshang merged commit bfa2b38 into main Jun 20, 2023
@lwshang lwshang deleted the lwshang/fee branch June 20, 2023 23:29
adamspofford-dfinity added a commit that referenced this pull request May 14, 2025
* feat: set sender_canister_version and support canister_info (#401)

* set sender_canister_version and support canister_info

* use canister_info in test canister

* remove Canister from CanisterChangeOrigin and CanisterChangeDetails variant types

* fix: no hard-coded fees for management canister calls (#404)

* btc API fees

* ecdsa fees

* create canister fee

* mv

* split http_request

* http_request fee

* tests

* doc

* bump ver & changelog

* bump ver (#405)

* feat: Bitcoin API handles cycles cost under the hood. (#406)

* bitcoin fee

* bump ver & changelog

* feat: Hardcodes the fee for `sign_with_ecdsa`. (#407)

* enhancements to bitcoin and ecdsa

* cargo fmt

* add back bitcoin prefix

* bump ver and changelog

* doc

* fix example

* fmt

---------

Co-authored-by: Linwei Shang <linwei.shang@dfinity.org>

* Check panic after await freeing resources (#408)

* feat: Add some conversion methods to AccountIdentifier in ic-ledger-types (#352)

* [enhancement] AccountIdentifier

* fix: compile error

* update change log

* [add] unit tests

---------

Co-authored-by: Linwei Shang <linwei.shang@dfinity.org>

* chore: Update example http_request_required_cycles (#409)

* Update example http_request_required_cycles

* fmt

* comment

---------

Co-authored-by: Linwei Shang <linwei.shang@dfinity.org>

* feat: upgrade candid to v0.9 (#411)

* feat(breaking): bump CDK to use candid 0.9-beta (#367)

* bump CDK to use candid 0.9-beta

* make ic-ledger-types not breaking

* chore: release continue (#370)

* fix

* bump ver

* Add readme to ic-cdk-timers

---------

Co-authored-by: Adam Spofford <adam.spofford@dfinity.org>

* version and changelog

* fix chess

* disable examples using import

---------

Co-authored-by: Linwei Shang <linwei.shang@dfinity.org>
Co-authored-by: Adam Spofford <adam.spofford@dfinity.org>

* test

* add wasmtime in CI

* revert

* use patched ic-test-state-machine-client

* feat: ic-cdk-bindgen replace import macro (#390)

* import did file

* fix

* test

* fix counter example

* rename to ic-cdk-bindgen

* fix profile example

* no re-export

* enable all example tests in CI

* remove import and fix tests

* fix clippy

* fix ic-certified-map doc test

* fmt

---------

Co-authored-by: Linwei Shang <linwei.shang@dfinity.org>

* feat: add export_candid macro (#386)

* export candid

* fix build.sh

* actor macro

* add wasmtime in CI

* fix

* fix

* fix

* remove actor macro

* fix

* ic-cdk/wasi enables export_candid

* git forget declarations/

* fmt

* Warning features in Cargo.toml

* bump ic0 version

---------

Co-authored-by: Linwei Shang <linwei.shang@dfinity.org>

* prepare for release

* TODO comment

* changelog

* doc export_candid

* format changelog

* bump library and changelog

* explain why no doc for TransformFunc

* find solution for doc TransformFunc

* remove TODO

* doc hidden wasi mod

---------

Co-authored-by: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com>
Co-authored-by: Adam Spofford <adam.spofford@dfinity.org>
Co-authored-by: Yan Chen <yan.chen@dfinity.org>

* chore: Rust v1.65.0 and cargo workspace (#415)

* rust 1.70.0

* rust update notice

* link LICENSE

* rust v1.65.0

* workspace.dependencies

* update README and CHANGELOG (#416)

* fix: only update/query macros can take guard function (#418)

* fix: only update/query take guard function

* trim docs

* test

* fix doc:wq

* bump ver

* changelog

* fix docs

* chore: update Rust toolchain (#420)

* Revert MSRV (#421)

* fix: export composite query correctly (#419)

* fix: export composite query correctly

* changelog

* feat: introduce candid-extractor for candid export (#424)

* remove wasi feature

* export_candid

* examples and CI

* speed up ic-wasm install

* fix

* add candid-extractor crate

* update readme and ic0.txt

* update CI

* fix CI

* try again

* fix ci

* fix

* bump versions and update changelog

* update date

* Update src/ic-cdk-timers/CHANGELOG.md

Co-authored-by: Adam Spofford <93943719+adamspofford-dfinity@users.noreply.github.com>

---------

Co-authored-by: Adam Spofford <93943719+adamspofford-dfinity@users.noreply.github.com>

* chore: CI for release candid-extractor (#427)

* include wat

* binstall CI

* fix url

* v0.1.1

* fix CI

* versioned runner

* include root Cargo.lock

* ubuntu 22.04

* chore: unify Rust toolchain version (#429)

* override toolchain in CI

* comments

* execute rustup override set

* remove MSRV of candid-extractor

* set MSRV to 1.66.0 and use it everywhere

* unify cache key hashFiles

* concise Cargo.toml members

* candidi-extractor MSRV

* fix CI test job

* clippy

* comment

* fix: Remove global state from `ic-cdk-macros` (#430)

* Remove global state from ic-cdk-macros

* Update version and changelog

* Release ic-cdk@0.11.1, ic0@0.21.0 (#433)

* feat: cycles_burn  (#434)

* ic0.txt

* safe api

* doc

* update ic-test-state-machine

* test

* changelog

* Release ic-cdk-timers@0.5.1 (#437)

* feat: RUN-798: Add call context perf counter (#435)

* feat: RUN-798: Add call context perf counter

* deprecated note

* improve doc

* fmt

* v0.11.3 and changelog

---------

Co-authored-by: Linwei Shang <linwei.shang@dfinity.org>

* test: refactor management_canister tests (#438)

* move main/provisonal tests to e2e

* refactor management example

* use stable rust in examples

* periodically run CI to keep cache available

* fmt

* single quote in yml

* 0 for Sunday

* chore(ci): use `dfinity/setup-dfx` GitHub Action to install `dfx` (#439)

* fix (#440)

* test: remove vendored actions (#441)

* use original action instead of dfinity fork

* regex based conventional pr title

* bats submodules

* use bats from submodule in examples.yml

* try fix

* checkout submodules only in test

* test: fix print example (#443)

* fix

* add bats test

* Adding icrc1_memo to the Transaction (#445)

* feat: Added query stats to canister status endpoint (#432)

* Added query stats to canister status endpoint

* Changelog

* pub and doc

* update ic-state-machine

* Adopt new API as discussed with Martin

* bump ic-cdk v0.11.4

---------

Co-authored-by: Linwei Shang <linwei.shang@dfinity.org>

* chore: Upgrade candid to v0.10 (#448)

* chore: Upgrade candid to v0.10

This upgrades candid to the new libary version which has been split into
smaller pieces, hence reducing the size of the dependencies for
downstream projects.

* Adapt cdk-bindgen to new candid_parser library

* Remove setting default value again

* Remove candid dependency from ic-cdk-bindgen

* Reword changelog entry

* Accommodate candid changes with regards to Nat conversions

* Update remaining candid references

* Update even more candid references

* Fix counter example

* Fix nat comparison

* bump versions and changelog

* cargo update

* bump ic-cdk-macros

* mv compile tests to ic-cdk

* bump ic-cdk-bindgen

* README

---------

Co-authored-by: Linwei Shang <linwei.shang@dfinity.org>

* feat: Add `reserved_cycles` and `reserved_cycles_limit` (#449)

* feat: Add `reserved_cycles` and `reserved_cycles_limit`

This adds the new fields to the API of the management canister:
- `reserved_cycles` to `CanisterStatusResponse`.
- `reserved_cycles_limit` to `CanisterSettings` and
  `DefiniteCanisterSettings`.

More information:
- https://forum.dfinity.org/t/23447
- https://dashboard.internetcomputer.org/proposal/126094

* Add to CHANGELOG and fix errors

* changelog details

---------

Co-authored-by: Linwei Shang <linwei.shang@dfinity.org>

* feat: "hidden" attribute to exclude exporting method in export_candid!() (#451)

* feat: no_export attribute to exclude exporting method in did file

* changelog

* test: example & macro compile

* rename to hidden

* typo

---------

Co-authored-by: Linwei Shang <linwei.shang@dfinity.org>

* fix: query stats: make members public (#453)

* feat: Serde Serialize and Deserialize traits for the RbTree in the ic-certified-map crate. (#399)

* This change adds the serde Serialize and Deserialize traits to the RbTree.

* Manual implementation of Serialize and Deserialize for the RbTree.

* replace 'static lifetime bounds with a custom lifetime 't.

* Added bincode serialization in the serde test.

* CandidType for the RbTree.

* update CHANGELOG with CandidType.

* docs: more informative README and call* methods (#454)

* docs: ic-cdk README

* docs: README for macros

* docs: call* methods

* chore: bump version and changelog

* fix: grammar and format

* fix: a leftover lock change from other PR

* feat: `is_recovering_from_trap` (#456)

* Raise MSRV to 1.70.0 (#457)

* chore(deps): bump zerocopy from 0.7.26 to 0.7.32 (#458)

* fix(bindgen): look for standardized environment variables (#467)

* feat: resolve env vars

* test: e2e using profile example

* chore: clean up dfx.json

* chore: bump ver & changelog

* chore: dfx v0.13.1

* fix: profile bats

* try the workaround

* workaround

* fmt

* chore(ci): examples run with latest dfx (#468)

* chore: upgrade CI dependencies & use latest in setup-dfx

* chore: correct comment

* fix: add mising export_candid!

* feat!: config canister endpoint decoding quota (#465)

* feat: config canister endpoint decoding quota

* add call_with_config

* fix

* fix

* changelog

* fix

* fix

* update changelog

* chore: release ic-cdk v0.13.0 (#469)

* chore: release ic-cdk v0.13.0

* chore: ic-ledger-types v0.10.0

* chore: release ic-cdk v0.13.1 and ic-cdk-macros v0.9.0 (#470)

* chore: release ic-cdk v0.13.1 and ic-cdk-macros v0.9.0

* pin ic-cdk-macros to a specific version

* chore: release ic-cdk-timers v0.7.0 (#471)

* chore: examples overhaul (#473)

* make assertions

* pin btc-canister

* gitignore

* comment

* asset_storage

* fix management

* chess

* counter

* print

* simplify profile

* edition 2021 & resolver 2

* feat: provide safe wrapper of global_timer_set in ic-cdk (#475)

* feat: provide safe wrapper of global_timer_set in ic-cdk

* changelog

* e2e test

* chore(ci): remove temporary fix for bitcoin integration canister (#474)

* try beta

* remove with beta

* remove outdated comment

* feat: add management canister methods for interacting with the chunk store (#461)

* feat: add management canister methods for interacting with the chunk store

* Update CHANGELOG

* fmt

* IC spec change

* Serialize with `serde_bytes`

* fix: names

* test: e2e chunk

* chore: upgrade state-machine binary

* chore: cargo fmt & clippy

* fix: clippy

* fix: make the tests pass

* conform final spec

---------

Co-authored-by: Linwei Shang <linwei.shang@dfinity.org>

* chore: release ic-cdk v0.13.2 (#478)

* feat: Re-generate bindings if canister id or candid path change (#479)

* refactor!: move Rust code generation logic from candid_parser. (#480)

* refactor!(bindgen): move Rust codegen logic from candid_parser

* changelog

* revert unnecessary changes

* replace deprecated URLs (#481)

* feat: Add `wasm_memory_limit` to the management canister (#483)

* feat: Add `wasm_memory_limit` to the management canister

This adds `wasm_memory_limit` to `CanisterSettings` and
`DefiniteCanisterSettings`.

The corresponding spec change:

- dfinity/interface-spec#278

* Add the PR number to the change log

* unify doc format

* better test coverage

---------

Co-authored-by: Linwei Shang <linwei.shang@dfinity.org>

* chore: bump dependencies & improve doc tests (#484)

* upgrade syn to v2

* move macros doc to ic-cdk for doc-tests

* fix doc links

* ci: add doc step which fail on warnings

* fix cache key

* bump dependency if major outdated

* feat: candid-extractor supports --version (#485)

* bump rust to v1.75.0 (same as sdk repo)

* bump wasmtime to 19 and cargo update

* add clap dependency

* submodule extract

* clap for --version and --help/-h

* add changelog and bump to 0.1.3

* clippy from recent rust has a false positive

* e2e test

* feat: add API `in_replicated_execution()` (#489)

* update ic0.txt

* auto-gen files

* add the safe wrapper

* e2e

* Changelog

* chore: release 20240510 (#491)

* chore: Release 0.14.0 (#494)

* Release 0.14.0

* lockfile

* ic-ledger-types and changelogs

* mark yank

* test: use pocket-ic in e2e-tests (#495)

* script to download pocket-ic binary

* use pocket-ic in e2e tests

* fix canister_info

* fix test_call_management

* fix test_chunk

* fix test_cycles_burn

* fix test_scheduling_many_timers

* fix test_set_global_timers

* raise init cycles

* ci.yml

* cargo update

* Revert "cargo update"

This reverts commit 6c969d0.

* pocket-ic from mono-repo tag

* run cargo test on macos too

* fix ci

* feat: support log_visibility canister setting (#497)

* feat!: Stable Memory always use 64-bit addresses and `stable64_*` system API. (#498)

* feat!: only use stable64 API

* changelog

* clippy

* chore: release 0.15.0 (#499)

* bump ic-cdk to 0.15.0

* bump timers and ledger-types

* update README

* fix: ld-compatible symbols (#500)

* Use ld-compatible symbol in ic-cdk-timers (#503)

* feat!: canister state snapshots (#504)

* snapshot types

* snapshot methods

* types cont.

* update pocket-ic which support nonmainnet features

* e2e test

* add LoadSnapshot variant to CanisterChangeDetails

* changelog

* fix canister_info e2e test

* show canister_info after snapshot operations

* ci test show output

* revert canister_info.rs

* revert ci.yml

* canister_info changes can have load_snapshot records

* chore: update deprecated actions (#507)

* docs: clarify post_upgrade argument types (#508)

* Improve READMEs

* clarify post_upgrade arg type

* fix: Fix memory leak in CallFuture (#509)

* Release 0.9.3

* Release 0.10.1

* Release 0.11.5

* Release 0.12.2

* Release 0.13.4

* Release 0.14.1

* Release 0.15.1

* chore: release ic-cdk v0.16.0 (#513)

* chore@0.8.2: Factor out v2 executor into separate crate (#603)

* Release 0.8.3

* Release 0.9.4

* Release 0.10.2

* synthetic commit: 0.11.6+patch

* Release 0.11.7

* Release 0.12.3

* synthetic commit: 0.13.5+patch

* Release 0.13.6

* Release 0.14.2

* Release 0.15.2

* Release 0.16.1

* pretend this was rebased

---------

Co-authored-by: mraszyk <31483726+mraszyk@users.noreply.github.com>
Co-authored-by: Linwei Shang <linwei.shang@dfinity.org>
Co-authored-by: Islam El-Ashi <islam.elashi@dfinity.org>
Co-authored-by: witter-deland <87846830+witter-deland@users.noreply.github.com>
Co-authored-by: AlexandraZapuc <61285418+AlexandraZapuc@users.noreply.github.com>
Co-authored-by: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com>
Co-authored-by: Yan Chen <yan.chen@dfinity.org>
Co-authored-by: Severin Siffert <severin.siffert@dfinity.org>
Co-authored-by: Andriy Berestovskyy <91958447+dfinity-berestovskyy@users.noreply.github.com>
Co-authored-by: Marcin Nowak-Liebiediew <marcin.liebiediew@dfinity.org>
Co-authored-by: maciejdfinity <122265298+maciejdfinity@users.noreply.github.com>
Co-authored-by: Stefan Kaestle <stefan.kaestle@dfinity.org>
Co-authored-by: Frederik Rothenberger <frederik.rothenberger@dfinity.org>
Co-authored-by: Ulan Degenbaev <udegenbaev@gmail.com>
Co-authored-by: Levi <31335633+levifeldman@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hamish Peebles <hamishpeebles@gmail.com>
Co-authored-by: Ulan Degenbaev <ulan.degenbaev@dfinity.org>
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.

1 participant