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