# Function forArtifact

- forArtifact(artifact, settings): Promise<ContractDecoder>

- This function is asynchronous.

  Constructs a contract decoder for a given contract artifact.

  #### Parameters

  - ##### artifact: ContractObject

    The artifact for the contract.

    A contract constructor object may be substituted for the artifact, so if you're not sure which you're dealing with, it's OK.

  - ##### settings: DecoderSettings

    The [[DecoderSettings]] to use, including the provider; see the documentation for that type for more information.

  #### Returns Promise<ContractDecoder>

  - Defined in decoder/lib/index.ts:216

Generated using TypeDoc