git.delta.rocks / unique-network / refs/commits / 6388bd84c0aa

difftreelog

Merge pull request #263 from UniqueNetwork/release/opal-v913000

kozyrevdev2021-12-08parents: #2f97751 #a59dce9.patch.diff
in: master
Release/opal v913000

6 files changed

modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -11679,7 +11679,6 @@
  "pallet-evm-migration",
  "pallet-evm-transaction-payment",
  "pallet-fungible",
- "pallet-inflation",
  "pallet-nonfungible",
  "pallet-randomness-collective-flip",
  "pallet-refungible",
modifiedruntime/Cargo.tomldiffbeforeafterboth
--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -33,7 +33,7 @@
     'pallet-refungible/runtime-benchmarks',
     'pallet-nonfungible/runtime-benchmarks',
     'pallet-unique/runtime-benchmarks',
-    'pallet-inflation/runtime-benchmarks',
+#    'pallet-inflation/runtime-benchmarks',
     'pallet-xcm/runtime-benchmarks',
     'sp-runtime/runtime-benchmarks',
     'xcm-builder/runtime-benchmarks',
@@ -75,7 +75,7 @@
     'fp-self-contained/std',
     'parachain-info/std',
     'serde',
-    'pallet-inflation/std',
+#    'pallet-inflation/std',
     'pallet-common/std',
     'pallet-fungible/std',
     'pallet-refungible/std',
@@ -380,7 +380,7 @@
 pallet-unique = { path = '../pallets/unique', default-features = false }
 up-rpc = { path = "../primitives/rpc", default-features = false }
 up-evm-mapping = { path = "../primitives/evm-mapping", default-features = false }
-pallet-inflation = { path = '../pallets/inflation', default-features = false }
+# pallet-inflation = { path = '../pallets/inflation', default-features = false }
 up-data-structs = { path = '../primitives/data-structs', default-features = false }
 pallet-common = { default-features = false, path = "../pallets/common" }
 pallet-fungible = { default-features = false, path = "../pallets/fungible" }
modifiedruntime/src/lib.rsdiffbeforeafterboth
147 spec_name: create_runtime_str!("opal"),147 spec_name: create_runtime_str!("opal"),
148 impl_name: create_runtime_str!("opal"),148 impl_name: create_runtime_str!("opal"),
149 authoring_version: 1,149 authoring_version: 1,
150 spec_version: 912204,150 spec_version: 913000,
151 impl_version: 1,151 impl_version: 1,
152 apis: RUNTIME_API_VERSIONS,152 apis: RUNTIME_API_VERSIONS,
153 transaction_version: 1,153 transaction_version: 1,
785 type Event = Event;785 type Event = Event;
786 type WeightInfo = pallet_unique::weights::SubstrateWeight<Self>;786 type WeightInfo = pallet_unique::weights::SubstrateWeight<Self>;
787}787}
788788/*
789parameter_types! {789parameter_types! {
790 pub const InflationBlockInterval: BlockNumber = 100; // every time per how many blocks inflation is applied790 pub const InflationBlockInterval: BlockNumber = 100; // every time per how many blocks inflation is applied
791}791} */
792792
793/// Used for the pallet inflation793/// Used for the pallet inflation
794impl pallet_inflation::Config for Runtime {794/* impl pallet_inflation::Config for Runtime {
795 type Currency = Balances;795 type Currency = Balances;
796 type TreasuryAccountId = TreasuryAccountId;796 type TreasuryAccountId = TreasuryAccountId;
797 type InflationBlockInterval = InflationBlockInterval;797 type InflationBlockInterval = InflationBlockInterval;
798}798} */
799799
800// parameter_types! {800// parameter_types! {
801// pub MaximumSchedulerWeight: Weight = Perbill::from_percent(50) *801// pub MaximumSchedulerWeight: Weight = Perbill::from_percent(50) *
882 DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 53,882 DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 53,
883883
884 // Unique Pallets884 // Unique Pallets
885 Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,885 // Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,
886 Unique: pallet_unique::{Pallet, Call, Storage, Event<T>} = 61,886 Unique: pallet_unique::{Pallet, Call, Storage, Event<T>} = 61,
887 // Scheduler: pallet_unq_scheduler::{Pallet, Call, Storage, Event<T>} = 62,887 // Scheduler: pallet_unq_scheduler::{Pallet, Call, Storage, Event<T>} = 62,
888 // free = 63888 // free = 63
13671367
1368 list_benchmark!(list, extra, pallet_evm_migration, EvmMigration);1368 list_benchmark!(list, extra, pallet_evm_migration, EvmMigration);
1369 list_benchmark!(list, extra, pallet_unique, Unique);1369 list_benchmark!(list, extra, pallet_unique, Unique);
1370 list_benchmark!(list, extra, pallet_inflation, Inflation);1370 //list_benchmark!(list, extra, pallet_inflation, Inflation);
1371 list_benchmark!(list, extra, pallet_fungible, Fungible);1371 list_benchmark!(list, extra, pallet_fungible, Fungible);
1372 list_benchmark!(list, extra, pallet_refungible, Refungible);1372 list_benchmark!(list, extra, pallet_refungible, Refungible);
1373 list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);1373 list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);
14011401
1402 add_benchmark!(params, batches, pallet_evm_migration, EvmMigration);1402 add_benchmark!(params, batches, pallet_evm_migration, EvmMigration);
1403 add_benchmark!(params, batches, pallet_unique, Unique);1403 add_benchmark!(params, batches, pallet_unique, Unique);
1404 add_benchmark!(params, batches, pallet_inflation, Inflation);1404 //add_benchmark!(params, batches, pallet_inflation, Inflation);
1405 add_benchmark!(params, batches, pallet_fungible, Fungible);1405 add_benchmark!(params, batches, pallet_fungible, Fungible);
1406 add_benchmark!(params, batches, pallet_refungible, Refungible);1406 add_benchmark!(params, batches, pallet_refungible, Refungible);
1407 add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);1407 add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);
modifiedtests/src/creditFeesToTreasury.test.tsdiffbeforeafterboth
--- a/tests/src/creditFeesToTreasury.test.ts
+++ b/tests/src/creditFeesToTreasury.test.ts
@@ -34,7 +34,7 @@
 // Skip the inflation block pauses if the block is close to inflation block
 // until the inflation happens
 /*eslint no-async-promise-executor: "off"*/
-function skipInflationBlock(api: ApiPromise): Promise<void> {
+/*function skipInflationBlock(api: ApiPromise): Promise<void> {
   const promise = new Promise<void>(async (resolve) => {
     const blockInterval = (await api.consts.inflation.inflationBlockInterval).toNumber();
     const unsubscribe = await api.rpc.chain.subscribeNewHeads(head => {
@@ -49,7 +49,7 @@
   });
 
   return promise;
-}
+}*/
 
 describe('integration test: Fees must be credited to Treasury:', () => {
   before(async () => {
@@ -61,7 +61,7 @@
 
   it('Total issuance does not change', async () => {
     await usingApi(async (api) => {
-      await skipInflationBlock(api);
+      //await skipInflationBlock(api);
       await waitNewBlocks(api, 1);
 
       const totalBefore = (await api.query.balances.totalIssuance()).toBigInt();
@@ -81,7 +81,7 @@
 
   it('Sender balance decreased by fee+sent amount, Treasury balance increased by fee', async () => {
     await usingApi(async (api) => {
-      await skipInflationBlock(api);
+      //await skipInflationBlock(api);
       await waitNewBlocks(api, 1);
 
       const alicePrivateKey = privateKey('//Alice');
@@ -104,7 +104,7 @@
 
   it('Treasury balance increased by failed tx fee', async () => {
     await usingApi(async (api) => {
-      await skipInflationBlock(api);
+      //await skipInflationBlock(api);
       await waitNewBlocks(api, 1);
 
       const bobPrivateKey = privateKey('//Bob');
@@ -125,7 +125,7 @@
 
   it('NFT Transactions also send fees to Treasury', async () => {
     await usingApi(async (api) => {
-      await skipInflationBlock(api);
+      //await skipInflationBlock(api);
       await waitNewBlocks(api, 1);
 
       const treasuryBalanceBefore = (await api.query.system.account(TREASURY)).data.free.toBigInt();
@@ -144,7 +144,7 @@
 
   it('Fees are sane', async () => {
     await usingApi(async (api) => {
-      await skipInflationBlock(api);
+      //await skipInflationBlock(api);
       await waitNewBlocks(api, 1);
 
       const aliceBalanceBefore: bigint = (await api.query.system.account(alicesPublicKey)).data.free.toBigInt();
@@ -161,7 +161,7 @@
 
   it('NFT Transfer fee is close to 0.1 Unique', async () => {
     await usingApi(async (api) => {
-      await skipInflationBlock(api);
+      //await skipInflationBlock(api);
       await waitNewBlocks(api, 1);
 
       const collectionId = await createCollectionExpectSuccess();
modifiedtests/src/inflation.test.tsdiffbeforeafterboth
--- a/tests/src/inflation.test.ts
+++ b/tests/src/inflation.test.ts
@@ -10,7 +10,7 @@
 chai.use(chaiAsPromised);
 const expect = chai.expect;
 
-describe('integration test: Inflation', () => {
+describe.skip('integration test: Inflation', () => {
   it('First year inflation is 10%', async () => {
     await usingApi(async (api) => {
 
modifiedtests/src/pallet-presence.test.tsdiffbeforeafterboth
--- a/tests/src/pallet-presence.test.ts
+++ b/tests/src/pallet-presence.test.ts
@@ -34,7 +34,7 @@
   'polkadotxcm',
   'cumulusxcm',
   'dmpqueue',
-  'inflation',
+  //'inflation',
   'unique',
   'nonfungible',
   'refungible',