Skip to content

Commit

Permalink
more address migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
frontendphil committed Feb 3, 2025
1 parent 5d35479 commit 98060d8
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from 'ethers'
import type { MetaTransactionRequest } from 'ser-kit'

const SIGN_MESSAGE_LIB_ADDRESS = '0xd53cd0aB83D845Ac265BE939c57F53AD838012c9'
const SIGN_MESSAGE_LIB_ADDRESS = '0xd53cd0ab83d845ac265be939c57f53ad838012c9'
const SIGN_MESSAGE_LIB_ABI = [
'function signMessage(bytes calldata _data)',
'function getMessageHash(bytes memory message) public view returns (bytes32)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Interface } from 'ethers'
import type { MetaTransactionRequest } from 'ser-kit'

// https://github.com/gnosisguild/snapshot-signer
const SNAPSHOT_SIGNER_ADDRESS = '0xa58Cf66d0f14AEFb2389c6998f6ad219dd4885c1'
const SNAPSHOT_SIGNER_ADDRESS = '0xa58cf66d0f14aefb2389c6998f6ad219dd4885c1'

const SnapshotSignerInterface = new Interface([
'function signSnapshotArrayVote(tuple(address from, string space, uint64 timestamp, bytes32 proposal, uint32[] choice, string reason, string app, string metadata) vote, tuple(string name, string version) domain)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { id, Interface } from 'ethers'
import { Waypoints } from 'lucide-react'
import type { TransactionTranslation } from './types'

const GP_V2_SETTLEMENT_ADDRESS = '0x9008D19f58AAbD9eD0D60971565AA8510560ab41'
const GP_V2_SETTLEMENT_ADDRESS = '0x9008d19f58aabD9ed0d60971565aa8510560ab41'
const GPv2SettlementInterface = new Interface([
{
type: 'function',
Expand All @@ -20,7 +20,7 @@ const GPv2SettlementInterface = new Interface([
])

const COWSWAP_ORDER_SIGNER_ADDRESS =
'0x23dA9AdE38E4477b23770DeD512fD37b12381FAB'
'0x23da9ade38e4477b23770ded512fd37b12381fab'

const CowswapOrderSignerInterface = new Interface([
'function signOrder(tuple(address sellToken, address buyToken, address receiver, uint256 sellAmount, uint256 buyAmount, uint32 validTo, bytes32 appData, uint256 feeAmount, bytes32 kind, bool partiallyFillable, bytes32 sellTokenBalance, bytes32 buyTokenBalance) order, uint32 validDuration, uint256 feeAmountBP)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type BridgeData = {
}

export const ETH_GNO_XDAI_BRIDGE: BridgeData = {
address: '0x4aa42145Aa6Ebf72e164C9bBC74fbD3788045016',
address: '0x4aa42145aa6ebf72e164c9bbc74fbd3788045016',
interface: new Interface([
'function relayTokens(address _receiver, uint256 _amount)',
]),
Expand All @@ -52,7 +52,7 @@ export const ETH_GNO_XDAI_BRIDGE: BridgeData = {
}

export const ETH_HOP_DAI_BRIDGE: BridgeData = {
address: '0x3d4Cc8A61c7528Fd86C55cfe061a78dCBA48EDd1',
address: '0x3d4cc8a61c7528fd86c55cfe061a78dcba48edd1',
interface: new Interface([
'function sendToL2(uint256 chainId, address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee)',
]),
Expand All @@ -61,7 +61,7 @@ export const ETH_HOP_DAI_BRIDGE: BridgeData = {
}

export const ETH_CONNEXT_BRIDGE: BridgeData = {
address: '0x8898B472C54c31894e3B9bb83cEA802a5d0e63C6',
address: '0x8898b472c54c31894e3b9bb83cea802a5d0e63c6',
interface: new Interface([
'function xcall(uint32 _destination, address _to, address _asset, address _delegate, uint256 _amount, uint256 _slippage, bytes _callData, uint256 _relayerFee)',
]),
Expand All @@ -70,7 +70,7 @@ export const ETH_CONNEXT_BRIDGE: BridgeData = {
}

export const ETH_GNO_OMNIBRIDGE: BridgeData = {
address: '0x88ad09518695c6c3712AC10a214bE5109a655671',
address: '0x88ad09518695c6c3712ac10a214be5109a655671',
interface: new Interface([
'function relayTokensAndCall(address token, address _receiver, uint256 _value, bytes _data)',
]),
Expand All @@ -79,7 +79,7 @@ export const ETH_GNO_OMNIBRIDGE: BridgeData = {
}

export const ETH_OPT_DAI_BRIDGE: BridgeData = {
address: '0x10E6593CDda8c58a1d0f14C5164B376352a55f2F',
address: '0x10e6593cdda8c58a1d0f14c5164b376352a55f2f',
interface: new Interface([
'function depositERC20(address _l1Token, address _l2Token, uint256 _amount, uint32 _l2Gas, bytes _data)',
'function depositERC20To(address _l1Token, address _l2Token, address _to, uint256 _amount, uint32 _l2Gas, bytes _data)',
Expand All @@ -89,7 +89,7 @@ export const ETH_OPT_DAI_BRIDGE: BridgeData = {
}

export const ETH_OPT_GATEWAY: BridgeData = {
address: '0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1',
address: '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1',
interface: new Interface([
'function depositERC20(address _l1Token, address _l2Token, uint256 _amount, uint32 _minGasLimit, bytes _extraData)',
'function depositERC20To(address _l1Token, address _l2Token, address _to, uint256 _amount, uint32 _minGasLimit, bytes _extraData)',
Expand All @@ -99,7 +99,7 @@ export const ETH_OPT_GATEWAY: BridgeData = {
}

export const ETH_CIRCLE_TOKEN_MESSENGER: BridgeData = {
address: '0xBd3fa81B58Ba92a82136038B25aDec7066af3155',
address: '0xbd3fa81b58ba92a82136038b25adec7066af3155',
interface: new Interface([
'function depositForBurn(uint256 amount, uint32 destinationDomain, bytes32 mintRecipient, address burnToken)',
]),
Expand All @@ -108,7 +108,7 @@ export const ETH_CIRCLE_TOKEN_MESSENGER: BridgeData = {
}

export const ETH_L1_HOP_CCTP: BridgeData = {
address: '0x7e77461CA2a9d82d26FD5e0Da2243BF72eA45747',
address: '0x7e77461ca2a9d82d26fd5e0da2243bf72ea45747',
interface: new Interface([
'function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee)',
]),
Expand All @@ -117,7 +117,7 @@ export const ETH_L1_HOP_CCTP: BridgeData = {
}

export const ETH_ARB_DAI_GATEWAY: BridgeData = {
address: '0xD3B5b60020504bc3489D6949d545893982BA3011',
address: '0xd3b5b60020504bc3489d6949d545893982ba3011',
interface: new Interface([
'function outboundTransfer(address l1Token, address to, uint256 amount, uint256 maxGas, uint256 gasPriceBid, bytes data)',
]),
Expand All @@ -126,7 +126,7 @@ export const ETH_ARB_DAI_GATEWAY: BridgeData = {
}

export const ETH_ARB_ERC20_GATEWAY: BridgeData = {
address: '0xa3A7B6F88361F48403514059F1F16C8E78d60EeC',
address: '0xa3a7b6f88361f48403514059f1f16c8e78d60eec',
interface: new Interface([
'function outboundTransfer(address _l1Token, address _to, uint256 _amount, uint256 _maxGas, uint256 _gasPriceBid, bytes _data)',
]),
Expand All @@ -135,7 +135,7 @@ export const ETH_ARB_ERC20_GATEWAY: BridgeData = {
}

export const ARB1_GATEWAY_ROUTER: BridgeData = {
address: '0x5288c571Fd7aD117beA99bF60FE0846C4E84F933',
address: '0x5288c571fd7ad117bea99bf60fe0846c4e84f933',
interface: new Interface([
'function outboundTransfer(address _l1Token, address _to, uint256 _amount, bytes _data)',
]),
Expand All @@ -144,7 +144,7 @@ export const ARB1_GATEWAY_ROUTER: BridgeData = {
}

export const ARB1_HOP_DAI_WRAPPER: BridgeData = {
address: '0xe7F40BF16AB09f4a6906Ac2CAA4094aD2dA48Cc2',
address: '0xe7f40bf16ab09f4a6906ac2caa4094ad2da48cc2',
interface: new Interface([
'function swapAndSend(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, uint256 destinationAmountOutMin, uint256 destinationDeadline)',
]),
Expand All @@ -153,7 +153,7 @@ export const ARB1_HOP_DAI_WRAPPER: BridgeData = {
}

export const ARB1_CONNEXT_BRIDGE: BridgeData = {
address: '0xEE9deC2712cCE65174B561151701Bf54b99C24C8',
address: '0xee9dec2712cce65174b561151701bf54b99c24c8',
interface: new Interface([
'function xcall(uint32 _destination, address _to, address _asset, address _delegate, uint256 _amount, uint256 _slippage, bytes _callData, uint256 _relayerFee)',
]),
Expand All @@ -162,7 +162,7 @@ export const ARB1_CONNEXT_BRIDGE: BridgeData = {
}

export const ARB1_CIRCLE_TOKEN_MESSENGER: BridgeData = {
address: '0x19330d10D9Cc8751218eaf51E8885D058642E08A',
address: '0x19330d10d9cc8751218eaf51e8885d058642e08a',
interface: new Interface([
'function depositForBurn(uint256 amount, uint32 destinationDomain, bytes32 mintRecipient, address burnToken)',
]),
Expand All @@ -171,7 +171,7 @@ export const ARB1_CIRCLE_TOKEN_MESSENGER: BridgeData = {
}

export const ARB1_L2_HOP_CCTP: BridgeData = {
address: '0x6504BFcaB789c35325cA4329f1f41FaC340bf982',
address: '0x6504bfcab789c35325ca4329f1f41fac340bf982',
interface: new Interface([
'function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee)',
]),
Expand All @@ -180,7 +180,7 @@ export const ARB1_L2_HOP_CCTP: BridgeData = {
}

export const BASE_CIRCLE_TOKEN_MESSENGER: BridgeData = {
address: '0x1682Ae6375C4E4A97e4B583BC394c861A46D8962',
address: '0x1682ae6375c4e4a97e4b583bc394c861a46d8962',
interface: new Interface([
'function depositForBurn(uint256 amount, uint32 destinationDomain, bytes32 mintRecipient, address burnToken)',
]),
Expand All @@ -189,7 +189,7 @@ export const BASE_CIRCLE_TOKEN_MESSENGER: BridgeData = {
}

export const BASE_L2_HOP_CCTP: BridgeData = {
address: '0xe7F40BF16AB09f4a6906Ac2CAA4094aD2dA48Cc2',
address: '0xe7f40bf16ab09f4a6906ac2caa4094ad2da48cc2',
interface: new Interface([
'function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee)',
]),
Expand All @@ -198,7 +198,7 @@ export const BASE_L2_HOP_CCTP: BridgeData = {
}

export const BASE_CONNEXT_BRIDGE: BridgeData = {
address: '0xB8448C6f7f7887D36DcA487370778e419e9ebE3F',
address: '0xb8448c6f7f7887d36dca487370778e419e9ebe3f',
interface: new Interface([
'function xcall(uint32 _destination, address _to, address _asset, address _delegate, uint256 _amount, uint256 _slippage, bytes _callData, uint256 _relayerFee)',
]),
Expand All @@ -207,14 +207,14 @@ export const BASE_CONNEXT_BRIDGE: BridgeData = {
}

export const GNOSIS_XDAI_BRIDGE_2: BridgeData = {
address: '0x7301CFA0e1756B71869E93d4e4Dca5c7d0eb0AA6',
address: '0x7301cfa0e1756b71869e93d4e4dca5c7d0eb0aa6',
interface: new Interface(['function relayTokens(address _receiver)']),
sourceChainId: 100,
token: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
}

export const GNOSIS_HOP_DAI_WRAPPER: BridgeData = {
address: '0x6C928f435d1F3329bABb42d69CCF043e3900EcF1',
address: '0x6c928f435d1f3329babb42d69ccf043e3900ecf1',
interface: new Interface([
'function swapAndSend(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, uint256 destinationAmountOutMin, uint256 destinationDeadline)',
]),
Expand All @@ -232,7 +232,7 @@ export const GNOSIS_CONNEXT_BRIDGE: BridgeData = {
}

export const GNOSIS_USDC: BridgeData = {
address: '0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83',
address: '0xddafbb505ad214d7b80b1f830fccc89b60fb7a83',
interface: new Interface([
'function transferAndCall(address _to, uint256 _value, bytes _data)',
]),
Expand All @@ -241,7 +241,7 @@ export const GNOSIS_USDC: BridgeData = {
}

export const OPTIMISM_DAI_TOKEN_BRIDGE: BridgeData = {
address: '0x467194771dAe2967Aef3ECbEDD3Bf9a310C76C65',
address: '0x467194771dae2967aef3ecbedd3bf9a310c76c65',
interface: new Interface([
'function withdraw(address _l2Token, uint256 _amount, uint32 _l1Gas, bytes _data)',
'function withdrawTo(address _l2Token, address _to, uint256 _amount, uint32 _l1Gas, bytes _data)',
Expand All @@ -251,7 +251,7 @@ export const OPTIMISM_DAI_TOKEN_BRIDGE: BridgeData = {
}

export const OPTIMISM_HOP_DAI_WRAPPER: BridgeData = {
address: '0xb3C68a491608952Cb1257FC9909a537a0173b63B',
address: '0xb3c68a491608952cb1257fc9909a537a0173b63b',
interface: new Interface([
'function swapAndSend(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, uint256 destinationAmountOutMin, uint256 destinationDeadline)',
]),
Expand All @@ -260,7 +260,7 @@ export const OPTIMISM_HOP_DAI_WRAPPER: BridgeData = {
}

export const OPTIMISM_CONNEXT_BRIDGE: BridgeData = {
address: '0x8f7492DE823025b4CfaAB1D34c58963F2af5DEDA',
address: '0x8f7492de823025b4cfaab1d34c58963f2af5deda',
interface: new Interface([
'function xcall(uint32 _destination, address _to, address _asset, address _delegate, uint256 _amount, uint256 _slippage, bytes _callData, uint256 _relayerFee)',
]),
Expand All @@ -269,7 +269,7 @@ export const OPTIMISM_CONNEXT_BRIDGE: BridgeData = {
}

export const OPTIMISM_CIRCLE_TOKEN_MESSENGER: BridgeData = {
address: '0x2B4069517957735bE00ceE0fadAE88a26365528f',
address: '0x2b4069517957735be00cee0fadae88a26365528f',
interface: new Interface([
'function depositForBurn(uint256 amount, uint32 destinationDomain, bytes32 mintRecipient, address burnToken)',
]),
Expand All @@ -278,7 +278,7 @@ export const OPTIMISM_CIRCLE_TOKEN_MESSENGER: BridgeData = {
}

export const OPTIMISM_L2_HOP_CCTP: BridgeData = {
address: '0x469147af8Bde580232BE9DC84Bb4EC84d348De24',
address: '0x469147af8bde580232be9dc84bb4ec84d348de24',
interface: new Interface([
'function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee)',
]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const BRIDGE_AWARE_CONTRACT_ADDRESSES = [
//Sepolia
{
chainId: 11155111,
address: '0x36B2a59f3CDa3db1283FEBc7c228E89ecE7Db6f4',
address: '0x36b2a59f3cda3db1283febc7c228e89ece7db6f4',
},
] as const

Expand Down
2 changes: 1 addition & 1 deletion packages/modules/src/queryRolesV1MultiSend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function queryRolesV1MultiSend(
.connect(modAddress, provider)
.multisend()

const lowerCasedAddress = address.toLowerCase()
const lowerCasedAddress = address.toLowerCase() as HexAddress

if (!isHexAddress(lowerCasedAddress) || lowerCasedAddress === ZERO_ADDRESS) {
return []
Expand Down
1 change: 1 addition & 0 deletions packages/schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
}
},
"dependencies": {
"@epic-web/invariant": "1.0.0",
"@safe-global/types-kit": "1.0.2",
"ser-kit": "2.0.0",
"zod": "3.24.1"
Expand Down
6 changes: 4 additions & 2 deletions packages/schema/src/routeSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ export const chainIdSchema = z.union([
z.literal(chains[7].chainId),
])

export type HexAddress = Hex
export type HexAddress = Lowercase<Hex>
export const isHexAddress = isHex
export const addressSchema = hexSchema
export const addressSchema = hexSchema.transform<HexAddress>(
(data) => data.toLowerCase() as HexAddress,
)

export const verifyHexAddress = (value: string) => addressSchema.parse(value)

Expand Down
2 changes: 1 addition & 1 deletion packages/test-utils/src/creators/randomHex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const randomHex = (size: number): HexAddress => {
.map(() => Math.floor(Math.random() * 16).toString(16))
.join('')

return `0x${hex}`
return `0x${hex}` as HexAddress
}

export const randomAddress = (size: number = 40) => randomHex(size)
Expand Down
7 changes: 5 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 98060d8

Please sign in to comment.