Aktionariat Documentation
Ask or search…
Comment on page

Get Brokerbot Contract for Token

The Brokerbot contact for a token can be found in the Brokerbot Registry, which we have on Mainnet and on 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);