Endpoint
EndPoint contract
Contract entry point for operation executing by executor to destination protocol Also contract contain GOV-protocol logic for adding and verify new protocols and transmitters
Endpoint__InvalidProtocolId
Endpoint__ExecutorIsNotAllowed
Endpoint__ExecutorIsAlreadyAllowed
Endpoint__ProtocolIsNotAllowed
Endpoint__ProtocolIsNotAdded
Endpoint__OpIsNotApproved
Endpoint__OpIsAlreadyExecuted
Endpoint__OpIsNotForThisChain
Endpoint__IsNotAllowedProposer
Endpoint__ZeroTransmittersCount
Endpoint__AddrTooBig
Endpoint__SelectorTooBig
Endpoint__ParamsTooBig
ProposalExecuted
Propose
ADMIN
GOV
govProtocolId
Signature
AllowedProtocolInfo
numberOfAllowedTransmitters
allowedTransmitters
executors
allowedProposers
allowedProtocolInfo
protocol info map
protocolAddressToProtocolId
map of protocol contract address to protocol id
opExecutedMap
map of executed operations
rateDecimals
10000 = 100%
masterSmartContract
eobChainId
globalNonce
protocolNonce
_isAllowedExecutorInternal
END of VARS *
isAllowedExecutor
_isAllowedProtocolInternal
isAllowedProtocol
_isAllowedProposerInternal
isAllowedProposer
_isValidProtocol
isValidProtocol
initialize
_authorizeUpgrade
__chainId
addGov
Adding gov contract and first gov transmitters
Parameters
Name | Type | Description |
---|---|---|
govAddress | address | gov contract address |
consensusTargetRate | uint256 | consensus target rate for gov protocol |
govTransmitters | address[] | initial gov transmitters addresses |
govExecutors | address[] | initial gov executors addresses |
_masterSmartContract | address | address of Master Smart Contract |
addAllowedProtocol
Adding protocol to whitelist
Parameters
Name | Type | Description |
---|---|---|
_protocolId | bytes32 | protocol Id |
_consensusTargetRate | uint256 | consensus target rate |
_transmitters | address[] | initial array of transmitters |
addAllowedProtocolAddress
Adding protocol contract address to whitelist
Parameters
Name | Type | Description |
---|---|---|
_protocolId | bytes32 | protocol id |
_protocolAddress | address | protocol contract address |
removeAllowedProtocolAddress
Removing protocol contract address from whitelist
Parameters
Name | Type | Description |
---|---|---|
_protocolId | bytes32 | protocol id |
_protocolAddress | address | protocol contract address |
addAllowedProposer
Adding proposer to whitelist
Parameters
Name | Type | Description |
---|---|---|
_protocolId | bytes32 | |
_proposer | address | address of proposer to add |
removeAllowedProposer
Removing proposer to whitelist
Parameters
Name | Type | Description |
---|---|---|
_protocolId | bytes32 | |
_proposer | address | address of proposer to remove |
addExecutor
Adding executor to whitelist
Parameters
Name | Type | Description |
---|---|---|
_protocolId | bytes32 | protocol id |
_executor | address | address of executor to add |
removeExecutor
Removing executor from whitelist
Parameters
Name | Type | Description |
---|---|---|
_protocolId | bytes32 | protocol address |
_executor | address | address of executor to remove |
addTransmitters
Adding transmitters to whitelist (payable is cheaper in gas cost)
Parameters
Name | Type | Description |
---|---|---|
_protocolId | bytes32 | protocol id |
_transmitters | address[] | array with addresses of transmitters to add |
removeTransmitters
Removing transmitters from whitelist (payable is cheaper in gas cost)
Parameters
Name | Type | Description |
---|---|---|
_protocolId | bytes32 | protocol address |
_transmitters | address[] | array with addresses of transmitters to remove |
setConsensusTargetRate
Setting of target rate
Parameters
Name | Type | Description |
---|---|---|
_protocolId | bytes32 | protocol id |
rate | uint256 | target rate |
checkOperationsExecuteStatus
Get array of opHashes, check it was executed and returns array of result
Parameters
Name | Type | Description |
---|---|---|
opHashArray | uint256[] | array of operation hashes |
Return Values
Name | Type | Description |
---|---|---|
resultArray | bool[] | array of bool values indicates that operation was executed or not |
executeOperation
execute approved operation
Parameters
Name | Type | Description |
---|---|---|
opData | struct OperationLib.OperationData | 1 |
transmitterSigs | struct EndPoint.Signature[] | 2 |
checkProposeData
propose
function of emitting event Propose for catching by transmitters
Parameters
Name | Type | Description |
---|---|---|
protocolId | bytes32 | protocol id to interact |
dstChainId | uint256 | dest chain id |
protocolAddress | bytes | dest protocol address is bytes32 cause dstChainId may be non-EVM |
functionSelector | bytes | dest protocol function id, for EVM is encoded abi func selector, for non-EVM may be func signature or whole func name |
params | bytes | function params for dest protocol function |
proposeInOrder
function of emitting event Propose with order for catching by transmitters
Parameters
Name | Type | Description |
---|---|---|
protocolId | bytes32 | protocol id to interact |
dstChainId | uint256 | dest chain id |
protocolAddress | bytes | dest protocol address is bytes32 cause dstChainId may be non-EVM |
functionSelector | bytes | dest protocol function id, for EVM is encoded abi func selector, for non-EVM may be func signature or whole func name |
params | bytes | function params for dest protocol function |
Last updated