EVM Chain Interactions

The EVMClient is the TypeScript SDK's interface for interacting with EVM-compatible blockchains. It provides a simple, powerful, and type-safe way to read data from and write data to your onchain contracts through the underlying EVM Read & Write Capabilities.

How it works

The TypeScript SDK uses manual ABI definitions with viem for contract interactions. This approach provides:

  • Type-safe ABI encoding/decoding with viem
  • No code generation required—just define ABIs as TypeScript constants
  • Full TypeScript type inference for contract calls
  • Synchronous-looking async operations with .result()
  • Built-in helpers like getNetwork(), bytesToHex(), and chain selectors

This approach gives you the flexibility of direct ABI handling with the type safety of TypeScript and viem's powerful utilities.

Guides

  • Onchain Read: Learn how to call view and pure functions on your smart contracts to read onchain state
  • Onchain Write: Learn how to call state-changing functions on your smart contracts to write data to the blockchain

Get the latest Chainlink content straight to your inbox.