# Evm.systemCall

Executes a protocol system call.

Runs a top-level call against a system contract, bypassing transaction validation, nonce updates, fees, refunds, and beneficiary rewards. The contract's code must already be in state: this does not deploy it. The handle resolves the same way a transaction's does.

A system call is not inspected, so it produces no trace even with an inspector installed.

## Imports

:::code-group
```ts [Named]
import { Evm } from 'ox/evm'
```

```ts [Entrypoint]
import * as Evm from 'ox/evm/Evm'
```
:::

## Examples

```ts twoslash
// @noErrors
import { Evm, ExecutedTx, System } from 'ox/evm'

// EIP-4788: record the beacon block root at the start of a block.
const executed = Evm.systemCall(evm, {
  address: System.beaconRoots,
  data: root,
})
ExecutedTx.commit(executed)
```

## Definition

```ts
function systemCall(
  evm: Evm<true>,
  options: systemCall.Options,
): ExecutedTx.ExecutedTx
```

**Source:** [src/evm/Evm.ts](https://github.com/wevm/ox/blob/main/src/evm/Evm.ts#L1243)

## Parameters

### evm

* **Type:** `Evm<true>`

EVM to use.

#### evm.'~async'

* **Type:** `asynchronous`

#### evm.'~chainId'

* **Type:** `bigint`

#### evm.'~config'

* **Type:** `{ block: Block; specId: "frontier" | "homestead" | "tangerine" | "spuriousDragon" | "byzantium" | "petersburg" | "istanbul" | "berlin" | "london" | "merge" | "shanghai" | "cancun" | "prague" | "osaka" | "amsterdam"; version?: Version; }`

The engine's current execution config.

Held so a setter can replace one half without discarding the other, since
the adapter's operation carries both.

#### evm.'~driver'

* **Type:** `asynchronous extends true ? Driver : undefined`

Drives the asynchronous source, when there is one.

#### evm.'~engine'

* **Type:** `Engine`

#### evm.block

* **Type:** `Block`

#### evm.specId

* **Type:** `"frontier" | "homestead" | "tangerine" | "spuriousDragon" | "byzantium" | "petersburg" | "istanbul" | "berlin" | "london" | "merge" | "shanghai" | "cancun" | "prague" | "osaka" | "amsterdam"`

#### evm.version

* **Type:** `Version`
* **Optional**

### options

* **Type:** `systemCall.Options`

Contract, calldata, and optionally the caller.

#### options.address

* **Type:** `abitype_Address`

System contract to call.

#### options.caller

* **Type:** `Address.Address | undefined`
* **Optional**

Account the call originates from.

#### options.data

* **Type:** `0x${string}`
* **Optional**

Calldata.

## Return Type

The executed system call.

`Promise<ExecutedTx.ExecutedTx>`
