# Extension Constants

### Overview

In the Getting Started [Workflow](https://docs.browto.com/getting-started) chapter, we have learned how to reference output variables (movie names). In addition, when we interact with various web pages, we will inevitably encounter the need to enter wallet addresses and token quantities. BrowTo provides the following system constants for input and configuration:

{% hint style="info" %}
When referencing constants, you need to enter **@\[constant name]\(constant name)** to distinguish them from ordinary input. For example, to reference metamask\_account, you need to enter **@\[metamask\_account]\(metamask\_account)**
{% endhint %}

**Wallet (**&#x49;t is well known that MetaMaks can add multiple wallet&#x73;**)**

* metamask\_account: current wallet address
* metamask\_account\_1: the first wallet address
* metamask\_account\_2: the second wallet address
* And so on

**Balance**

* metamask\_balance\_1: 10% of the current network token balance
* metamask\_balance\_2: 20% of the current network token balance
* And so on to 10, that is, metamask\_balance and metamask\_balance\_10 both represent the balance of all tokens

{% hint style="info" %}
Note: When referencing the above variables, you need to unlock or connect your wallet before you can reference them normally.
{% endhint %}

### Test

Next, let’s complete a script for automatically claiming funds on the Holesky test network. Open Google Chrome and go to <https://faucet.triangleplatform.com/ethereum/holesky> . Then right-click Inspect to find the recorder and click Start Recording (for detailed steps, go to the[ recording script ](https://docs.browto.com/getting-started/lu-zhi-jiao-ben)in the Getting Started section ). Then click the web input box in turn, paste your wallet address, and click Request 0.001ETH. Wait for the prompt to succeed:

<figure><img src="https://content.gitbook.com/content/L6WLuERAo9yq6f5Anerv/blobs/6o6MiZZrLurHqGfWPRIv/WX20240309-225853@2x.png" alt=""><figcaption></figcaption></figure>

In order to prevent recording some unnecessary operations, we stop recording first. If you find that unnecessary operations are recorded, you can click the Delete button in the More menu of the current step.

Usually when we record a script, in order to know whether the script is executed successfully, we will add a step at the end, that is, wait for the success mark to appear. For this script, we need to wait for Success or the Tx of the transaction to appear, so we choose to add a step at the end in the menu of the last step of the recorder:

<figure><img src="https://content.gitbook.com/content/L6WLuERAo9yq6f5Anerv/blobs/dybxeLuqsI0V4UbK4ilZ/WX20240309-230243@2x.png" alt=""><figcaption></figcaption></figure>

Keep the default waitForElement for type, then click the selection button on the right side of selectors, and then select the Success text on the web page. The selectors in the recorder will be automatically filled in:

<figure><img src="https://content.gitbook.com/content/L6WLuERAo9yq6f5Anerv/blobs/7UhoAIXgyKaWKjfeGQXW/WX20240309-230534@2x.png" alt=""><figcaption></figcaption></figure>

Then we save the script as a JSON file, import it into BrowTo, and start configuring the script. First, we need to unlock the wallet by quoting the wallet address, so we expand the first step web address and select MetaMask in the binding plug-in operation to unlock the wallet:

<figure><img src="https://1490959813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL6WLuERAo9yq6f5Anerv%2Fuploads%2FoyzLMki0YZCNtwX4oBrN%2FWX20240530-181046%402x.png?alt=media&#x26;token=90dd7c69-f70f-4faf-9761-b3a83ddf7ecf" alt=""><figcaption></figcaption></figure>

Next, expand the wallet address input step, click Set as Local Configuration Item, configure the name as Wallet, and the type as Text/Number:

<figure><img src="https://1490959813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL6WLuERAo9yq6f5Anerv%2Fuploads%2Faj0lHHmupd9MvemEzCk4%2FWX20240530-181123%402x.png?alt=media&#x26;token=6b8c130e-8d53-4233-980a-4c99bfce16d3" alt=""><figcaption></figcaption></figure>

The final result is shown in the figure below. We click Update:

<figure><img src="https://1490959813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL6WLuERAo9yq6f5Anerv%2Fuploads%2FKUsN1cVdCSmHolgBPV3k%2FWX20240530-181200%402x.png?alt=media&#x26;token=23c5c9bf-54e8-4587-8d24-f6bd17972235" alt=""><figcaption></figcaption></figure>

Finally, return to the script configuration window and enter @\[metamask\_account\_1]\(metamask\_account\_1) in the wallet input box, which is the first wallet address. The input will be automatically recognized as a gray background in the reference format:

<figure><img src="https://1490959813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL6WLuERAo9yq6f5Anerv%2Fuploads%2FcDTPv58uXN9TC3qYmnmg%2FWX20240530-181346%402x.png?alt=media&#x26;token=947582d6-e68e-4955-8ed4-e809d3b57d65" alt=""><figcaption></figcaption></figure>

Finally, click Update and Save, then Run. You can see that the window we bound automatically helps us complete the function of receiving the test token to the first address of the wallet.
