@@ -33,13 +33,6 @@ contract ExecutorQuoterRouter is IExecutorQuoterRouter {
3333 error GovernanceExpired (uint64 expiryTime );
3434 error NotAnEvmAddress (bytes32 );
3535
36- struct ExecutionParams {
37- uint16 dstChain;
38- bytes32 dstAddr;
39- address refundAddr;
40- address quoterAddr;
41- }
42-
4336 constructor (address _executor ) {
4437 EXECUTOR = IExecutor (_executor);
4538 OUR_CHAIN = EXECUTOR.ourChain ();
@@ -119,34 +112,25 @@ contract ExecutorQuoterRouter is IExecutorQuoterRouter {
119112 bytes calldata requestBytes ,
120113 bytes calldata relayInstructions
121114 ) external payable {
122- ExecutionParams memory params =
123- ExecutionParams ({dstChain: dstChain, dstAddr: dstAddr, refundAddr: refundAddr, quoterAddr: quoterAddr});
124- _requestExecutionInternal (params, requestBytes, relayInstructions);
125- }
126-
127- function _requestExecutionInternal (
128- ExecutionParams memory params ,
129- bytes calldata requestBytes ,
130- bytes calldata relayInstructions
131- ) private {
132- IExecutorQuoter implementation = quoterContract[params.quoterAddr];
133- (uint256 requiredPayment , bytes32 payeeAddress , bytes32 quoteBody ) = implementation.requestExecutionQuote (
134- params.dstChain, params.dstAddr, params.refundAddr, requestBytes, relayInstructions
135- );
115+ IExecutorQuoter implementation = quoterContract[quoterAddr];
116+ (uint256 requiredPayment , bytes32 payeeAddress , bytes32 quoteBody ) =
117+ implementation.requestExecutionQuote (dstChain, dstAddr, refundAddr, requestBytes, relayInstructions);
136118 if (msg .value < requiredPayment) {
137119 revert Underpaid (msg .value , requiredPayment);
138120 }
139121 if (msg .value > requiredPayment) {
140- (bool refundSuccessful ,) = payable (params. refundAddr).call {value: msg .value - requiredPayment}("" );
122+ (bool refundSuccessful ,) = payable (refundAddr).call {value: msg .value - requiredPayment}("" );
141123 if (! refundSuccessful) {
142- revert RefundFailed (params. refundAddr);
124+ revert RefundFailed (refundAddr);
143125 }
144126 }
145- bytes memory signedQuote = abi.encodePacked (
146- QUOTE_PREFIX, params.quoterAddr, payeeAddress, OUR_CHAIN, params.dstChain, EXPIRY_TIME, quoteBody
147- );
148127 EXECUTOR.requestExecution {value: requiredPayment}(
149- params.dstChain, params.dstAddr, params.refundAddr, signedQuote, requestBytes, relayInstructions
128+ dstChain,
129+ dstAddr,
130+ refundAddr,
131+ abi.encodePacked (QUOTE_PREFIX, quoterAddr, payeeAddress, OUR_CHAIN, dstChain, EXPIRY_TIME, quoteBody),
132+ requestBytes,
133+ relayInstructions
150134 );
151135 // this must emit a message in this function in order to verify off-chain that this contract generated the quote
152136 // the implementation is the only data available in this context that is not available from the executor event
0 commit comments