πŸ’°IZNSTreasury

PaymentConfig

The PaymentConfig struct describes the two pieces of information needed to create a payment configuration for a domain. The address of the user to send funds to in a sale, and what token those funds are in.

struct PaymentConfig {
  contract IERC20 token;
  address beneficiary;
}

IZNSTreasury

IZNSTreasury.sol - Interface for the ZNSTreasury contract responsible for managing payments and staking.

Below are docs for the types in this file:

  • PaymentConfig: Struct containing data for the payment configuration of the parent distributing subdomains:

    • token: The address of the ERC-20 compliant payment token contract chosen by the parent

    • beneficiary: The address of the beneficiary contract or wallet that will receive payments or fees

  • Stake: Struct containing data for the staking of a domain written at the time of staking:

    • token: The address of the ERC-20 compliant staking token used to deposit a specific stake for domain

    • amount: The amount of the staking token above deposited by the user

NoBeneficiarySetForParent

Emitted when a user tries to pay for a domain when parent's domain payment beneficiary is not set yet.

Stake

Describes a stake for a domain. This could be in any ERC20 token so the address of the specific token as well as the amount is required.

StakeDeposited

Emitted when a new stake is deposited upon registration of a new domain.

Parameters

Name
Type
Description

parentHash

bytes32

domainHash

bytes32

The hash of the domain name

depositor

address

The address of the depositing user / new domain owner

stakingToken

address

stakeAmount

uint256

The amount they are depositing / price of the domain based on name length

stakeFee

uint256

The registration fee paid by the user on top of the staked amount

protocolFee

uint256

StakeWithdrawn

Emitted when a stake is withdrawn upon domain revocation.

Parameters

Name
Type
Description

domainHash

bytes32

The hash of the domain name being revoked

owner

address

The owner of the domain being revoked

stakingToken

address

stakeAmount

uint256

The staked amount withdrawn to the user after revoking

DirectPaymentProcessed

Emitted when a direct payment is processed upon registration of a new domain.

Parameters

Name
Type
Description

parentHash

bytes32

The hash of the parent domain

domainHash

bytes32

The full namehash of the domain registered

payer

address

The address of the user who paid for the domain

beneficiary

address

The address of the beneficiary contract or wallet that received the payment

amount

uint256

The amount paid by the user

protocolFee

uint256

The protocol fee paid by the user to Zero

CurvePricerSet

Emitted when curvePricer is set in state.

Parameters

Name
Type
Description

curvePricer

address

The new address of the CurvePricer contract

PaymentTokenSet

Emitted when stakingToken is set in state.

Parameters

Name
Type
Description

domainHash

bytes32

token

address

The new address of the ERC-20 compliant payment token contract

BeneficiarySet

Emitted when zeroVault is set in state.

Parameters

Name
Type
Description

domainHash

bytes32

beneficiary

address

The new address of the beneficiary contract or wallet

paymentConfigs

stakedForDomain

stakeForDomain

unstakeForDomain

processDirectPayment

setPaymentConfig

setBeneficiary

setPaymentToken

setRegistry

initialize

Last updated