@@ -18,7 +18,7 @@ const reaction = descriptorForAnnouncementType(AnnouncementType.Reaction).parque
18
18
const reply = descriptorForAnnouncementType ( AnnouncementType . Reply ) . parquetSchema ;
19
19
const tombstone = descriptorForAnnouncementType ( AnnouncementType . Tombstone ) . parquetSchema ;
20
20
const update = descriptorForAnnouncementType ( AnnouncementType . Update ) . parquetSchema ;
21
- const userAttributeSet = descriptorForAnnouncementType ( AnnouncementType . Update ) . parquetSchema ;
21
+ const userAttributeSet = descriptorForAnnouncementType ( AnnouncementType . UserAttributeSet ) . parquetSchema ;
22
22
const dsnpContentAttributeSet = descriptorForAnnouncementType ( AnnouncementType . DSNPContentAttributeSet ) . parquetSchema ;
23
23
const externalContentAttributeSet = descriptorForAnnouncementType (
24
24
AnnouncementType . ExternalContentAttributeSet ,
@@ -104,7 +104,7 @@ export const schemas = new Map<SchemaName, Deploy>([
104
104
modelType : "Parquet" ,
105
105
payloadLocation : "IPFS" ,
106
106
settings : [ ] ,
107
- dsnpVersion : "1.2 " ,
107
+ dsnpVersion : "1.3 " ,
108
108
} ,
109
109
] ,
110
110
[
@@ -114,7 +114,7 @@ export const schemas = new Map<SchemaName, Deploy>([
114
114
modelType : "Parquet" ,
115
115
payloadLocation : "IPFS" ,
116
116
settings : [ ] ,
117
- dsnpVersion : "1.2 " ,
117
+ dsnpVersion : "1.3 " ,
118
118
} ,
119
119
] ,
120
120
[
@@ -124,7 +124,7 @@ export const schemas = new Map<SchemaName, Deploy>([
124
124
modelType : "Parquet" ,
125
125
payloadLocation : "IPFS" ,
126
126
settings : [ ] ,
127
- dsnpVersion : "1.2 " ,
127
+ dsnpVersion : "1.3 " ,
128
128
} ,
129
129
] ,
130
130
[
@@ -144,7 +144,7 @@ export const schemas = new Map<SchemaName, Deploy>([
144
144
modelType : "Parquet" ,
145
145
payloadLocation : "IPFS" ,
146
146
settings : [ ] ,
147
- dsnpVersion : "1.2 " ,
147
+ dsnpVersion : "1.3 " ,
148
148
} ,
149
149
] ,
150
150
[
@@ -250,45 +250,37 @@ const chainMapping: { [genesisHash: string]: SchemaMapping } = {};
250
250
export const GENESIS_HASH_TESTNET_PASEO = "0x203c6838fc78ea3660a2f298a58d859519c72a5efdc0f194abd6f0d5ce1838e0" ;
251
251
export const GENESIS_HASH_MAINNET = "0x4a587bf17a404e3572747add7aab7bbe56e805a5479c6c436f07f36fcc8d3ae1" ;
252
252
253
- chainMapping [ GENESIS_HASH_TESTNET_PASEO ] = {
254
- tombstone : { "1.2" : 1 } ,
255
- broadcast : { "1.2" : 2 } ,
256
- reply : { "1.2" : 3 } ,
257
- reaction : { "1.1" : 4 } ,
258
- update : { "1.2" : 6 } ,
259
- "public-key-key-agreement" : { "1.2" : 7 } ,
260
- "public-follows" : { "1.2" : 8 } ,
261
- "private-follows" : { "1.2" : 9 } ,
262
- "private-connections" : { "1.2" : 10 } ,
263
- "public-key-assertion-method" : { "1.3" : 11 } ,
264
- "profile-resources" : { "1.3" : 570 } ,
265
- "user-attribute-set" : { "1.3" : 579 } ,
266
- "dsnp-content-attribute-set" : { "1.3" : 580 } ,
267
- "ext-content-attribute-set" : { "1.3" : 581 } ,
268
- } ;
253
+ /*
254
+ * As schemas are approved on mainnet they will be added to the Frequency source code in
255
+ * https://github.com/frequency-chain/frequency/blob/main/resources/genesis-schemas.json
256
+ * and also backported so that testnet contains all approved schemas.
257
+ */
269
258
chainMapping [ GENESIS_HASH_MAINNET ] = {
270
- tombstone : { "1.2" : 1 } ,
271
- broadcast : { "1.2" : 2 } ,
272
- reply : { "1.2" : 3 } ,
259
+ tombstone : { "1.2" : 1 , "1.3" : 16 } ,
260
+ broadcast : { "1.2" : 2 , "1.3" : 17 } ,
261
+ reply : { "1.2" : 3 , "1.3" : 18 } ,
273
262
reaction : { "1.1" : 4 } ,
274
- update : { "1.2" : 5 } ,
263
+ update : { "1.2" : 5 , "1.3" : 19 } ,
275
264
"public-key-key-agreement" : { "1.2" : 7 } ,
276
265
"public-follows" : { "1.2" : 8 } ,
277
266
"private-follows" : { "1.2" : 9 } ,
278
267
"private-connections" : { "1.2" : 10 } ,
279
- // "public-key-assertion-method": { "1.3": TBD },
280
- // "profile-resources": { "1.3": TBD },
281
- // "user-attribute-set": { "1.3": TBD },
282
- // "dsnp-content-attribute-set": { "1.3": TBD },
283
- // "ext-content-attribute-set": { "1.3": TBD },
268
+ "user-attribute-set" : { "1.3" : 11 } , // this will become 20
269
+ "dsnp-content-attribute-set" : { "1.3" : 12 } ,
270
+ "ext-content-attribute-set" : { "1.3" : 13 } ,
271
+ "public-key-assertion-method" : { "1.3" : 14 } ,
272
+ "profile-resources" : { "1.3" : 15 } ,
273
+ } ;
274
+
275
+ // Schemas that exist on testnet but not yet on mainnet should be appended here
276
+ chainMapping [ GENESIS_HASH_TESTNET_PASEO ] = {
277
+ ...chainMapping [ GENESIS_HASH_MAINNET ] ,
278
+ } ;
279
+
280
+ // Schemas that exist only on a local/development chain should be appended here
281
+ chainMapping [ "default" ] = {
282
+ ...chainMapping [ GENESIS_HASH_MAINNET ] ,
284
283
} ;
285
- /*
286
- * Schemas in "default" deployments (e.g. to a clean local node) are
287
- * generally the same as mainnet. As schemas are approved on mainnet
288
- * they will be added to the Frequency source code in
289
- * https://github.com/frequency-chain/frequency/blob/main/resources/genesis-schemas.json.
290
- */
291
- chainMapping [ "default" ] = JSON . parse ( JSON . stringify ( chainMapping [ GENESIS_HASH_MAINNET ] ) ) ;
292
284
293
285
/**
294
286
* Gets the schemaId from the Frequency instance configured for
0 commit comments