git.delta.rocks / unique-network / refs/commits / 996c95ef8a66

difftreelog

chore run price calibration

Yaroslav Bolyukin2022-08-15parent: #dc26a33.patch.diff
in: master

3 files changed

modifiedCargo.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"
modifiedprimitives/common/src/constants.rsdiffbeforeafterboth
36pub const UNIQUE: Balance = 100 * CENTIUNIQUE;36pub const UNIQUE: Balance = 100 * CENTIUNIQUE;
3737
38// Targeting 0.1 UNQ per transfer38// Targeting 0.1 UNQ per transfer
39pub const WEIGHT_TO_FEE_COEFF: u32 = /*<weight2fee>*/207_890_902/*</weight2fee>*/;39pub const WEIGHT_TO_FEE_COEFF: u32 = /*<weight2fee>*/207_267_232/*</weight2fee>*/;
4040
41// Targeting 0.15 UNQ per transfer via ETH41// Targeting 0.15 UNQ per transfer via ETH
42pub const MIN_GAS_PRICE: u64 = /*<mingasprice>*/1_019_493_469_850/*</mingasprice>*/;42pub const MIN_GAS_PRICE: u64 = /*<mingasprice>*/1_019_488_372_383/*</mingasprice>*/;
4343
44/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.44/// 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.45/// This is used to limit the maximal weight of a single extrinsic.
modifiedtests/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);
   });