Function coreledger_backend::int_update_supply_amount
pub async fn int_update_supply_amount(
supply_id: SupplyId,
new_total_amount: u256,
additional_amount: u256
) -> Response
Expand description
Changes the remaining amount of a supply.
The amount is changed by either setting an absolute amount or adding something to it.
Is available also when the contract is paused.
§Parameters
supply_id
: Unique identifier for the supply.new_total_amount
: Either a new amount, which overwrites the existing one.additional_amount
: Or an additional amount, which is added to the openAmount.
§Result
tx_id
: Id of the transaction.
§Sample request
SUPPLY_ID=8_251_471_539_482_211_562_355_238_650_337_652_682_089_590_676_002_818_286_951_709_100_188_048_031_745
SUP_AMOUNT_NEW=500
SUP_ADDITIONAL_AMOUNT=0
dfx canister call coreledger_backend int_update_supply_amount "($SUPPLY_ID, $SUP_AMOUNT_NEW, $SUP_ADDITIONAL_AMOUNT)"
§Sample response
( record {
tx_id = 64_902_045_878_680_215_161_103_406_576_570_366_475_824_533_393_005_533_149_888_825_789_042_550_227_580 : nat
})