# Interact with the blockchain

### MXPY

To interact with the blockchain and make transactions, you need to install `mxpy`. You can find more detailed installation instructions and additional setup steps for `mxpy` [here](https://docs.multiversx.com/sdk-and-tools/sdk-py/installing-mxpy).

### Configure mxpy Address HRP

mxpy config set default\_address\_hrp one<br>

### For the validator pem to interact with the mxpy we need to create a json with the path having the following structure

```
{
  "validators": [
    {
      "pemFile": "validatorKey.pem"
    }
  ]
}
```

### Add a validator

```
mxpy validator stake \
  --pem=walletKey.pem \
  --value="2500000000000000000000" \
  --validators-file=validator.json \
  --proxy="https://gateway.validators.onefinity.network" \
  --gas-limit 25000000 \
  --recall-nonce \
  --send
```

### Unstake a validator

```
mxpy validator unstake \
  --pem=walletKey.pem \
  --nodes-public-keys address \
  --proxy="https://gateway.validators.onefinity.network" \
  --gas-limit 25000000 \
  --recall-nonce \
  --send
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onefinity.network/validators/interact-with-the-blockchain.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
