CompensationFactory
Last updated
Was this helpful?
Last updated
Was this helpful?
A factory contract that registers different compensation contract implementations (e.g., ESO, RSA) and deploys clones of these implementations.
Registers initial compensation implementations.
Parameters
_implementations
CompensationImplementation[]
Array of compensation implementations to register.
Adds (or updates) a compensation implementation dynamically.
Parameters
_implementation
CompensationImplementation
The compensation implementation details.
Creates (and tracks) a Rule701Exemption for msg.sender
with an initialCap
. Reverts if one already exists for the given msg.sender
.
Deploys a new compensation contract using a minimal proxy clone of the registered implementation.
Parameters
compImplId
bytes32
The identifier of the compensation implementation to clone.
initCallData
bytes
The call data used to initialize the newly cloned contract. Must start with the requiredSelector for this implementation.
Returns
newComp
address
The address of the newly deployed compensation contract.
Returns an array of all deployed compensation contracts.
Extracts a revert message from failed external calls.
Parameters
_returnData
bytes
The return data from the call.
Returns
<none>
string
The revert message string.
Struct for storing compensation implementation details.
Properties
compType
string
A human-readable name or identifier for the compensation (e.g., "ESO", "RSA").
implementation
address
The address of the deployed implementation contract.
requiredSelector
bytes4
The function selector expected in the first 4 bytes of the initialization call.
active
bool
Whether this implementation is active and can be cloned.