bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 8쪽
postDeployCtor: (instance: ContractInstanceWithAddress, wallet: Wallet) => TContract;
args?: any[];
constructorNameOrArtifact?: string | FunctionArtifact;
};
```
**Type Members:**
##### artifact[](#artifact "Direct link to artifact")
Build artifact of the contract being deployed.
**Type:** `ContractArtifact`
##### postDeployCtor[](#postdeployctor "Direct link to postDeployCtor")
Factory invoked after deployment to produce the typed contract handle.
**Type:** `(instance: ContractInstanceWithAddress, wallet: Wallet) => TContract`
##### args[](#args "Direct link to args")
Encoded constructor arguments for the contract. Defaults to `[]`.
**Type:** `any[]`
##### constructorNameOrArtifact[](#constructornameorartifact "Direct link to constructorNameOrArtifact")
Name (or full artifact) of the initializer to call.
**Type:** `string | FunctionArtifact`
#### DeployMethodPayload[](#deploymethodpayload "Direct link to DeployMethodPayload")
**Type:** Type Alias
Execution-payload metadata propagated through `request` / `send` / `simulate` / `profile`.
**Signature:**
```
export type DeployMethodPayload = {
authWitnesses?: AuthWitness[];
capsules?: Capsule[];
extraHashedArgs?: HashedValues[];
};
```
**Type Members:**
##### authWitnesses[](#authwitnesses "Direct link to authWitnesses")
Auth witnesses propagated to the deploy interaction.
**Type:** `AuthWitness[]`
##### capsules[](#capsules "Direct link to capsules")
Capsules propagated to the deploy interaction.
**Type:** `Capsule[]`
##### extraHashedArgs[](#extrahashedargs "Direct link to extraHashedArgs")
Extra hashed args propagated to the deploy interaction.
**Type:** `HashedValues[]`
#### RequestDeployOptions[](#requestdeployoptions "Direct link to RequestDeployOptions")
**Type:** Type Alias
Options for deploying a contract on the Aztec network. Controls publication and registration policy for this deployment.
**Signature:**
```
export type RequestDeployOptions = RequestInteractionOptions & {
skipClassPublication?: boolean;
skipInstancePublication?: boolean;
skipInitialization?: boolean;
skipRegistration?: boolean;
};
```
**Type Members:**
##### skipClassPublication[](#skipclasspublication "Direct link to skipClassPublication")
Skip contract class publication.
**Type:** `boolean`
##### skipInstancePublication[](#skipinstancepublication "Direct link to skipInstancePublication")
Skip publication, instead just privately initialize the contract.
**Type:** `boolean`
##### skipInitialization[](#skipinitialization "Direct link to skipInitialization")
Skip contract initialization.
**Type:** `boolean`
##### skipRegistration[](#skipregistration "Direct link to skipRegistration")
Skip contract registration in the wallet
**Type:** `boolean`
#### DeployOptionsWithoutWait[](#deployoptionswithoutwait "Direct link to DeployOptionsWithoutWait")
**Type:** Type Alias
Base deployment options without wait parameter.
**Signature:**
```
export type DeployOptionsWithoutWait = RequestDeployOptions &
Pick<SendInteractionOptionsWithoutWait, 'from' | 'fee' | 'additionalScopes'>;
```
#### DeployOptions[](#deployoptions "Direct link to DeployOptions")
**Type:** Type Alias
Extends the deployment options with the required parameters to send the transaction.
**Signature:**
```
export type DeployOptions<W extends InteractionWaitOptions = undefined> = DeployOptionsWithoutWait & {
wait?: W;
};
```
**Type Members:**
##### wait[](#wait "Direct link to wait")
Options for waiting for the transaction to be mined. - undefined (default): wait with default options and return the contract instance - WaitOpts: wait with custom options - NO\_WAIT: return TxHash immediately without waiting
**Type:** `W`
#### SimulateDeployOptions[](#simulatedeployoptions "Direct link to SimulateDeployOptions")
**Type:** Type Alias
Options for simulating the deployment of a contract Allows skipping certain validations and computing gas estimations
**Signature:**
```
export type SimulateDeployOptions = Omit<DeployOptionsWithoutWait, 'fee'> & {
fee?: InteractionFeeOptions;
skipTxValidation?: boolean;
skipFeeEnforcement?: boolean;
includeMetadata?: boolean;
};
```
**Type Members:**
##### fee[](#fee "Direct link to fee")
The fee options for the transaction.
**Type:** `InteractionFeeOptions`
##### skipTxValidation[](#skiptxvalidation "Direct link to skipTxValidation")
Simulate without checking for the validity of the resulting transaction, e.g. whether it emits any existing nullifiers.
**Type:** `boolean`
##### skipFeeEnforcement[](#skipfeeenforcement "Direct link to skipFeeEnforcement")
Whether to ensure the fee payer is not empty and has enough balance to pay for the fee.
**Type:** `boolean`
##### includeMetadata[](#includemetadata "Direct link to includeMetadata")
Whether to include metadata such as offchain effects and performance statistics (e.g. timing information of the different circuits and oracles) in the simulation result, instead of just the return value of the function
**Type:** `boolean`
#### DeployResultMined[](#deployresultmined "Direct link to DeployResultMined")
**Type:** Type Alias
Result of deploying a contract when waiting for mining (default case).
**Signature:**
```
export type DeployResultMined<TContract extends ContractBase> = {
contract: TContract;
instance: ContractInstanceWithAddress;
receipt: TxReceipt;
} & OffchainOutput;
```
**Type Members:**
##### contract[](#contract-2 "Direct link to contract")
The deployed contract instance.
**Type:** `TContract`
##### instance[](#instance "Direct link to instance")
The deployed contract instance with address and metadata.
**Type:** `ContractInstanceWithAddress`
##### receipt[](#receipt "Direct link to receipt")
The deploy transaction receipt.
**Type:** `TxReceipt`
#### DeployReturn[](#deployreturn "Direct link to DeployReturn")
**Type:** Type Alias
Conditional return type for deploy based on wait options.
**Signature:**
```
export type DeployReturn<TContract extends ContractBase, W extends InteractionWaitOptions> = W extends NoWait
? TxSendResultImmediate
: DeployResultMined<TContract>;
```
#### DeployMethod[](#deploymethod "Direct link to DeployMethod")
**Type:** Class
Umbrella type for a contract deployment interaction. `DeployMethod` is abstract: callers always interact with one of three concrete flavors — BoundDeployMethod, UniversalDeployMethod, or PendingDeployMethod — picked by DeployMethod.create based on the supplied DeployInstantiationOptions. The flavors only differ in their initial deployer-lock state; the full API (`request` / `send` / `simulate` / `profile` / `getInstance` / `getAddress` / `getPartialAddress` / `register` / `with`) lives on this base, so consumers can type variables as `DeployMethod<T>` and treat all three uniformly. The deployer (and therefore the deployed address) is locked once and never changes. Locking happens either at construction (via `deployer` or `universalDeploy: true` in the instantiation options) or lazily on the first `send` / `simulate` / `profile` call, which lock from `options.from`. Once locked: - The address is stable for the lifetime of this object. - Subsequent `send` / `simulate` / `profile` calls with a `from` that would imply a different deployer throw, to prevent silently deploying at a different address than `getAddress()` reported. - A locked universal deployer (`AztecAddress.ZERO`) is compatible with any `from`, since the address does not depend on the sender. Note that for some contracts, a tx is not required as part of its "creation": If there are no public functions, and if there are no initialization functions, then technically the contract has already been "created", and all of the contract's functions (private and utility) can be interacted-with immediately, without any "deployment tx".
**Extends:** `BaseContractInteraction`
#### Constructor[](#constructor-6 "Direct link to Constructor")
**Signature:**
```
protected constructor(
wallet: Wallet,
contract: DeployMethodContract<TContract>,
salt: Fr | undefined,
publicKeys: PublicKeys | undefined,
immutablesHash: Fr | undefined,
payload: DeployMethodPayload = {}
)
```
**Parameters:**
* `wallet`: `Wallet`
* `contract`: `DeployMethodContract<TContract>`
* `salt`: `Fr | undefined`
* `publicKeys`: `PublicKeys | undefined`
* `immutablesHash`: `Fr | undefined`
* `payload` (optional): `DeployMethodPayload`
#### Properties[](#properties-2 "Direct link to Properties")
##### salt[](#salt-1 "Direct link to salt")
Salt used in the address preimage.
**Type:** `Fr`
##### publicKeys[](#publickeys-1 "Direct link to publicKeys")
Public keys mixed into the address preimage.
**Type:** `PublicKeys`
##### immutablesHash[](#immutableshash-1 "Direct link to immutablesHash")
Immutables hash folded into the salted initialization hash.
**Type:** `Fr`
##### #instancePromise[](#instancepromise "Direct link to #instancePromise")
Cached instance promise; resolved once the deployer is known.
**Type:** `Promise<ContractInstanceWithAddress>`
##### #resolvedInstance[](#resolvedinstance "Direct link to #resolvedInstance")
Resolved value of `#instancePromise`, populated synchronously once the promise settles.
**Type:** `ContractInstanceWithAddress`
##### constructorArtifact[](#constructorartifact "Direct link to constructorArtifact")
Constructor function to call.
**Type:** `FunctionAbi | undefined`
##### artifact[](#artifact-1 "Direct link to artifact")
Build artifact of the contract being deployed.
**Type:** `ContractArtifact`
##### postDeployCtor[](#postdeployctor-1 "Direct link to postDeployCtor")
Factory invoked after deployment to produce the typed contract handle.
**Type:** `(instance: ContractInstanceWithAddress, wallet: Wallet) => TContract`
##### args[](#args-1 "Direct link to args")
Encoded constructor arguments for the contract.
**Type:** `any[]`
##### extraHashedArgs[](#extrahashedargs-1 "Direct link to extraHashedArgs")
Extra hashed args propagated through `with(...)` and into the deploy payload.
**Type:** `HashedValues[]`
#### Methods[](#methods-10 "Direct link to Methods")
##### getDeployerAddress[](#getdeployeraddress "Direct link to getDeployerAddress")
The address that will be mixed into the contract's address preimage. Owned returns the concrete deployer; Universal returns `AztecAddress.ZERO`; Pending throws unless a prior `send` / `simulate` / `profile` call has already locked it.
**Signature:**
```
public abstract getDeployerAddress(): AztecAddress
```
**Returns:**
`AztecAddress`
##### lockDeployer[](#lockdeployer "Direct link to lockDeployer")
Reconciles a send-time `from` with the deploy's deployer. Owned asserts an exact match; Universal accepts anything; Pending uses the first call to lock its deployer (transitioning into an Owned/Universal sibling), then defers to that sibling's assertion on subsequent calls. The "locks-or-asserts" name is intentional: only Pending mutates state, and only on its first invocation. Owned and Universal are pure assertions.
**Signature:**
```
public abstract lockDeployer(from: SendInteractionOptionsWithoutWait['from'] | undefined): void
```
**Parameters:**
* `from`: `SendInteractionOptionsWithoutWait['from'] | undefined`
* The send-time `from` value (`AztecAddress`, `NO_FROM`, or `undefined`).
**Returns:**
`void`
##### cloneInstantiation[](#cloneinstantiation "Direct link to cloneInstantiation")
Returns the DeployInstantiationOptions that match this flavor. Used by `with(...)` to spawn a sibling instance carrying the same lock state.
**Signature:**
```
public abstract cloneInstantiation(): DeployInstantiationOptions
```
**Returns:**
`DeployInstantiationOptions`
##### create[](#create "Direct link to create")
Constructs the right concrete `DeployMethod` flavor for the supplied instantiation options: - `{ deployer: <addr> }` → BoundDeployMethod - `{ universalDeploy: true }` → UniversalDeployMethod - neither set → PendingDeployMethod Mixing `deployer` and `universalDeploy` throws. Returns the umbrella `DeployMethod<T>` type so callers can use the result generically without narrowing.
**Signature:**
```
public static create<TContract extends ContractBase>(
wallet: Wallet,
contract: DeployMethodContract<TContract>,
instantiation: DeployInstantiationOptions = {},
payload: DeployMethodPayload = {}
): DeployMethod<TContract>
```
**Parameters:**
* `wallet`: `Wallet`
* Wallet used to send / simulate the deploy tx.
* `contract`: `DeployMethodContract<TContract>`
* The contract being deployed (artifact, factory, args, initializer).
* `instantiation` (optional): `DeployInstantiationOptions`
* Address-affecting parameters (salt, deployer / universalDeploy, publicKeys). Defaults to pending.
* `payload` (optional): `DeployMethodPayload`
* Auth witnesses, capsules, and extra hashed args propagated to the deploy. Defaults to empty.
**Returns:**
`DeployMethod<TContract>`
##### request[](#request-3 "Direct link to request")
Returns the execution payload that allows this operation to happen on chain. Requires the deployer to be known — call `getDeployerAddress()` first; on a `PendingDeployMethod` this throws unless a prior `send` / `simulate` / `profile` has already locked the deployer.
**Signature:**
```
public async request(options: RequestDeployOptions = {}): Promise<ExecutionPayload>
```
**Parameters:**
* `options` (optional): `RequestDeployOptions`
* Configuration options.
**Returns:**
`Promise<ExecutionPayload>` - The execution payload for this operation
##### convertDeployOptionsToSendOptions[](#convertdeployoptionstosendoptions "Direct link to convertDeployOptionsToSendOptions")
Converts DeployOptions to SendOptions.
**Signature:**
```
protected convertDeployOptionsToSendOptions<W extends InteractionWaitOptions>(options: DeployOptions<W>): SendOptions<W>
```
**Parameters:**
* `options`: `DeployOptions<W>`
* Deploy options with wait parameter.
**Returns:**
`SendOptions<W>`
##### convertDeployOptionsToSimulateOptions[](#convertdeployoptionstosimulateoptions "Direct link to convertDeployOptionsToSimulateOptions")
Converts deploy simulation options into wallet-level simulate options.
**Signature:**
```
protected convertDeployOptionsToSimulateOptions(options: SimulateDeployOptions): SimulateOptions
```
**Parameters:**
* `options`: `SimulateDeployOptions`
* The deploy simulation options to convert.
**Returns:**
`SimulateOptions`
##### convertDeployOptionsToProfileOptions[](#convertdeployoptionstoprofileoptions "Direct link to convertDeployOptionsToProfileOptions")
Converts deploy profile options into wallet-level profile options.
**Signature:**
```
protected convertDeployOptionsToProfileOptions(options: DeployOptionsWithoutWait & ProfileInteractionOptions): ProfileOptions
```
**Parameters:**
* `options`: `DeployOptionsWithoutWait & ProfileInteractionOptions`
* The deploy profile options to convert.
**Returns:**
`ProfileOptions`
##### register[](#register "Direct link to register")
Adds this contract to the wallet and returns the Contract object.
**Signature:**
```
public async register(): Promise<TContract>
```
**Returns:**
`Promise<TContract>`
##### getPublicationExecutionPayload[](#getpublicationexecutionpayload "Direct link to getPublicationExecutionPayload")
Returns an execution payload for: - publication of the contract class and - publication of the contract instance to enable public execution depending on the provided options.
**Signature:**
```
protected async getPublicationExecutionPayload(options?: RequestDeployOptions): Promise<ExecutionPayload>
```
**Parameters:**
* `options` (optional): `RequestDeployOptions`
* Contract creation options.
**Returns:**
`Promise<ExecutionPayload>` - An execution payload with potentially calls (and bytecode capsule) to the class registry and instance registry.
##### getInitializationExecutionPayload[](#getinitializationexecutionpayload "Direct link to getInitializationExecutionPayload")
Returns the calls necessary to initialize the contract.
**Signature:**
```
protected async getInitializationExecutionPayload(options?: RequestDeployOptions): Promise<ExecutionPayload>
```
**Parameters:**
* `options` (optional): `RequestDeployOptions`
* Deployment options.
**Returns:**
`Promise<ExecutionPayload>` - An array of function calls.
##### send[](#send-3 "Direct link to send")
Send a contract deployment transaction (initialize and/or publish) using the provided options. By default, waits for the transaction to be mined and returns the deployed contract instance.
**Signature:**
```
public override send(options: DeployOptionsWithoutWait): Promise<DeployResultMined<TContract>>
```
**Parameters:**
* `options`: `DeployOptionsWithoutWait`
* An object containing various deployment options such as `from` and `fee`.
**Returns:**
`Promise<DeployResultMined<TContract>>` - TxHash (if wait is NO\_WAIT), or DeployResultMined with contract, receipt, and instance (otherwise)
##### send[](#send-4 "Direct link to send")
**Signature:**
```
public override send<W extends InteractionWaitOptions>(options: DeployOptions<W>): Promise<DeployReturn<TContract, W>>
```
**Parameters:**
* `options`: `DeployOptions<W>`
**Returns:**
`Promise<DeployReturn<TContract, W>>`
##### send[](#send-5 "Direct link to send")
**Signature:**
```
public override async send(options: DeployOptions<InteractionWaitOptions>): Promise<any>
```
**Parameters:**
* `options`: `DeployOptions<InteractionWaitOptions>`
**Returns:**
`Promise<any>`
##### getInstance[](#getinstance "Direct link to getInstance")
Builds the contract instance and returns it. The instance is computed once and cached for the lifetime of this DeployMethod; subsequent calls return the same instance. On a PendingDeployMethod this throws unless a prior `send` / `simulate` / `profile` call has already locked the deployer — otherwise the resolved address could silently differ from the eventually-deployed one.
**Signature:**
```
public getInstance(): Promise<ContractInstanceWithAddress>
```
**Returns:**
`Promise<ContractInstanceWithAddress>` - An instance object.
##### simulate[](#simulate-2 "Direct link to simulate")
Simulate the deployment
**Signature:**
```
public async simulate(options: SimulateDeployOptions): Promise<SimulationResult>
```
**Parameters:**
* `options`: `SimulateDeployOptions`
* An optional object containing additional configuration for the simulation.
**Returns:**
`Promise<SimulationResult>` - A simulation result object containing metadata of the execution, including gas estimations (if requested via options), execution statistics and emitted offchain effects
##### profile[](#profile-1 "Direct link to profile")
Simulate a deployment and profile the gate count for each function in the transaction.
**Signature:**
```
public async profile(options: DeployOptionsWithoutWait & ProfileInteractionOptions): Promise<TxProfileResult>
```
**Parameters:**
* `options`: `DeployOptionsWithoutWait & ProfileInteractionOptions`
* Same options as `send`, plus extra profiling options.
**Returns:**
`Promise<TxProfileResult>` - An object containing the function return value and profile result.
##### getAddress[](#getaddress-2 "Direct link to getAddress")
Returns the deployed contract address.
**Signature:**
```
public async getAddress(): Promise<AztecAddress>
```
**Returns:**
`Promise<AztecAddress>`
##### getPartialAddress[](#getpartialaddress "Direct link to getPartialAddress")
Returns the partial address for this deployment.
**Signature:**
```
public async getPartialAddress(): Promise<Fr>
```
**Returns:**
`Promise<Fr>`
##### getCachedInstanceOrThrow[](#getcachedinstanceorthrow "Direct link to getCachedInstanceOrThrow")
Returns the cached resolved instance synchronously, or throws if no instance has been computed프로젝트로 돌아가기