Function coreledger_backend::int_run_warp
pub async fn int_run_warp(request: RunWarpRequest) -> Response
Expand description
Initiates a trade sequence from any public address as msg.sender.
If anything unexpected happens, the function will revert all transactions to avoid non-atomic transfers.
§Parameters
request
: Run warp request.
§Result
tx_id
: Id of the transaction.
§Sample request
WARP_AMOUNT=100
TARGET_ADDRESS='principal "dimdt-vwpm3-tkwgu-c2nkv-txykr-atn2x-xras5-6xidt-wtti3-i4xr6-vqe"'
SUPPLY_ID_1=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_746
SUPPLY_ID_2=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_744
dfx canister call coreledger_backend int_run_warp "(record { input_amount = $WARP_AMOUNT; target_address = opt $TARGET_ADDRESS; supplies = vec { $SUPPLY_ID_1; $SUPPLY_ID_2 } })"
§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
})