All pages
Powered by GitBook
1 of 1

Loading...

Become an EVM Transmitter

Transmitters function as lightweight nodes that facilitate message transmission and execution of transactions across connected blockchain networks. They are responsible for signing message requests, ensuring secure and verified communication. Each transmitter operates tethered to a specific blockchain, which allows them to specialize in that network's protocols.

Transmitters can operate across multiple networks but are limited to a single network's parameters at any given time. Their dual role as transmitters and executors enables them to cover processing costs for transactions, enhancing the efficiency of the UIP messaging system.

On the other hand, Super Transmitters provide an additional layer of oversight and security within the UIP framework. Unlike transmitters, super-transmitters do not execute transactions; instead, they oversee the transaction process by confirming or rejecting messages originating from transmitters. This role is crucial for mitigating potential fraudulent activities, as super-transmitters enhance scrutiny and governance without being directly involved in transaction execution. Super-transmitters may include public figures or reputable organizations, adding credibility to the protocol's operations. Their independent function strengthens the overall decentralization and security of the UIP messaging system, ensuring that transactions are thoroughly vetted before proceeding.

Dependencies

Before beginning make sure to install all of the necessary dependencies and tools. In this guide we'll be using several, including:

  • , an open source library that allows communication with USB devices fom user space.

  • , a modular toolkit for Ethereum application development.

  • , a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers.

For the Zsh shell, use source "~/.zshenv" instead of source "~/.bashrc".

To verify the successful installation of dependencies, you can run the following command.

If everything was successfully installed, the output should be the version of the cast command, as shown below.

1. Registration

Make sure that you have the native network token on Entangle and that you have added the Entangle network address to your wallet.

  • Node:

  • Chain Id: 33033

Now run the cast command described below to register the transmitter.

Command Parameter Explanation

The cast command includes several parameters, here we've described them.

  1. The HEX address at the begining is the address of our AgentRegistrator contract.

  2. <agent address> is the wallet address which you plan to make an agent.

You will receive a success message, as described below, if your transmitter is successfully registered.

2. Security Deposit

To ensure your transmitter works as expected you are required to stake a security deposit. A minimum of 100 NTGL is required.

Run the cast command again but this time with the follow parameters.

Command Parameter Explanation

Set WNTGL amount to 0 if you want to use NTGL for staking and vice versa, set NTGL amount to 0 if you want to use WNTGL for staking.

The cast command includes several parameters, here we've described them.

You will receive a success message, as described below, if you have successfully staked your security deposit.

3. Docker Environment Setup

To simplify this process, we've created a docker image. In this part we will describe how to install and setup docker.

1

Update the system.

2

Install dependencies.

3

Add the official Docker GPG key.

4

4. Starting the Transmitter

1

Update the docker image.

2

Create a directory for the transmitterand move to it.

3

Start the transmitter.

Choosing a Transmitter Name

You can also set a unique name for your agent to more easily distinguish it. Run the below command to do so.

Command Parameter Explanation
  1. <agent-name> is where you provide the unique name for the agent (e.g. agent-sonic-1).

Change Round

To change the round, run the following command.

Command Parameter Explanation
  1. <agent-name> the name of the agent (e.g. agent-sonic-1).

  2. <chain_id> is the blockchain Id (for Sonic, use 146).

Changing Blockchain Providers

You can change blockchain providers (RPC nodes) by modifying the source.config.yaml file.

Additional Configuration Parameters

Below are additional configuration parameters you can use for the blockchain provider source configuration file.

Parameter
Description

Troubleshooting

Error Code -32000

Make sure there are enough native tokens in the wallet to cover the transaction fees.

Git Command Not Found

Install git using the command below.

<chainID> is the blockchain ID where the agent will be deployed.

  • <your key> is the wallet’s private key.

  • The HEX address at the begining is the address of the RewardVaults contract which is responsible for distributing rewards among UIP participants
  • <chainID> is the blockchain ID where the agent will be deployed.

  • <agent-address> is the wallet address which you plan to make an agent.

  • <ntgl-value> is the amount of security deposit (in wei) min 100 NTGL.

  • <wntgl-value> is the amount of security deposit (in wei) min 100WNTGL

  • <your key> is the wallet’s private key.

  • Add the Docker repository.

    5

    Install Docker and Docker Compose.

    6

    Verify the installation.

    7

    Add the current user to the Docker group (to run commands without using sudo).

    8

    Then log out and log back in, or run.

    1

    Install Docker via Homebrew

    2

    Launch Docker Desktop

    Simply find it in your applications and open it.

    3

    Verify the installation

    If you want this transmitter to be a super transmitter you need to specify "-e IS_SUPER_AGENT=true".

    Command Parameter Explanation
    1. EVM_CHAINS is used to specify the chain Id of the network where you want to deploy your agent.

    2. yourprivatekey is your wallet's private key.

    3. yourpassword is your desired password to encrypt the private key.

    After the successful execution of the program, you will see the message:

    parse_new_headers_interval

    How often to update blockchain information (e.g., 5s, 1m).

    max_query_in_batch

    The number of requests in a single batch request.

    filter_logs_max_blocks

    The maximum difference between fromBlock and toBlock.

    blocks_delay

    The maximum difference between block shifts.

    blocks_batch_to_filter

    The minimum number of blocks to process.

    min_balance_to_alert

    The minimum wallet balance for notifications (in wei).

    libusd
    foundry
    docker
    https://json-rpc.entangle.fi
    brew install libusb
    curl -L https://foundry.paradigm.xyz | bash
    foundryup
    sudo apt update
    sudo apt install curl build-essential libssl-dev pkg-config
    sudo apt install libusb-1.0-0-dev
    curl -L https://foundry.paradigm.xyz | bash
    ~./bashrc  
    foundryup
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt update
    sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
    docker --version
    docker compose version
    sudo usermod -aG docker $USER
    newgrp docker
    brew install --cask docker
    docker --version
    docker compose version
    cast --version
    cast 0.2.0 (31c24b0 2024-11-14T00:20:56.080456000Z)
    cast send 0xB83E7753CAB418775f0dc91ACfcfECba24FE62C1 \
      "registerAgentOneKeyEVM(uint,address)" <chain_id> <agentaddress> \
      -r "https://json-rpc.entangle.fi" \
      --private-key <your key>
    status 1 (success)
    cast send 0x2897F9093bE0B5d5F9067c6f7842B949017eE830 \
      "deposit(uint256,address,uint256)" <chainID> <agent-address> <wntgl-value>\
      -r https://json-rpc.entangle.fi \
      --private-key <your key> --value <ntgl-value>
    status 1 (success)
    sudo apt update && sudo apt upgrade -y
    sudo apt install -y ca-certificates curl gnupg
    sudo install -m 0755 -d /etc/apt/keyrings
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo tee /etc/apt/keyrings/docker.asc > /dev/null
    sudo chmod a+r /etc/apt/keyrings/docker.asc
    docker pull msentangle/agent:3.0
    docker pull msentangle/agent-setup:3.0
    mkdir transmitter  
    cd transmitter  
    docker-compose -p <agent-name> up -d
    docker exec -it <agent-name>-evm_agent-1 sh -c "apk add curl && curl 'http://localhost:9131/turnround?chainId=<chain_id>'"
    source.config.yaml
    evmchains_tolisten:
        - chain_id: "80002"
          name: Polygon Amoy
          rpc_http_urls:
            - https://polygon-amoy.gateway.tenderly.co
            - https://polygon-amoy.gateway.tenderly.co
            - https://polygon-amoy.gateway.tenderly.co
    sudo apt install git -y
    docker run --rm \
      -v $(pwd)/.:/app/agent/ \
      -e PRIVATE_KEY="yourprivatekey" \
      -e PASSWORD="yourpassword" \
      -e EVM_CHAINS="<chain_id>" \
      msentangle/agent-setup:3.0
    Your Address: 0x1C414914bAc557B7980db4184594867E1dfca359 please check correct
    
    11:43AM WRN > contract has no events Contract Name=Slasher
    ...