EndpointResolver class

Resolves and validates endpoints from ABI.

Fast O(1) endpoint lookup with validation and type checking.

Constructors

EndpointResolver(SmartContractAbi abi, {Logger? logger})
Creates resolver with ABI definition.

Properties

abi SmartContractAbi
ABI definition containing all endpoints.
final
hashCode int
The hash code for this object.
no setterinherited
logger Logger?
Optional logger.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearCache() → void
Clears endpoint cache.
getAllEndpoints() List<AbiEndpoint>
Gets all endpoints defined in ABI.
getEndpoint(String name) AbiEndpoint
Gets endpoint by name.
getEndpointsByType(EndpointType type) List<AbiEndpoint>
Gets endpoints by type (view/mutable/payable).
getEndpointSummary(String endpointName) String
Gets human-readable summary of endpoint.
getInputCount(String endpointName) int
Gets number of input parameters.
getInputTypes(String endpointName) List<AbiParameter>
Gets input parameter types for endpoint.
getOutputCount(String endpointName) int
Gets number of output parameters.
getOutputTypes(String endpointName) List<AbiParameter>
Gets output parameter types for endpoint.
hasEndpoint(String name) bool
Checks if endpoint exists in ABI.
isOwnerOnly(String endpointName) bool
Checks if endpoint requires owner privileges.
isPayableFunction(String endpointName) bool
Checks if endpoint is payable.
isViewFunction(String endpointName) bool
Checks if endpoint is a view function.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validateArgumentCount(String endpointName, int argCount) → void
Validates argument count matches endpoint definition.
validateArgumentTypes(String endpointName, List<TypedValue> arguments) → void
Validates argument types match endpoint definition.
validateReturnCount(String endpointName, int returnDataCount) → void
Validates response data count against endpoint definition.

Operators

operator ==(Object other) bool
The equality operator.
inherited