Extends
EthereumWalletMockAbstract
Constructors
new EthereumWalletMock()
Parameters
| Parameter | Type | Description |
|---|---|---|
page | Page | The Playwright Page object to interact with. |
wallet? | WalletMock | The type of wallet to mock. |
Returns
EthereumWalletMock
Overrides
EthereumWalletMockAbstract.constructor
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
page | Page | The Playwright Page object to interact with. | - |
seedPhrase | undefined | string | - | EthereumWalletMockAbstract.seedPhrase |
wallet | WalletMock | - | EthereumWalletMockAbstract.wallet |
Methods
addNetwork()
Parameters
| Parameter | Type | Description |
|---|---|---|
network | Network | The network object to use for adding the new network. |
Returns
Promise<void>
A promise that resolves when the network is added.
Overrides
EthereumWalletMockAbstract.addNetwork
addNewAccount()
Returns
Promise<void>
A promise that resolves when the new account is added.
Overrides
EthereumWalletMockAbstract.addNewAccount
connectToDapp()
Parameters
| Parameter | Type | Description |
|---|---|---|
wallet? | WalletMock | The wallet to connect to the dapp. |
Returns
Promise<void>
A promise that resolves when the wallet is connected to the dapp.
Overrides
EthereumWalletMockAbstract.connectToDapp
getAccountAddress()
Returns
Promise<undefined | `0x${string}`>
A promise that resolves to the current account address.
Overrides
EthereumWalletMockAbstract.getAccountAddress
getAllAccounts()
Returns
Promise<undefined | `0x${string}`[]>
A promise that resolves to an array of account addresses.
Overrides
EthereumWalletMockAbstract.getAllAccounts
importWallet()
Parameters
| Parameter | Type | Description |
|---|---|---|
seedPhrase | string | The seed phrase to import. |
Returns
Promise<void>
A promise that resolves when the wallet is imported.
Overrides
EthereumWalletMockAbstract.importWallet
importWalletFromPrivateKey()
Parameters
| Parameter | Type | Description |
|---|---|---|
privateKey | `0x${string}` | The private key to import. |
Returns
Promise<void>
A promise that resolves when the wallet is imported.
Overrides
EthereumWalletMockAbstract.importWalletFromPrivateKey
switchAccount()
Parameters
| Parameter | Type | Description |
|---|---|---|
accountAddress | string | The address of the account to switch to. |
Returns
Promise<void>
A promise that resolves when the account switch is complete.
Overrides
EthereumWalletMockAbstract.switchAccount
switchNetwork()
Parameters
| Parameter | Type | Description |
|---|---|---|
networkName | string | The name of the network to switch to. |
Returns
Promise<void>
A promise that resolves when the network switch is complete.
Overrides
EthereumWalletMockAbstract.switchNetwork
