Skip to content

Commit 62e4072

Browse files
committed
Hotfix: resolve ARM token0/token1 from config symbols (contract removed the getters)
1 parent acdbef4 commit 62e4072

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/templates/origin-arm/origin-arm.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,15 @@ export const createOriginARMProcessors = ({
186186
armEntity = entity
187187
} else {
188188
const armContract = new originOsArmAbi.Contract(ctx, ctx.blocks[0].header, armAddress)
189-
const [name, symbol, decimals, token0Addr, token1Addr] = await Promise.all([
189+
const [name, symbol, decimals] = await Promise.all([
190190
armContract.name(),
191191
armContract.symbol(),
192192
armContract.decimals(),
193-
armContract.token0(),
194-
armContract.token1(),
195193
])
194+
// token0()/token1() were removed in the multi-base upgrade — calling them reverts on upgraded
195+
// ARMs. Resolve the liquidity + primary-base addresses from the configured Currency symbols.
196+
const token0Addr = currencyToAddress(chainId, token0)
197+
const token1Addr = currencyToAddress(chainId, token1)
196198
const arm = new Arm({
197199
id: armAddress,
198200
chainId: ctx.chain.id,

0 commit comments

Comments
 (0)