Bot Controller Smart Contract

in #steem-engine4 years ago

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