Parameter | Type | Description |
---|---|---|
context | BrowserContext | The browser context |
metamaskExtensionPage | Page | The MetaMask extension page |
metamaskExtensionId | string | The MetaMask extension ID |
MetaMask
Property | Modifier | Type | Description |
---|---|---|---|
metamaskExtensionPage | readonly | Page | The MetaMask extension page |
metamaskPlaywright | readonly | MetaMask | The MetaMask instance for Playwright |
Parameter | Type | Description |
---|---|---|
network | object | The network configuration to add |
network.blockExplorerUrl ? | string | - |
network.chainId | number | - |
network.name | string | - |
network.rpcUrl | string | - |
network.symbol | string | - |
Promise
<boolean
>
True if the network was added successfully
Parameter | Type | Description |
---|---|---|
accountName | string | The name for the new account |
Promise
<boolean
>
True if the account was added successfully
Promise
<boolean
>
True if the token was added successfully
Promise
<boolean
>
True if the new network was approved successfully
Promise
<boolean
>
True if the network switch was approved successfully
Parameter | Type | Description |
---|---|---|
options ? | object | Optional settings for token approval |
options.gasSetting ? | | "low" | "market" | "aggressive" | "site" | { "gasLimit" : number ; "maxBaseFee" : number ; "priorityFee" : number ; } | Gas settings for the transaction |
options.spendLimit ? | number | "max" | The spend limit for the token (number or ‘max’) |
Promise
<boolean
>
True if the permission was approved, false otherwise
Promise
<boolean
>
True if the transaction details were closed successfully, false otherwise
Promise
<boolean
>
True if the signature was confirmed successfully, false otherwise
Parameter | Type | Description |
---|---|---|
options ? | object | Optional gas settings for the transaction |
options.gasSetting ? | | "low" | "market" | "aggressive" | "site" | { "gasLimit" : number ; "maxBaseFee" : number ; "priorityFee" : number ; } | - |
Promise
<boolean
>
True if the transaction was confirmed successfully
Promise
<boolean
>
True if the transaction was confirmed and mined successfully, false otherwise
Parameter | Type | Description |
---|---|---|
options | object | Object containing the RPC URL and chain ID |
options.chainId | number | The chain ID of the Anvil node |
options.rpcUrl | string | The RPC URL of the Anvil node |
Promise
<boolean
>
True if the connection was successful, false otherwise
Parameter | Type | Description |
---|---|---|
accounts ? | string [] | Optional array of account addresses to connect |
Promise
<boolean
>
True if the connection was successful
Parameter | Type | Description |
---|---|---|
options ? | CreateAnvilOptions | Optional Anvil node creation options |
Promise
<{
"anvil"
: Anvil
;
"chainId"
: number
;
"rpcUrl"
: string
;
}>
Object containing the Anvil instance, RPC URL, and chain ID
Member | Type |
---|---|
anvil | Anvil |
chainId | number |
rpcUrl | string |
Promise
<boolean
>
True if the message was decrypted successfully, false otherwise
Promise
<boolean
>
True if the token was deployed successfully
Promise
<boolean
>
True if the operation was successful
Promise
<string
>
The current account name
Promise
<string
>
The current account address
Promise
<string
>
The current network name
Promise
<boolean
>
True if the navigation was successful
Parameter | Type | Description |
---|---|---|
seedPhrase | string | The seed phrase to import |
Promise
<boolean
>
True if the import was successful
Parameter | Type | Description |
---|---|---|
privateKey | string | The private key to import |
Promise
<boolean
>
True if the import was successful
Promise
<boolean
>
True if the wallet was locked successfully
Promise
<boolean
>
True if the settings page was opened successfully
Parameter | Type | Description |
---|---|---|
menu | SettingsSidebarMenus | The menu to open |
Promise
<boolean
>
True if the menu was opened successfully
Parameter | Type | Description |
---|---|---|
txIndex | number | The index of the transaction to open |
Promise
<boolean
>
True if the transaction details were opened successfully, false otherwise
Promise
<boolean
>
True if the key was provided successfully, false otherwise
Promise
<boolean
>
True if the new network was rejected successfully
Promise
<boolean
>
True if the signature was rejected successfully
Promise
<boolean
>
True if the network switch was rejected successfully
Promise
<boolean
>
True if the permission was rejected successfully
Promise
<boolean
>
True if the transaction was rejected successfully
Parameter | Type | Description |
---|---|---|
options | object | Object containing the current and new account names |
options.currentAccountName | string | The current name of the account |
options.newAccountName | string | The new name for the account |
Promise
<boolean
>
True if the rename was successful
Promise
<boolean
>
True if the reset was successful
Parameter | Type | Description |
---|---|---|
accountName | string | The name of the account to switch to |
Promise
<boolean
>
True if the switch was successful
Parameter | Type | Description |
---|---|---|
options | object | Object containing the network name and testnet flag |
options.isTestnet ? | boolean | Whether the network is a testnet (default: false) |
options.networkName | string | The name of the network to switch to |
Promise
<boolean
>
True if the switch was successful, false otherwise
Promise
<boolean
>
True if the toggle was successful
Promise
<boolean
>
True if the toggle was successful
Promise
<boolean
>
True if the wallet was unlocked successfully