MCPcopy Create free account
hub / github.com/everx-labs/everdev / parseArray

Method parseArray

src/controllers/contract/param-parser.ts:92–103  ·  view source on GitHub ↗
(param: AbiParam)

Source from the content-addressed store, hash-verified

90 }
91
92 parseArray(param: AbiParam): any[] {
93 const item = JSON.parse(JSON.stringify(param)) as AbiParam
94 const value = []
95
96 item.type = param.type.slice(0, -2)
97 this.expect("[", param)
98 while (!this.pass("]")) {
99 value.push(this.parseParam(item))
100 this.pass(",")
101 }
102 return value
103 }
104
105 parseParam(param: AbiParam): any {
106 if (param.type.endsWith("[]")) {

Callers 1

parseParamMethod · 0.95

Calls 4

expectMethod · 0.95
passMethod · 0.95
parseParamMethod · 0.95
parseMethod · 0.80

Tested by

no test coverage detected