Skip to content

Commit

Permalink
Attempt to write mock runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
ameba23 committed Aug 14, 2024
1 parent 6fe7070 commit 8cc3457
Show file tree
Hide file tree
Showing 5 changed files with 440 additions and 11 deletions.
13 changes: 13 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 25 additions & 6 deletions pallets/attestation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,32 @@ edition ='2021'
publish =false

[dependencies]
codec ={ package="parity-scale-codec", version="3.6.3", default-features=false, features=["derive"] }
scale-info ={ version="2.11", default-features=false, features=["derive"] }
log ={ version="0.4.22", default-features=false }
frame-support={ version="29.0.0", default-features=false }
frame-system ={ version="29.0.0", default-features=false }
tdx-quote ={ git="https://github.com/entropyxyz/tdx-quote" }
codec ={ package="parity-scale-codec", version="3.6.3", default-features=false, features=["derive"] }
scale-info ={ version="2.11", default-features=false, features=["derive"] }
log ={ version="0.4.22", default-features=false }
frame-support ={ version="29.0.0", default-features=false }
frame-system ={ version="29.0.0", default-features=false }
sp-io ={ version="31.0.0", default-features=false }
sp-core ={ version="29.0.0", default-features=false }
sp-runtime ={ version="32.0.0", default-features=false }
pallet-session={ version="29.0.0", default-features=false }
pallet-staking={ version="29.0.0", default-features=false }
sp-staking ={ version="27.0.0", default-features=false }

entropy-shared={ version="0.2.0", path="../../crates/shared", features=[
"wasm-no-std",
], default-features=false }
pallet-parameters={ version="0.2.0", path="../parameters", default-features=false }
pallet-staking-extension={ version="0.2.0", path="../staking", default-features=false }
tdx-quote={ git="https://github.com/entropyxyz/tdx-quote" }

[dev-dependencies]
pallet-balances ={ version="29.0.0", default-features=false }
pallet-bags-list ={ version="28.0.0", default-features=false }
pallet-timestamp ={ version="28.0.0", default-features=false }
sp-npos-elections ={ version="27.0.0", default-features=false }
frame-election-provider-support={ version="29.0.0", default-features=false }
pallet-staking-reward-curve ={ version="11.0.0" }

[features]
default=['std']
Expand All @@ -30,5 +45,9 @@ std=[
'frame-system/std',
'log/std',
'pallet-staking-extension/std',
'pallet-balances/std',
'sp-io/std',
"sp-runtime/std",
"pallet-parameters/std",
]
try-runtime=['frame-support/try-runtime']
17 changes: 12 additions & 5 deletions pallets/attestation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ pub use pallet::*;

// pub mod weights;

// #[cfg(test)]
// mod mock;
#[cfg(test)]
mod mock;

// #[cfg(test)]
// mod tests;
#[cfg(test)]
mod tests;

#[frame_support::pallet]
pub mod pallet {
Expand All @@ -42,7 +42,14 @@ pub mod pallet {
pub struct Pallet<T>(_);

#[pallet::config]
pub trait Config: frame_system::Config + pallet_staking_extension::Config {
pub trait Config:
frame_system::Config
+ pallet_staking_extension::Config
+ pallet_session::Config
+ frame_system::Config
+ pallet_staking_extension::Config
+ pallet_parameters::Config
{
/// The overarching event type.
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
}
Expand Down
Loading

0 comments on commit 8cc3457

Please sign in to comment.