Browse Source

altered object creation to match new api

Gleb Urvanov 4 years ago
parent
commit
65b7f9596c
25 changed files with 111 additions and 110 deletions
  1. 5 5
      tests/network-tests/package.json
  2. 1 1
      tests/network-tests/src/iznik/tests/council/electingCouncilTest.ts
  3. 3 4
      tests/network-tests/src/iznik/tests/councilSetup.ts
  4. 1 1
      tests/network-tests/src/iznik/tests/fixtures/councilElectionHappyCase.ts
  5. 2 2
      tests/network-tests/src/iznik/tests/fixtures/leaderHiringHappyCase.ts
  6. 1 1
      tests/network-tests/src/iznik/tests/fixtures/membershipModule.ts
  7. 1 4
      tests/network-tests/src/iznik/tests/leaderSetup.ts
  8. 1 1
      tests/network-tests/src/iznik/tests/membership/membershipCreationTest.ts
  9. 1 1
      tests/network-tests/src/iznik/tests/proposals/contentWorkingGroupMintCapacityProposalTest.ts
  10. 1 1
      tests/network-tests/src/iznik/tests/proposals/electionParametersProposalTest.ts
  11. 3 3
      tests/network-tests/src/iznik/tests/proposals/manageLeaderRoleTest.ts
  12. 1 1
      tests/network-tests/src/iznik/tests/proposals/setLeadProposalTest.ts
  13. 1 1
      tests/network-tests/src/iznik/tests/proposals/spendingProposalTest.ts
  14. 1 1
      tests/network-tests/src/iznik/tests/proposals/textProposalTest.ts
  15. 1 1
      tests/network-tests/src/iznik/tests/proposals/updateRuntime.ts
  16. 1 1
      tests/network-tests/src/iznik/tests/proposals/validatorCountProposalTest.ts
  17. 2 2
      tests/network-tests/src/iznik/tests/proposals/workingGroupMintCapacityProposalTest.ts
  18. 1 1
      tests/network-tests/src/iznik/tests/workingGroup/atLeastValueBugTest.ts
  19. 2 2
      tests/network-tests/src/iznik/tests/workingGroup/manageWorkerAsLeadTest.ts
  20. 2 2
      tests/network-tests/src/iznik/tests/workingGroup/manageWorkerAsWorkerTest.ts
  21. 2 2
      tests/network-tests/src/iznik/tests/workingGroup/workerApplicationHappyCaseTest.ts
  22. 2 2
      tests/network-tests/src/iznik/tests/workingGroup/workerApplicationRejectionCaseTest.ts
  23. 3 3
      tests/network-tests/src/iznik/tests/workingGroup/workerPayoutTest.ts
  24. 67 66
      tests/network-tests/src/iznik/utils/apiWrapper.ts
  25. 5 1
      tests/network-tests/tsconfig.json

+ 5 - 5
tests/network-tests/package.json

@@ -4,10 +4,10 @@
   "license": "GPL-3.0-only",
   "license": "GPL-3.0-only",
   "scripts": {
   "scripts": {
     "build": "tsc --build tsconfig.json",
     "build": "tsc --build tsconfig.json",
-    "test": "tap --files src/iznik/tests/proposals/*Test.ts --files src/iznik/tests/workingGroup/*Test.ts -T",
+    "test": "tap --files src/iznik/tests/unknown.unknown src/iznik/tests/councilSetup.ts src/iznik/tests/proposals/*Test.ts src/iznik/tests/leaderSetup.ts src/iznik/tests/workingGroup/*Test.ts -T",
     "test-migration-constantinople": "tap --files src/rome/tests/romeRuntimeUpgradeTest.ts --files src/constantinople/tests/electingCouncilTest.ts -T",
     "test-migration-constantinople": "tap --files src/rome/tests/romeRuntimeUpgradeTest.ts --files src/constantinople/tests/electingCouncilTest.ts -T",
     "test-migration-nicaea": "tap --files src/constantinople/tests/proposals/updateRuntimeTest.ts --files src/nicaea/tests/electingCouncilTest.ts -T",
     "test-migration-nicaea": "tap --files src/constantinople/tests/proposals/updateRuntimeTest.ts --files src/nicaea/tests/electingCouncilTest.ts -T",
-    "debug": "tap --files src/iznik/tests/unknown.unknown src/iznik/tests/councilSetup.ts src/iznik/tests/proposals/*Test.ts src/iznik/tests/leaderSetup.ts src/iznik/tests/workingGroup/*Test.ts -T",
+    "debug": "tap --files src/iznik/tests/councilSetup.ts -T",
     "lint": "eslint . --quiet --ext .ts",
     "lint": "eslint . --quiet --ext .ts",
     "checks": "yarn lint && tsc --noEmit --pretty && prettier ./ --check",
     "checks": "yarn lint && tsc --noEmit --pretty && prettier ./ --check",
     "format": "prettier ./ --write "
     "format": "prettier ./ --write "
@@ -15,9 +15,9 @@
   "dependencies": {
   "dependencies": {
     "@constantinople/types@npm:@joystream/types": "^0.10.0",
     "@constantinople/types@npm:@joystream/types": "^0.10.0",
     "@nicaea/types@npm:@joystream/types": "^0.12.0",
     "@nicaea/types@npm:@joystream/types": "^0.12.0",
-    "@alexandria/types": "link:../../types",
-    "@polkadot/api": "^0.96.1",
-    "@polkadot/keyring": "^1.7.0-beta.5",
+    "@alexandria/types": "./types",
+    "@polkadot/api": "1.26.1",
+    "@polkadot/keyring": "3.0.1",
     "@rome/types@npm:@joystream/types": "^0.7.0",
     "@rome/types@npm:@joystream/types": "^0.7.0",
     "@types/bn.js": "^4.11.5",
     "@types/bn.js": "^4.11.5",
     "@types/lowdb": "^1.0.9",
     "@types/lowdb": "^1.0.9",

+ 1 - 1
tests/network-tests/src/iznik/tests/council/electingCouncilTest.ts

@@ -10,7 +10,7 @@ import { closeApi } from '../../utils/closeApi'
 import { BuyMembershipHappyCaseFixture } from '../fixtures/membershipModule'
 import { BuyMembershipHappyCaseFixture } from '../fixtures/membershipModule'
 import { ElectCouncilFixture } from '../fixtures/councilElectionModule'
 import { ElectCouncilFixture } from '../fixtures/councilElectionModule'
 import { Utils } from '../../utils/utils'
 import { Utils } from '../../utils/utils'
-import { PaidTermId } from '@nicaea/types/members'
+import { PaidTermId } from '@alexandria/types/members'
 
 
 tap.mocha.describe('Electing council scenario', async () => {
 tap.mocha.describe('Electing council scenario', async () => {
   initConfig()
   initConfig()

+ 3 - 4
tests/network-tests/src/iznik/tests/councilSetup.ts

@@ -2,8 +2,7 @@ import { KeyringPair } from '@polkadot/keyring/types'
 import { Keyring, WsProvider } from '@polkadot/api'
 import { Keyring, WsProvider } from '@polkadot/api'
 import BN from 'bn.js'
 import BN from 'bn.js'
 import tap from 'tap'
 import tap from 'tap'
-import { registerJoystreamTypes } from '@nicaea/types'
-import { PaidTermId } from '@nicaea/types/members'
+import { PaidTermId } from '@alexandria/types/members'
 import { DbService } from '../services/dbService'
 import { DbService } from '../services/dbService'
 import { initConfig } from '../utils/config'
 import { initConfig } from '../utils/config'
 import { ApiWrapper } from '../utils/apiWrapper'
 import { ApiWrapper } from '../utils/apiWrapper'
@@ -14,7 +13,6 @@ import { CouncilElectionHappyCaseFixture } from './fixtures/councilElectionHappy
 
 
 tap.mocha.describe('Electing council scenario', async () => {
 tap.mocha.describe('Electing council scenario', async () => {
   initConfig()
   initConfig()
-  registerJoystreamTypes()
 
 
   const nodeUrl: string = process.env.NODE_URL!
   const nodeUrl: string = process.env.NODE_URL!
   const sudoUri: string = process.env.SUDO_ACCOUNT_URI!
   const sudoUri: string = process.env.SUDO_ACCOUNT_URI!
@@ -31,7 +29,8 @@ tap.mocha.describe('Electing council scenario', async () => {
   const N: number = +process.env.MEMBERSHIP_CREATION_N!
   const N: number = +process.env.MEMBERSHIP_CREATION_N!
   const m1KeyPairs: KeyringPair[] = Utils.createKeyPairs(keyring, N)
   const m1KeyPairs: KeyringPair[] = Utils.createKeyPairs(keyring, N)
   const m2KeyPairs: KeyringPair[] = Utils.createKeyPairs(keyring, N)
   const m2KeyPairs: KeyringPair[] = Utils.createKeyPairs(keyring, N)
-  const paidTerms: PaidTermId = new PaidTermId(+process.env.MEMBERSHIP_PAID_TERMS!)
+  // const paidTerms: PaidTermId = new PaidTermId(+process.env.MEMBERSHIP_PAID_TERMS!)
+  const paidTerms: PaidTermId = apiWrapper.createPaidTermId(+process.env.MEMBERSHIP_PAID_TERMS!)
   const K: number = +process.env.COUNCIL_ELECTION_K!
   const K: number = +process.env.COUNCIL_ELECTION_K!
   const greaterStake: BN = new BN(+process.env.COUNCIL_STAKE_GREATER_AMOUNT!)
   const greaterStake: BN = new BN(+process.env.COUNCIL_STAKE_GREATER_AMOUNT!)
   const lesserStake: BN = new BN(+process.env.COUNCIL_STAKE_LESSER_AMOUNT!)
   const lesserStake: BN = new BN(+process.env.COUNCIL_STAKE_LESSER_AMOUNT!)

+ 1 - 1
tests/network-tests/src/iznik/tests/fixtures/councilElectionHappyCase.ts

@@ -4,7 +4,7 @@ import tap from 'tap'
 import { ElectCouncilFixture } from './councilElectionModule'
 import { ElectCouncilFixture } from './councilElectionModule'
 import { ApiWrapper } from '../../utils/apiWrapper'
 import { ApiWrapper } from '../../utils/apiWrapper'
 import { KeyringPair } from '@polkadot/keyring/types'
 import { KeyringPair } from '@polkadot/keyring/types'
-import { PaidTermId } from '@nicaea/types/members'
+import { PaidTermId } from '@alexandria/types/members'
 import BN from 'bn.js'
 import BN from 'bn.js'
 
 
 export class CouncilElectionHappyCaseFixture implements Fixture {
 export class CouncilElectionHappyCaseFixture implements Fixture {

+ 2 - 2
tests/network-tests/src/iznik/tests/fixtures/leaderHiringHappyCase.ts

@@ -8,9 +8,9 @@ import {
 } from './workingGroupModule'
 } from './workingGroupModule'
 import { BuyMembershipHappyCaseFixture } from './membershipModule'
 import { BuyMembershipHappyCaseFixture } from './membershipModule'
 import { ApiWrapper, WorkingGroups } from '../../utils/apiWrapper'
 import { ApiWrapper, WorkingGroups } from '../../utils/apiWrapper'
-import { OpeningId } from '@nicaea/types/hiring'
+import { OpeningId } from '@alexandria/types/hiring'
 import { KeyringPair } from '@polkadot/keyring/types'
 import { KeyringPair } from '@polkadot/keyring/types'
-import { PaidTermId } from '@nicaea/types/members'
+import { PaidTermId } from '@alexandria/types/members'
 import BN from 'bn.js'
 import BN from 'bn.js'
 
 
 export class LeaderHiringHappyCaseFixture implements Fixture {
 export class LeaderHiringHappyCaseFixture implements Fixture {

+ 1 - 1
tests/network-tests/src/iznik/tests/fixtures/membershipModule.ts

@@ -3,7 +3,7 @@ import { KeyringPair } from '@polkadot/keyring/types'
 import BN from 'bn.js'
 import BN from 'bn.js'
 import { assert } from 'chai'
 import { assert } from 'chai'
 import { Fixture } from './interfaces/fixture'
 import { Fixture } from './interfaces/fixture'
-import { PaidTermId } from '@nicaea/types/members'
+import { PaidTermId } from '@alexandria/types/members'
 
 
 export class BuyMembershipHappyCaseFixture implements Fixture {
 export class BuyMembershipHappyCaseFixture implements Fixture {
   private apiWrapper: ApiWrapper
   private apiWrapper: ApiWrapper

+ 1 - 4
tests/network-tests/src/iznik/tests/leaderSetup.ts

@@ -1,5 +1,4 @@
 import { initConfig } from '../utils/config'
 import { initConfig } from '../utils/config'
-import { registerJoystreamTypes } from '@nicaea/types'
 import { closeApi } from '../utils/closeApi'
 import { closeApi } from '../utils/closeApi'
 import { ApiWrapper, WorkingGroups } from '../utils/apiWrapper'
 import { ApiWrapper, WorkingGroups } from '../utils/apiWrapper'
 import { WsProvider, Keyring } from '@polkadot/api'
 import { WsProvider, Keyring } from '@polkadot/api'
@@ -8,14 +7,12 @@ import { setTestTimeout } from '../utils/setTestTimeout'
 import BN from 'bn.js'
 import BN from 'bn.js'
 import tap from 'tap'
 import tap from 'tap'
 import { Utils } from '../utils/utils'
 import { Utils } from '../utils/utils'
-import { PaidTermId } from '@nicaea/types/members'
+import { PaidTermId } from '@alexandria/types/members'
 import { DbService } from '../services/dbService'
 import { DbService } from '../services/dbService'
 import { LeaderHiringHappyCaseFixture } from './fixtures/leaderHiringHappyCase'
 import { LeaderHiringHappyCaseFixture } from './fixtures/leaderHiringHappyCase'
 
 
 tap.mocha.describe('Worker application happy case scenario', async () => {
 tap.mocha.describe('Worker application happy case scenario', async () => {
   initConfig()
   initConfig()
-  registerJoystreamTypes()
-
   const nodeUrl: string = process.env.NODE_URL!
   const nodeUrl: string = process.env.NODE_URL!
   const sudoUri: string = process.env.SUDO_ACCOUNT_URI!
   const sudoUri: string = process.env.SUDO_ACCOUNT_URI!
   const keyring = new Keyring({ type: 'sr25519' })
   const keyring = new Keyring({ type: 'sr25519' })

+ 1 - 1
tests/network-tests/src/iznik/tests/membership/membershipCreationTest.ts

@@ -8,7 +8,7 @@ import { ApiWrapper } from '../../utils/apiWrapper'
 import { closeApi } from '../../utils/closeApi'
 import { closeApi } from '../../utils/closeApi'
 import { BuyMembershipHappyCaseFixture, BuyMembershipWithInsufficienFundsFixture } from '../fixtures/membershipModule'
 import { BuyMembershipHappyCaseFixture, BuyMembershipWithInsufficienFundsFixture } from '../fixtures/membershipModule'
 import { Utils } from '../../utils/utils'
 import { Utils } from '../../utils/utils'
-import { PaidTermId } from '@nicaea/types/members'
+import { PaidTermId } from '@alexandria/types/members'
 
 
 tap.mocha.describe('Membership creation scenario', async () => {
 tap.mocha.describe('Membership creation scenario', async () => {
   initConfig()
   initConfig()

+ 1 - 1
tests/network-tests/src/iznik/tests/proposals/contentWorkingGroupMintCapacityProposalTest.ts

@@ -9,7 +9,7 @@ import { closeApi } from '../../utils/closeApi'
 import { ApiWrapper } from '../../utils/apiWrapper'
 import { ApiWrapper } from '../../utils/apiWrapper'
 import { ContentWorkingGroupMintCapacityProposalFixture } from '../fixtures/proposalsModule'
 import { ContentWorkingGroupMintCapacityProposalFixture } from '../fixtures/proposalsModule'
 import { Utils } from '../../utils/utils'
 import { Utils } from '../../utils/utils'
-import { PaidTermId } from '@nicaea/types/members'
+import { PaidTermId } from '@alexandria/types/members'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { DbService } from '../../services/dbService'
 import { DbService } from '../../services/dbService'
 
 

+ 1 - 1
tests/network-tests/src/iznik/tests/proposals/electionParametersProposalTest.ts

@@ -9,7 +9,7 @@ import { closeApi } from '../../utils/closeApi'
 import { ApiWrapper } from '../../utils/apiWrapper'
 import { ApiWrapper } from '../../utils/apiWrapper'
 import { Utils } from '../../utils/utils'
 import { Utils } from '../../utils/utils'
 import { ElectionParametersProposalFixture } from '../fixtures/proposalsModule'
 import { ElectionParametersProposalFixture } from '../fixtures/proposalsModule'
-import { PaidTermId } from '@nicaea/types/members'
+import { PaidTermId } from '@alexandria/types/members'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { DbService } from '../../services/dbService'
 import { DbService } from '../../services/dbService'
 
 

+ 3 - 3
tests/network-tests/src/iznik/tests/proposals/manageLeaderRoleTest.ts

@@ -29,9 +29,9 @@ import {
   ExpectLeadOpeningAddedFixture,
   ExpectLeadOpeningAddedFixture,
 } from '../fixtures/workingGroupModule'
 } from '../fixtures/workingGroupModule'
 import { Utils } from '../../utils/utils'
 import { Utils } from '../../utils/utils'
-import { PaidTermId } from '@nicaea/types/members'
-import { OpeningId } from '@nicaea/types/hiring'
-import { ProposalId } from '@nicaea/types/proposals'
+import { PaidTermId } from '@alexandria/types/members'
+import { OpeningId } from '@alexandria/types/hiring'
+import { ProposalId } from '@alexandria/types/proposals'
 import { DbService } from '../../services/dbService'
 import { DbService } from '../../services/dbService'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 
 

+ 1 - 1
tests/network-tests/src/iznik/tests/proposals/setLeadProposalTest.ts

@@ -9,7 +9,7 @@ import { closeApi } from '../../utils/closeApi'
 import { ApiWrapper } from '../../utils/apiWrapper'
 import { ApiWrapper } from '../../utils/apiWrapper'
 import { Utils } from '../../utils/utils'
 import { Utils } from '../../utils/utils'
 import { SetLeadProposalFixture } from '../fixtures/proposalsModule'
 import { SetLeadProposalFixture } from '../fixtures/proposalsModule'
-import { PaidTermId } from '@nicaea/types/members'
+import { PaidTermId } from '@alexandria/types/members'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { DbService } from '../../services/dbService'
 import { DbService } from '../../services/dbService'
 
 

+ 1 - 1
tests/network-tests/src/iznik/tests/proposals/spendingProposalTest.ts

@@ -9,7 +9,7 @@ import { closeApi } from '../../utils/closeApi'
 import { ApiWrapper } from '../../utils/apiWrapper'
 import { ApiWrapper } from '../../utils/apiWrapper'
 import { Utils } from '../../utils/utils'
 import { Utils } from '../../utils/utils'
 import { SpendingProposalFixture } from '../fixtures/proposalsModule'
 import { SpendingProposalFixture } from '../fixtures/proposalsModule'
-import { PaidTermId } from '@nicaea/types/members'
+import { PaidTermId } from '@alexandria/types/members'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { DbService } from '../../services/dbService'
 import { DbService } from '../../services/dbService'
 
 

+ 1 - 1
tests/network-tests/src/iznik/tests/proposals/textProposalTest.ts

@@ -9,7 +9,7 @@ import { closeApi } from '../../utils/closeApi'
 import { ApiWrapper } from '../../utils/apiWrapper'
 import { ApiWrapper } from '../../utils/apiWrapper'
 import { Utils } from '../../utils/utils'
 import { Utils } from '../../utils/utils'
 import { TextProposalFixture } from '../fixtures/proposalsModule'
 import { TextProposalFixture } from '../fixtures/proposalsModule'
-import { PaidTermId } from '@nicaea/types/members'
+import { PaidTermId } from '@alexandria/types/members'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { DbService } from '../../services/dbService'
 import { DbService } from '../../services/dbService'
 
 

+ 1 - 1
tests/network-tests/src/iznik/tests/proposals/updateRuntime.ts

@@ -10,7 +10,7 @@ import { ApiWrapper } from '../../utils/apiWrapper'
 import { Utils } from '../../utils/utils'
 import { Utils } from '../../utils/utils'
 import { BuyMembershipHappyCaseFixture } from '../fixtures/membershipModule'
 import { BuyMembershipHappyCaseFixture } from '../fixtures/membershipModule'
 import { UpdateRuntimeFixture } from '../fixtures/proposalsModule'
 import { UpdateRuntimeFixture } from '../fixtures/proposalsModule'
-import { PaidTermId } from '@nicaea/types/members'
+import { PaidTermId } from '@alexandria/types/members'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { DbService } from '../../services/dbService'
 import { DbService } from '../../services/dbService'
 
 

+ 1 - 1
tests/network-tests/src/iznik/tests/proposals/validatorCountProposalTest.ts

@@ -9,7 +9,7 @@ import { closeApi } from '../../utils/closeApi'
 import { ApiWrapper } from '../../utils/apiWrapper'
 import { ApiWrapper } from '../../utils/apiWrapper'
 import { Utils } from '../../utils/utils'
 import { Utils } from '../../utils/utils'
 import { ValidatorCountProposalFixture } from '../fixtures/proposalsModule'
 import { ValidatorCountProposalFixture } from '../fixtures/proposalsModule'
-import { PaidTermId } from '@nicaea/types/members'
+import { PaidTermId } from '@alexandria/types/members'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { DbService } from '../../services/dbService'
 import { DbService } from '../../services/dbService'
 
 

+ 2 - 2
tests/network-tests/src/iznik/tests/proposals/workingGroupMintCapacityProposalTest.ts

@@ -10,8 +10,8 @@ import { ApiWrapper, WorkingGroups } from '../../utils/apiWrapper'
 import { Utils } from '../../utils/utils'
 import { Utils } from '../../utils/utils'
 import { VoteForProposalFixture, WorkingGroupMintCapacityProposalFixture } from '../fixtures/proposalsModule'
 import { VoteForProposalFixture, WorkingGroupMintCapacityProposalFixture } from '../fixtures/proposalsModule'
 import { ExpectMintCapacityChangedFixture } from '../fixtures/workingGroupModule'
 import { ExpectMintCapacityChangedFixture } from '../fixtures/workingGroupModule'
-import { PaidTermId } from '@nicaea/types/members'
-import { ProposalId } from '@nicaea/types/proposals'
+import { PaidTermId } from '@alexandria/types/members'
+import { ProposalId } from '@alexandria/types/proposals'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { DbService } from '../../services/dbService'
 import { DbService } from '../../services/dbService'
 
 

+ 1 - 1
tests/network-tests/src/iznik/tests/workingGroup/atLeastValueBugTest.ts

@@ -9,7 +9,7 @@ import { AddWorkerOpeningFixture, LeaveRoleFixture } from '../fixtures/workingGr
 import BN from 'bn.js'
 import BN from 'bn.js'
 import tap from 'tap'
 import tap from 'tap'
 import { Utils } from '../../utils/utils'
 import { Utils } from '../../utils/utils'
-import { PaidTermId } from '@nicaea/types/members'
+import { PaidTermId } from '@alexandria/types/members'
 import { DbService } from '../../services/dbService'
 import { DbService } from '../../services/dbService'
 import { LeaderHiringHappyCaseFixture } from '../fixtures/leaderHiringHappyCase'
 import { LeaderHiringHappyCaseFixture } from '../fixtures/leaderHiringHappyCase'
 
 

+ 2 - 2
tests/network-tests/src/iznik/tests/workingGroup/manageWorkerAsLeadTest.ts

@@ -21,8 +21,8 @@ import {
 import { Utils } from '../../utils/utils'
 import { Utils } from '../../utils/utils'
 import BN from 'bn.js'
 import BN from 'bn.js'
 import tap from 'tap'
 import tap from 'tap'
-import { PaidTermId } from '@nicaea/types/members'
-import { OpeningId } from '@nicaea/types/hiring'
+import { PaidTermId } from '@alexandria/types/members'
+import { OpeningId } from '@alexandria/types/hiring'
 import { DbService } from '../../services/dbService'
 import { DbService } from '../../services/dbService'
 import { LeaderHiringHappyCaseFixture } from '../fixtures/leaderHiringHappyCase'
 import { LeaderHiringHappyCaseFixture } from '../fixtures/leaderHiringHappyCase'
 
 

+ 2 - 2
tests/network-tests/src/iznik/tests/workingGroup/manageWorkerAsWorkerTest.ts

@@ -17,8 +17,8 @@ import {
 import { Utils } from '../../utils/utils'
 import { Utils } from '../../utils/utils'
 import BN from 'bn.js'
 import BN from 'bn.js'
 import tap from 'tap'
 import tap from 'tap'
-import { PaidTermId } from '@nicaea/types/members'
-import { OpeningId } from '@nicaea/types/hiring'
+import { PaidTermId } from '@alexandria/types/members'
+import { OpeningId } from '@alexandria/types/hiring'
 import { DbService } from '../../services/dbService'
 import { DbService } from '../../services/dbService'
 import { LeaderHiringHappyCaseFixture } from '../fixtures/leaderHiringHappyCase'
 import { LeaderHiringHappyCaseFixture } from '../fixtures/leaderHiringHappyCase'
 
 

+ 2 - 2
tests/network-tests/src/iznik/tests/workingGroup/workerApplicationHappyCaseTest.ts

@@ -16,8 +16,8 @@ import {
   LeaveRoleFixture,
   LeaveRoleFixture,
   WithdrawApplicationFixture,
   WithdrawApplicationFixture,
 } from '../fixtures/workingGroupModule'
 } from '../fixtures/workingGroupModule'
-import { PaidTermId } from '@nicaea/types/members'
-import { OpeningId } from '@nicaea/types/hiring'
+import { PaidTermId } from '@alexandria/types/members'
+import { OpeningId } from '@alexandria/types/hiring'
 import { DbService } from '../../services/dbService'
 import { DbService } from '../../services/dbService'
 import { LeaderHiringHappyCaseFixture } from '../fixtures/leaderHiringHappyCase'
 import { LeaderHiringHappyCaseFixture } from '../fixtures/leaderHiringHappyCase'
 
 

+ 2 - 2
tests/network-tests/src/iznik/tests/workingGroup/workerApplicationRejectionCaseTest.ts

@@ -15,8 +15,8 @@ import {
   LeaveRoleFixture,
   LeaveRoleFixture,
   TerminateApplicationsFixture,
   TerminateApplicationsFixture,
 } from '../fixtures/workingGroupModule'
 } from '../fixtures/workingGroupModule'
-import { PaidTermId } from '@nicaea/types/members'
-import { OpeningId } from '@nicaea/types/hiring'
+import { PaidTermId } from '@alexandria/types/members'
+import { OpeningId } from '@alexandria/types/hiring'
 import { DbService } from '../../services/dbService'
 import { DbService } from '../../services/dbService'
 import { LeaderHiringHappyCaseFixture } from '../fixtures/leaderHiringHappyCase'
 import { LeaderHiringHappyCaseFixture } from '../fixtures/leaderHiringHappyCase'
 
 

+ 3 - 3
tests/network-tests/src/iznik/tests/workingGroup/workerPayoutTest.ts

@@ -18,9 +18,9 @@ import BN from 'bn.js'
 import tap from 'tap'
 import tap from 'tap'
 import { Utils } from '../../utils/utils'
 import { Utils } from '../../utils/utils'
 import { VoteForProposalFixture, WorkingGroupMintCapacityProposalFixture } from '../fixtures/proposalsModule'
 import { VoteForProposalFixture, WorkingGroupMintCapacityProposalFixture } from '../fixtures/proposalsModule'
-import { PaidTermId } from '@nicaea/types/members'
-import { OpeningId } from '@nicaea/types/hiring'
-import { ProposalId } from '@nicaea/types/proposals'
+import { PaidTermId } from '@alexandria/types/members'
+import { OpeningId } from '@alexandria/types/hiring'
+import { ProposalId } from '@alexandria/types/proposals'
 import { DbService } from '../../services/dbService'
 import { DbService } from '../../services/dbService'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
 import { LeaderHiringHappyCaseFixture } from '../fixtures/leaderHiringHappyCase'
 import { LeaderHiringHappyCaseFixture } from '../fixtures/leaderHiringHappyCase'

+ 67 - 66
tests/network-tests/src/iznik/utils/apiWrapper.ts

@@ -2,7 +2,7 @@ import { ApiPromise, WsProvider } from '@polkadot/api'
 import { Bytes, Option, u32, Vec } from '@polkadot/types'
 import { Bytes, Option, u32, Vec } from '@polkadot/types'
 import { Codec } from '@polkadot/types/types'
 import { Codec } from '@polkadot/types/types'
 import { KeyringPair } from '@polkadot/keyring/types'
 import { KeyringPair } from '@polkadot/keyring/types'
-import { MemberId, PaidMembershipTerms, PaidTermId, UserInfo } from '@alexandria/types/members'
+import { MemberId, PaidMembershipTerms, PaidTermId } from '@alexandria/types/members'
 import { Mint, MintId } from '@alexandria/types/mint'
 import { Mint, MintId } from '@alexandria/types/mint'
 import { Lead, LeadId } from '@alexandria/types/content-working-group'
 import { Lead, LeadId } from '@alexandria/types/content-working-group'
 import {
 import {
@@ -65,6 +65,10 @@ export class ApiWrapper {
     }
     }
   }
   }
 
 
+  public createPaidTermId(value: BN): PaidTermId {
+    return this.api.createType('PaidTermId', value)
+  }
+
   public async buyMembership(
   public async buyMembership(
     account: KeyringPair,
     account: KeyringPair,
     paidTermsId: PaidTermId,
     paidTermsId: PaidTermId,
@@ -264,44 +268,44 @@ export class ApiWrapper {
   public estimateVoteForProposalFee(): BN {
   public estimateVoteForProposalFee(): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
       (this.api.tx.proposalsEngine.vote(
       (this.api.tx.proposalsEngine.vote(
-        new MemberId(0),
-        new ProposalId(0),
+        this.api.createType('MemberId', 0),
+        this.api.createType('ProposalId', 0),
         'Approve'
         'Approve'
       ) as unknown) as SubmittableExtrinsic<'promise'>
       ) as unknown) as SubmittableExtrinsic<'promise'>
     )
     )
   }
   }
 
 
   public estimateAddOpeningFee(module: WorkingGroups): BN {
   public estimateAddOpeningFee(module: WorkingGroups): BN {
-    const commitment: WorkingGroupOpeningPolicyCommitment = new WorkingGroupOpeningPolicyCommitment({
-      application_rationing_policy: new Option(ApplicationRationingPolicy, {
+    const commitment: WorkingGroupOpeningPolicyCommitment = this.api.createType('WorkingGroupOpeningPolicyCommitment', {
+      application_rationing_policy: this.api.createType('Option<ApplicationRationingPolicy>', {
         max_active_applicants: new BN(32) as u32,
         max_active_applicants: new BN(32) as u32,
       }),
       }),
       max_review_period_length: new BN(32) as u32,
       max_review_period_length: new BN(32) as u32,
-      application_staking_policy: new Option(StakingPolicy, {
+      application_staking_policy: this.api.createType('Option<StakingPolicy>', {
         amount: new BN(1),
         amount: new BN(1),
         amount_mode: 'AtLeast',
         amount_mode: 'AtLeast',
         crowded_out_unstaking_period_length: new BN(1),
         crowded_out_unstaking_period_length: new BN(1),
         review_period_expired_unstaking_period_length: new BN(1),
         review_period_expired_unstaking_period_length: new BN(1),
       }),
       }),
-      role_staking_policy: new Option(StakingPolicy, {
+      role_staking_policy: this.api.createType('Option<StakingPolicy>', {
         amount: new BN(1),
         amount: new BN(1),
         amount_mode: 'AtLeast',
         amount_mode: 'AtLeast',
         crowded_out_unstaking_period_length: new BN(1),
         crowded_out_unstaking_period_length: new BN(1),
         review_period_expired_unstaking_period_length: new BN(1),
         review_period_expired_unstaking_period_length: new BN(1),
       }),
       }),
-      role_slashing_terms: new SlashingTerms({
+      role_slashing_terms: this.api.createType('SlashingTerms', {
         Slashable: {
         Slashable: {
           max_count: new BN(0),
           max_count: new BN(0),
           max_percent_pts_per_time: new BN(0),
           max_percent_pts_per_time: new BN(0),
         },
         },
       }),
       }),
-      fill_opening_successful_applicant_application_stake_unstaking_period: new Option(u32, new BN(1) as BlockNumber),
-      fill_opening_failed_applicant_application_stake_unstaking_period: new Option(u32, new BN(1) as BlockNumber),
-      fill_opening_failed_applicant_role_stake_unstaking_period: new Option(u32, new BN(1) as BlockNumber),
-      terminate_application_stake_unstaking_period: new Option(u32, new BN(1) as BlockNumber),
-      terminate_role_stake_unstaking_period: new Option(u32, new BN(1) as BlockNumber),
-      exit_role_application_stake_unstaking_period: new Option(u32, new BN(1) as BlockNumber),
-      exit_role_stake_unstaking_period: new Option(u32, new BN(1) as BlockNumber),
+      fill_opening_successful_applicant_application_stake_unstaking_period: this.api.createType('Option<BlockNumber>', new BN(1)),
+      fill_opening_failed_applicant_application_stake_unstaking_period: this.api.createType('Option<BlockNumber>', new BN(1)),
+      fill_opening_failed_applicant_role_stake_unstaking_period: this.api.createType('Option<BlockNumber>', new BN(1)),
+      terminate_application_stake_unstaking_period: this.api.createType('Option<BlockNumber>', new BN(1)),
+      terminate_role_stake_unstaking_period: this.api.createType('Option<BlockNumber>', new BN(1)),
+      exit_role_application_stake_unstaking_period: this.api.createType('Option<BlockNumber>', new BN(1)),
+      exit_role_stake_unstaking_period: this.api.createType('Option<BlockNumber>', new BN(1)),
     })
     })
 
 
     return this.estimateTxFee(
     return this.estimateTxFee(
@@ -316,15 +320,15 @@ export class ApiWrapper {
 
 
   public estimateAcceptApplicationsFee(module: WorkingGroups): BN {
   public estimateAcceptApplicationsFee(module: WorkingGroups): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
-      (this.api.tx[module].acceptApplications(new OpeningId(0)) as unknown) as SubmittableExtrinsic<'promise'>
+      (this.api.tx[module].acceptApplications(this.api.createType('OpeningId',0)) as unknown) as SubmittableExtrinsic<'promise'>
     )
     )
   }
   }
 
 
   public estimateApplyOnOpeningFee(account: KeyringPair, module: WorkingGroups): BN {
   public estimateApplyOnOpeningFee(account: KeyringPair, module: WorkingGroups): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
       (this.api.tx[module].applyOnOpening(
       (this.api.tx[module].applyOnOpening(
-        new MemberId(0),
-        new OpeningId(0),
+          this.api.createType('MemberId', 0),
+          this.api.createType('OpeningId', 0),
         account.address,
         account.address,
         0,
         0,
         0,
         0,
@@ -335,13 +339,13 @@ export class ApiWrapper {
 
 
   public estimateBeginApplicantReviewFee(module: WorkingGroups): BN {
   public estimateBeginApplicantReviewFee(module: WorkingGroups): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
-      (this.api.tx[module].beginApplicantReview(new OpeningId(0)) as unknown) as SubmittableExtrinsic<'promise'>
+      (this.api.tx[module].beginApplicantReview(this.api.createType('OpeningId', 0)) as unknown) as SubmittableExtrinsic<'promise'>
     )
     )
   }
   }
 
 
   public estimateFillOpeningFee(module: WorkingGroups): BN {
   public estimateFillOpeningFee(module: WorkingGroups): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
-      (this.api.tx[module].fillOpening(new OpeningId(0), [new ApplicationId(0)], {
+      (this.api.tx[module].fillOpening(this.api.createType('OpeningId', 0), [this.api.createType('ApplicationId', 0)], {
         'amount_per_payout': 0,
         'amount_per_payout': 0,
         'next_payment_at_block': 0,
         'next_payment_at_block': 0,
         'payout_interval': 0,
         'payout_interval': 0,
@@ -351,31 +355,31 @@ export class ApiWrapper {
 
 
   public estimateIncreaseStakeFee(module: WorkingGroups): BN {
   public estimateIncreaseStakeFee(module: WorkingGroups): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
-      (this.api.tx[module].increaseStake(new WorkerId(0), 0) as unknown) as SubmittableExtrinsic<'promise'>
+      (this.api.tx[module].increaseStake(this.api.createType('WorkerId',0), 0) as unknown) as SubmittableExtrinsic<'promise'>
     )
     )
   }
   }
 
 
   public estimateDecreaseStakeFee(module: WorkingGroups): BN {
   public estimateDecreaseStakeFee(module: WorkingGroups): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
-      (this.api.tx[module].decreaseStake(new WorkerId(0), 0) as unknown) as SubmittableExtrinsic<'promise'>
+      (this.api.tx[module].decreaseStake(this.api.createType('WorkerId',0), 0) as unknown) as SubmittableExtrinsic<'promise'>
     )
     )
   }
   }
 
 
   public estimateUpdateRoleAccountFee(address: string, module: WorkingGroups): BN {
   public estimateUpdateRoleAccountFee(address: string, module: WorkingGroups): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
-      (this.api.tx[module].updateRoleAccount(new WorkerId(0), address) as unknown) as SubmittableExtrinsic<'promise'>
+      (this.api.tx[module].updateRoleAccount(this.api.createType('WorkerId',0), address) as unknown) as SubmittableExtrinsic<'promise'>
     )
     )
   }
   }
 
 
   public estimateUpdateRewardAccountFee(address: string, module: WorkingGroups): BN {
   public estimateUpdateRewardAccountFee(address: string, module: WorkingGroups): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
-      (this.api.tx[module].updateRewardAccount(new WorkerId(0), address) as unknown) as SubmittableExtrinsic<'promise'>
+      (this.api.tx[module].updateRewardAccount(this.api.createType('WorkerId',0), address) as unknown) as SubmittableExtrinsic<'promise'>
     )
     )
   }
   }
 
 
   public estimateLeaveRoleFee(module: WorkingGroups): BN {
   public estimateLeaveRoleFee(module: WorkingGroups): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
-      (this.api.tx[module].leaveRole(new WorkerId(0), 'Long justification text') as unknown) as SubmittableExtrinsic<
+      (this.api.tx[module].leaveRole(this.api.createType('WorkerId',0), 'Long justification text') as unknown) as SubmittableExtrinsic<
         'promise'
         'promise'
       >
       >
     )
     )
@@ -383,26 +387,26 @@ export class ApiWrapper {
 
 
   public estimateWithdrawApplicationFee(module: WorkingGroups): BN {
   public estimateWithdrawApplicationFee(module: WorkingGroups): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
-      (this.api.tx[module].withdrawApplication(new ApplicationId(0)) as unknown) as SubmittableExtrinsic<'promise'>
+      (this.api.tx[module].withdrawApplication(this.api.createType('ApplicationId',0)) as unknown) as SubmittableExtrinsic<'promise'>
     )
     )
   }
   }
 
 
   public estimateTerminateApplicationFee(module: WorkingGroups): BN {
   public estimateTerminateApplicationFee(module: WorkingGroups): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
-      (this.api.tx[module].terminateApplication(new ApplicationId(0)) as unknown) as SubmittableExtrinsic<'promise'>
+      (this.api.tx[module].terminateApplication(this.api.createType('ApplicationId',0)) as unknown) as SubmittableExtrinsic<'promise'>
     )
     )
   }
   }
 
 
   public estimateSlashStakeFee(module: WorkingGroups): BN {
   public estimateSlashStakeFee(module: WorkingGroups): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
-      (this.api.tx[module].slashStake(new WorkerId(0), 0) as unknown) as SubmittableExtrinsic<'promise'>
+      (this.api.tx[module].slashStake(this.api.createType('WorkerId',0), 0) as unknown) as SubmittableExtrinsic<'promise'>
     )
     )
   }
   }
 
 
   public estimateTerminateRoleFee(module: WorkingGroups): BN {
   public estimateTerminateRoleFee(module: WorkingGroups): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
       (this.api.tx[module].terminateRole(
       (this.api.tx[module].terminateRole(
-        new WorkerId(0),
+        this.api.createType('WorkerId',0),
         'Long justification text explaining why the worker role will be terminated',
         'Long justification text explaining why the worker role will be terminated',
         false
         false
       ) as unknown) as SubmittableExtrinsic<'promise'>
       ) as unknown) as SubmittableExtrinsic<'promise'>
@@ -410,41 +414,41 @@ export class ApiWrapper {
   }
   }
 
 
   public estimateProposeCreateWorkingGroupLeaderOpeningFee(): BN {
   public estimateProposeCreateWorkingGroupLeaderOpeningFee(): BN {
-    const commitment: WorkingGroupOpeningPolicyCommitment = new WorkingGroupOpeningPolicyCommitment({
-      application_rationing_policy: new Option(ApplicationRationingPolicy, {
+    const commitment: WorkingGroupOpeningPolicyCommitment = this.api.createType('WorkingGroupOpeningPolicyCommitment',{
+      application_rationing_policy: this.api.createType('Option<ApplicationRationingPolicy>', {
         max_active_applicants: new BN(32) as u32,
         max_active_applicants: new BN(32) as u32,
       }),
       }),
       max_review_period_length: new BN(32) as u32,
       max_review_period_length: new BN(32) as u32,
-      application_staking_policy: new Option(StakingPolicy, {
+      application_staking_policy: this.api.createType('Option<StakingPolicy>', {
         amount: new BN(1),
         amount: new BN(1),
         amount_mode: 'AtLeast',
         amount_mode: 'AtLeast',
         crowded_out_unstaking_period_length: new BN(1),
         crowded_out_unstaking_period_length: new BN(1),
         review_period_expired_unstaking_period_length: new BN(1),
         review_period_expired_unstaking_period_length: new BN(1),
       }),
       }),
-      role_staking_policy: new Option(StakingPolicy, {
+      role_staking_policy: this.api.createType('Option<StakingPolicy>', {
         amount: new BN(1),
         amount: new BN(1),
         amount_mode: 'AtLeast',
         amount_mode: 'AtLeast',
         crowded_out_unstaking_period_length: new BN(1),
         crowded_out_unstaking_period_length: new BN(1),
         review_period_expired_unstaking_period_length: new BN(1),
         review_period_expired_unstaking_period_length: new BN(1),
       }),
       }),
-      role_slashing_terms: new SlashingTerms({
+      role_slashing_terms: this.api.createType('SlashingTerms',{
         Slashable: {
         Slashable: {
           max_count: new BN(0),
           max_count: new BN(0),
           max_percent_pts_per_time: new BN(0),
           max_percent_pts_per_time: new BN(0),
         },
         },
       }),
       }),
-      fill_opening_successful_applicant_application_stake_unstaking_period: new Option(u32, new BN(1) as BlockNumber),
-      fill_opening_failed_applicant_application_stake_unstaking_period: new Option(u32, new BN(1) as BlockNumber),
-      fill_opening_failed_applicant_role_stake_unstaking_period: new Option(u32, new BN(1) as BlockNumber),
-      terminate_application_stake_unstaking_period: new Option(u32, new BN(1) as BlockNumber),
-      terminate_role_stake_unstaking_period: new Option(u32, new BN(1) as BlockNumber),
-      exit_role_application_stake_unstaking_period: new Option(u32, new BN(1) as BlockNumber),
-      exit_role_stake_unstaking_period: new Option(u32, new BN(1) as BlockNumber),
+      fill_opening_successful_applicant_application_stake_unstaking_period: this.api.createType('Option<BlockNumber>', new BN(1)),
+      fill_opening_failed_applicant_application_stake_unstaking_period: this.api.createType('Option<BlockNumber>', new BN(1)),
+      fill_opening_failed_applicant_role_stake_unstaking_period: this.api.createType('Option<BlockNumber>', new BN(1)),
+      terminate_application_stake_unstaking_period: this.api.createType('Option<BlockNumber>', new BN(1)),
+      terminate_role_stake_unstaking_period: this.api.createType('Option<BlockNumber>', new BN(1)),
+      exit_role_application_stake_unstaking_period: this.api.createType('Option<BlockNumber>', new BN(1)),
+      exit_role_stake_unstaking_period: this.api.createType('Option<BlockNumber>', new BN(1)),
     })
     })
 
 
     return this.estimateTxFee(
     return this.estimateTxFee(
       (this.api.tx.proposalsCodex.createAddWorkingGroupLeaderOpeningProposal(
       (this.api.tx.proposalsCodex.createAddWorkingGroupLeaderOpeningProposal(
-        new MemberId(0),
+          this.api.createType('MemberId',0),
         'some long title for the purpose of testing',
         'some long title for the purpose of testing',
         'some long description for the purpose of testing',
         'some long description for the purpose of testing',
         0,
         0,
@@ -461,34 +465,31 @@ export class ApiWrapper {
   public estimateProposeBeginWorkingGroupLeaderApplicationReviewFee(): BN {
   public estimateProposeBeginWorkingGroupLeaderApplicationReviewFee(): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
       (this.api.tx.proposalsCodex.createBeginReviewWorkingGroupLeaderApplicationsProposal(
       (this.api.tx.proposalsCodex.createBeginReviewWorkingGroupLeaderApplicationsProposal(
-        new MemberId(0),
+        this.api.createType('MemberId',0),
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         0,
         0,
-        new OpeningId(0),
+        this.api.createType('OpeningId',0),
         'Storage'
         'Storage'
       ) as unknown) as SubmittableExtrinsic<'promise'>
       ) as unknown) as SubmittableExtrinsic<'promise'>
     )
     )
   }
   }
 
 
   public estimateProposeFillLeaderOpeningFee(): BN {
   public estimateProposeFillLeaderOpeningFee(): BN {
-    const fillOpeningParameters: FillOpeningParameters = new FillOpeningParameters({
-      opening_id: new OpeningId(0),
-      successful_application_id: new ApplicationId(0),
-      reward_policy: new Option(
-        RewardPolicy,
-        new RewardPolicy({
+    const fillOpeningParameters: FillOpeningParameters = this.api.createType('FillOpeningParameters',{
+      opening_id: this.api.createType('OpeningId',0),
+      successful_application_id: this.api.createType('ApplicationId',0),
+      reward_policy: this.api.createType('Option<RewardPolicy>', {
           amount_per_payout: new BN(1) as Balance,
           amount_per_payout: new BN(1) as Balance,
           next_payment_at_block: new BN(99999) as BlockNumber,
           next_payment_at_block: new BN(99999) as BlockNumber,
-          payout_interval: new Option(u32, new u32(99999)),
-        })
-      ),
-      working_group: new WorkingGroup('Storage'),
+          payout_interval: this.api.createType('Option<u32>', new BN(99999)),
+        }),
+      working_group: this.api.createType('WorkingGroup','Storage'),
     })
     })
 
 
     return this.estimateTxFee(
     return this.estimateTxFee(
       (this.api.tx.proposalsCodex.createFillWorkingGroupLeaderOpeningProposal(
       (this.api.tx.proposalsCodex.createFillWorkingGroupLeaderOpeningProposal(
-        new MemberId(0),
+        this.api.createType('MemberId',0),
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         0,
         0,
@@ -500,12 +501,12 @@ export class ApiWrapper {
   public estimateProposeTerminateLeaderRoleFee(): BN {
   public estimateProposeTerminateLeaderRoleFee(): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
       (this.api.tx.proposalsCodex.createTerminateWorkingGroupLeaderRoleProposal(
       (this.api.tx.proposalsCodex.createTerminateWorkingGroupLeaderRoleProposal(
-        new MemberId(0),
+          this.api.createType('MemberId', 0),
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         0,
         0,
         {
         {
-          'worker_id': new WorkerId(0),
+          'worker_id': this.api.createType('WorkerId', 0),
           'rationale': 'Exceptionaly long and extraordinary descriptive rationale',
           'rationale': 'Exceptionaly long and extraordinary descriptive rationale',
           'slash': true,
           'slash': true,
           'working_group': 'Storage',
           'working_group': 'Storage',
@@ -517,11 +518,11 @@ export class ApiWrapper {
   public estimateProposeLeaderRewardFee(): BN {
   public estimateProposeLeaderRewardFee(): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
       (this.api.tx.proposalsCodex.createSetWorkingGroupLeaderRewardProposal(
       (this.api.tx.proposalsCodex.createSetWorkingGroupLeaderRewardProposal(
-        new MemberId(0),
+        this.api.createType('MemberId', 0),
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         0,
         0,
-        new WorkerId(0),
+        this.api.createType('WorkerId', 0),
         0,
         0,
         'Storage'
         'Storage'
       ) as unknown) as SubmittableExtrinsic<'promise'>
       ) as unknown) as SubmittableExtrinsic<'promise'>
@@ -531,11 +532,11 @@ export class ApiWrapper {
   public estimateProposeDecreaseLeaderStakeFee(): BN {
   public estimateProposeDecreaseLeaderStakeFee(): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
       (this.api.tx.proposalsCodex.createDecreaseWorkingGroupLeaderStakeProposal(
       (this.api.tx.proposalsCodex.createDecreaseWorkingGroupLeaderStakeProposal(
-        new MemberId(0),
+        this.api.createType('MemberId', 0),
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         0,
         0,
-        new WorkerId(0),
+        this.api.createType('WorkerId', 0),
         0,
         0,
         'Storage'
         'Storage'
       ) as unknown) as SubmittableExtrinsic<'promise'>
       ) as unknown) as SubmittableExtrinsic<'promise'>
@@ -545,11 +546,11 @@ export class ApiWrapper {
   public estimateProposeSlashLeaderStakeFee(): BN {
   public estimateProposeSlashLeaderStakeFee(): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
       (this.api.tx.proposalsCodex.createSlashWorkingGroupLeaderStakeProposal(
       (this.api.tx.proposalsCodex.createSlashWorkingGroupLeaderStakeProposal(
-        new MemberId(0),
+        this.api.createType('MemberId', 0),
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         0,
         0,
-        new WorkerId(0),
+        this.api.createType('WorkerId', 0),
         0,
         0,
         'Storage'
         'Storage'
       ) as unknown) as SubmittableExtrinsic<'promise'>
       ) as unknown) as SubmittableExtrinsic<'promise'>
@@ -559,7 +560,7 @@ export class ApiWrapper {
   public estimateProposeWorkingGroupMintCapacityFee(): BN {
   public estimateProposeWorkingGroupMintCapacityFee(): BN {
     return this.estimateTxFee(
     return this.estimateTxFee(
       (this.api.tx.proposalsCodex.createSetWorkingGroupMintCapacityProposal(
       (this.api.tx.proposalsCodex.createSetWorkingGroupMintCapacityProposal(
-        new MemberId(0),
+        this.api.createType('MemberId', 0),
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         'Some testing text used for estimation purposes which is longer than text expected during the test',
         0,
         0,
@@ -951,14 +952,14 @@ export class ApiWrapper {
     const mintId: MintId = await this.api.query.contentWorkingGroup.mint<MintId>()
     const mintId: MintId = await this.api.query.contentWorkingGroup.mint<MintId>()
     const mintCodec = await this.api.query.minting.mints<Codec[]>(mintId)
     const mintCodec = await this.api.query.minting.mints<Codec[]>(mintId)
     const mint: Mint = (mintCodec[0] as unknown) as Mint
     const mint: Mint = (mintCodec[0] as unknown) as Mint
-    return mint.getField<Balance>('capacity')
+    return mint.capacity
   }
   }
 
 
   public async getWorkingGroupMintCapacity(module: WorkingGroups): Promise<BN> {
   public async getWorkingGroupMintCapacity(module: WorkingGroups): Promise<BN> {
     const mintId: MintId = await this.api.query[module].mint<MintId>()
     const mintId: MintId = await this.api.query[module].mint<MintId>()
     const mintCodec = await this.api.query.minting.mints<Codec[]>(mintId)
     const mintCodec = await this.api.query.minting.mints<Codec[]>(mintId)
     const mint: Mint = (mintCodec[0] as unknown) as Mint
     const mint: Mint = (mintCodec[0] as unknown) as Mint
-    return mint.getField<Balance>('capacity')
+    return mint.capacity
   }
   }
 
 
   public getValidatorCount(): Promise<BN> {
   public getValidatorCount(): Promise<BN> {

+ 5 - 1
tests/network-tests/tsconfig.json

@@ -7,6 +7,10 @@
     "strict": true,
     "strict": true,
     "esModuleInterop": true,
     "esModuleInterop": true,
     "forceConsistentCasingInFileNames": true,
     "forceConsistentCasingInFileNames": true,
-    "skipLibCheck": true
+    "skipLibCheck": true,
+    "baseUrl": ".",
+    "paths": {
+      "@polkadot/types/augment": ["../../types/src/definitions/augment-types.ts"]
+    }
   }
   }
 }
 }