Skip to content

Commit 9a02553

Browse files
committed
Fix Arm entity load: get used chainId-prefixed id but create used bare address, so persisted state (upgradeBlock/adapters/assets) was never loaded
1 parent 62e4072 commit 9a02553

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@ export const createOriginARMProcessors = ({
180180
let yieldRowsInitialized = false
181181
let initialize = async (ctx: Context) => {
182182
if (ctx.blocks[0].header.height < from) return
183-
const id = `${ctx.chain.id}:${armAddress}`
183+
// Must match the id the entity is created with below (`armAddress`). Previously this looked up
184+
// `${chainId}:${armAddress}`, never found the row, and rebuilt a fresh Arm every run — silently
185+
// dropping persisted state (upgradeBlock, adapters, appended base assets) and breaking upgrade
186+
// detection on any run that resumed past the upgrade block.
187+
const id = armAddress
184188
let entity = await ctx.store.get(Arm, id)
185189
if (entity) {
186190
armEntity = entity

0 commit comments

Comments
 (0)