REI Network Documents
  • REI Network
    • Welcome to REI Network
    • Why We build REI Network
    • Introduction to $REI
  • Developer
    • Quick Start
    • API Reference
    • Token Addresses
    • System Contracts
      • StakeManager
      • Fee
      • ContractFee
      • Router
      • AbstractToken
      • CommissionShare
      • FeeToken
      • FeePool
      • ValidatorRewardPool
      • FreeFee
      • UnstakePool
      • FreeFeeToken
      • Config
    • Guides
      • Using The Graph
        • Using The Graph on REI Network
        • Running a Graph Node on REI Network
      • Using Gnosis Safe
      • Exchange Integration
  • REI DAO
    • What is REI DAO?
      • Background
      • Management content of REI DAO
      • How the REI DAO is implemented?
      • How REI DAO works?
    • Governance
      • About Governance
      • Governance Process
      • Voting with Snapshot
      • FAQ
    • Guides
      • Dashboard
      • Become a Validator
      • Jail Mechanism
      • Slash Mechanism
      • Voting for a Validator
      • Stake for Free Gas
      • Using BLS
        • Check BLS
      • REI@3.0.X Upgrade Guide
Powered by GitBook
On this page
  • Contents
  • Globals
  • Functions
  • generateAddress
  • generateAddress2
  • register
  • setFee
  • Events
  • Register
  1. Developer
  2. System Contracts

ContractFee

Contents

Globals

Var
Type

feeOf

mapping(address => uint256)

creatorOf

mapping(address => address)

Functions

generateAddress

Generate contract address.

Declaration:

  function generateAddress(
    address from,
    uint256 nonce
  ) public returns (address)

Modifiers: No modifiers

Args:

Arg
Type
Description

from

address

Creator address

nonce

uint256

Creator nonce

generateAddress2

Generate contract address(create2).

Declaration:

  function generateAddress2(
    address from,
    bytes32 salt,
    bytes32 codeHash
  ) public returns (address)

Modifiers: No modifiers

Args:

Arg
Type
Description

from

address

Creator address

salt

bytes32

Salt

codeHash

bytes32

Deploy code hash, notice: this is not the same as the account code hash

register

Register the contract creator.

Declaration:

  function register(
    address parent,
    bool[] flags,
    uint256[] nonces,
    struct Create2Info[] infos
  ) external

Modifiers: No modifiers

Args:

Arg
Type
Description

parent

address

Root creator address

flags

bool[]

A list of flags, if the flag is true, it means create and load a nonce from nonces, otherwise it means create2 and load a Create2Info from infos

nonces

uint256[]

A list of nonces

infos

struct Create2Info[]

A list of Create2Info

setFee

Set contract fee. The contract fee can be set only when the sender is the creator of the contract.

Declaration:

  function setFee(
    address contractAddress,
    uint256 fee
  ) external

Modifiers: No modifiers

Args:

Arg
Type
Description

contractAddress

address

Target contract address

fee

uint256

Contract fee

Events

Register

Registration event, emit when someone registers their contract.

Params:

Param
Type
Indexed
Description

parent

address

Creator

child

address

Contract address

PreviousFeeNextRouter

Last updated 3 years ago