Bot Controller Smart Contract
{"id":"ssc-mainnet1","json":{"contractName":"contract","contractAction":"update","contractPayload":{"name":"botcontroller","params":"","code":"Y29uc3QgVVRJTElUWV9UT0tFTl9TWU1CT0w9IkVORyIsQkFTRV9TWU1CT0w9IlNURUVNUCIsQkFTRV9TWU1CT0xfUFJFQ0lTSU9OPTgsQ0hBSU5fVFlQRT0iU1RFRU0iO2FjdGlvbnMudXBkYXRlUGFyYW1zPWFzeW5jIHBheWxvYWQ9PntpZihhcGkuc2VuZGVyIT09YXBpLm93bmVyKXJldHVybjtjb25zdHtiYXNpY0ZlZTpiYXNpY0ZlZSxiYXNpY1NldHRpbmdzRmVlOmJhc2ljU2V0dGluZ3NGZWUscHJlbWl1bUZlZTpwcmVtaXVtRmVlLHByZW1pdW1CYXNlU3Rha2U6cHJlbWl1bUJhc2VTdGFrZSxzdGFrZVBlck1hcmtldDpzdGFrZVBlck1hcmtldCxiYXNpY0R1cmF0aW9uQmxvY2tzOmJhc2ljRHVyYXRpb25CbG9ja3MsYmFzaWNDb29sZG93bkJsb2NrczpiYXNpY0Nvb2xkb3duQmxvY2tzLGJhc2ljTWluVGlja0ludGVydmFsQmxvY2tzOmJhc2ljTWluVGlja0ludGVydmFsQmxvY2tzLHByZW1pdW1NaW5UaWNrSW50ZXJ2YWxCbG9ja3M6cHJlbWl1bU1pblRpY2tJbnRlcnZhbEJsb2NrcyxiYXNpY01heFRpY2tzUGVyQmxvY2s6YmFzaWNNYXhUaWNrc1BlckJsb2NrLHByZW1pdW1NYXhUaWNrc1BlckJsb2NrOnByZW1pdW1NYXhUaWNrc1BlckJsb2NrfT1wYXlsb2FkLHBhcmFtcz1hd2FpdCBhcGkuZGIuZmluZE9uZSgicGFyYW1zIix7fSk7YmFzaWNGZWUmJiJzdHJpbmciPT10eXBlb2YgYmFzaWNGZWUmJiFhcGkuQmlnTnVtYmVyKGJhc2ljRmVlKS5pc05hTigpJiZhcGkuQmlnTnVtYmVyKGJhc2ljRmVlKS5ndGUoM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