File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { bytesToHex } from '@ethereumjs/util'
2
- import { HistoryNetworkContentType , NetworkId } from 'portalnetwork'
2
+ import { HistoryNetworkContentType , NetworkId , PingPongCustomPayload } from 'portalnetwork'
3
3
4
4
import { isValidEnr } from '../util.js'
5
5
@@ -506,4 +506,22 @@ export const validators = {
506
506
}
507
507
}
508
508
} ,
509
+
510
+ get extension ( ) {
511
+ return ( params : any [ ] , index : number ) => {
512
+ if ( typeof params [ index ] !== 'number' ) {
513
+ return {
514
+ code : INVALID_PARAMS ,
515
+ message : `invalid argument ${ index } : argument must be a number` ,
516
+ }
517
+ }
518
+ if ( ! ( params [ index ] in PingPongCustomPayload ) ) {
519
+ return {
520
+ code : INVALID_PARAMS ,
521
+ message : `invalid argument ${ index } : argument must be a supported PingPong payload type` ,
522
+ }
523
+ }
524
+ }
525
+ } ,
509
526
}
527
+
You can’t perform that action at this time.
0 commit comments