Operator Manager Contract
Manages relayers access to the Pool
Last updated
Was this helpful?
Manages relayers access to the Pool
Last updated
Was this helpful?
The Operator Manager contract organizes and limits operators access to the Pool. Transactions should be appended to the Merkle tree strictly in a serial manner. The relayer node (or a user in case of direct Pool interaction) should calculate a Merkle tree proof (zkSNARK) before sending a transaction.
However, the transaction will revert if the Merkle tree has changed during this calculation. If several relayers send transactions simultaneously collisions will appear and the transaction will be unsuccessful (along with spent gas fees).
To prevent this case we restrict Pool interactions using the Operator Manager contract. The Operator manager contract has three methods:
isOperator
Returns true when the transaction origin sender is the operator and can interact with the Pool.
isOperatorFeeReceiver
Checks if the primary operator is also the fee receiver. There are two operator accounts. The first (_operator) sends service transactions, the second (_feeReceiver) receives fees and covers expenses. These should not be the same account.
operatorURI
This string URI identifier for the Operator (typically the URL endpoint of the relayer).
The contract interface source code:
For the contract implementation please refer to the