Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 164 additions & 1 deletion config/clearSigningProposal.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$note": "ERC-7730 display.formats entries for the LIFI Diamond, generated by tasks/buildClearSigningProposal.ts from Foundry artifacts. Source of truth for clear-signing UX strings. Consumed by tasks/generateLedgerClearSigning.ts during the sync workflow: entries here are merged into the registry payload pushed to ethereum/clear-signing-erc7730-registry.",
"$count": 107,
"$count": 109,
"formats": {
"startBridgeTokensViaAcross((bytes32 transactionId, string bridge, string integrator, address referrer, address sendingAssetId, address receiver, uint256 minAmount, uint256 destinationChainId, bool hasSourceSwaps, bool hasDestinationCall) _bridgeData, (int64 relayerFeePct, uint32 quoteTimestamp, bytes message, uint256 maxCount) _acrossData)": {
"intent": "Bridge via Across",
Expand Down Expand Up @@ -803,6 +803,73 @@
}
]
},
"startBridgeTokensViaFrax((bytes32 transactionId, string bridge, string integrator, address referrer, address sendingAssetId, address receiver, uint256 minAmount, uint256 destinationChainId, bool hasSourceSwaps, bool hasDestinationCall) _bridgeData, (address oft, uint32 dstEid, uint256 nativeFee, address refundRecipient) _fraxData)": {
"intent": "Bridge via Frax",
"interpolatedIntent": "Bridge {_bridgeData.minAmount} via Frax to chain {_bridgeData.destinationChainId} for {_bridgeData.receiver}",
"fields": [
{
"path": "_bridgeData.minAmount",
"label": "Amount to Bridge",
"format": "tokenAmount",
"params": {
"tokenPath": "_bridgeData.sendingAssetId"
},
"visible": "always"
},
{
"path": "_bridgeData.destinationChainId",
"label": "Destination Chain",
"format": "raw",
"visible": "always"
},
{
"path": "_bridgeData.receiver",
"label": "Recipient",
"format": "addressName",
"params": {
"types": [
"eoa",
"contract"
],
"sources": [
"local",
"ens"
]
},
"visible": "always"
},
{
"path": "_bridgeData.transactionId",
"label": "Transaction Id",
"visible": "never"
},
{
"path": "_bridgeData.bridge",
"label": "Bridge",
"visible": "never"
},
{
"path": "_bridgeData.integrator",
"label": "Integrator",
"visible": "never"
},
{
"path": "_bridgeData.referrer",
"label": "Referrer",
"visible": "never"
},
{
"path": "_bridgeData.hasSourceSwaps",
"label": "Has Source Swaps",
"visible": "never"
},
{
"path": "_bridgeData.hasDestinationCall",
"label": "Has Destination Call",
"visible": "never"
}
]
},
Comment on lines +806 to +872

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the reviewed config entry and related source/generator definitions.
git ls-files | rg '^config/clearSigningProposal\.json$|Frax|clearSigningProposal|signing proposal|clear signing' || true

echo '--- search for Frax-related clear signing definitions ---'
rg -n '"startBridgeTokensViaFrax|dstEid|refundRecipient|clearSigningProposal|Frax"' config src script .cursor -g '!**/dist/**' -g '!**/build/**' || true

echo '--- locate the reviewed block in config/clearSigningProposal.json ---'
rg -n -A40 -B20 '"startBridgeTokensViaFrax\(\(bytes32 transactionId, string bridge, string integrator, address referrer, address sendingAssetId, address receiver, uint256 minAmount, uint256 destinationChainId, bool hasSourceSwaps, bool hasDestinationCall\) _bridgeData, \(address oft, uint32 dstEid, uint256 nativeFee, address refundRecipient\) _fraxData\)"' config/clearSigningProposal.json || true

echo '--- find the generator/source that emits these descriptors ---'
fd -a 'clearSigningProposal*' . || true
fd -a '*signing*proposal*' . || true
fd -a '*Frax*' src script config . || true

Repository: lifinance/contracts

Length of output: 18151


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- FraxFacet relevant slice ---'
cat -n src/Facets/FraxFacet.sol | sed -n '1,380p'

echo '--- search for clearSigningProposal generator/templates ---'
rg -n "clearSigningProposal|clear signing|signing proposal|proposal" .cursor src script config docs -g '!**/dist/**' -g '!**/build/**' || true

echo '--- list likely generator files with correct globs ---'
fd -a --glob '*clear*sign*' . || true
fd -a --glob '*proposal*' . || true
fd -a --glob '*signing*' . || true

Repository: lifinance/contracts

Length of output: 50375


Display _fraxData.dstEid and _fraxData.refundRecipient in both Frax clear-signing entries.
_bridgeData.destinationChainId is only descriptive here; the facet actually bridges with _fraxData.dstEid, and _fraxData.refundRecipient receives dust and any refunded native/fee leftovers. Surface those fields in both Frax entries so the signing UI reflects the real destination and recipient.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/clearSigningProposal.json` around lines 806 - 872, Update both Frax
clear-signing entries to display _fraxData.dstEid as the destination and
_fraxData.refundRecipient as the refund recipient, replacing the descriptive
_bridgeData.destinationChainId presentation where appropriate. Add visible field
definitions for both _fraxData paths in each entry, using suitable destination
and address formatting while preserving the existing bridge fields.

"startBridgeTokensViaGarden((bytes32 transactionId, string bridge, string integrator, address referrer, address sendingAssetId, address receiver, uint256 minAmount, uint256 destinationChainId, bool hasSourceSwaps, bool hasDestinationCall) _bridgeData, (address redeemer, address refundAddress, uint256 timelock, bytes32 secretHash, bytes32 nonEvmReceiver) _gardenData)": {
"intent": "Bridge via Garden",
"interpolatedIntent": "Bridge {_bridgeData.minAmount} via Garden to chain {_bridgeData.destinationChainId} for {_bridgeData.receiver}",
Expand Down Expand Up @@ -3700,6 +3767,102 @@
}
]
},
"swapAndStartBridgeTokensViaFrax((bytes32 transactionId, string bridge, string integrator, address referrer, address sendingAssetId, address receiver, uint256 minAmount, uint256 destinationChainId, bool hasSourceSwaps, bool hasDestinationCall) _bridgeData, (address callTo, address approveTo, address sendingAssetId, address receivingAssetId, uint256 fromAmount, bytes callData, bool requiresDeposit)[] _swapData, (address oft, uint32 dstEid, uint256 nativeFee, address refundRecipient) _fraxData)": {
"intent": "Swap & Bridge via Frax",
"interpolatedIntent": "Swap then bridge {_bridgeData.minAmount} via Frax to chain {_bridgeData.destinationChainId} for {_bridgeData.receiver}",
"fields": [
{
"path": "_swapData.[0].fromAmount",
"label": "Amount to Swap",
"format": "tokenAmount",
"params": {
"tokenPath": "_swapData.[0].sendingAssetId"
},
"visible": "always"
},
{
"path": "_bridgeData.minAmount",
"label": "Minimum to Bridge",
"format": "tokenAmount",
"params": {
"tokenPath": "_bridgeData.sendingAssetId"
},
"visible": "always"
},
{
"path": "_bridgeData.destinationChainId",
"label": "Destination Chain",
"format": "raw",
"visible": "always"
},
{
"path": "_bridgeData.receiver",
"label": "Recipient",
"format": "addressName",
"params": {
"types": [
"eoa",
"contract"
],
"sources": [
"local",
"ens"
]
},
"visible": "always"
},
{
"path": "_bridgeData.transactionId",
"label": "Transaction Id",
"visible": "never"
},
{
"path": "_bridgeData.bridge",
"label": "Bridge",
"visible": "never"
},
{
"path": "_bridgeData.integrator",
"label": "Integrator",
"visible": "never"
},
{
"path": "_bridgeData.referrer",
"label": "Referrer",
"visible": "never"
},
{
"path": "_bridgeData.hasSourceSwaps",
"label": "Has Source Swaps",
"visible": "never"
},
{
"path": "_bridgeData.hasDestinationCall",
"label": "Has Destination Call",
"visible": "never"
},
{
"path": "_swapData.[].callData",
"label": "Swap Data Call Data",
"visible": "never"
},
{
"path": "_swapData.[].callTo",
"label": "Swap Data Call To",
"visible": "never"
},
{
"path": "_swapData.[].approveTo",
"label": "Swap Data Approve To",
"visible": "never"
},
{
"path": "_swapData.[].requiresDeposit",
"label": "Swap Data Requires Deposit",
"visible": "never"
}
]
},
"swapAndStartBridgeTokensViaGarden((bytes32 transactionId, string bridge, string integrator, address referrer, address sendingAssetId, address receiver, uint256 minAmount, uint256 destinationChainId, bool hasSourceSwaps, bool hasDestinationCall) _bridgeData, (address callTo, address approveTo, address sendingAssetId, address receivingAssetId, uint256 fromAmount, bytes callData, bool requiresDeposit)[] _swapData, (address redeemer, address refundAddress, uint256 timelock, bytes32 secretHash, bytes32 nonEvmReceiver) _gardenData)": {
"intent": "Swap & Bridge via Garden",
"interpolatedIntent": "Swap then bridge {_bridgeData.minAmount} via Garden to chain {_bridgeData.destinationChainId} for {_bridgeData.receiver}",
Expand Down
89 changes: 89 additions & 0 deletions config/frax.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"hop": {
"mainnet": "0x0000006D38568b00B457580b734e0076C62de659",
"abstract": "0x0000006D38568b00B457580b734e0076C62de659",
"arbitrum": "0x0000006D38568b00B457580b734e0076C62de659",
"avalanche": "0x0000006D38568b00B457580b734e0076C62de659",
"base": "0x0000006D38568b00B457580b734e0076C62de659",
"berachain": "0x0000006D38568b00B457580b734e0076C62de659",
"bsc": "0x0000006D38568b00B457580b734e0076C62de659",
"fraxtal": "0x00000000e18aFc20Afe54d4B2C8688bB60c06B36",
"hyperevm": "0x0000006D38568b00B457580b734e0076C62de659",
"ink": "0x0000006D38568b00B457580b734e0076C62de659",
"katana": "0x0000006D38568b00B457580b734e0076C62de659",
"linea": "0x0000006D38568b00B457580b734e0076C62de659",
"mode": "0x0000006D38568b00B457580b734e0076C62de659",
"monad": "0x0000006D38568b00B457580b734e0076C62de659",
"optimism": "0x0000006D38568b00B457580b734e0076C62de659",
"plume": "0x0000006D38568b00B457580b734e0076C62de659",
"polygon": "0x0000006D38568b00B457580b734e0076C62de659",
"scroll": "0x0000006D38568b00B457580b734e0076C62de659",
"sei": "0x0000006D38568b00B457580b734e0076C62de659",
"somnia": "0x0000006D38568b00B457580b734e0076C62de659",
"sonic": "0x0000006D38568b00B457580b734e0076C62de659",
"stable": "0x0000006D38568b00B457580b734e0076C62de659",
"tempo": "0x0000006D38568b00B457580b734e0076C62de659",
"unichain": "0x0000006D38568b00B457580b734e0076C62de659",
"worldchain": "0x0000006D38568b00B457580b734e0076C62de659",
"xlayer": "0x0000006D38568b00B457580b734e0076C62de659",
"zksync": "0x0000006D38568b00B457580b734e0076C62de659"
},
"tipFeeManager": {
"mainnet": "0x0000000000000000000000000000000000000000",
"abstract": "0x0000000000000000000000000000000000000000",
"arbitrum": "0x0000000000000000000000000000000000000000",
"avalanche": "0x0000000000000000000000000000000000000000",
"base": "0x0000000000000000000000000000000000000000",
"berachain": "0x0000000000000000000000000000000000000000",
"bsc": "0x0000000000000000000000000000000000000000",
"fraxtal": "0x0000000000000000000000000000000000000000",
"hyperevm": "0x0000000000000000000000000000000000000000",
"ink": "0x0000000000000000000000000000000000000000",
"katana": "0x0000000000000000000000000000000000000000",
"linea": "0x0000000000000000000000000000000000000000",
"mode": "0x0000000000000000000000000000000000000000",
"monad": "0x0000000000000000000000000000000000000000",
"optimism": "0x0000000000000000000000000000000000000000",
"plume": "0x0000000000000000000000000000000000000000",
"polygon": "0x0000000000000000000000000000000000000000",
"scroll": "0x0000000000000000000000000000000000000000",
"sei": "0x0000000000000000000000000000000000000000",
"somnia": "0x0000000000000000000000000000000000000000",
"sonic": "0x0000000000000000000000000000000000000000",
"stable": "0x0000000000000000000000000000000000000000",
"tempo": "0xfeEC000000000000000000000000000000000000",
"unichain": "0x0000000000000000000000000000000000000000",
"worldchain": "0x0000000000000000000000000000000000000000",
"xlayer": "0x0000000000000000000000000000000000000000",
"zksync": "0x0000000000000000000000000000000000000000"
},
"pathUsd": {
"mainnet": "0x0000000000000000000000000000000000000000",
"abstract": "0x0000000000000000000000000000000000000000",
"arbitrum": "0x0000000000000000000000000000000000000000",
"avalanche": "0x0000000000000000000000000000000000000000",
"base": "0x0000000000000000000000000000000000000000",
"berachain": "0x0000000000000000000000000000000000000000",
"bsc": "0x0000000000000000000000000000000000000000",
"fraxtal": "0x0000000000000000000000000000000000000000",
"hyperevm": "0x0000000000000000000000000000000000000000",
"ink": "0x0000000000000000000000000000000000000000",
"katana": "0x0000000000000000000000000000000000000000",
"linea": "0x0000000000000000000000000000000000000000",
"mode": "0x0000000000000000000000000000000000000000",
"monad": "0x0000000000000000000000000000000000000000",
"optimism": "0x0000000000000000000000000000000000000000",
"plume": "0x0000000000000000000000000000000000000000",
"polygon": "0x0000000000000000000000000000000000000000",
"scroll": "0x0000000000000000000000000000000000000000",
"sei": "0x0000000000000000000000000000000000000000",
"somnia": "0x0000000000000000000000000000000000000000",
"sonic": "0x0000000000000000000000000000000000000000",
"stable": "0x0000000000000000000000000000000000000000",
"tempo": "0x20C0000000000000000000000000000000000000",
"unichain": "0x0000000000000000000000000000000000000000",
"worldchain": "0x0000000000000000000000000000000000000000",
"xlayer": "0x0000000000000000000000000000000000000000",
"zksync": "0x0000000000000000000000000000000000000000"
}
}
Loading
Loading