Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('firmwareClearSigns mirrors the rc3 native clear-sign allowlist', () =>
})

test('0x proxy methods only at the pinned ExchangeProxy/router', () => {
expect(firmwareClearSigns(ZX, '0x415565b0' + word)).toBe(true) // transformERC20
expect(firmwareClearSigns(ZX, '0x415565b0' + word)).toBe(false) // transformERC20
expect(firmwareClearSigns(ZX, '0xd9627aa4' + word)).toBe(true) // sellToUniswap
expect(firmwareClearSigns(UNIV2, '0xf305d719' + word)).toBe(true) // addLiquidityETH
expect(firmwareClearSigns(RANDOM, '0x415565b0' + word)).toBe(false)
Expand Down
3 changes: 1 addition & 2 deletions projects/keepkey-vault/src/bun/calldata-decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ export function decodeCalldataLocal(
// (the drain vector PR #261/#303 closed). Addresses copied from firmware
// lib/firmware/ethereum_contracts/*.{c,h} on origin/develop (the rc3 line).
const ADDR = {
ZX_EXCHANGE_PROXY: '0xdef1c0ded9bec7f1a1670819833240f027b25eff', // 0x transformERC20 / sellToUniswap
ZX_EXCHANGE_PROXY: '0xdef1c0ded9bec7f1a1670819833240f027b25eff', // 0x sellToUniswap
UNISWAP_V2_ROUTER: '0x7a250d5630b4cf539739df2c5dacb4c659f2488d', // 0x liquid add/remove + approve-to-router
SALARY_PROXY: '0xbd6a40bb904aea5a49c59050b5395f7484a4203d', // saproxy withdrawFromSalary
THOR_ROUTER: '0xd37bbe5744d730a1d98d8dc97c42f0ca46ad7146', // Ethereum
Expand All @@ -417,7 +417,6 @@ const THOR_ROUTER_BY_CHAIN: Record<number, string> = {

// selector → the ONE contract address the firmware pins that selector to.
const FIRMWARE_PINNED: Record<string, string> = {
'0x415565b0': ADDR.ZX_EXCHANGE_PROXY, // transformERC20
'0xd9627aa4': ADDR.ZX_EXCHANGE_PROXY, // sellToUniswap (0x)
'0xf305d719': ADDR.UNISWAP_V2_ROUTER, // addLiquidityETH
'0x02751cec': ADDR.UNISWAP_V2_ROUTER, // removeLiquidityETH
Expand Down
Loading