# Call.make

Builds a raw call: no function and no ABI, the bytes as they are, to an address or as a
deployment.

## Usage

```ts
import { Call, type Address, type Hex } from "@ethect/core";

const calls = (treasury: Address.Address, bytecode: Hex.Hex) => [
  // a transfer of ether: no data
  Call.make({ to: treasury, value: 10n ** 17n }),
  // calldata you have already: from another library, from a relayer
  Call.make({ to: treasury, data: "0xd0e30db0", value: 1n }),
  // a deployment: no address, the creation code as data
  Call.make({ data: bytecode }),
];
```

A raw call is sent like any other, alone or beside calls of functions, with
[`Tx`](https://ethect.dev/reference/tx/).

## Returns

`Call.Call<Hex.Hex, never>`

A [call](https://ethect.dev/reference/call/) without a function. What it returns is bytes, and it declares no
error. It is plain data, and not an effect.

| A raw call holds | Value |
| --- | --- |
| `fn` | `undefined` |
| `to` | the address, or `undefined` for a deployment |
| `data` | the bytes, `"0x"` when none was given |
| `value` | the value, `0n` when none was given |
| `args` | `[]` |

## Parameters

### call.to (optional)

- **Type:** [`Address.Address`](https://ethect.dev/reference/primitives/address/)

The address called. Without it the call is a deployment: its data is the creation code of a
contract.

### call.data (optional)

- **Type:** [`Hex.Hex`](https://ethect.dev/reference/primitives/hex/)
- **Default:** `"0x"`

The calldata, as it is sent.

### call.value (optional)

- **Type:** `bigint`
- **Default:** `0n`

The ether the call carries, in wei.

## Behavior

- **Nothing is checked and nothing is sent.** The bytes are kept as you gave them.
- **A raw call is not read with `Call.read`.** It is not a call of a view. For an `eth_call`
  of raw bytes, use [`Eth.call`](https://ethect.dev/rpc/eth/call/).
- **A revert of a raw call is a plain [`Revert`](https://ethect.dev/reference/revert/).** It declares no error
  to decode it with.
