Aktionariat Documentation
  • Introduction to Aktionariat
    • ⚡Quick Start
  • 🛠️APIs
    • 📊Subgraph
      • Schema
      • Query Examples
        • Platform data
        • Token Data
        • Brokerbot Data
        • Swaps Data
    • ⚙️External API
      • ⚙️External API (Gitbook)
  • 🌐Web
    • Integrate with Ethers.js
      • Brokerbot Quoter
    • Integrate Aktionariat Widgets
  • ⛓️Smart Contracts
    • 📔Contracts Overview
    • 👷‍♂️Guides
      • Implement A Trade
        • Direct Trades
        • Multihop Trades
      • Get Brokerbot Contract for Token
      • Buy Shares
      • Sell Shares
    • Technical Reference
      • Allowlist
      • Brokerbot
      • Drag-Along
      • Infinite Allowances
      • Multi-Signature Contract
      • Recovery
      • Shareholder Registry
  • 📖Reference
    • Brokerbot Architecture
    • Github
    • Whitepaper
    • Brokerbot Analytics
  • 💬Socials
    • Twitter
    • Telegram
    • LinkedIn
    • Youtube
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Smart Contracts
  2. Guides

Get Brokerbot Contract for Token

PreviousMultihop TradesNextBuy Shares

Last updated 1 year ago

Was this helpful?

The Brokerbot contact for a token can be found in the Brokerbot Registry, which we have on Mainnet and on Optimism.

  • Mainnet:

  • Optimism:

contract BrokerbotRegistry is Ownable {
  /// @notice Returns the brokerbot address for a given pair base and share token, or address 0 if it does not exist
  /// @dev mapping is [base][token] = brokerbotAddress
  /// @return brokerbot The brokerbot address
  mapping(IERC20 => mapping(IERC20 => IBrokerbot)) public getBrokerbot;

The public getBrokerbot holds the mapping of all current Brokerbots.

To get for example the Brokerbot of DAKS with the base token of XCHF you get it on-chain via

IERC20 public constant XCHF = 0xB4272071eCAdd69d933AdcD19cA99fe80664fc08;
IERC20 public constant DAKS = 0x6f38e0f1a73c96cB3f42598613EA3474F09cB200;
BrokerbotRegistry public constant BROKERBOT_REGISTRY = 0xcB3e482df38d62E73A7aE0E15a2605caDcc5aE98;
// get Brokerbot
Brokerbot brokerbot = BROKERBOT_REGISTRY.getBrokerbot(XCHF,DAKS);

⛓️
👷‍♂️
0xcB3e482df38d62E73A7aE0E15a2605caDcc5aE98
0x2C9b9b9143A9Ef5051A299EF3CC8039b06927093