-
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
Feat: MsgInstallBundle indexing #27
Conversation
|
||
await bundleRecord.save(); | ||
} | ||
|
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 think we should wrap this section of the code in a try-catch
block to catch and log any errors that may occur.
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.
catching the error would result in skipping this message entirely. Throwing an error allows the indexing to stop at that point.
that is our current implementation for all of our functions
src/mappings/utils.ts
Outdated
return address; | ||
}; | ||
|
||
export const getAddressFromUint8Array = (uint8Array: Array<number>, chainPrefix: string = 'agoric') => { |
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.
You can use the Uint8Array
type,
export const getAddressFromUint8Array = (uint8Array: Uint8Array, chainPrefix: string = 'agoric') => {
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.
If you change the type, you will need to make this change on line 106:
const shaHashUint8Array = new Uint8Array(shaHash.slice(0, 20));
const address = getAddressFromUint8Array(shaHashUint8Array);
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.
PS: I haven't tested the functionality implemented in this PR. Just changed the code and there were no compilation errors.
This PR adds indexing for
MsgInstallBundle
messagesCompare data in picture against this transaction