Buy Shares
Get PaymentHub Address
PaymentHub paymentHub = Brokerbot.paymenthub;Set Up Contract
contract BuySharesExample {
//constants
BrokerbotRegistry public constant BROKERBOT_REGISTRY = 0xcB3e482df38d62E73A7aE0E15a2605caDcc5aE98;
IERC20 public constant XCHF = 0xB4272071eCAdd69d933AdcD19cA99fe80664fc08;
// immutables
IERC20 public immutable share;
Brokerbot public immutable brokerbot;
PaymentHub public immutable paymenthub;
contstructor(IERC20 shareToken){
share = shareToken;
brokerbot = BROKERBOT_REGISTRY.getBrokerbot(XCHF,share);
paymenthub = brokerbot.paymenthub();
} Buy with Base Currency (XCHF)
Buy with Ether
But with any ERC20
Last updated