Skip to content

Commit

Permalink
Null deployment block number when copy abi jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
kompotkot committed Oct 10, 2024
1 parent 0a44e35 commit 956371f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions indexer/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -1249,8 +1249,8 @@ func (p *PostgreSQLpgx) CopyAbiJobs(sourceCustomerId, destCustomerId string, abi
defer tx.Rollback(ctx)

_, prepErr := tx.Prepare(ctx, "insertAbiJob", `
INSERT INTO abi_jobs (id, address, user_id, customer_id, abi_selector, chain, abi_name, status, historical_crawl_status, progress, moonworm_task_pickedup, abi, deployment_block_number, created_at, updated_at)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, now(), now())
INSERT INTO abi_jobs (id, address, user_id, customer_id, abi_selector, chain, abi_name, status, historical_crawl_status, progress, moonworm_task_pickedup, abi, created_at, updated_at)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, now(), now())
`)
if prepErr != nil {
return err
Expand All @@ -1266,7 +1266,7 @@ func (p *PostgreSQLpgx) CopyAbiJobs(sourceCustomerId, destCustomerId string, abi
abi := abiJob.Abi[1 : len(abiJob.Abi)-1]
abiBytes := []byte(abi)

_, execErr := tx.Exec(ctx, "insertAbiJob", jobID, abiJob.Address, abiJob.UserID, destCustomerId, abiJob.AbiSelector, abiJob.Chain, abiJob.AbiName, "true", "pending", 0, false, abiBytes, abiJob.DeploymentBlockNumber)
_, execErr := tx.Exec(ctx, "insertAbiJob", jobID, abiJob.Address, abiJob.UserID, destCustomerId, abiJob.AbiSelector, abiJob.Chain, abiJob.AbiName, "true", "pending", 0, false, abiBytes)
if execErr != nil {
return execErr
}
Expand Down

0 comments on commit 956371f

Please sign in to comment.