Skip to content

Commit

Permalink
moved currency constants to avail-core
Browse files Browse the repository at this point in the history
  • Loading branch information
ToufeeqP committed Oct 23, 2023
1 parent 1a9833f commit b424375
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 20 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

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

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ frame-system-rpc-runtime-api = { path = "pallets/system/rpc/runtime-api" }
frame-system-benchmarking = { path = "pallets/system/benchmarking" }

# DA Primitives
avail-core = { version = "0.5", git = "https://github.com/availproject/avail-core", tag = "v1.7.1" }
kate = { version = "0.8", git = "https://github.com/availproject/avail-core", tag = "v1.7.1" }
kate-recovery = { version = "0.9", git = "https://github.com/availproject/avail-core", tag = "v1.7.1" }
avail-core = { version = "0.5", git = "https://github.com/availproject/avail-core", branch = "main" }
kate = { version = "0.8", git = "https://github.com/availproject/avail-core", branch = "main" }
kate-recovery = { version = "0.9", git = "https://github.com/availproject/avail-core", branch = "main" }

# Nomad
nomad-signature = { version = "0.1", git = "https://github.com/availproject/avail-core", tag = "v1.7.1" }
nomad-merkle = { version = "0.1", git = "https://github.com/availproject/avail-core", tag = "v1.7.1" }
nomad-base = { version = "0.1", git = "https://github.com/availproject/avail-core", tag = "v1.7.1" }
nomad-core = { version = "0.1", git = "https://github.com/availproject/avail-core", tag = "v1.7.1" }
nomad-signature = { version = "0.1", git = "https://github.com/availproject/avail-core", branch = "main" }
nomad-merkle = { version = "0.1", git = "https://github.com/availproject/avail-core", branch = "main" }
nomad-base = { version = "0.1", git = "https://github.com/availproject/avail-core", branch = "main" }
nomad-core = { version = "0.1", git = "https://github.com/availproject/avail-core", branch = "main" }

# Other stuff
uint = { git = "https://github.com/paritytech/parity-common.git", tag = "rlp-v0.5.2" }
Expand Down
3 changes: 0 additions & 3 deletions runtime/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ pub mod currency {
pub const CENTS: Balance = 1_000 * MILLICENTS; // assume this is worth about a cent.
pub const DOLLARS: Balance = 100 * CENTS;

pub const PICO_AVL: Balance = 1_000_000;
pub const NANO_AVL: Balance = 1_000_000_000;

pub const fn deposit(items: u32, bytes: u32) -> Balance {
items as Balance * 15 * CENTS + (bytes as Balance) * 6 * CENTS
}
Expand Down
6 changes: 3 additions & 3 deletions runtime/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::{
TechnicalCommittee, Timestamp, TransactionPayment, Treasury, UncheckedExtrinsic, VoterList,
MINUTES, VERSION,
};
use avail_core::currency::{Balance, AVL, CENTS};
use avail_core::currency::{Balance, AVL, CENTS, NANO_AVL, PICO_AVL};
use avail_core::AppId;
use avail_core::OpaqueExtrinsic;
use avail_core::NORMAL_DISPATCH_RATIO;
Expand Down Expand Up @@ -208,8 +208,8 @@ impl pallet_tips::Config for Runtime {
}

parameter_types! {
pub const WeightFee: Balance = constants::currency::PICO_AVL;
pub const TransactionByteFee: Balance = 100 * constants::currency::NANO_AVL; // 100 nanoAVL
pub const WeightFee: Balance = PICO_AVL;
pub const TransactionByteFee: Balance = NANO_AVL; // 100 nanoAVL
pub const OperationalFeeMultiplier: u8 = 5u8;
pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(50); // target_utilization 50%
pub AdjustmentVariable: Multiplier = Multiplier::saturating_from_rational(1, 1_000_000); // 0.000001
Expand Down

0 comments on commit b424375

Please sign in to comment.