mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
dfff8fc228
added lock payment added fulfilmentOperators added declarative way to describe dependencies added service agreement termination
17 lines
624 B
TypeScript
17 lines
624 B
TypeScript
import MethodReflection from "../models/MethodReflection"
|
|
import GenericContract from "./contracts/GenericContract"
|
|
|
|
export default class ContractReflector {
|
|
|
|
public static async reflectContractMethod(contractName: string, methodName: string): Promise<MethodReflection> {
|
|
const contract = await GenericContract.getInstance(contractName)
|
|
return {
|
|
contractName,
|
|
methodName,
|
|
address: contract.getAddress(),
|
|
signature: contract.getSignatureOfMethod(methodName),
|
|
inputs: contract.getInputsOfMethod(methodName),
|
|
} as MethodReflection
|
|
}
|
|
}
|