MCPcopy Create free account
hub / github.com/dharmaprotocol/dharmaOS / parseCallArgumentTypes

Method parseCallArgumentTypes

src/encoder.js:979–990  ·  view source on GitHub ↗
(definition)

Source from the content-addressed store, hash-verified

977
978 // TODO: support tuples (needed for advanced calls)
979 static parseCallArgumentTypes(definition) {
980 return definition.split(' ')[3] === 'fallback'
981 ? []
982 : definition
983 .split(" => ")[0]
984 .replace(":payable", "")
985 .split("(")[1]
986 .slice(0, -1)
987 .split(",")
988 .filter(x => x)
989 .map(x => typeof x === "string" ? x.trim(" ") : x);
990 }
991
992 static parseCallReturnTypes(definition) {
993 return (definition.split(' => ')[1] || '')

Calls

no outgoing calls

Tested by

no test coverage detected