Skip to content

UrdFactory

0x46fE2bc33b661E01A8946BbC3Bf43F2B8382d802 | Git Source

Inherits:IUrdFactory

This contract allows to create UniversalRewardsDistributor (URD) contracts, and to index them easily.

State Variables

isUrd

solidity
mapping(address => bool) public isUrd

Functions

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

NameTypeDescription
initialOwneraddressThe initial owner of the URD.
initialTimelockuint256The initial timelock of the URD.
initialRootbytes32The initial merkle root of the URD.
initialIpfsHashbytes32The optional ipfs hash containing metadata about the root (e.g. the merkle tree itself).
saltbytes32The salt used for CREATE2 opcode.

Returns

NameTypeDescription
urdIUniversalRewardsDistributorThe address of the newly created URD.