Benign rust 503 installs download unavailable

fc-pallet-payments 2.3.1

“This pallet enables managing smart, reversible payments on-chain using assets”

Large registry install base (10k+ downloads)Rust inline tests module path
SHA-25616df924752f05c11c5e2b2ca7ab622e5934f4f2d5ad24b129cf61793fc6dccd2

Evidence

imports frame_support::assert_err tests.rs · lines 1–13
1use super::*;
2use frame_support::{
3 assert_err, assert_ok, traits::fungibles, weights::constants::WEIGHT_REF_TIME_PER_NANOS,
4};
5use mock::{Hooks, *};
6use sp_runtime::Perbill;
7use types::{PaymentDetail, PaymentState};
8use weights::SubstrateWeight;
9use Payment as PaymentStore;
10
11const ASSERT_PAYMENT_CREATION: bool = true;
12
13fn build_payment(assert_payment_ …
#[test] attribute tests.rs · lines 123–131
123:44… tokens free of charge
124/// The sender will need have a balance at least of 27 tokens to make the
125/// purchase:
126/// - 20 tokens for the payment + 5 tokens for the fee + 2 tokens for the
127/// incentive
128#[test]
129fn test_pay_and_release_works() {
130 new_test_ext().execute_with(|| {
131 let fees: Fees<Test> = build_payment(ASSERT_PAYM …
imports crate::weights::WeightInfo tests.rs · lines 596–605
⋯4 lines
600#[test]
601fn weights() {
602 use crate::weights::WeightInfo;
603 use frame_support::weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight};
604 // max block: 0.5s compute with 12s average block time
605 const MAX_BLOCK_REF_TIME: u64 = WEIGHT_REF_TIME_PER_SECOND.saturatin …
imports frame_support::traits::schedule::DispatchTime lib.rs · lines 1–48
1:26… "std"), no_std)]
2
3extern crate alloc;
4
5pub use pallet::*;
6
7#[cfg(feature = "runtime-benchmarks")]
8mod benchmarking;
9
10#[cfg(test)]
11mod mock;
12
13#[cfg(test)]
14mod tests;
15
16pub use codec::{Decode, Encode, MaxEncodedLen};
17use sp_io::hashing::blake2_256;
18
19use alloc::vec::Vec;
20use fc_traits_payments::{OnPaymentStatusChanged, PaymentMutate};
21use frame_support::{
22 ensure, fail,
23 pallet_prelude::*,
24 traits::{
25 fungibles::{
26 hold::Mutate as FunHoldMutate, Balanced as FunBalanced, Inspect as FunInspect,
27 Mutate as FunMutate,
28 },
29 schedule::{v3::Named as ScheduleNamed, DispatchTime},
30 tokens::{
31 fungibles::Inspect as FunsInspect,
32 Fortitude::Polite,
33 Precision::Exact,
34 Preservation::{Expendable, Preserve},
35 },
36 Bounded, CallerTrait, QueryPreimage, StorePreimage,
37 },
38 PalletId,
39};
40use frame_system::pallet_prelude::*;
41use sp_runtime::{
42 traits::{BlockNumberProvider, CheckedAdd, CheckedSub, Get, StaticLookup},
43 ArithmeticError, DispatchError, Percent, Saturating,
44};
45use types::BlockNumberFor;
46
47pub mod weights;
48pub use weights::*;
imports frame_support::traits::fungibles::Create as FunCreate lib.rs · lines 60–70
60:3… frame_support::pallet]
61pub mod pallet {
62 use super::*;
63
64 #[cfg(feature = "runtime-benchmarks")]
65 use frame_support::traits::fungibles::Create as FunCreate;
66
67 #[pallet::config]
68 pub trait Config:
69 frame_system::Config<
70 …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.