Constructors
new Interface()
Parameters
Returns
Interface
Source
abi/interface.ts:342Properties
Methods
decodeErrorResult()
data (e.g. from an quai_call) for the specified error (see getError
for valid values for key).
Most developers should prefer the parseCallResult | parseCallResult method instead, which will
automatically detect a CALL_EXCEPTION and throw the corresponding error.
Parameters
Returns
Result
Source
abi/interface.ts:826decodeFunctionData()
data from a transaction tx.data for the function specified (see
getFunction for valid values for fragment).
Most developers should prefer the parseTransaction method instead, which will
automatically detect the fragment.
Parameters
Returns
Result
Source
abi/interface.ts:866decodeFunctionResult()
data (e.g. from an quai_call) for the specified function (see
getFunction for valid values for key).
Most developers should prefer the parseCallResult | parseCallResult method instead, which will
automatically detect a CALL_EXCEPTION and throw the corresponding error.
Parameters
Returns
Result
Source
abi/interface.ts:904encodeDeploy()
tx.data object for deploying the Contract with the values as the constructor arguments.
Parameters
Returns
string
Source
abi/interface.ts:815encodeErrorResult()
error (see getError for valid values for fragment) with the values.
This is generally not used by most developers, unless trying to mock a result from a Contract.
Parameters
Returns
string
Source
abi/interface.ts:849encodeFunctionData()
tx.data for a transaction that calls the function specified (see
getFunction for valid values for fragment) with the values.
Parameters
Returns
string
Source
abi/interface.ts:887encodeFunctionResult()
quai_call) for the specified function (see
getFunction for valid values for fragment) with values.
This is generally not used by most developers, unless trying to mock a result from a Contract.
Parameters
Returns
string
Source
abi/interface.ts:975forEachError()
callback, sorted by their name.
Parameters
Returns
void
Source
abi/interface.ts:789forEachEvent()
callback, sorted by their name.
Parameters
Returns
void
Source
abi/interface.ts:708forEachFunction()
callback, sorted by their name.
Parameters
Returns
void
Source
abi/interface.ts:595format()
minimal strings, which removes
parameter names and unneceesary spaces.
Parameters
Returns
string[]
Source
abi/interface.ts:438formatJson()
Returns
string
Source
abi/interface.ts:447getAbiCoder()
Returns
AbiCoder
Source
abi/interface.ts:457getError()
key, which may be an error selector, error name or error
signature that belongs to the ABI.
If values is provided, it will use the Typed API to handle ambiguous cases where multiple errors match by name.
If the key and values do not refine to a single error in the ABI, this will throw.
Parameters
Returns
null | ErrorFragment
Source
abi/interface.ts:727getEvent()
key, which may be a topic hash, event name or event
signature that belongs to the ABI.
If values is provided, it will use the Typed API to handle ambiguous cases where multiple events match by name.
If the key and values do not refine to a single event in the ABI, this will throw.
Parameters
Returns
null | EventFragment
Source
abi/interface.ts:701getEventName()
key, which may be a topic hash, event name or event signature that belongs to the ABI.
Parameters
Returns
string
Source
abi/interface.ts:676getFunction()
key, which may be a function selector, function name
or function signature that belongs to the ABI.
If values is provided, it will use the Typed API to handle ambiguous cases where multiple functions match by
name.
If the key and values do not refine to a single function in the ABI, this will throw.
Parameters
Returns
null | FunctionFragment
Source
abi/interface.ts:588getFunctionName()
key, which may be a function selector, function name or function signature that
belongs to the ABI.
Parameters
Returns
string
Source
abi/interface.ts:563hasEvent()
key (an event topic hash, event name or event signature) is present in the ABI.
In the case of an event name, the name may be ambiguous, so accessing the
EventFragment may require refinement.
Parameters
Returns
boolean
Source
abi/interface.ts:689hasFunction()
key (a function selector, function name or function signature) is present in the ABI.
In the case of a function name, the name may be ambiguous, so accessing the
FunctionFragment may require refinement.
Parameters
Returns
boolean
Source
abi/interface.ts:575parseError()
Parameters
Returns
null | ErrorDescription
Source
abi/interface.ts:1241parseLog()
Parameters
Returns
null | LogDescription
Source
abi/interface.ts:1221parseTransaction()
Parameters
Returns
null | TransactionDescription
Source
abi/interface.ts:1195from()
value.
The value may be provided as an existing Interface object, a JSON-encoded ABI or any
Human-Readable ABI format.
Parameters
Returns
Interface
