@@ -12,9 +12,7 @@ import {
12
12
IbcUniversalPacketReceiver
13
13
} from "vibc-core-smart-contracts/IbcMiddleware.sol " ;
14
14
15
- // This is an example contract which exposes an onReceive interface. This is for messaging protocols
16
- // where messages are delivered directly to the messaging protocol's contract rather than this contract.
17
- // Comments marked by * imply that an integration point should be changed by external contracts.
15
+ /// @notice Polymer implementation of the Generalised Incentives based on vIBC.
18
16
contract IncentivizedPolymerEscrow is IMETimeoutExtension , IbcMwUser {
19
17
error NotEnoughGasProvidedForVerification ();
20
18
error NonVerifiableMessage ();
@@ -58,6 +56,8 @@ contract IncentivizedPolymerEscrow is IMETimeoutExtension, IbcMwUser {
58
56
);
59
57
}
60
58
59
+ /// @notice This function is used to allow acks to be executed twice (if the first one ran out of gas)
60
+ /// This is not intended to allow processPacket to work.
61
61
function _verifyPacket (bytes calldata , /* _metadata */ bytes calldata _message )
62
62
internal
63
63
view
@@ -72,9 +72,7 @@ contract IncentivizedPolymerEscrow is IMETimeoutExtension, IbcMwUser {
72
72
message_ = _message;
73
73
}
74
74
75
- /// @dev This is an example of how this function can be disabled.
76
- /// This doesn't have to be how it is done. This implementation works
77
- /// fine with and without (There is even a test for that).
75
+ /// @dev Disable processPacket
78
76
function processPacket (
79
77
bytes calldata , /* messagingProtocolContext */
80
78
bytes calldata , /* rawMessage */
@@ -108,7 +106,7 @@ contract IncentivizedPolymerEscrow is IMETimeoutExtension, IbcMwUser {
108
106
return AckPacket ({success: true , data: receiveAck});
109
107
}
110
108
111
- // The escrow manages acks, so any message can be directly provided to _onReceive .
109
+ // The escrow manages acks, so any message can be directly provided to _handleAck .
112
110
function onUniversalAcknowledgement (UniversalPacket calldata packet , AckPacket calldata ack ) external onlyIbcMw {
113
111
uint256 gasLimit = gasleft ();
114
112
bytes32 feeRecipitent = bytes32 (uint256 (uint160 (tx .origin )));
0 commit comments