Skip to content

Commit

Permalink
Merge pull request #32 from initia-labs/bot/register-denom-metadata
Browse files Browse the repository at this point in the history
bot: register base denom
  • Loading branch information
JSHan94 authored Mar 15, 2024
2 parents 77ca824 + 3e9951f commit c3a4464
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 58 deletions.
135 changes: 81 additions & 54 deletions bots/package-lock.json

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

2 changes: 1 addition & 1 deletion bots/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"homepage": "https://github.com/initia-labs/batch-submitter#readme",
"devDependencies": {
"@initia/initia.js": "^0.1.27",
"@initia/initia.js": "^0.1.33",
"@koa/cors": "^4.0.0",
"@sentry/node": "^7.91.0",
"@testcontainers/postgresql": "^10.4.0",
Expand Down
2 changes: 1 addition & 1 deletion bots/src/sawgger/executor_model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const ClaimStruct = z.object({
l_2_denom: z.string(),
version: z.string(),
state_root: z.string(),
storage_root: z.string(),
merkle_root: z.string(),
last_block_hash: z.string(),
})

Expand Down
4 changes: 2 additions & 2 deletions bots/src/service/executor/ClaimTxService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface ClaimTx {
l2Denom: string
version: string
stateRoot: string
storageRoot: string
merkleRoot: string
lastBlockHash: string
}

Expand Down Expand Up @@ -86,7 +86,7 @@ export async function getClaimTxList(
l2Denom: withdrawalTx.l2Denom,
version: sha3_256(withdrawalTx.outputIndex).toString('base64'),
stateRoot: output.stateRoot,
storageRoot: output.merkleRoot,
merkleRoot: output.merkleRoot,
lastBlockHash: output.lastBlockHash,
}
claimTxList.push(claimData)
Expand Down
1 change: 1 addition & 0 deletions bots/src/worker/bridgeExecutor/L1Monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export class L1Monitor extends Monitor {
new Coin(data['l2_denom'], data['amount']),
parseInt(data['l1_sequence']),
this.currentHeight,
data['l1_denom'],
Buffer.from(data['data'], 'hex').toString('base64')
)
];
Expand Down

0 comments on commit c3a4464

Please sign in to comment.