Function: toSlot()
function toSlot(value): Bytes32;
Defined in: evm-client/src/utils.ts:144
Widen anything up to 32 bytes into a canonical slot — the padding primitive EvmUtils.toBytes32 is built on.
Separate from that method, and not part of OvercastUtils, because it
also has to accept a value that is already 32 bytes: an offer's salt and
an option's two offer ids are bytes32 on the contract, so the conversions
below hand them straight through and the padding is a no-op. Anything wider
throws. Feeding those same values to toBytes32 would (correctly) fail its
address parse.
Parameters
| Parameter | Type |
|---|---|
value | `0x${string}` |
Returns
Bytes32