Skip to main content

CuratedGate

CuratedGate is a supplementary contract that allows an address included in a gate instance's Merkle tree to create an empty Node Operator in CuratedModule. In the same transaction, the gate configures the manager and reward addresses, stores the operator's name and description in MetaRegistry, and assigns the gate's bond curve through Accounting when it differs from the default curve. Each address can use a given gate instance only once.

State Variables​

MODULE​

ICuratedModule public immutable MODULE

ACCOUNTING​

IAccounting public immutable ACCOUNTING

DEFAULT_BOND_CURVE_ID​

Cached default bond curve id from Accounting.

uint256 public immutable DEFAULT_BOND_CURVE_ID

META_REGISTRY​

IMetaRegistry public immutable META_REGISTRY

Functions​

constructor​

constructor(address module) ;

initialize​

function initialize(uint256 curveId, bytes32 treeRoot, string calldata treeCid, string calldata name, address admin)
public
override(IMerkleGate, MerkleGate)
initializer;

createNodeOperator​

Create an empty Node Operator for the caller if eligible. Stores provided name/description in MetaRegistry. Marks caller as consumed.

If curveId() equals Accounting.DEFAULT_BOND_CURVE_ID(), the created operator stays on the default bond curve.

function createNodeOperator(
string calldata name,
string calldata description,
address managerAddress,
address rewardAddress,
bytes32[] calldata proof
) external whenResumed returns (uint256 nodeOperatorId);

Parameters

NameTypeDescription
namestringDisplay name of the Node Operator
descriptionstringDescription of the Node Operator
managerAddressaddressAddress to set as manager; if zero, defaults will be used by the module
rewardAddressaddressAddress to set as rewards receiver; if zero, defaults will be used by the module
proofbytes32[]Merkle proof for the caller address

Returns

NameTypeDescription
nodeOperatorIduint256Newly created Node Operator id