We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ef4613 commit c5641c5Copy full SHA for c5641c5
.changeset/ten-moons-lay.md
@@ -0,0 +1,5 @@
1
+---
2
+"@graphprotocol/sdk": patch
3
4
+
5
+Ensure L2 aliased addresses are the correct length
packages/sdk/src/utils/arbitrum/address.ts
@@ -1,3 +1,4 @@
+import { hexZeroPad } from 'ethers/lib/utils'
import { toBN } from '../units'
// Adapted from:
@@ -8,5 +9,5 @@ export const applyL1ToL2Alias = (l1Address: string): string => {
8
9
const l2AddressAsNumber = l1AddressAsNumber.add(offset)
10
11
const mask = toBN(2).pow(160)
- return l2AddressAsNumber.mod(mask).toHexString()
12
+ return hexZeroPad(l2AddressAsNumber.mod(mask).toHexString(), 20)
13
}
0 commit comments