-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Track V1 OApps latest configuration #111
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
const rows = records.map(toRow) | ||
const knex = await this.knex() | ||
|
||
await knex('oapp_configuration').delete() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we clear the table before adding something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover from when I used to wipe the whole table instead of using built-in conflict resolver, fixed
return rows.length | ||
} | ||
|
||
public async findAll(): Promise<OAppConfigurationRecord[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public async findAll(): Promise<OAppConfigurationRecord[]> { | |
public async getAll(): Promise<OAppConfigurationRecord[]> { |
We follow this convention that find...
repository method returns one element, but get...
returns multiple.
return rows.length | ||
} | ||
|
||
public async findAll(): Promise<OAppDefaultConfigurationRecord[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public async findAll(): Promise<OAppDefaultConfigurationRecord[]> { | |
public async getAll(): Promise<OAppDefaultConfigurationRecord[]> { |
return rows.map(toRecord) | ||
} | ||
|
||
public async findBySourceChain( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public async findBySourceChain( | |
public async getBySourceChain( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far looks good. The logic in the code is quite complicated, testing locally now.
return ids.map((id) => id.id) | ||
} | ||
|
||
public async findAll(): Promise<OAppRecord[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public async findAll(): Promise<OAppRecord[]> { | |
public async getAll(): Promise<OAppRecord[]> { |
return rows.map(toRecord) | ||
} | ||
|
||
public async findBySourceChain( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public async findBySourceChain( | |
public async getBySourceChain( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM. Couple of nit picks on the way.
'https://l2beat-production.herokuapp.com/api/integrations/layerzero-oapps', | ||
), | ||
tickIntervalMs: env.integer('TRACKING_TICK_INTERVAL_MS', 60_000_000), | ||
rpcUrl: env.string(`${chainNamePrefix}_TRACKING_RPC_URL`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we just use the regular RPC that we already have?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to separate modules + for tip-only data we do not need 'better' providers than those available to the public for now - multicall does its job perfectly fine
Resolves L2B-4083
Resolves L2B-4095
Resolves L2B-4084