Class: DeployMethod<TContract>
contract.DeployMethod
Contract interaction for deployment. Handles class registration, public instance deployment, and initialization of the contract. Extends the BaseContractInteraction class.
Type parameters
Name | Type |
---|---|
TContract | extends ContractBase = Contract |
Hierarchy
-
BaseContractInteraction
↳
DeployMethod
Constructors
constructor
• new DeployMethod<TContract
>(publicKeys
, wallet
, artifact
, postDeployCtor
, args?
, constructorNameOrArtifact?
): DeployMethod
<TContract
>
Type parameters
Name | Type |
---|---|
TContract | extends ContractBase = Contract |
Parameters
Name | Type | Default value |
---|---|---|
publicKeys | PublicKeys | undefined |
wallet | Wallet | undefined |
artifact | ContractArtifact | undefined |
postDeployCtor | (address : AztecAddress , wallet : Wallet ) => Promise <TContract > | undefined |
args | any [] | [] |
constructorNameOrArtifact? | string | FunctionArtifact | undefined |
Returns
DeployMethod
<TContract
>
Overrides
BaseContractInteraction.constructor
Properties
args
• Private
args: any
[] = []
artifact
• Private
artifact: ContractArtifact
constructorArtifact
• Private
constructorArtifact: undefined
| FunctionArtifact
Constructor function to call.
instance
• Private
Optional
instance: ContractInstanceWithAddress
= undefined
The contract instance to be deployed.
log
• Protected
log: Logger
Inherited from
BaseContractInteraction.log
postDeployCtor
• Private
postDeployCtor: (address
: AztecAddress
, wallet
: Wallet
) => Promise
<TContract
>
Type declaration
▸ (address
, wallet
): Promise
<TContract
>
Parameters
Name | Type |
---|---|
address | AztecAddress |
wallet | Wallet |
Returns
Promise
<TContract
>
publicKeys
• Private
publicKeys: PublicKeys
wallet
• Protected
wallet: Wallet
Inherited from
BaseContractInteraction.wallet
Accessors
address
• get
address(): undefined
| AztecAddress
Return this deployment address.
Returns
undefined
| AztecAddress
partialAddress
• get
partialAddress(): undefined
| Fr
Returns the partial address for this deployment.
Returns
undefined
| Fr
Methods
create
▸ create(options?
): Promise
<TxExecutionRequest
>
Create a contract deployment transaction, given the deployment options.
This function internally calls request()
and sign()
methods to prepare
the transaction for deployment. The resulting signed transaction can be
later sent using the send()
method.
Parameters
Name | Type | Description |
---|---|---|
options | DeployOptions | An object containing optional deployment settings, contractAddressSalt, and from. |
Returns
Promise
<TxExecutionRequest
>
A Promise resolving to an object containing the signed transaction data and other relevant information.
Overrides
BaseContractInteraction.create