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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