Functions
setPoolByteCode
the setByteCode function is expected to receive only bytes as its only parameter the makeByteCodeImmutable function is expected to receive no parameters helper function to send the byte code in chunks to the factory and then make it immutable| Name | Type | Description |
|---|---|---|
factoryAddress | address | address of the factory where to set the byte code |
bytecode | bytes | the full byte code to set |
chunks | uint256 | number of chunks to split the byte code into |
setByteCodeSelector | bytes4 | selector of the setByteCode function |
makeImmutableSelector | bytes4 | selector of the makeByteCodeImmutable function |
slice
this function was taken from https://stackoverflow.com/questions/74443594/how-to-slice-bytes-memory-in-solidity helper function to slice bytes arrays| Name | Type | Description |
|---|---|---|
_bytes | bytes | the bytes array to slice |
_start | uint256 | the starting index |
_length | uint256 | the length of the slice |
| Name | Type | Description |
|---|---|---|
<none> | bytes | tempBytes the sliced bytes array |