# EVM Chain Signatures Contract

The EVM Chain Signatures Contract provides an implementation of the abstract `ChainSignatureContract` for EVM-compatible blockchains. It allows you to interact with the Chain Signatures contract deployed on EVM chains.

## Usage

```ts twoslash
import { contracts, constants } from 'signet.js'
import { createPublicClient, createWalletClient, http } from 'viem'
import { sepolia } from 'viem/chains'

const publicClient = createPublicClient({
  chain: sepolia,
  transport: http(),
})

const walletClient = createWalletClient({
  chain: sepolia,
  transport: http(),
})

const contract = new contracts.evm.ChainSignatureContract({
  publicClient,
  walletClient,
  contractAddress: constants.CONTRACT_ADDRESSES.ETHEREUM
    .TESTNET_DEV as `0x${string}`,
})
```

## Parameters

| Parameter              | Type            | Description                                                                     |
| ---------------------- | --------------- | ------------------------------------------------------------------------------- |
| `args`                 | `object`        | Configuration options for the contract                                          |
| `args.publicClient`    | `PublicClient`  | A Viem PublicClient instance for reading from the blockchain                    |
| `args.walletClient`    | `WalletClient`  | A Viem WalletClient instance for sending transactions                           |
| `args.contractAddress` | `Hex`           | The address of the deployed ChainSignatures contract                            |
| `args.rootPublicKey?`  | `RootPublicKey` | Optional root public key. If not provided, it will be derived from the contract |

## Working Examples

* [Unit tests](https://github.com/sig-net/signet.js/blob/main/tests/unit/evm/EVM.test.ts) — contract setup with hardhat
* [E2E tests](https://github.com/sig-net/signet.js/blob/main/tests/e2e/evm/EVM.e2e.test.ts) — contract setup with Sepolia
