UrdFactory
Inherits:IUrdFactory
This contract allows to create UniversalRewardsDistributor (URD) contracts, and to index them easily.
State Variables
isUrd
solidity
mapping(address => bool) public isUrdFunctions
createUrd
Creates a new URD contract using CREATE2 opcode.
solidity
function createUrd(
address initialOwner,
uint256 initialTimelock,
bytes32 initialRoot,
bytes32 initialIpfsHash,
bytes32 salt
) public returns (IUniversalRewardsDistributor urd);Parameters
| Name | Type | Description |
|---|---|---|
initialOwner | address | The initial owner of the URD. |
initialTimelock | uint256 | The initial timelock of the URD. |
initialRoot | bytes32 | The initial merkle root of the URD. |
initialIpfsHash | bytes32 | The optional ipfs hash containing metadata about the root (e.g. the merkle tree itself). |
salt | bytes32 | The salt used for CREATE2 opcode. |
Returns
| Name | Type | Description |
|---|---|---|
urd | IUniversalRewardsDistributor | The address of the newly created URD. |