Skip to content

Commit 7a5ee29

Browse files
committed
rearrange code
1 parent 2f847fc commit 7a5ee29

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

packages/ethereum-contracts/contracts/utils/Only712MacroForwarder.sol

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -95,23 +95,6 @@ contract Only712MacroForwarder is ForwarderBase, EIP712, NonceManager {
9595

9696
// PUBLIC FUNCTIONS
9797

98-
/**
99-
* @dev Encode action and security params into the payload bytes expected by runMacro.
100-
* @param actionParams params specific to the macro action, already ABI-encoded by the caller.
101-
* @param security security related parameters
102-
* @return Encoded payload to pass to runMacro()
103-
*/
104-
function encodeParams(bytes calldata actionParams, SecurityType calldata security)
105-
external pure
106-
returns (bytes memory)
107-
{
108-
PrimaryType memory payload = PrimaryType({
109-
action: ActionType({ actionParams: actionParams }),
110-
security: security
111-
});
112-
return abi.encode(payload);
113-
}
114-
11598
/**
11699
* @dev Run the macro with encoded payload (generic + macro specific fragments).
117100
* @param m Target macro.
@@ -157,6 +140,23 @@ contract Only712MacroForwarder is ForwarderBase, EIP712, NonceManager {
157140
return retVal;
158141
}
159142

143+
/**
144+
* @dev Encode action and security params into the payload bytes expected by runMacro.
145+
* @param actionParams params specific to the macro action, already ABI-encoded by the caller.
146+
* @param security security related parameters
147+
* @return Encoded payload to pass to runMacro()
148+
*/
149+
function encodeParams(bytes calldata actionParams, SecurityType calldata security)
150+
external pure
151+
returns (bytes memory)
152+
{
153+
PrimaryType memory payload = PrimaryType({
154+
action: ActionType({ actionParams: actionParams }),
155+
security: security
156+
});
157+
return abi.encode(payload);
158+
}
159+
160160
// TODO: should this exist?
161161
function getTypeDefinition(IUserDefined712Macro m, bytes calldata params) external view returns (string memory) {
162162
return _getTypeDefinition(m, params);

0 commit comments

Comments
 (0)