feat: Rebrand Polkadot/Substrate references to PezkuwiChain

This commit systematically rebrands various references from Parity Technologies'
Polkadot/Substrate ecosystem to PezkuwiChain within the kurdistan-sdk.

Key changes include:
- Updated external repository URLs (zombienet-sdk, parity-db, parity-scale-codec, wasm-instrument) to point to pezkuwichain forks.
- Modified internal documentation and code comments to reflect PezkuwiChain naming and structure.
- Replaced direct references to  with  or specific paths within the  for XCM, Pezkuwi, and other modules.
- Cleaned up deprecated  issue and PR references in various  and  files, particularly in  and  modules.
- Adjusted image and logo URLs in documentation to point to PezkuwiChain assets.
- Removed or rephrased comments related to external Polkadot/Substrate PRs and issues.

This is a significant step towards fully customizing the SDK for the PezkuwiChain ecosystem.
This commit is contained in:
2025-12-14 00:04:10 +03:00
parent 286de54384
commit 1c0e57d984
9084 changed files with 997839 additions and 997557 deletions
@@ -0,0 +1,41 @@
{
"bootNodes": [],
"chainType": "Live",
"codeSubstitutes": {
"100": "0x040506"
},
"custom_field": "custom_value",
"genesis": {
"runtimeGenesis": {
"code": "0x010203",
"config": {
"babe": {
"authorities": [],
"epochConfig": {
"allowed_slots": "PrimaryAndSecondaryVRFSlots",
"c": [
1,
4
]
}
},
"balances": {
"balances": []
},
"bizinikiwiTest": {
"authorities": []
},
"system": {}
}
}
},
"id": "custom",
"name": "Custom",
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"protocolId": null,
"relay_chain": "pezkuwichain-local",
"telemetryEndpoints": null
}
@@ -0,0 +1,37 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"relay_chain": "pezkuwichain-local",
"custom_field": "custom_value",
"codeSubstitutes": {},
"genesis": {
"raw": {
"childrenDefault": {},
"top": {
"0x00771836bebdd29870ff246d305c578c4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x00771836bebdd29870ff246d305c578c5e0621c4869aa60c02be9adcc98a0d1d": "0x00",
"0x1cb6f36e027abb2091cfb5110ab5087f4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x1cb6f36e027abb2091cfb5110ab5087f66e8f035c8adbe7f1547b43c51e6f8a4": "0x00000000",
"0x1cb6f36e027abb2091cfb5110ab5087fdc6b171b77304263c292cc3ea5ed31ef": "0x0100000000000000040000000000000002",
"0x26aa394eea5630e07c48ae0c9558cef74e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef75684a022a34dd8bfa2baaf44f172b710": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef78a42f33323cb5ced3b44dd825fda9fcc": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a44704b568d21667356a5a050c118746bb1bdbcacd6ac9340000000000000000": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a7fd6c28836b9a28522dc924110cf439": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8": "0x0000",
"0x3a636f6465": "0x010203",
"0x3a65787472696e7369635f696e646578": "0x00000000",
"0xc2261276cc9d1f8598ea4b6a74b15c2f4e7b9012096b41c4eb3aaf947f6ea429": "0x0100",
"0xc2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80": "0x0000000000000000"
}
}
}
}
@@ -0,0 +1,38 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"codeSubstitutes": {},
"genesis": {
"runtimeGenesis": {
"code": "0x010203",
"config": {
"babe": {
"authorities": [],
"epochConfig": {
"allowed_slots": "PrimaryAndSecondaryVRFSlots",
"c": [
1,
4
]
}
},
"balances": {
"balances": [],
"devAccounts": null
},
"bizinikiwiTest": {
"authorities": []
},
"system": {}
}
}
}
}
@@ -0,0 +1,39 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"codeSubstitutes": {},
"genesis": {
"raw": {
"top": {
"0x00771836bebdd29870ff246d305c578c4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x00771836bebdd29870ff246d305c578c5e0621c4869aa60c02be9adcc98a0d1d": "0x0cd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d1cbd2d43530a44705ad088af313e18f80b53ef16b36177cd4b77b846f2a5f07c186e1bafbb1430668c95d89b77217a402a74f64c3e103137b69e95e4b6e06b1e",
"0x1cb6f36e027abb2091cfb5110ab5087f4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x1cb6f36e027abb2091cfb5110ab5087f66e8f035c8adbe7f1547b43c51e6f8a4": "0x00000000",
"0x1cb6f36e027abb2091cfb5110ab5087fdc6b171b77304263c292cc3ea5ed31ef": "0x0100000000000000040000000000000002",
"0x26aa394eea5630e07c48ae0c9558cef74e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef75684a022a34dd8bfa2baaf44f172b710": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef78a42f33323cb5ced3b44dd825fda9fcc": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a44704b568d21667356a5a050c118746bb1bdbcacd6ac9340000000000000000": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a7fd6c28836b9a28522dc924110cf439": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da92c2a60ec6dd16cd8ab911865ecf7555b186e1bafbb1430668c95d89b77217a402a74f64c3e103137b69e95e4b6e06b1e": "0x00000000000000000000000001000000000000000080e03779c311000000000000000000000000000000000000000000000000000000000000000080",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da94f9aea1afa791265fae359272badc1cf8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48": "0x00000000000000000000000001000000000000000080c6a47e8d03000000000000000000000000000000000000000000000000000000000000000080",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9b0edae20838083f2cde1c4080db8cf8090b5ab205c6974c9ea841be688864633dc9ca8a357843eeacf2314649965fe22": "0x00000000000000000000000001000000000000000080c6a47e8d03000000000000000000000000000000000000000000000000000000000000000080",
"0x26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8": "0x0000",
"0x3a636f6465": "0x010203",
"0x3a65787472696e7369635f696e646578": "0x00000000",
"0xc2261276cc9d1f8598ea4b6a74b15c2f4e7b9012096b41c4eb3aaf947f6ea429": "0x0100",
"0xc2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80": "0x00806d8176de1800",
"0xd5e1a2fa16732ce6906189438c0a82c64e7b9012096b41c4eb3aaf947f6ea429": "0x0000"
},
"childrenDefault": {}
}
}
}
@@ -0,0 +1,39 @@
{
"name": "test_chain",
"id": "100",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"relay_chain": "pezkuwichain-local",
"codeSubstitutes": {},
"genesis": {
"runtimeGenesis": {
"code": "0x010203",
"config": {
"babe": {
"authorities": [],
"epochConfig": {
"allowed_slots": "PrimaryAndSecondaryVRFSlots",
"c": [
1,
4
]
}
},
"balances": {
"balances": [],
"devAccounts": null
},
"bizinikiwiTest": {
"authorities": []
},
"system": {}
}
}
}
}
@@ -0,0 +1,67 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"codeSubstitutes": {},
"genesis": {
"runtimeGenesis": {
"code": "0x010203",
"config": {
"babe": {
"authorities": [
[
"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
1
],
[
"5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL",
1
],
[
"5CcjiSgG2KLuKAsqkE2Nak1S2FbAcMr5SxRASUuwR3zSNV2b",
1
]
],
"epochConfig": {
"allowed_slots": "PrimaryAndSecondaryVRFSlots",
"c": [
2,
4
]
}
},
"balances": {
"balances": [
[
"5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
2000000000000000
],
[
"5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y",
2000000000000000
],
[
"5CcjiSgG2KLuKAsqkE2Nak1S2FbAcMr5SxRASUuwR3zSNV2b",
5000000000000000
]
]
},
"bizinikiwiTest": {
"authorities": [
"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL",
"5CcjiSgG2KLuKAsqkE2Nak1S2FbAcMr5SxRASUuwR3zSNV2b"
]
},
"system": {}
}
}
}
}
@@ -0,0 +1,38 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"codeSubstitutes": {},
"genesis": {
"runtimeGenesis": {
"code": "0x010203",
"patch": {
"balances": {
"balances": [
[
"5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
1000000000000000
],
[
"5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y",
1000000000000000
]
]
},
"bizinikiwiTest": {
"authorities": [
"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL"
]
}
}
}
}
}
@@ -0,0 +1,38 @@
{
"name": "test_chain",
"id": "100",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"codeSubstitutes": {},
"genesis": {
"runtimeGenesis": {
"code": "0x010203",
"config": {
"babe": {
"authorities": [],
"epochConfig": {
"allowed_slots": "PrimaryAndSecondaryVRFSlots",
"c": [
1,
4
]
}
},
"balances": {
"balances": [],
"devAccounts": null
},
"bizinikiwiTest": {
"authorities": []
},
"system": {}
}
}
}
}
@@ -0,0 +1,43 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"codeSubstitutes": {},
"genesis": {
"runtimeGenesis": {
"code": "0x010203",
"patch": {
"balances": {
"balances": [
[
"5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
1000000000000000
],
[
"5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y",
1000000000000000
],
[
"5CcjiSgG2KLuKAsqkE2Nak1S2FbAcMr5SxRASUuwR3zSNV2b",
5000000000000000
]
]
},
"bizinikiwiTest": {
"authorities": [
"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL",
"5CcjiSgG2KLuKAsqkE2Nak1S2FbAcMr5SxRASUuwR3zSNV2b"
]
}
}
}
}
}
@@ -0,0 +1,40 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 6,
"tokenSymbol": "TEST",
"ss58Prefix": 42,
"isEthereum": false
},
"codeSubstitutes": {},
"genesis": {
"runtimeGenesis": {
"code": "0x010203",
"config": {
"babe": {
"authorities": [],
"epochConfig": {
"allowed_slots": "PrimaryAndSecondaryVRFSlots",
"c": [
1,
4
]
}
},
"balances": {
"balances": [],
"devAccounts": null
},
"bizinikiwiTest": {
"authorities": []
},
"system": {}
}
}
}
}
@@ -0,0 +1,37 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"codeSubstitutes": {},
"genesis": {
"runtimeGenesis": {
"config": {
"babe": {
"authorities": [],
"epochConfig": {
"allowed_slots": "PrimaryAndSecondaryVRFSlots",
"c": [
1,
4
]
}
},
"balances": {
"balances": [],
"devAccounts": null
},
"bizinikiwiTest": {
"authorities": []
},
"system": {}
}
}
}
}
@@ -0,0 +1,66 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"codeSubstitutes": {},
"genesis": {
"runtimeGenesis": {
"config": {
"babe": {
"authorities": [
[
"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
1
],
[
"5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL",
1
],
[
"5CcjiSgG2KLuKAsqkE2Nak1S2FbAcMr5SxRASUuwR3zSNV2b",
1
]
],
"epochConfig": {
"allowed_slots": "PrimaryAndSecondaryVRFSlots",
"c": [
2,
4
]
}
},
"balances": {
"balances": [
[
"5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
2000000000000000
],
[
"5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y",
2000000000000000
],
[
"5CcjiSgG2KLuKAsqkE2Nak1S2FbAcMr5SxRASUuwR3zSNV2b",
5000000000000000
]
]
},
"bizinikiwiTest": {
"authorities": [
"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL",
"5CcjiSgG2KLuKAsqkE2Nak1S2FbAcMr5SxRASUuwR3zSNV2b"
]
},
"system": {}
}
}
}
}
@@ -0,0 +1,40 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"codeSubstitutes": {},
"genesis": {
"raw": {
"top": {
"0x00771836bebdd29870ff246d305c578c4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x00771836bebdd29870ff246d305c578c5e0621c4869aa60c02be9adcc98a0d1d": "0x0cd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d1cbd2d43530a44705ad088af313e18f80b53ef16b36177cd4b77b846f2a5f07c186e1bafbb1430668c95d89b77217a402a74f64c3e103137b69e95e4b6e06b1e",
"0x1cb6f36e027abb2091cfb5110ab5087f4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x1cb6f36e027abb2091cfb5110ab5087f5e0621c4869aa60c02be9adcc98a0d1d": "0x0cd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01000000000000001cbd2d43530a44705ad088af313e18f80b53ef16b36177cd4b77b846f2a5f07c0100000000000000186e1bafbb1430668c95d89b77217a402a74f64c3e103137b69e95e4b6e06b1e0100000000000000",
"0x1cb6f36e027abb2091cfb5110ab5087f66e8f035c8adbe7f1547b43c51e6f8a4": "0x00000000",
"0x1cb6f36e027abb2091cfb5110ab5087faacf00b9b41fda7a9268821c2a2b3e4c": "0x0cd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01000000000000001cbd2d43530a44705ad088af313e18f80b53ef16b36177cd4b77b846f2a5f07c0100000000000000186e1bafbb1430668c95d89b77217a402a74f64c3e103137b69e95e4b6e06b1e0100000000000000",
"0x1cb6f36e027abb2091cfb5110ab5087fdc6b171b77304263c292cc3ea5ed31ef": "0x0200000000000000040000000000000002",
"0x26aa394eea5630e07c48ae0c9558cef74e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef75684a022a34dd8bfa2baaf44f172b710": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef78a42f33323cb5ced3b44dd825fda9fcc": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a44704b568d21667356a5a050c118746bb1bdbcacd6ac9340000000000000000": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a7fd6c28836b9a28522dc924110cf439": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da92c2a60ec6dd16cd8ab911865ecf7555b186e1bafbb1430668c95d89b77217a402a74f64c3e103137b69e95e4b6e06b1e": "0x00000000000000000000000001000000000000000080e03779c311000000000000000000000000000000000000000000000000000000000000000080",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da94f9aea1afa791265fae359272badc1cf8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48": "0x000000000000000000000000010000000000000000008d49fd1a07000000000000000000000000000000000000000000000000000000000000000080",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9b0edae20838083f2cde1c4080db8cf8090b5ab205c6974c9ea841be688864633dc9ca8a357843eeacf2314649965fe22": "0x000000000000000000000000010000000000000000008d49fd1a07000000000000000000000000000000000000000000000000000000000000000080",
"0x26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8": "0x0000",
"0x3a65787472696e7369635f696e646578": "0x00000000",
"0xc2261276cc9d1f8598ea4b6a74b15c2f4e7b9012096b41c4eb3aaf947f6ea429": "0x0100",
"0xc2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80": "0x0080faca73f91f00",
"0xd5e1a2fa16732ce6906189438c0a82c64e7b9012096b41c4eb3aaf947f6ea429": "0x0000"
},
"childrenDefault": {}
}
}
}
@@ -0,0 +1,38 @@
{
"bootNodes": [],
"chainType": "Live",
"codeSubstitutes": {},
"genesis": {
"runtimeGenesis": {
"patch": {
"balances": {
"balances": [
[
"5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
1000000000000000
],
[
"5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y",
1000000000000000
]
]
},
"bizinikiwiTest": {
"authorities": [
"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL"
]
}
}
}
},
"id": "custom",
"name": "Custom",
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"protocolId": null,
"relay_chain": "dev",
"telemetryEndpoints": null
}
@@ -0,0 +1,42 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"codeSubstitutes": {},
"genesis": {
"runtimeGenesis": {
"patch": {
"balances": {
"balances": [
[
"5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
1000000000000000
],
[
"5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y",
1000000000000000
],
[
"5CcjiSgG2KLuKAsqkE2Nak1S2FbAcMr5SxRASUuwR3zSNV2b",
5000000000000000
]
]
},
"bizinikiwiTest": {
"authorities": [
"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL",
"5CcjiSgG2KLuKAsqkE2Nak1S2FbAcMr5SxRASUuwR3zSNV2b"
]
}
}
}
}
}
@@ -0,0 +1,38 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"codeSubstitutes": {},
"genesis": {
"raw": {
"top": {
"0x00771836bebdd29870ff246d305c578c4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x00771836bebdd29870ff246d305c578c5e0621c4869aa60c02be9adcc98a0d1d": "0x0cd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d1cbd2d43530a44705ad088af313e18f80b53ef16b36177cd4b77b846f2a5f07c186e1bafbb1430668c95d89b77217a402a74f64c3e103137b69e95e4b6e06b1e",
"0x1cb6f36e027abb2091cfb5110ab5087f4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x1cb6f36e027abb2091cfb5110ab5087f66e8f035c8adbe7f1547b43c51e6f8a4": "0x00000000",
"0x1cb6f36e027abb2091cfb5110ab5087fdc6b171b77304263c292cc3ea5ed31ef": "0x0100000000000000040000000000000002",
"0x26aa394eea5630e07c48ae0c9558cef74e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef75684a022a34dd8bfa2baaf44f172b710": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef78a42f33323cb5ced3b44dd825fda9fcc": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a44704b568d21667356a5a050c118746bb1bdbcacd6ac9340000000000000000": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a7fd6c28836b9a28522dc924110cf439": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da92c2a60ec6dd16cd8ab911865ecf7555b186e1bafbb1430668c95d89b77217a402a74f64c3e103137b69e95e4b6e06b1e": "0x00000000000000000000000001000000000000000080e03779c311000000000000000000000000000000000000000000000000000000000000000080",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da94f9aea1afa791265fae359272badc1cf8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48": "0x00000000000000000000000001000000000000000080c6a47e8d03000000000000000000000000000000000000000000000000000000000000000080",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9b0edae20838083f2cde1c4080db8cf8090b5ab205c6974c9ea841be688864633dc9ca8a357843eeacf2314649965fe22": "0x00000000000000000000000001000000000000000080c6a47e8d03000000000000000000000000000000000000000000000000000000000000000080",
"0x26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8": "0x0000",
"0x3a65787472696e7369635f696e646578": "0x00000000",
"0xc2261276cc9d1f8598ea4b6a74b15c2f4e7b9012096b41c4eb3aaf947f6ea429": "0x0100",
"0xc2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80": "0x00806d8176de1800",
"0xd5e1a2fa16732ce6906189438c0a82c64e7b9012096b41c4eb3aaf947f6ea429": "0x0000"
},
"childrenDefault": {}
}
}
}
@@ -0,0 +1 @@
{"babe":{"authorities":[],"epochConfig":{"allowed_slots":"PrimaryAndSecondaryVRFSlots","c":[1,4]}},"balances":{"balances":[], "devAccounts": null},"bizinikiwiTest":{"authorities":[]},"system":{}}
@@ -0,0 +1 @@
{"balances":{"balances":[["5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",1000000000000000],["5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y",1000000000000000]]},"bizinikiwiTest":{"authorities":["5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY","5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL"]}}
@@ -0,0 +1 @@
{"presets":["foobar","staging"]}
@@ -0,0 +1,39 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"relay_chain": "pezkuwichain-local",
"custom_field": "custom_value",
"codeSubstitutes": {},
"genesis": {
"runtimeGenesis": {
"code": "0x040506",
"config": {
"babe": {
"authorities": [],
"epochConfig": {
"allowed_slots": "PrimaryAndSecondaryVRFSlots",
"c": [
1,
4
]
}
},
"balances": {
"balances": []
},
"bizinikiwiTest": {
"authorities": []
},
"system": {}
}
}
}
}
@@ -0,0 +1,38 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"codeSubstitutes": {},
"genesis": {
"raw": {
"top": {
"0x00771836bebdd29870ff246d305c578c4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x00771836bebdd29870ff246d305c578c5e0621c4869aa60c02be9adcc98a0d1d": "0x0cd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d1cbd2d43530a44705ad088af313e18f80b53ef16b36177cd4b77b846f2a5f07c186e1bafbb1430668c95d89b77217a402a74f64c3e103137b69e95e4b6e06b1e",
"0x1cb6f36e027abb2091cfb5110ab5087f4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x1cb6f36e027abb2091cfb5110ab5087f66e8f035c8adbe7f1547b43c51e6f8a4": "0x00000000",
"0x1cb6f36e027abb2091cfb5110ab5087fdc6b171b77304263c292cc3ea5ed31ef": "0x0100000000000000040000000000000002",
"0x26aa394eea5630e07c48ae0c9558cef74e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef75684a022a34dd8bfa2baaf44f172b710": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef78a42f33323cb5ced3b44dd825fda9fcc": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a44704b568d21667356a5a050c118746bb1bdbcacd6ac9340000000000000000": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a7fd6c28836b9a28522dc924110cf439": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da92c2a60ec6dd16cd8ab911865ecf7555b186e1bafbb1430668c95d89b77217a402a74f64c3e103137b69e95e4b6e06b1e": "0x00000000000000000000000001000000000000000080e03779c311000000000000000000000000000000000000000000000000000000000000000080",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da94f9aea1afa791265fae359272badc1cf8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48": "0x00000000000000000000000001000000000000000080c6a47e8d03000000000000000000000000000000000000000000000000000000000000000080",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9b0edae20838083f2cde1c4080db8cf8090b5ab205c6974c9ea841be688864633dc9ca8a357843eeacf2314649965fe22": "0x00000000000000000000000001000000000000000080c6a47e8d03000000000000000000000000000000000000000000000000000000000000000080",
"0x26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8": "0x0000",
"0x3a636f6465": "0x040506",
"0x3a65787472696e7369635f696e646578": "0x00000000",
"0xc2261276cc9d1f8598ea4b6a74b15c2f4e7b9012096b41c4eb3aaf947f6ea429": "0x0100",
"0xc2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80": "0x00806d8176de1800"
},
"childrenDefault": {}
}
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,39 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"relay_chain": "pezkuwichain-local",
"custom_field": "custom_value",
"codeSubstitutes": {},
"genesis": {
"runtimeGenesis": {
"code": "0x010203",
"config": {
"babe": {
"authorities": [],
"epochConfig": {
"allowed_slots": "PrimaryAndSecondaryVRFSlots",
"c": [
1,
4
]
}
},
"balances": {
"balances": []
},
"bizinikiwiTest": {
"authorities": []
},
"system": {}
}
}
}
}
@@ -0,0 +1,38 @@
{
"name": "Custom",
"id": "custom",
"chainType": "Live",
"bootNodes": [],
"telemetryEndpoints": null,
"protocolId": null,
"properties": {
"tokenDecimals": 12,
"tokenSymbol": "UNIT"
},
"codeSubstitutes": {},
"genesis": {
"raw": {
"top": {
"0x00771836bebdd29870ff246d305c578c4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x00771836bebdd29870ff246d305c578c5e0621c4869aa60c02be9adcc98a0d1d": "0x0cd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d1cbd2d43530a44705ad088af313e18f80b53ef16b36177cd4b77b846f2a5f07c186e1bafbb1430668c95d89b77217a402a74f64c3e103137b69e95e4b6e06b1e",
"0x1cb6f36e027abb2091cfb5110ab5087f4e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x1cb6f36e027abb2091cfb5110ab5087f66e8f035c8adbe7f1547b43c51e6f8a4": "0x00000000",
"0x1cb6f36e027abb2091cfb5110ab5087fdc6b171b77304263c292cc3ea5ed31ef": "0x0100000000000000040000000000000002",
"0x26aa394eea5630e07c48ae0c9558cef74e7b9012096b41c4eb3aaf947f6ea429": "0x0000",
"0x26aa394eea5630e07c48ae0c9558cef75684a022a34dd8bfa2baaf44f172b710": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef78a42f33323cb5ced3b44dd825fda9fcc": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a44704b568d21667356a5a050c118746bb1bdbcacd6ac9340000000000000000": "0x4545454545454545454545454545454545454545454545454545454545454545",
"0x26aa394eea5630e07c48ae0c9558cef7a7fd6c28836b9a28522dc924110cf439": "0x01",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da92c2a60ec6dd16cd8ab911865ecf7555b186e1bafbb1430668c95d89b77217a402a74f64c3e103137b69e95e4b6e06b1e": "0x00000000000000000000000001000000000000000080e03779c311000000000000000000000000000000000000000000000000000000000000000080",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da94f9aea1afa791265fae359272badc1cf8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48": "0x00000000000000000000000001000000000000000080c6a47e8d03000000000000000000000000000000000000000000000000000000000000000080",
"0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9b0edae20838083f2cde1c4080db8cf8090b5ab205c6974c9ea841be688864633dc9ca8a357843eeacf2314649965fe22": "0x00000000000000000000000001000000000000000080c6a47e8d03000000000000000000000000000000000000000000000000000000000000000080",
"0x26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8": "0x0000",
"0x3a636f6465": "0x010203",
"0x3a65787472696e7369635f696e646578": "0x00000000",
"0xc2261276cc9d1f8598ea4b6a74b15c2f4e7b9012096b41c4eb3aaf947f6ea429": "0x0100",
"0xc2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80": "0x00806d8176de1800"
},
"childrenDefault": {}
}
}
}
@@ -0,0 +1,40 @@
{
"babe": {
"authorities": [
["5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", 1],
["5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL", 1],
["5CcjiSgG2KLuKAsqkE2Nak1S2FbAcMr5SxRASUuwR3zSNV2b", 1]
],
"epochConfig": {
"allowed_slots": "PrimaryAndSecondaryVRFSlots",
"c": [
2,
4
]
}
},
"balances": {
"balances": [
[
"5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
2000000000000000
],
[
"5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y",
2000000000000000
],
[
"5CcjiSgG2KLuKAsqkE2Nak1S2FbAcMr5SxRASUuwR3zSNV2b",
5000000000000000
]
]
},
"bizinikiwiTest": {
"authorities": [
"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL",
"5CcjiSgG2KLuKAsqkE2Nak1S2FbAcMr5SxRASUuwR3zSNV2b"
]
},
"system": {}
}
@@ -0,0 +1,25 @@
{
"balances": {
"balances": [
[
"5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
1000000000000000
],
[
"5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y",
1000000000000000
],
[
"5CcjiSgG2KLuKAsqkE2Nak1S2FbAcMr5SxRASUuwR3zSNV2b",
5000000000000000
]
]
},
"bizinikiwiTest": {
"authorities": [
"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL",
"5CcjiSgG2KLuKAsqkE2Nak1S2FbAcMr5SxRASUuwR3zSNV2b"
]
}
}
@@ -0,0 +1,419 @@
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
use std::fs::File;
use clap::Parser;
use cmd_lib::spawn_with_output;
use pretty_assertions::assert_eq;
use pezsc_chain_spec::update_code_in_json_chain_spec;
use serde_json::{from_reader, from_str, Value};
use pezstaging_chain_spec_builder::ChainSpecBuilder;
// note: the runtime path will not be read, runtime code will be set directly, to avoid hassle with
// creating the wasm file or providing a valid existing path during test execution.
const DUMMY_PATH: &str = "fake-runtime-path";
const OUTPUT_FILE: &str = "/tmp/chain_spec_builder.test_output_file.json";
// Used for running commands visually pleasing in doc tests.
macro_rules! bash(
( chain-spec-builder $($a:tt)* ) => {{
let bin_path = env!("CARGO_BIN_EXE_chain-spec-builder");
spawn_with_output!(
$bin_path $($a)*
)
.expect("a process running. qed")
.wait_with_output()
.expect("to get output. qed.")
}}
);
// Used specifically in docs tests.
fn doc_assert(output: String, expected_output_path: &str, remove_code: bool) {
let expected: Value =
from_reader(File::open(expected_output_path).unwrap()).expect("a valid JSON. qed.");
let output = if remove_code {
let mut output: Value = from_str(output.as_str()).expect("a valid JSON. qed.");
// Remove code sections gracefully for both `plain` & `raw`.
output
.get_mut("genesis")
.and_then(|inner| inner.get_mut("runtimeGenesis"))
.and_then(|inner| inner.as_object_mut())
.and_then(|inner| inner.remove("code"));
output
.get_mut("genesis")
.and_then(|inner| inner.get_mut("raw"))
.and_then(|inner| inner.get_mut("top"))
.and_then(|inner| inner.as_object_mut())
.and_then(|inner| inner.remove("0x3a636f6465"));
output
} else {
from_str::<Value>(output.as_str()).expect("a valid JSON. qed.")
};
assert_eq!(output, expected);
}
/// Asserts that the JSON in output file matches the JSON in expected file.
///
/// This helper function reads the JSON content from the file at `OUTPUT_FILE + suffix` path. If the
/// `overwrite_code` flag is set, it updates the output chain specification with a sample code
/// vector `[1, 2, 3]` (to avoid bulky *expected* files), and then compares it against the JSON
/// content from the given `expected_path`.
fn assert_output_eq_expected(overwrite_code: bool, output_suffix: &str, expected_path: &str) {
let path = OUTPUT_FILE.to_string() + output_suffix;
let mut output: serde_json::Value =
serde_json::from_reader(File::open(path.clone()).unwrap()).unwrap();
if overwrite_code {
update_code_in_json_chain_spec(&mut output, &vec![1, 2, 3]);
}
let expected: serde_json::Value =
serde_json::from_reader(File::open(expected_path).unwrap()).unwrap();
assert_eq!(expected, output);
std::fs::remove_file(path).expect("Failed to delete file");
}
fn get_builder(suffix: &str, command_args: Vec<&str>) -> ChainSpecBuilder {
let path = OUTPUT_FILE.to_string() + suffix;
let mut base_args = vec!["dummy", "-c", path.as_str()];
base_args.extend(command_args);
ChainSpecBuilder::parse_from(base_args)
}
#[test]
fn test_create_default() {
const SUFFIX: &str = "00";
let mut builder = get_builder(SUFFIX, vec!["create", "-r", DUMMY_PATH, "default"]);
builder.set_create_cmd_runtime_code(bizinikiwi_test_runtime::WASM_BINARY.unwrap().into());
builder.run().unwrap();
assert_output_eq_expected(true, SUFFIX, "tests/expected/create_default.json");
}
#[test]
fn test_create_with_named_preset() {
const SUFFIX: &str = "01";
let mut builder =
get_builder(SUFFIX, vec!["create", "-r", DUMMY_PATH, "named-preset", "staging"]);
builder.set_create_cmd_runtime_code(bizinikiwi_test_runtime::WASM_BINARY.unwrap().into());
builder.run().unwrap();
assert_output_eq_expected(true, SUFFIX, "tests/expected/create_with_named_preset.json");
}
#[test]
fn test_create_with_patch() {
const SUFFIX: &str = "02";
let mut builder =
get_builder(SUFFIX, vec!["create", "-r", DUMMY_PATH, "patch", "tests/input/patch.json"]);
builder.set_create_cmd_runtime_code(bizinikiwi_test_runtime::WASM_BINARY.unwrap().into());
builder.run().unwrap();
assert_output_eq_expected(true, SUFFIX, "tests/expected/create_with_patch.json");
}
#[test]
fn test_create_with_full() {
const SUFFIX: &str = "03";
let mut builder =
get_builder(SUFFIX, vec!["create", "-r", DUMMY_PATH, "full", "tests/input/full.json"]);
builder.set_create_cmd_runtime_code(bizinikiwi_test_runtime::WASM_BINARY.unwrap().into());
builder.run().unwrap();
assert_output_eq_expected(true, SUFFIX, "tests/expected/create_with_full.json");
}
#[test]
fn test_create_with_params() {
const SUFFIX: &str = "04";
let mut builder = get_builder(
SUFFIX,
vec!["create", "-r", DUMMY_PATH, "-n", "test_chain", "-i", "100", "-t", "live", "default"],
);
builder.set_create_cmd_runtime_code(bizinikiwi_test_runtime::WASM_BINARY.unwrap().into());
builder.run().unwrap();
assert_output_eq_expected(true, SUFFIX, "tests/expected/create_with_params.json");
}
#[test]
fn test_create_teyrchain() {
const SUFFIX: &str = "05";
let mut builder = get_builder(
SUFFIX,
vec![
"create",
"-r",
DUMMY_PATH,
"-n",
"test_chain",
"-i",
"100",
"-t",
"live",
"--relay-chain",
"pezkuwichain-local",
"default",
],
);
builder.set_create_cmd_runtime_code(bizinikiwi_test_runtime::WASM_BINARY.unwrap().into());
builder.run().unwrap();
assert_output_eq_expected(true, SUFFIX, "tests/expected/create_teyrchain.json");
}
#[test]
fn test_create_raw_storage() {
const SUFFIX: &str = "06";
let mut builder = get_builder(
SUFFIX,
vec!["create", "-r", DUMMY_PATH, "-s", "patch", "tests/input/patch.json"],
);
builder.set_create_cmd_runtime_code(bizinikiwi_test_runtime::WASM_BINARY.unwrap().into());
builder.run().unwrap();
assert_output_eq_expected(true, SUFFIX, "tests/expected/create_raw_storage.json");
}
#[test]
fn test_update_code() {
const SUFFIX: &str = "07";
let builder = get_builder(
SUFFIX,
vec!["update-code", "tests/input/chain_spec_plain.json", "tests/input/code_040506.blob"],
);
builder.run().unwrap();
assert_output_eq_expected(false, SUFFIX, "tests/expected/update_code.json");
}
#[test]
fn test_update_code_raw() {
const SUFFIX: &str = "08";
let builder = get_builder(
SUFFIX,
vec!["update-code", "tests/input/chain_spec_raw.json", "tests/input/code_040506.blob"],
);
builder.run().unwrap();
assert_output_eq_expected(false, SUFFIX, "tests/expected/update_code_raw.json");
}
#[test]
fn test_convert_to_raw() {
const SUFFIX: &str = "09";
let builder =
get_builder(SUFFIX, vec!["convert-to-raw", "tests/input/chain_spec_conversion_test.json"]);
builder.run().unwrap();
assert_output_eq_expected(true, SUFFIX, "tests/expected/convert_to_raw.json");
}
#[test]
fn test_add_code_substitute() {
const SUFFIX: &str = "10";
let builder = get_builder(
SUFFIX,
vec![
"add-code-substitute",
"tests/input/chain_spec_plain.json",
"tests/input/code_040506.blob",
"100",
],
);
builder.run().unwrap();
assert_output_eq_expected(true, SUFFIX, "tests/expected/add_code_substitute.json");
}
#[test]
fn test_create_with_properties() {
const SUFFIX: &str = "11";
let mut builder = get_builder(
SUFFIX,
vec![
"create",
"-r",
DUMMY_PATH,
"--properties",
"tokenSymbol=TEST,tokenDecimals=6",
"--properties",
"isEthereum=false",
"--properties",
"ss58Prefix=42",
"default",
],
);
builder.set_create_cmd_runtime_code(bizinikiwi_test_runtime::WASM_BINARY.unwrap().into());
builder.run().unwrap();
assert_output_eq_expected(true, SUFFIX, "tests/expected/create_with_properties.json");
}
#[docify::export_content]
fn cmd_create_default(runtime_path: &str) -> String {
bash!(
chain-spec-builder -c "/dev/stdout" create -r $runtime_path default
)
}
#[test]
fn create_default() {
doc_assert(
cmd_create_default(
bizinikiwi_test_runtime::WASM_BINARY_PATH.expect("to be a valid path. qed"),
),
"tests/expected/doc/create_default.json",
true,
);
}
#[docify::export_content]
fn cmd_display_default_preset(runtime_path: &str) -> String {
bash!(
chain-spec-builder display-preset -r $runtime_path
)
}
#[test]
fn display_default_preset() {
doc_assert(
cmd_display_default_preset(
bizinikiwi_test_runtime::WASM_BINARY_PATH.expect("to be a valid path. qed."),
),
"tests/expected/doc/display_preset.json",
false,
);
}
#[docify::export]
fn cmd_display_preset(runtime_path: &str) -> String {
bash!(
chain-spec-builder display-preset -r $runtime_path -p "staging"
)
}
#[test]
fn display_preset() {
doc_assert(
cmd_display_preset(
bizinikiwi_test_runtime::WASM_BINARY_PATH.expect("to be a valid path. qed"),
),
"tests/expected/doc/display_preset_staging.json",
false,
);
}
#[docify::export_content]
fn cmd_list_presets(runtime_path: &str) -> String {
bash!(
chain-spec-builder list-presets -r $runtime_path
)
}
#[test]
fn list_presets() {
doc_assert(
cmd_list_presets(
bizinikiwi_test_runtime::WASM_BINARY_PATH.expect("to be a valid path. qed"),
),
"tests/expected/doc/list_presets.json",
false,
);
}
#[docify::export_content]
fn cmd_create_with_named_preset(runtime_path: &str) -> String {
bash!(
chain-spec-builder -c "/dev/stdout" create --relay-chain "dev" -r $runtime_path named-preset "staging"
)
}
#[test]
fn create_with_named_preset() {
doc_assert(
cmd_create_with_named_preset(
bizinikiwi_test_runtime::WASM_BINARY_PATH.expect("to be a valid path. qed"),
),
"tests/expected/doc/create_with_named_preset_staging.json",
true,
)
}
#[docify::export_content]
fn cmd_create_with_patch_raw(runtime_path: &str) -> String {
bash!(
chain-spec-builder -c "/dev/stdout" create -s -r $runtime_path patch "tests/input/patch.json"
)
}
#[test]
fn create_with_patch_raw() {
doc_assert(
cmd_create_with_patch_raw(
bizinikiwi_test_runtime::WASM_BINARY_PATH.expect("to be a valid path. qed"),
),
"tests/expected/doc/create_with_patch_raw.json",
true,
);
}
#[docify::export_content]
fn cmd_create_with_patch_plain(runtime_path: &str) -> String {
bash!(
chain-spec-builder -c "/dev/stdout" create -r $runtime_path patch "tests/input/patch.json"
)
}
#[test]
fn create_with_patch_plain() {
doc_assert(
cmd_create_with_patch_plain(
bizinikiwi_test_runtime::WASM_BINARY_PATH.expect("to be a valid path. qed"),
),
"tests/expected/doc/create_with_patch_plain.json",
true,
);
}
#[docify::export_content]
fn cmd_create_full_plain(runtime_path: &str) -> String {
bash!(
chain-spec-builder -c "/dev/stdout" create -r $runtime_path full "tests/input/full.json"
)
}
#[test]
fn create_full_plain() {
doc_assert(
cmd_create_full_plain(
bizinikiwi_test_runtime::WASM_BINARY_PATH.expect("to be a valid path. qed"),
),
"tests/expected/doc/create_full_plain.json",
true,
);
}
#[docify::export_content]
fn cmd_create_full_raw(runtime_path: &str) -> String {
bash!(
chain-spec-builder -c "/dev/stdout" create -s -r $runtime_path full "tests/input/full.json"
)
}
#[test]
fn create_full_raw() {
doc_assert(
cmd_create_full_raw(
bizinikiwi_test_runtime::WASM_BINARY_PATH.expect("to be a valid path. qed"),
),
"tests/expected/doc/create_full_raw.json",
true,
);
}