---
description: Send transactions and interact with contracts using Cast.
---

## Sending transactions

Cast sends transactions to deploy contracts, call functions, and transfer value. Transactions require a signer (private key, keystore, or hardware wallet).

### Basic transaction

:::code-group

```bash [Send ETH]
$ cast send $TO --value 1ether --private-key $PRIVATE_KEY
```

```bash [Call function]
$ cast send $CONTRACT "transfer(address,uint256)" $TO 1000000000000000000 --private-key $PRIVATE_KEY
```

```bash [Deploy contract]
$ cast send --create $BYTECODE --private-key $PRIVATE_KEY
```

:::

### Signing options

::::steps

#### Private key

Pass directly (not recommended for production):

```bash
$ cast send $CONTRACT "mint()" --private-key $PRIVATE_KEY
```

#### Keystore file

Use an encrypted keystore:

```bash
$ cast send $CONTRACT "mint()" --keystore ~/.foundry/keystores/my-key --password $PASSWORD
```

Or prompt for password:

```bash
$ cast send $CONTRACT "mint()" --keystore ~/.foundry/keystores/my-key --interactive
```

#### Hardware wallet

Use Ledger or Trezor:

```bash
$ cast send $CONTRACT "mint()" --ledger
$ cast send $CONTRACT "mint()" --trezor
```

#### Browser wallet

Connect an injected wallet through Foundry's local browser bridge:

```bash
$ cast send $CONTRACT "mint()" --rpc-url $RPC_URL --browser
```

See [Browser Wallet Signing](/guides/browser-wallet) for the approval flow, network checks, and agent handoff guidance.

#### AWS KMS

Use a key stored in AWS KMS:

```bash
$ cast send $CONTRACT "mint()" --aws
```

::::

### Transaction parameters

:::code-group

```bash [Gas limit]
$ cast send $CONTRACT "mint()" --gas-limit 100000 --private-key $KEY
```

```bash [Gas price (legacy)]
$ cast send $CONTRACT "mint()" --gas-price 20gwei --private-key $KEY
```

```bash [EIP-1559 fees]
$ cast send $CONTRACT "mint()" --priority-gas-price 1gwei --private-key $KEY
```

```bash [Nonce]
$ cast send $CONTRACT "mint()" --nonce 42 --private-key $KEY
```

```bash [With value]
$ cast send $CONTRACT "deposit()" --value 0.1ether --private-key $KEY
```

:::

### Waiting and confirmations

By default, `cast send` waits for the transaction to be mined.

:::code-group

```bash [Async (don't wait)]
$ cast send $CONTRACT "mint()" --private-key $KEY --async
```

```bash [Wait for confirmations]
$ cast send $CONTRACT "mint()" --private-key $KEY --confirmations 3
```

:::

### Transaction simulation

Preview a transaction without sending:

```bash [Simulate with cast call]
$ cast call $CONTRACT "transfer(address,uint256)" $TO $AMOUNT --from $SENDER
```

```bash [Estimate gas]
$ cast estimate $CONTRACT "transfer(address,uint256)" $TO $AMOUNT --from $SENDER
```

### Access lists (EIP-2930)

Create an access list to reduce gas costs:

```bash [Generate access list]
$ cast access-list $CONTRACT "transfer(address,uint256)" $TO $AMOUNT --from $SENDER
```

```bash [Send with access list]
$ cast send $CONTRACT "transfer(address,uint256)" $TO $AMOUNT --access-list $ACCESS_LIST --private-key $KEY
```

### Raw transactions

```bash [Sign without sending]
$ cast mktx $CONTRACT "mint()" --private-key $KEY
```

```bash [Publish a signed transaction]
$ cast publish $SIGNED_TX
```

### Blob transactions (EIP-4844)

Send transactions with blob data:

```bash [Send blob transaction]
$ cast send $CONTRACT "submitBlob()" --blob "0x..." --private-key $KEY
```
