Clone
Last updated
Last updated
Authors: Trader Joe, Solady (https://github.com/vectorized/solady/blob/main/src/utils/Clone.sol), Adapted from clones with immutable args by zefram.eth, Saw-mon & Natalie (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)
Class with helper read functions for clone with immutable args.
Reads an immutable arg with type bytes
Parameters
argOffset
uint256
The offset of the arg in the immutable args
length
uint256
The length of the arg
Returns
arg
bytes
The immutable bytes arg
Reads an immutable arg with type address
Parameters
argOffset
uint256
The offset of the arg in the immutable args
Returns
arg
address
The immutable address arg
Reads an immutable arg with type uint256
Parameters
argOffset
uint256
The offset of the arg in the immutable args
Returns
arg
uint256
The immutable uint256 arg
Reads a uint256 array stored in the immutable args.
Parameters
argOffset
uint256
The offset of the arg in the immutable args
length
uint256
The length of the arg
Returns
arg
uint256[]
The immutable uint256 array arg
Reads an immutable arg with type uint64
Parameters
argOffset
uint256
The offset of the arg in the immutable args
Returns
arg
uint64
The immutable uint64 arg
Reads an immutable arg with type uint16
Parameters
argOffset
uint256
The offset of the arg in the immutable args
Returns
arg
uint16
The immutable uint16 arg
Reads an immutable arg with type uint8
Parameters
argOffset
uint256
The offset of the arg in the immutable args
Returns
arg
uint8
The immutable uint8 arg
Reads the offset of the packed immutable args in calldata.
Returns
offset
uint256
The offset of the packed immutable args in calldata.