Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00Latest 25 from a total of 37 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Register Brokerb... | 115333676 | 721 days ago | IN | 0 ETH | 0.000044012377 | ||||
| Register Brokerb... | 114740937 | 735 days ago | IN | 0 ETH | 0.000098910544 | ||||
| Register Brokerb... | 113829101 | 756 days ago | IN | 0 ETH | 0.000091472468 | ||||
| Register Brokerb... | 113652325 | 760 days ago | IN | 0 ETH | 0.000102360273 | ||||
| Register Brokerb... | 113354461 | 767 days ago | IN | 0 ETH | 0.000084674012 | ||||
| Register Brokerb... | 106828197 | 918 days ago | IN | 0 ETH | 0.000037863092 | ||||
| Register Brokerb... | 106444925 | 927 days ago | IN | 0 ETH | 0.000040925249 | ||||
| Register Brokerb... | 72759854 | 1074 days ago | IN | 0 ETH | 0.000197404856 | ||||
| Register Brokerb... | 71248197 | 1082 days ago | IN | 0 ETH | 0.0000711458 | ||||
| Register Brokerb... | 56656565 | 1115 days ago | IN | 0 ETH | 0.000062829708 | ||||
| Register Brokerb... | 50135487 | 1128 days ago | IN | 0 ETH | 0.000253037258 | ||||
| Register Brokerb... | 45731126 | 1138 days ago | IN | 0 ETH | 0.000098707889 | ||||
| Register Brokerb... | 44402663 | 1142 days ago | IN | 0 ETH | 0.000049802167 | ||||
| Sync Brokerbot | 31393627 | 1179 days ago | IN | 0 ETH | 0.000102199525 | ||||
| Register Brokerb... | 29169252 | 1191 days ago | IN | 0 ETH | 0.000113556609 | ||||
| Register Brokerb... | 27288660 | 1200 days ago | IN | 0 ETH | 0.000040309139 | ||||
| Register Brokerb... | 27178020 | 1201 days ago | IN | 0 ETH | 0.000135064502 | ||||
| Register Brokerb... | 26037902 | 1206 days ago | IN | 0 ETH | 0.000094310602 | ||||
| Register Brokerb... | 25547779 | 1208 days ago | IN | 0 ETH | 0.000021700443 | ||||
| Register Brokerb... | 21344998 | 1234 days ago | IN | 0 ETH | 0.000103694653 | ||||
| Register Brokerb... | 15855705 | 1270 days ago | IN | 0 ETH | 0.000095772806 | ||||
| Register Brokerb... | 15834014 | 1270 days ago | IN | 0 ETH | 0.000084421735 | ||||
| Register Brokerb... | 14023820 | 1289 days ago | IN | 0 ETH | 0.000276884007 | ||||
| Register Brokerb... | 13326673 | 1299 days ago | IN | 0 ETH | 0.000572624957 | ||||
| Register Brokerb... | 12478708 | 1306 days ago | IN | 0 ETH | 0.000196618637 |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
BrokerbotRegistry
Compiler Version
v0.8.12+commit.f00d7308
Contract Source Code (Solidity Standard Json-Input format)
/**
* 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);
}
}/**
* 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);
}// 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);
}// 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");
_;
}
}{
"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
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"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"}]Contract Creation Code
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
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.