Skip to content

Commit

Permalink
Merge branch 'main' into feat/gov-v3
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Oct 11, 2023
2 parents 38cb1db + 9a4b6c5 commit 4f6ed60
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/utils/storageSlots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ export function getDynamicArraySlot(baseSlot: bigint, arrayIndex: number, itemSi
export function getBytesValue(value: string | Hex) {
const bytesString = toBytes(value);
if (bytesString.length > 31) throw new Error('Error: strings > 31 bytes are not implemented');
return pad(
concat([toHex(pad(bytesString, { size: 31, dir: 'right' })), toHex(bytesString.length * 2, { size: 1 })]),
{ size: 32 }
);
return concat([toHex(pad(bytesString, { size: 31, dir: 'right' })), toHex(bytesString.length * 2, { size: 1 })]);
}

/**
Expand Down

0 comments on commit 4f6ed60

Please sign in to comment.