StreamDataSpotterFactory

StreamDataSpotterFactory__SpotterDoesNotExist

error StreamDataSpotterFactory__SpotterDoesNotExist(bytes32, bytes32)

StreamDataSpotterFactory__SpotterAlreadyExist

error StreamDataSpotterFactory__SpotterAlreadyExist(bytes32, bytes32)

StreamDataSpotterFactory__SpotterDisabledSettingAllowedKeys

error StreamDataSpotterFactory__SpotterDisabledSettingAllowedKeys(bytes32, bytes32)

StreamDataSpotterFactory__CallerIsNotSpotter

error StreamDataSpotterFactory__CallerIsNotSpotter()

StreamDataSpotterFactory__CallerIsNotAllowedTransmitter

error StreamDataSpotterFactory__CallerIsNotAllowedTransmitter()

StreamDataSpotterFactory__CallerIsNotAllowedExecutor

error StreamDataSpotterFactory__CallerIsNotAllowedExecutor()

StreamDataSpotterFactory__CallerIsNotAllowedProtocolOwner

error StreamDataSpotterFactory__CallerIsNotAllowedProtocolOwner()

StreamDataSpotterFactory__InvalidConsensusRate

error StreamDataSpotterFactory__InvalidConsensusRate()

NewStreamDataSpotter

event NewStreamDataSpotter(bytes32 protocolId, bytes32 sourceId, address spotter, address processingLib, uint256 consensusRate, uint256 minFinalizationInterval, bytes32[] allowedKeys, bool onlyAllowedKeys)

SetSpotterConsensusRate

event SetSpotterConsensusRate(bytes32 protocolId, bytes32 sourceId, uint256 newConsensusRate)

SetMinFinalizationInterval

event SetMinFinalizationInterval(bytes32 protocolId, bytes32 sourceId, uint256 newMinFinalizationInterval)

SetAllowedKeys

event SetAllowedKeys(bytes32 protocolId, bytes32 sourceId, bytes32[] allowedKeys)

ADMIN

bytes32 ADMIN

ROUND_MANAGER

bytes32 ROUND_MANAGER

PendedConsensusRate

struct PendedConsensusRate {
  bytes32 protocolId;
  bytes32 sourceId;
  uint256 newConsensusRate;
}

PendedMinFinalizationInterval

struct PendedMinFinalizationInterval {
  bytes32 protocolId;
  bytes32 sourceId;
  uint256 newMinFinalizationInterval;
}

pendedConsensusRate

struct StreamDataSpotterFactory.PendedConsensusRate[] pendedConsensusRate

pendedMinFinalizationInterval

struct StreamDataSpotterFactory.PendedMinFinalizationInterval[] pendedMinFinalizationInterval

isSpotter

mapping(address => bool) isSpotter

allSpotters

contract StreamDataSpotter[] allSpotters

externalDeveloperHub

contract ExternalDeveloperHub externalDeveloperHub

masterSmartContract

contract MasterSmartContract masterSmartContract

masterStreamDataSpotter

contract MasterStreamDataSpotter masterStreamDataSpotter

betManager

contract BetManager betManager

__chainId

function __chainId() internal view returns (uint256 id)

initialize

function initialize(address[5] initAddr) public

Initializer

Parameters

NameTypeDescription

initAddr

address[5]

0: admin, 1: externalDeveloperHub, 2: MasterSmartContract, 3: BetManager, 4: RoundManager

_authorizeUpgrade

function _authorizeUpgrade(address) internal

_onlyProtocolOwner

function _onlyProtocolOwner(bytes32 protocolId) internal view

onlyProtocolOwner

modifier onlyProtocolOwner(bytes32 protocolId)

_onlySpotter

function _onlySpotter() internal view

onlySpotter

modifier onlySpotter()

setMasterStreamDataSpotter

function setMasterStreamDataSpotter(address newMasterStreamDataSpotter) external

sets masterStreamDataSpotter contract address

Parameters

NameTypeDescription

newMasterStreamDataSpotter

address

MasterStreamDataSpotter contract address

placeBet

function placeBet(bytes32 protocolId, address transmitter, enum BetManager.BetType betType, uint256 opHash) external

releaseBetsAndReward

function releaseBetsAndReward(bytes32 protocolId, address[] agentBets, uint256 opHash) external

finalizeData

function finalizeData(bytes32 protocolId, bytes32 sourceId, bytes32 dataKey) external

Executor function that attempts to trigger update for a given dataKey asset

Parameters

NameTypeDescription

protocolId

bytes32

protocol id

sourceId

bytes32

source id

dataKey

bytes32

data key

proposeData

function proposeData(bytes32 protocolId, bytes32 sourceId, bytes32 dataKey, bytes value) external

Transmitter function that allows to propose data for a given dataKey asset

Parameters

NameTypeDescription

protocolId

bytes32

protocol id

sourceId

bytes32

source id

dataKey

bytes32

data key

value

bytes

deployNewStreamDataSpotter

function deployNewStreamDataSpotter(bytes32 protocolId, bytes32 sourceId, address processingLib, uint256 consensusRate, uint256 minFinalizationInterval, bytes32[] allowedKeys, bool onlyAllowedKeys) public returns (address)

Deploy spotter contract for the new sourceID

Parameters

NameTypeDescription

protocolId

bytes32

protocol id

sourceId

bytes32

source id

processingLib

address

address of deployed processing lib contract to be used for that spotter

consensusRate

uint256

consensus rate of agents necessary for update to happend

minFinalizationInterval

uint256

allowedKeys

bytes32[]

array of allowed data keys, only existing datakeys can be used to vote the data for

onlyAllowedKeys

bool

if false, any key can be used as data key in DataSpotter

setSpotterConsensusRate

function setSpotterConsensusRate(bytes32 protocolId, bytes32 sourceId, uint256 newConsensusRate) external

changes consensus rate for a spotter

Parameters

NameTypeDescription

protocolId

bytes32

protocol id

sourceId

bytes32

source id

newConsensusRate

uint256

new consensus rate

setMinFinalizationInterval

function setMinFinalizationInterval(bytes32 protocolId, bytes32 sourceId, uint256 newMinFinalizationInterval) external

changes minimum finalization interval for a spotter

Parameters

NameTypeDescription

protocolId

bytes32

protocol id

sourceId

bytes32

source id

newMinFinalizationInterval

uint256

new minimum finalization interval

setAllowedKeys

function setAllowedKeys(bytes32 protocolId, bytes32 sourceId, bytes32[] allowedKeys) external

set allowed keys for deployed spotter

Parameters

NameTypeDescription

protocolId

bytes32

protocol id

sourceId

bytes32

source id

allowedKeys

bytes32[]

array of new allowed datakeys

allSpottersLength

function allSpottersLength() external view returns (uint256)

getSpotter

function getSpotter(bytes32 protocolId, bytes32 sourceId) public view returns (address)

get spotter contract address for source id

Parameters

NameTypeDescription

protocolId

bytes32

protocol id

sourceId

bytes32

source id

getConsensusRate

function getConsensusRate(bytes32 protocolId, bytes32 sourceId) external view returns (uint256)

turnRound

function turnRound() external

Last updated