Skip to content

Commit

Permalink
chore: add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbate committed Feb 3, 2025
1 parent d3e6093 commit 664c0b4
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ export function getBytecodeConfigurableOffset(bytecode: Uint8Array): number {
}

/**
* Takes bytecode and generates it's associated bytecode ID
* Takes bytecode and generates it's associated bytecode ID.
*
* The bytecode ID is a hash of the bytecode when sliced at the configurable offset. This
* superseded legacy blob IDs when uploading blobs for scripts and predicates so that
* the bytecode ID is equal to the legacy blob ID. Therefore blobs can be used for ABI verification.
*
* @param bytecode - The bytecode to get the id from
* @returns The id of the bytecode
Expand All @@ -48,7 +52,9 @@ export function getBytecodeId(bytecode: Uint8Array): string {
}

/**
* Takes bytecode and generates it's associated legacy blob ID
* Takes bytecode and generates it's associated legacy blob ID.
*
* The legacy blob ID is a hash of the bytecode when sliced at the data section offset.
*
* @param bytecode - The bytecode to get the id from
* @returns The id of the bytecode
Expand Down

0 comments on commit 664c0b4

Please sign in to comment.