Skip to content
Draft
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
24 changes: 24 additions & 0 deletions Cargo.lock

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

69 changes: 69 additions & 0 deletions pallets/derivatives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[package]
name = "pallet-derivatives"
version = "0.1.0"
edition.workspace = true
authors = ["Bittensor Nucleus Team"]
license = "Apache-2.0"
homepage = "https://bittensor.com"
description = "Derivatives based on TAO and Alpha"
publish = false
repository = "https://github.com/opentensor/subtensor"

[lints]
workspace = true

[dependencies]
safe-math.workspace = true
subtensor-macros.workspace = true
scale-info = { workspace = true, features = ["derive"] }
codec = { workspace = true, features = ["max-encoded-len"] }
frame-benchmarking = { optional = true, workspace = true }
frame-support.workspace = true
frame-system.workspace = true
pallet-balances.workspace = true
pallet-subtensor-swap.workspace = true
sp-core.workspace = true
sp-io.workspace = true
sp-runtime.workspace = true
sp-std.workspace = true
substrate-fixed.workspace = true
subtensor-runtime-common.workspace = true
subtensor-swap-interface.workspace = true
log.workspace = true

[dev-dependencies]
approx.workspace = true

[features]
default = ["std"]
std = [
"codec/std",
"frame-benchmarking?/std",
"frame-support/std",
"frame-system/std",
"scale-info/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"log/std",
"safe-math/std",
"sp-core/std",
"substrate-fixed/std",
"subtensor-runtime-common/std",
"subtensor-swap-interface/std",
"pallet-balances/std",
"pallet-subtensor-swap/std",
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"sp-runtime/try-runtime",
"pallet-balances/try-runtime",
]
7 changes: 7 additions & 0 deletions pallets/derivatives/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Pallet derivatives

Implements derivatives based on TAO and Alpha.

## Shorts

TBD
24 changes: 24 additions & 0 deletions pallets/derivatives/src/benchmarking.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//! Benchmarks for Derivatives Pallet
#![cfg(feature = "runtime-benchmarks")]
#![allow(
clippy::arithmetic_side_effects,
clippy::indexing_slicing,
clippy::unwrap_used
)]

extern crate alloc;

// #[benchmarks]
// mod benchmarks {
// use super::*;

// #[benchmark]
// fn open_short() {
// }

// #[benchmark]
// fn close_short() {
// }

// impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test);
// }
Loading
Loading