Skip to content

Commit

Permalink
add sign-auth reference
Browse files Browse the repository at this point in the history
  • Loading branch information
zerosnacks committed Feb 7, 2025
1 parent 3574884 commit b134ca4
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions src/reference/cast/cast-wallet-sign-auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## cast wallet sign-auth

### NAME

cast-wallet-sign-auth - Sign an EIP-7702 authorization.

### SYNOPSIS

`cast wallet sign-auth` _address_

### DESCRIPTION

Sign an [EIP-7702](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7702.md) authorization for an address.

Note that `sign-auth` uses the current nonce as it is not aware of whether you are going to broadcast the authorization from the same or a different sender.

If you are sending the transaction from the same address you will need to either pass the next nonce using the `--nonce` flag or alternatively use `cast send <to> --auth <address>` to sign and send directly.

### OPTIONS

{{#include ../common/wallet-options-raw.md}}

{{#include ../common/wallet-options-keystore.md}}

{{#include ../common/wallet-options-hardware.md}}

{{#include common-options.md}}

### EXAMPLES

1. Sign an EIP-7702 authorization using a keystore:

```sh
cast wallet sign-auth 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --keystore keystore.json --interactive
```

2. Sign an EIP-7702 authorization using a raw private key:
```sh
cast wallet sign-auth 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --private-key $PRIV_KEY
```

### SEE ALSO

[cast](./cast.md), [cast wallet](./cast-wallet.md)

0 comments on commit b134ca4

Please sign in to comment.