#### **new ***ethers* . *utils* . **Interface**( abi )
Create a new **Interface** from a JSON string or object representing *abi*.
The *abi* may be a JSON string or the parsed Object (using JSON.parse) which is emitted by the [Solidity compiler](https://solidity.readthedocs.io/en/v0.6.0/using-the-compiler.html#output-description) (or compatible languages).
The *abi* may also be a [Human-Readable Abi](https://blog.ricmoo.com/human-readable-contract-abis-in-ethers-js-141902f4d917), which is a format the Ethers created to simplify manually typing the ABI into the source and so that a Contract ABI can also be referenced easily within the same source file.
Return the formatted **Interface**. If the format type is `json` a single string is returned, otherwise an Array of the human-readable strings is returned.
Fragment Access
---------------
#### *interface* . **getFunction**( fragment ) => *[FunctionFragment](/v5/api/utils/abi/fragments/#FunctionFragment)*
Returns the [FunctionFragment](/v5/api/utils/abi/fragments/#FunctionFragment) for *fragment* (see [Specifying Fragments](/v5/api/utils/abi/interface/#Interface--specifying-fragments)).
#### *interface* . **getEvent**( fragment ) => *[EventFragment](/v5/api/utils/abi/fragments/#EventFragment)*
Returns the [EventFragment](/v5/api/utils/abi/fragments/#EventFragment) for *fragment* (see [Specifying Fragments](/v5/api/utils/abi/interface/#Interface--specifying-fragments)).
Returns the encoded topic filter, which can be passed to getLogs for *fragment* (see [Specifying Fragments](/v5/api/utils/abi/interface/#Interface--specifying-fragments)) for the given *values*.
Each *topic* is a 32 byte (64 nibble) [DataHexString](/v5/api/utils/bytes/#DataHexString).
Returns the encoded data, which can be used as the data for a transaction for *fragment* (see [Specifying Fragments](/v5/api/utils/abi/interface/#Interface--specifying-fragments)) for the given *values*.
Returns the encoded result, which would normally be the response from a call for *fragment* (see [Specifying Fragments](/v5/api/utils/abi/interface/#Interface--specifying-fragments)) for the given *values*.
Most developers will not need this method, but may be useful for authors of a mock blockchain.
Decoding Data
-------------
#### *interface* . **decodeEventLog**( fragment , data [ , topics ] ) => *[Result](/v5/api/utils/abi/interface/#Result)*
Returns the decoded event values from an event log for *fragment* (see [Specifying Fragments](/v5/api/utils/abi/interface/#Interface--specifying-fragments)) for the given *data* with the optional *topics*.
If *topics* is not specified, placeholders will be inserted into the result.
#### *interface* . **decodeFunctionData**( fragment , data ) => *[Result](/v5/api/utils/abi/interface/#Result)*
Returns the decoded values from transaction data for *fragment* (see [Specifying Fragments](/v5/api/utils/abi/interface/#Interface--specifying-fragments)) for the given *data*.
Most developers will not need this method, but may be useful for debugging or inspecting transactions.
#### *interface* . **decodeFunctionResult**( fragment , data ) => *[Result](/v5/api/utils/abi/interface/#Result)*
Returns the decoded values from the result of a call for *fragment* (see [Specifying Fragments](/v5/api/utils/abi/interface/#Interface--specifying-fragments)) for the given *data*.