# makeAuctionManagerDeploy

Creates a legacy `Deploy` for auction (staking) operations: delegate, undelegate, or redelegate.

## Import

```ts
import { makeAuctionManagerDeploy, AuctionManagerEntryPoint } from 'casper-js-sdk';
```

## Usage

```ts
// Delegate 500 CSPR
const deploy = makeAuctionManagerDeploy({
  contractEntryPoint: AuctionManagerEntryPoint.delegate,
  delegatorPublicKeyHex: privateKey.publicKey.toHex(),
  validatorPublicKeyHex: validatorPublicKey.toHex(),
  amount: '500000000000',   // 500 CSPR in motes
  paymentAmount: '2500000000',
  chainName: 'casper',
});

deploy.sign(privateKey);
const result = await rpcClient.putDeploy(deploy);
```

## Parameters

| Parameter | Type | Required | Default |
|---|---|---|---|
| `contractEntryPoint` | `AuctionManagerEntryPoint` | yes | - |
| `delegatorPublicKeyHex` | `string` | yes | - |
| `validatorPublicKeyHex` | `string` | yes | - |
| `amount` | `string` | yes | - |
| `newValidatorPublicKeyHex` | `string` | redelegate only | - |
| `paymentAmount` | `string` | no | - |
| `chainName` | `CasperNetworkName` | no | `'casper'` |
| `contractHash` | `string` | no | built-in mainnet hash |
| `ttl` | `number` | no | `1800000` |
| `timestamp` | `string` | no | now |
| `gasPrice` | `number` | no | `1` |

### contractEntryPoint

```ts
enum AuctionManagerEntryPoint {
  delegate = 'delegate',
  undelegate = 'undelegate',
  redelegate = 'redelegate',
}
```

## Return Value

`Deploy`

## Related

- [`makeAuctionManagerTransaction`](/utilities/makeAuctionManagerTransaction) - TransactionV1 format for 2.0 nodes
- [`NativeDelegateBuilder`](/builders/NativeDelegateBuilder)
- [`NativeUndelegateBuilder`](/builders/NativeUndelegateBuilder)
