Master Smart Contract
Master Smart Contract is a contract which should collect operations from transmitters with those signatures. Also it has gov functions which can administrate protocols:
allow new protocol
add/remove protocol address to interact on specified chain
add/remove proposer address on specified chain wich can proposing new operations due EndPoint.propose() function.
update transmitters on protocol
add/remove executors on specified chain
set consensus target rate
MasterSmartContract__GovProtocolAlreadyInited
MasterSmartContract__GovProtocolIsNotInited
MasterSmartContract__InvalidProtocolId
MasterSmartContract__ForbiddenOperationWithGovProtocol
MasterSmartContract__DaoIsNotAllowedOnSpecifiedChain
MasterSmartContract__ProtocolIsNotInited
MasterSmartContract__ProtocolIsNotInitedOnChain
MasterSmartContract__ProtocolAlreadyAdded
MasterSmartContract__ProtocolIsNotAllowed
MasterSmartContract__ProtocolAddressAlreadyExist
MasterSmartContract__TransmitterIsAlreadyAdded
MasterSmartContract__TransmitterIsNotAllowed
MasterSmartContract__WatcherIsNotAllowed
MasterSmartContract__OperationIsAlreadyApproved
MasterSmartContract__TransmitterIsAlreadyApproved
MasterSmartContract__WatcherIsAlreadyApproved
MasterSmartContract__OperationDoesNotExist
MasterSmartContract__OpIsNotApproved
MasterSmartContract__OpExecutionAlreadyApproved
MasterSmartContract__SignatureCheckFailed
MasterSmartContract__ProtocolIsPaused
MasterSmartContract__AddrTooBig
MasterSmartContract__SelectorTooBig
MasterSmartContract__ParamsTooBig
AddAllowedProtocol
SetProtocolPause
AddAllowedProtocolAddress
RemoveAllowedProtocolAddress
AddAllowedProposerAddress
RemoveAllowedProposerAddress
UpdateTransmitters
RemoveTransmitter
AddExecutor
RemoveExecutor
SetConsensusTargetRate
NewOperation
NewProof
ProposalApproved
ProposalExecuted
ADMIN
SPOTTER
STAKING_CONTRACTS
govProtocolId
InitOnChainStages
InitOnChainInfo
AllowedProtocolInfo
isInit
allowedTransmitters
allowedTransmitters map of allowed transmitters which can work with this protocol
allowedExecutors
allowedExecutors map of allowed executors addresses which can execute operations on specified protocol on specified chain
allowedProposers
allowedProposers map of allowed proposers addresses which can propose operations on specified protocol on specified chain
operations
map with operations, key: opHash is a uint256(keccak256(OperationData operationData)), value - Operation which need to validate and execute
allowedProtocolInfo
map with allowed protocols info
protocolAddressToProtocolId
map to associate specified protocol contract on specified chain id with protocol id
govContractAddresses
map of gov contract addresses on other chains
rateDecimals
10000 = 100%
allowedWatchers
watcher wich should approve operation execution
numberOfAllowedWatchers
number of allowed watchers
watchersConsensusTargetRate
watchers consensus target rate
endPoint
proposer contract
betManager
transmitters bet manager
externalDeveloperHub
externalDeveloper manager
lastExecutedOpNonceInOrder
last executed ordered operation nonce for specified protocol on specified chain
used for ordered operations to notify executors about last executed operation nonce
_isAllowedTransmitterInternal
END of VARS *
isAllowedTransmitter
_isAllowedWatcherInternal
isAllowedWatcher
_isAllowedProtocolInternal
isAllowedProtocol
__chainId
initialize
Initialize
Parameters
setContracts
Set contracts addresses
_authorizeUpgrade
getSelector
proposeAddAllowedProtocol
Make proposal to adding allowed protocol to endPoint on specified chain
Parameters
proposeAddAllowedProtocolAddress
Make proposal to adding allowed protocol contract address to endPoint on specified chain
Parameters
proposeRemoveAllowedProtocolAddress
Make proposal to removing allowed protocol contract address from endPoint on specified chain
Parameters
proposeAddAllowedProposerAddress
Make proposal to adding allowed proposer on specified chain
Parameters
proposeRemoveAllowedProposerAddress
Make proposal to removing allowed proposer on specified chain
Parameters
proposeAddExecutor
Make proposal to adding allowed executor to specified protocol on specified chain
Parameters
proposeRemoveExecutor
Make proposal to removing allowed executor to specified protocol on specified chain
Parameters
proposeAddTransmitters
Make proposal to adding allowed transmitter to specified protocol on specified chain
Parameters
proposeRemoveTransmitters
Make proposal to removing allowed transmitter to specified protocol on specified chain
Parameters
proposeUpdateTransmitters
Make proposal to update allowed transmitter to specified protocol on specified chain
Parameters
proposeSetConsensusTargetRate
Make proposal to set consensus target rate
Parameters
handleAddAllowedProtocol
Callback function for handle 2nd step of protocol inition on specified chain.
called by EndPoint from specified chain, after addAllowedProtocol processing
Parameters
initGovProtocol
Adding info about GOV protocol
Parameters
addGovProtocolAddress
add gov contract address and executors on specified chain
Parameters
addProtocol
Adding new protocol by id
Parameters
setProtocolPause
Pause/unpause protocol
Parameters
addWatcher
Adding watcher to whitelist
Parameters
removeWatcher
Removing watcher from whitelist
Parameters
setWatchersConsensusTargetRate
Removing watcher from whitelist
Parameters
addAllowedProtocolAddress
Adding chainId and protocol address to whitelist
Parameters
removeAllowedProtocolAddress
Removing protocol address from whitelist for specified protocol on specified chain
Parameters
addAllowedProposerAddress
Adding proposer to whitelist for specified protocol on specified chain
Parameters
removeAllowedProposerAddress
Removing proposer from whitelist for specified protocol on specified chain
Parameters
addExecutor
Adding executor to specified protocol on specified chain id
Parameters
removeExecutor
Removing executor to specified protocol on specified chain id
Parameters
updateTransmitters
Update transmitters to specified protocol
called by RoundManager and AgentManager
Parameters
removeTransmitter
Removing transmitters from whitelist called when transmitters was banned or slashed
Parameters
setConsensusTargetRate
Setting of target rate
Parameters
getOpData
getter of operation data
Parameters
Return Values
getOpSigs
getter of operation proofs
Parameters
Return Values
getProtocolInitStateOnChain
checkOperationsApproveStatus
Get array of opHashes, check it was approved and returns array of result
Parameters
Return Values
checkOperationsExecuteStatus
Get array of opHashes, check it was executed and returns array of result
Parameters
Return Values
checkOperationSignature
recover and check transmitter's signature
Parameters
proposeOperation
proposing an operation/approve an operation/give an operation of status approved
0xe1b3d28a
Parameters
approveOperationExecuting
approve operation was executed
Parameters
isPaused
isInited
getTransmitters
Last updated