Documentation Index
Fetch the complete documentation index at: https://docs.forteamm.io/llms.txt
Use this file to discover all available pages before exploring further.
Git Source
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
function setPoolByteCode(
address factoryAddress,
bytes memory bytecode,
uint256 chunks,
bytes4 setByteCodeSelector,
bytes4 makeImmutableSelector
) internal;
Parameters
| 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
function slice(bytes memory _bytes, uint256 _start, uint256 _length) private pure returns (bytes memory);
Parameters
| Name | Type | Description |
|---|
_bytes | bytes | the bytes array to slice |
_start | uint256 | the starting index |
_length | uint256 | the length of the slice |
Returns
| Name | Type | Description |
|---|
<none> | bytes | tempBytes the sliced bytes array |