Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,13 @@ quantus vesting show --schedule-id 0
# Claim the vested payout of a schedule (any funded wallet can sign)
quantus vesting claim --schedule-id 0 --from my_wallet

# Keep claiming every schedule the moment the next 25 QTC step vests.
# Due claims go out as one utility.batch_all. One claim pays the whole aligned
# amount, so this has to stay running or a late claim comes out as a multiple
# of 25 QTC. Ctrl-C to stop.
quantus vesting drip --from my_wallet
quantus vesting drip --from my_wallet --beneficiary qz...

# Admin: create a schedule (moments are unix ms, "now", or "+<seconds>")
quantus vesting create-schedule \
--beneficiary qz... \
Expand Down
26 changes: 3 additions & 23 deletions src/chain/quantus_subxt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12747,23 +12747,6 @@ pub mod api {
],
)
}
#[doc = " Minimum elapsed milliseconds between successful claims on one schedule."]
pub fn min_claim_interval(
&self,
) -> ::subxt::ext::subxt_core::constants::address::StaticAddress<
::core::primitive::u64,
> {
::subxt::ext::subxt_core::constants::address::StaticAddress::new_static(
"Vesting",
"MinClaimInterval",
[
128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8,
59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8,
103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8,
246u8,
],
)
}
}
}
}
Expand Down Expand Up @@ -16258,18 +16241,15 @@ pub mod api {
#[doc = "below the non-final alignment otherwise)."]
NothingToClaim,
#[codec(index = 3)]
#[doc = "This schedule has already paid out within the minimum claim interval."]
ClaimTooSoon,
#[codec(index = 4)]
#[doc = "The treasury account is not configured or aliases the vesting pot."]
TreasuryNotConfigured,
#[codec(index = 5)]
#[codec(index = 4)]
#[doc = "The pot does not hold its existential-deposit buffer; endow it first."]
PotUnderfunded,
#[codec(index = 6)]
#[codec(index = 5)]
#[doc = "The beneficiary must not be the pot, and retargeting must change the account."]
InvalidBeneficiary,
#[codec(index = 7)]
#[codec(index = 6)]
#[doc = "The proof recorder reported the transfer credit as dropped: no wormhole leaf"]
#[doc = "was created, so the transfer is rolled back rather than finalized without a"]
#[doc = "leaf."]
Expand Down
6 changes: 2 additions & 4 deletions src/cli/exercise/scenarios/vesting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ async fn constants_and_schedules(ctx: &mut ExerciseCtx) -> Result<String> {
let constants = ctx.client.client().constants();
let payout_quantum =
constants.at(&quantus_subxt::api::constants().vesting().payout_quantum())?;
let min_claim_interval =
constants.at(&quantus_subxt::api::constants().vesting().min_claim_interval())?;

if payout_quantum == 0 {
return Err(QuantusError::Generic(
Expand Down Expand Up @@ -102,7 +100,7 @@ async fn constants_and_schedules(ctx: &mut ExerciseCtx) -> Result<String> {
}

Ok(format!(
"quantum {payout_quantum}, claim interval {min_claim_interval}ms, {launch_note}; \
"quantum {payout_quantum}, {launch_note}; \
{} schedule(s), next id {next_id}",
schedules.len()
))
Expand Down Expand Up @@ -206,7 +204,7 @@ async fn admin_create_and_claim(
)));
}
let reclaim = quantus_subxt::api::tx().vesting().claim(schedule_id);
submit_expect_failure(ctx, &charlie, reclaim, &["NothingToClaim", "ClaimTooSoon"]).await?;
submit_expect_failure(ctx, &charlie, reclaim, &["NothingToClaim"]).await?;

Ok(format!(
"schedule #{schedule_id} created via treasury multisig, {total} claimed \
Expand Down
Loading
Loading