difftreelog
chore run price calibration
in: master
3 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5309,6 +5309,7 @@
"pallet-balances",
"pallet-base-fee",
"pallet-common",
+ "pallet-configuration",
"pallet-ethereum",
"pallet-evm",
"pallet-evm-coder-substrate",
@@ -5338,9 +5339,7 @@
"rmrk-rpc",
"scale-info",
"serde",
- "smallvec",
"sp-api",
- "sp-arithmetic",
"sp-block-builder",
"sp-consensus-aura",
"sp-core",
@@ -5744,6 +5743,22 @@
]
[[package]]
+name = "pallet-configuration"
+version = "0.1.0"
+dependencies = [
+ "fp-evm",
+ "frame-support",
+ "frame-system",
+ "parity-scale-codec 3.1.5",
+ "scale-info",
+ "smallvec",
+ "sp-arithmetic",
+ "sp-core",
+ "sp-runtime",
+ "sp-std",
+]
+
+[[package]]
name = "pallet-democracy"
version = "4.0.0-dev"
source = "git+https://github.com/uniquenetwork/substrate?branch=polkadot-v0.9.24-hack-substitute#1fa76b0665d32b1e28c36da67e54da1816db3fa2"
primitives/common/src/constants.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617use sp_runtime::Perbill;18use frame_support::{19 parameter_types,20 weights::{Weight, constants::WEIGHT_PER_SECOND},21};22use crate::types::{BlockNumber, Balance};2324pub const MILLISECS_PER_BLOCK: u64 = 12000;2526pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;2728// These time units are defined in number of blocks.29pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber);30pub const HOURS: BlockNumber = MINUTES * 60;31pub const DAYS: BlockNumber = HOURS * 24;3233pub const MICROUNIQUE: Balance = 1_000_000_000_000;34pub const MILLIUNIQUE: Balance = 1_000 * MICROUNIQUE;35pub const CENTIUNIQUE: Balance = 10 * MILLIUNIQUE;36pub const UNIQUE: Balance = 100 * CENTIUNIQUE;3738// Targeting 0.1 UNQ per transfer39pub const WEIGHT_TO_FEE_COEFF: u32 = /*<weight2fee>*/207_890_902/*</weight2fee>*/;4041// Targeting 0.15 UNQ per transfer via ETH42pub const MIN_GAS_PRICE: u64 = /*<mingasprice>*/1_019_493_469_850/*</mingasprice>*/;4344/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.45/// This is used to limit the maximal weight of a single extrinsic.46pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);47/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used48/// by Operational extrinsics.49pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);50/// We allow for 2 seconds of compute with a 6 second average block time.51pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2;5253parameter_types! {54 pub const TransactionByteFee: Balance = 501 * MICROUNIQUE;55}tests/src/eth/base.test.tsdiffbeforeafterboth--- a/tests/src/eth/base.test.ts
+++ b/tests/src/eth/base.test.ts
@@ -15,14 +15,14 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
import {
- collectionIdToAddress,
- createEthAccount,
- createEthAccountWithBalance,
- deployFlipper,
- ethBalanceViaSub,
- GAS_ARGS,
- itWeb3,
- recordEthFee,
+ collectionIdToAddress,
+ createEthAccount,
+ createEthAccountWithBalance,
+ deployFlipper,
+ ethBalanceViaSub,
+ GAS_ARGS,
+ itWeb3,
+ recordEthFee,
usingWeb3,
} from './util/helpers';
import {expect} from 'chai';
@@ -66,7 +66,7 @@
const fee = Number(cost) / Number(UNIQUE);
const expectedFee = 0.15;
- const tolerance = 0.00002;
+ const tolerance = 0.001;
expect(Math.abs(fee - expectedFee)).to.be.lessThan(tolerance);
});