Class: DeploySentTx<TContract>
contract.DeploySentTx
A contract deployment transaction sent to the network, extending SentTx with methods to create a contract instance.
Type parameters
Name | Type |
---|---|
TContract | extends Contract = Contract |
Hierarchy
-
↳
DeploySentTx
Constructors
constructor
• new DeploySentTx<TContract
>(wallet
, txHashPromise
, postDeployCtor
, instance
): DeploySentTx
<TContract
>
Type parameters
Name | Type |
---|---|
TContract | extends Contract = Contract |
Parameters
Name | Type | Description |
---|---|---|
wallet | PXE | Wallet | - |
txHashPromise | Promise <TxHash > | - |
postDeployCtor | (address : AztecAddress , wallet : Wallet ) => Promise <TContract > | - |
instance | ContractInstanceWithAddress | The deployed contract instance |
Returns
DeploySentTx
<TContract
>
Overrides
Properties
instance
• instance: ContractInstanceWithAddress
The deployed contract instance
log
• Private
log: Logger
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
>
pxe
• Protected
pxe: PXE
Inherited from
txHashPromise
• Protected
txHashPromise: Promise
<TxHash
>
Inherited from
Methods
deployed
▸ deployed(opts?
): Promise
<TContract
>
Awaits for the tx to be mined and returns the contract instance. Throws if tx is not mined.
Parameters
Name | Type | Description |
---|---|---|
opts? | DeployedWaitOpts | Options for configuring the waiting for the tx to be mined. |
Returns
Promise
<TContract
>
The deployed contract instance.
getContractObject
▸ getContractObject(wallet?
): Promise
<TContract
>
Parameters
Name | Type |
---|---|
wallet? | Wallet |
Returns
Promise
<TContract
>
getReceipt
▸ getReceipt(): Promise
<TxReceipt
>
Retrieve the transaction receipt associated with the current SentTx instance. The function fetches the transaction hash using 'getTxHash' and then queries the PXE to get the corresponding transaction receipt.
Returns
Promise
<TxReceipt
>
A promise that resolves to a TxReceipt object representing the fetched transaction receipt.
Inherited from
getTxHash
▸ getTxHash(): Promise
<TxHash
>
Retrieves the transaction hash of the SentTx instance. The function internally awaits for the 'txHashPromise' to resolve, and then returns the resolved transaction hash.
Returns
Promise
<TxHash
>
A promise that resolves to the transaction hash of the SentTx instance. TODO(#7717): Don't throw here.
Inherited from
getUnencryptedLogs
▸ getUnencryptedLogs(): Promise
<GetUnencryptedLogsResponse
>
Gets unencrypted logs emitted by this tx.
Returns
Promise
<GetUnencryptedLogsResponse
>
The requested logs.
Remarks
This function will wait for the tx to be mined if it hasn't been already.
Inherited from
getVisibleNotes
▸ getVisibleNotes(): Promise
<ExtendedNote
[]>
Get notes of accounts registered in the provided PXE/Wallet created in this tx.
Returns
Promise
<ExtendedNote
[]>
The requested notes.
Remarks
This function will wait for the tx to be mined if it hasn't been already.
Inherited from
wait
▸ wait(opts?
): Promise
<DeployTxReceipt
<TContract
>>
Awaits for the tx to be mined and returns the receipt along with a contract instance. Throws if tx is not mined.
Parameters
Name | Type | Description |
---|---|---|
opts? | DeployedWaitOpts | Options for configuring the waiting for the tx to be mined. |
Returns
Promise
<DeployTxReceipt
<TContract
>>
The transaction receipt with the deployed contract instance.
Overrides
waitForProven
▸ waitForProven(minedBlock
, opts?
): Promise
<number
>
Parameters
Name | Type |
---|---|
minedBlock | number |
opts? | WaitOpts |
Returns
Promise
<number
>
Inherited from
waitForReceipt
▸ waitForReceipt(opts?
): Promise
<TxReceipt
>
Parameters
Name | Type |
---|---|
opts? | WaitOpts |
Returns
Promise
<TxReceipt
>