Asterizm
  • What is Asterizm
    • Overview
    • Architecture
    • Benefits
    • Supported chains
      • Non-EVM chains integration plan
    • Frequently asked questions
    • White paper
    • GitHub
  • Infrastructure
    • Overview
    • Asterizm Connector
      • Client smart contract abstraction
      • Initializer smart contract
      • Translator smart contract
    • Client off-chain module
    • Asterizm Relayer
    • Asterizm Interfaces
      • IAsterizmConfigEnv
      • IConfig
      • IAsterizmEnv
      • IClientReceiverContract
      • IInitializerReceiver
      • IInitializerSender
      • IMultiChainToken
      • INonce
      • ITranslator
  • Guides
    • Transaction flow
    • Getting started
      • 1. Deploy your smart contracts
        • AsterizmDemo contract
        • Client contracts implementation logic
        • Solana integration logic
      • 2. Implement off-chain module
        • Simple implementation (shell script)
        • Default implementation (manual)
      • 3. Important! One final pre-flight check
    • External relays
      • Relay deployment and configuration
      • List of external relays
        • Chainlink
          • Mainnet
          • Testnet
    • Source chain notifications
    • Refund Logic
    • Error messages
      • EVM
        • Source chain
        • Destination chain
      • TVM and TON
      • Solana
    • Fee management
    • Code examples
    • Multi-Owner (Sender) System
  • Advanced
    • Best practices
    • Asset transfer
    • Debugging
  • Technical reference
    • Mainnet
    • Testnet
    • Smart contract audits
    • SDK
Powered by GitBook
On this page
  • Sender logic on client contracts
  • Sender logic (off-chain part)
  1. Guides

Multi-Owner (Sender) System

Description of the multi-owner (sender) system

The Asterizm Protocol can continuously handle a significant volume of on-chain transactions.

EVM systems incorporate nonce logic, determining a precise order for sending transactions from a specific address. This approach has a crucial nuance - if one transaction from the sequence doesn't make it into a block, all subsequent transactions won't be included in a block until the original one is included. Consequently, queues for transaction submission may form on owner addresses.

The Asterizm Protocol has been designed with this nuance in mind, allowing multiple addresses capable of sending requests to be added to contracts. These addresses are referred to as senders. In this context, the off-chain part of the system selects the least loaded sender. This approach helps reduce load and avoid transaction queues.

Sender logic on client contracts

To implement this logic, additional senders need to be added (the first sender is considered the owner who deployed the contract, and it is automatically added to the list of senders during the deployment of the client contract). To achieve this, the following method should be called on the respective contract:

function addSender(address _sender) public onlyOwner

This method adds the provided address to the list of senders, enabling the specified address to invoke basic methods for sending protocol transfers.

Sender logic (off-chain part)

After adding a sender to the client contract, it is necessary to include this sender in the off-chain module of the protocol. To achieve this, execute the following console command:

docker exec asterizm-console /app/main owners/add {netwotk-symbol} {owner-address} {owner-private-key} {?owner-public-key}

This command adds a sender to the contract of a specific network. It accepts the following parameters:

  • network-symbol - mandatory parameter, the network symbol (e.g., ETH, POL, etc.)

  • owner-address - mandatory parameter, the address of the owner

  • owner-private-key - mandatory parameter, the private key of the owner

  • owner-public-key - optional parameter, the public key of the owner (used in TVM systems).

After adding a sender to the off-chain module, it is necessary to restart the system. This is done with the following command: docker compose -f /opt/asterizm/docker-compose.yml restart

PreviousCode examplesNextBest practices

Last updated 6 months ago