Class: ContractBase
contract.ContractBase
Abstract implementation of a contract extended by the Contract class and generated contract types.
Hierarchy
-
ContractBase
↳
Contract
Constructors
constructor
• new ContractBase(instance
, artifact
, wallet
): ContractBase
Parameters
Name | Type | Description |
---|---|---|
instance | ContractInstanceWithAddress | The deployed contract instance definition. |
artifact | ContractArtifact | The Application Binary Interface for the contract. |
wallet | Wallet | The wallet used for interacting with this contract. |
Returns
Properties
artifact
• Readonly
artifact: ContractArtifact
The Application Binary Interface for the contract.
instance
• Readonly
instance: ContractInstanceWithAddress
The deployed contract instance definition.
methods
• methods: Object
= {}
An object containing contract methods mapped to their respective names.
Index signature
▪ [name: string
]: ContractMethod
wallet
• wallet: Wallet
The wallet used for interacting with this contract.
Accessors
address
• get
address(): AztecAddress
Address of the contract.
Returns
AztecAddress
partialAddress
• get
partialAddress(): Fr
Partial address of the contract.
Returns
Fr
Methods
withWallet
▸ withWallet(wallet
): this
Creates a new instance of the contract wrapper attached to a different wallet.
Parameters
Name | Type | Description |
---|---|---|
wallet | Wallet | Wallet to use for sending txs. |
Returns
this
A new contract instance.