Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Commit

Permalink
Add diffing for 1inch AggregationRouter versions
Browse files Browse the repository at this point in the history
  • Loading branch information
taiyangc committed Nov 16, 2024
1 parent 3bcadcb commit 92ad574
Show file tree
Hide file tree
Showing 5 changed files with 330 additions and 0 deletions.
1 change: 1 addition & 0 deletions erc7730/AggregationRouterV5.abi

Large diffs are not rendered by default.

154 changes: 154 additions & 0 deletions erc7730/AggregationRouterV5.interface.sol

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions erc7730/AggregationRouterV6.abi

Large diffs are not rendered by default.

149 changes: 149 additions & 0 deletions erc7730/AggregationRouterV6.interface.sol

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions erc7730/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# erc7730

## Rationale

This is to support 1inch's latest AggregationRouterV6 interface clear signing ([ERC-7730](https://developers.ledger.com/docs/clear-signing/erc7730)).

We need to get the ABIs from 1inch contracts, then generate a diff from V5 to V6 to understand how to modify for the [erc7730 registry](https://github.com/LedgerHQ/clear-signing-erc7730-registry).

## Dependencies

Install abi-to-sol (or use online version)
```bash
npm install -g abi-to-sol
```

Run abi-to-sol for the ABI of choice, for example
```bash
cat AggregationRouterV5.abi | npx abi-to-sol --solidity-version=0.8.28 AggregationRouterV5 > AggregationRouterV5.interface.sol
cat AggregationRouterV6.abi | npx abi-to-sol --solidity-version=0.8.28 AggregationRouterV6 > AggregationRouterV6.interface.sol
```

Then diff them
```bash
diff AggregationRouterV5.interface.sol AggregationRouterV6.interface.sol
```

0 comments on commit 92ad574

Please sign in to comment.