ETH Price: $2,289.16 (+1.07%)

Contract

0x2C9b9b9143A9Ef5051A299EF3CC8039b06927093

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Register Brokerb...1153336762024-01-26 10:48:49225 days ago1706266129IN
0x2C9b9b91...b06927093
0 ETH0.0000440123770.00408897
Register Brokerb...1147409372024-01-12 17:30:51238 days ago1705080651IN
0x2C9b9b91...b06927093
0 ETH0.0000989105440.01626628
Register Brokerb...1138291012023-12-22 14:56:19260 days ago1703256979IN
0x2C9b9b91...b06927093
0 ETH0.0000914724680.00836619
Register Brokerb...1136523252023-12-18 12:43:47264 days ago1702903427IN
0x2C9b9b91...b06927093
0 ETH0.0001023602730.1078567
Register Brokerb...1133544612023-12-11 15:14:59271 days ago1702307699IN
0x2C9b9b91...b06927093
0 ETH0.0000846740120.01344453
Register Brokerb...1068281972023-07-13 13:32:51422 days ago1689255171IN
0x2C9b9b91...b06927093
0 ETH0.0000378630920.00000009
Register Brokerb...1064449252023-07-04 16:37:07431 days ago1688488627IN
0x2C9b9b91...b06927093
0 ETH0.0000409252490.0000001
Register Brokerb...727598542023-02-07 16:25:10578 days ago1675787110IN
0x2C9b9b91...b06927093
0 ETH0.0001974048560.001
Register Brokerb...712481972023-01-30 9:57:13586 days ago1675072633IN
0x2C9b9b91...b06927093
0 ETH0.00007114580.001
Register Brokerb...566565652022-12-28 13:25:28619 days ago1672233928IN
0x2C9b9b91...b06927093
0 ETH0.0000628297080.001
Register Brokerb...501354872022-12-15 17:04:52631 days ago1671123892IN
0x2C9b9b91...b06927093
0 ETH0.0002530372580.001
Register Brokerb...457311262022-12-05 16:27:11642 days ago1670257631IN
0x2C9b9b91...b06927093
0 ETH0.0000987078890.001
Register Brokerb...444026632022-12-01 23:39:49645 days ago1669937989IN
0x2C9b9b91...b06927093
0 ETH0.0000498021670.001
Sync Brokerbot313936272022-10-25 13:16:45683 days ago1666703805IN
0x2C9b9b91...b06927093
0 ETH0.0001021995250.00104185
Register Brokerb...291692522022-10-13 17:06:07694 days ago1665680767IN
0x2C9b9b91...b06927093
0 ETH0.0001135566090.001
Register Brokerb...272886602022-10-04 8:18:42704 days ago1664871522IN
0x2C9b9b91...b06927093
0 ETH0.0000403091390.001
Register Brokerb...271780202022-10-03 15:36:27705 days ago1664811387IN
0x2C9b9b91...b06927093
0 ETH0.0001350645020.001
Register Brokerb...260379022022-09-28 15:23:12710 days ago1664378592IN
0x2C9b9b91...b06927093
0 ETH0.0000943106020.00100155
Register Brokerb...255477792022-09-26 12:06:24712 days ago1664193984IN
0x2C9b9b91...b06927093
0 ETH0.0000217004430.00100155
Register Brokerb...213449982022-08-31 13:58:20738 days ago1661954300IN
0x2C9b9b91...b06927093
0 ETH0.0001036946530.001
Register Brokerb...158557052022-07-26 16:57:58773 days ago1658854678IN
0x2C9b9b91...b06927093
0 ETH0.0000957728060.001
Register Brokerb...158340142022-07-26 12:41:30774 days ago1658839290IN
0x2C9b9b91...b06927093
0 ETH0.0000844217350.001
Register Brokerb...140238202022-07-07 14:18:52793 days ago1657203532IN
0x2C9b9b91...b06927093
0 ETH0.0002768840070.001
Register Brokerb...133266732022-06-27 16:55:38802 days ago1656348938IN
0x2C9b9b91...b06927093
0 ETH0.0005726249570.001
Register Brokerb...124787082022-06-20 15:18:37810 days ago1655738317IN
0x2C9b9b91...b06927093
0 ETH0.0001966186370.001
View all transactions

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BrokerbotRegistry

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
File 1 of 4 : BrokerbotRegistry.sol
/**
* SPDX-License-Identifier: LicenseRef-Aktionariat
*
* Proprietary License
*
* This code cannot be used without an explicit permission from the copyright holder.
* If you wish to use the Aktionariat Brokerbot, you can either use the open version
* named Brokerbot.sol that can be used under an MIT License with Automated License Fee Payments,
* or you can get in touch with use to negotiate a license to use LicensedBrokerbot.sol .
*
* Copyright (c) 2021 Aktionariat AG (aktionariat.com), All rights reserved.
*/
pragma solidity ^0.8.0;

import "./IBrokerbot.sol";
import "../ERC20/IERC20.sol";
import "../utils/Ownable.sol";

/// @title Brokerbot Registry
/// @notice Holds a registry from all deployed active brokerbots
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;

  /// @notice Emitted when brokerbot is registered.
  /// @param brokerbot The address of the brokerbot
  /// @param base The address of the base currency
  /// @param token The address of the share token
  event RegisterBrokerbot(IBrokerbot brokerbot, IERC20 indexed base, IERC20 indexed token);

  /// @notice Emmitted when calling syncBrokerbot function
  /// @param brokerbot The brokerbot address that is synced
  event SyncBrokerbot(IBrokerbot indexed brokerbot);

  constructor(address _owner) Ownable(_owner) {}

  /// @notice Per network only one active brokerbot should exist per base/share pair
  /// @param _brokerbot The brokerbot contract that should be registered.
  /// @param _base The contract of the base currency of the brokerbot.
  /// @param _token The contract of the share token of the brokerbot.
  function registerBrokerbot(IBrokerbot _brokerbot, IERC20 _base, IERC20 _token ) external onlyOwner() {
    getBrokerbot[_base][_token] = _brokerbot;
    emit RegisterBrokerbot(_brokerbot, _base, _token);
  }

  /// @notice This event is usful for indexers/subgraphs to update token balances which are not tracked with other events
  /// @param _brokerbot The brokerbot that should be synced
  function syncBrokerbot(IBrokerbot _brokerbot) external {
    emit SyncBrokerbot(_brokerbot);
  }

}

File 2 of 4 : IERC20.sol
/**
* SPDX-License-Identifier: MIT
*
* Copyright (c) 2016-2019 zOS Global Limited
*
*/
pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see `ERC20Detailed`.
 */

interface IERC20 {

    // Optional functions
    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function decimals() external view returns (uint8);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a `Transfer` event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through `transferFrom`. This is
     * zero by default.
     *
     * This value changes when `approve` or `transferFrom` are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * > Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an `Approval` event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a `Transfer` event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to `approve`. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

}

File 3 of 4 : IBrokerbot.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../ERC20/IERC20.sol";

interface IBrokerbot {

  function base() external view returns (IERC20);
  
  function settings() external view returns (uint256);

  // @return The amount of shares bought on buying or how much in the base currency is transfered on selling
  function processIncoming(IERC20 token_, address from, uint256 amount, bytes calldata ref) external payable returns (uint256);

}

File 4 of 4 : Ownable.sol
// SPDX-License-Identifier: MIT
//
// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
//
// Modifications:
// - Replaced Context._msgSender() with msg.sender
// - Made leaner
// - Extracted interface

pragma solidity ^0.8.0;

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable {

    address public owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor (address initialOwner) {
        owner = initialOwner;
        emit OwnershipTransferred(address(0), owner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) external onlyOwner {
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }

    modifier onlyOwner() {
        require(owner == msg.sender, "not owner");
        _;
    }
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IBrokerbot","name":"brokerbot","type":"address"},{"indexed":true,"internalType":"contract IERC20","name":"base","type":"address"},{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"}],"name":"RegisterBrokerbot","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IBrokerbot","name":"brokerbot","type":"address"}],"name":"SyncBrokerbot","type":"event"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"},{"internalType":"contract IERC20","name":"","type":"address"}],"name":"getBrokerbot","outputs":[{"internalType":"contract IBrokerbot","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IBrokerbot","name":"_brokerbot","type":"address"},{"internalType":"contract IERC20","name":"_base","type":"address"},{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"registerBrokerbot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IBrokerbot","name":"_brokerbot","type":"address"}],"name":"syncBrokerbot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5060405161044338038061044383398101604081905261002f9161007e565b600080546001600160a01b0319166001600160a01b03831690811782556040518392907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350506100ae565b60006020828403121561009057600080fd5b81516001600160a01b03811681146100a757600080fd5b9392505050565b610386806100bd6000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806309f793711461005c57806376abbf0a146100715780638da5cb5b146100c15780639abad75e146100d4578063f2fde38b146100e7575b600080fd5b61006f61006a3660046102a8565b6100fa565b005b6100a561007f3660046102f3565b60016020908152600092835260408084209091529082529020546001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b6000546100a5906001600160a01b031681565b61006f6100e236600461032c565b6101b8565b61006f6100f536600461032c565b6101ef565b6000546001600160a01b031633146101455760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b60448201526064015b60405180910390fd5b6001600160a01b0382811660008181526001602090815260408083208686168085529083529281902080546001600160a01b03191695891695861790555193845290927f3cc22fa2b08c920913fb7245fcc72114373ad796b1be5d44ee1ff6ad60b3a65a910160405180910390a3505050565b6040516001600160a01b038216907f8709efa7ee1ccd26c55d0d4770969d05389572dec0bc4e3b34acfdf89f1b64f990600090a250565b6000546001600160a01b031633146102355760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015260640161013c565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811681146102a557600080fd5b50565b6000806000606084860312156102bd57600080fd5b83356102c881610290565b925060208401356102d881610290565b915060408401356102e881610290565b809150509250925092565b6000806040838503121561030657600080fd5b823561031181610290565b9150602083013561032181610290565b809150509250929050565b60006020828403121561033e57600080fd5b813561034981610290565b939250505056fea26469706673582212205ed12650a21da8d2e12c10f8a3eba2c74057053b41e9be3ad1d279dcbedfa2d864736f6c634300080c0033000000000000000000000000cc59c42d05bd66fe22fba27016f783af43f68fa7

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100575760003560e01c806309f793711461005c57806376abbf0a146100715780638da5cb5b146100c15780639abad75e146100d4578063f2fde38b146100e7575b600080fd5b61006f61006a3660046102a8565b6100fa565b005b6100a561007f3660046102f3565b60016020908152600092835260408084209091529082529020546001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b6000546100a5906001600160a01b031681565b61006f6100e236600461032c565b6101b8565b61006f6100f536600461032c565b6101ef565b6000546001600160a01b031633146101455760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b60448201526064015b60405180910390fd5b6001600160a01b0382811660008181526001602090815260408083208686168085529083529281902080546001600160a01b03191695891695861790555193845290927f3cc22fa2b08c920913fb7245fcc72114373ad796b1be5d44ee1ff6ad60b3a65a910160405180910390a3505050565b6040516001600160a01b038216907f8709efa7ee1ccd26c55d0d4770969d05389572dec0bc4e3b34acfdf89f1b64f990600090a250565b6000546001600160a01b031633146102355760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015260640161013c565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811681146102a557600080fd5b50565b6000806000606084860312156102bd57600080fd5b83356102c881610290565b925060208401356102d881610290565b915060408401356102e881610290565b809150509250925092565b6000806040838503121561030657600080fd5b823561031181610290565b9150602083013561032181610290565b809150509250929050565b60006020828403121561033e57600080fd5b813561034981610290565b939250505056fea26469706673582212205ed12650a21da8d2e12c10f8a3eba2c74057053b41e9be3ad1d279dcbedfa2d864736f6c634300080c0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000cc59c42d05bd66fe22fba27016f783af43f68fa7

-----Decoded View---------------
Arg [0] : _owner (address): 0xCc59c42d05bd66fe22FBA27016f783af43f68fa7

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000cc59c42d05bd66fe22fba27016f783af43f68fa7


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.