Function extractContractTypes
- extractContractTypes(contractMetadata): {
docs: string[];
id: number;
params: {
name: string;
typeId: undefined | number;
}[];
path: string[];
typeDef:
| {
type: "Struct";
value: {
fields: Field[];
};
}
| {
type: "Enum";
value: {
members: {
docs: string[];
fields: Field[];
index: number;
name: string;
}[];
};
}
| {
type: "Sequence";
value: {
typeParam: number;
};
}
| {
type: "SizedVec";
value: {
len: number;
typeParam: number;
};
}
| {
type: "Tuple";
value: {
fields: number[];
};
}
| {
type: "Primitive";
value: {
kind:
| "bool"
| "u8"
| "u128"
| "u64"
| "u32"
| "char"
| "str"
| "u16"
| "u256"
| "i8"
| "i16"
| "i32"
| "i64"
| "i128"
| "i256";
};
}
| {
type: "Compact";
value: {
typeParam: number;
};
}
| {
type: "BitSequence";
value: {
bitOrderType: number;
bitStoreType: number;
};
};
}[] Returns {
docs: string[];
id: number;
params: {
name: string;
typeId: undefined | number;
}[];
path: string[];
typeDef:
| {
type: "Struct";
value: {
fields: Field[];
};
}
| {
type: "Enum";
value: {
members: {
docs: string[];
fields: Field[];
index: number;
name: string;
}[];
};
}
| {
type: "Sequence";
value: {
typeParam: number;
};
}
| {
type: "SizedVec";
value: {
len: number;
typeParam: number;
};
}
| {
type: "Tuple";
value: {
fields: number[];
};
}
| {
type: "Primitive";
value: {
kind:
| "bool"
| "u8"
| "u128"
| "u64"
| "u32"
| "char"
| "str"
| "u16"
| "u256"
| "i8"
| "i16"
| "i32"
| "i64"
| "i128"
| "i256";
};
}
| {
type: "Compact";
value: {
typeParam: number;
};
}
| {
type: "BitSequence";
value: {
bitOrderType: number;
bitStoreType: number;
};
};
}[]