@@ -146,18 +146,21 @@ contract Bridge is Pausable, Context {
146146 @param handlerAddress Address of handler resource will be set for.
147147 @param resourceID ResourceID to be used when making deposits.
148148 @param contractAddress Address of contract to be called when a deposit is made and a deposited is executed.
149+ @param depositFunctionSig Function signature of method to be called in {contractAddress} when a deposit is made.
150+ @param depositFunctionDepositorOffset Depositor address position offset in the metadata, in bytes.
151+ @param executeFunctionSig Function signature of method to be called in {contractAddress} when a deposit is executed.
149152 */
150153 function adminSetGenericResource (
151154 address handlerAddress ,
152155 bytes32 resourceID ,
153156 address contractAddress ,
154157 bytes4 depositFunctionSig ,
155- uint256 depositFunctionDepositerOffset ,
158+ uint256 depositFunctionDepositorOffset ,
156159 bytes4 executeFunctionSig
157160 ) external onlyAllowed {
158161 _resourceIDToHandlerAddress[resourceID] = handlerAddress;
159162 IGenericHandler handler = IGenericHandler (handlerAddress);
160- handler.setResource (resourceID, contractAddress, depositFunctionSig, depositFunctionDepositerOffset , executeFunctionSig);
163+ handler.setResource (resourceID, contractAddress, depositFunctionSig, depositFunctionDepositorOffset , executeFunctionSig);
161164 }
162165
163166 /**
@@ -274,6 +277,9 @@ contract Bridge is Pausable, Context {
274277 @param data Data originally provided when deposit was made.
275278 @param signature bytes memory signature composed of MPC key shares
276279 @notice Emits {ProposalExecution} event.
280+ @notice Behaviour of this function is different for {GenericHandler} and other specific ERC handlers.
281+ In the case of ERC handler, when execution fails, the handler will terminate the function with revert.
282+ In the case of {GenericHandler}, when execution fails, the handler will emit a failure event and terminate the function normally.
277283 */
278284 function executeProposal (uint8 originDomainID , uint64 depositNonce , bytes calldata data , bytes32 resourceID , bytes calldata signature ) public whenNotPaused {
279285 require (isProposalExecuted (originDomainID, depositNonce) != true , "Deposit with provided nonce already executed " );
@@ -303,6 +309,9 @@ contract Bridge is Pausable, Context {
303309 - data Data originally provided when deposit was made.
304310 @param signature bytes memory signature for the whole array composed of MPC key shares
305311 @notice Emits {ProposalExecution} event for each proposal in the batch.
312+ @notice Behaviour of this function is different for {GenericHandler} and other specific ERC handlers.
313+ In the case of ERC handler, when execution fails, the handler will terminate the function with revert.
314+ In the case of {GenericHandler}, when execution fails, the handler will emit a failure event and terminate the function normally.
306315 */
307316 function executeProposals (Proposal[] memory proposals , bytes memory signature ) public whenNotPaused {
308317 require (proposals.length > 0 , "Proposals can't be an empty array " );
@@ -373,6 +382,7 @@ contract Bridge is Pausable, Context {
373382 /**
374383 @notice This method is used to trigger the process for retrying failed deposits on the MPC side.
375384 @param txHash Transaction hash which contains deposit that should be retried
385+ @notice This is not applicable for failed executions on {GenericHandler}
376386 */
377387 function retry (string memory txHash ) external {
378388 emit Retry (txHash);
0 commit comments