Blockwell

NftDeployer

About

Stats

Public Functions 7
Event Types 3
Code Size 28,363 bytes

Events (3) keyboard_arrow_up

AdminAdded Event

Parameters help
account
address help

AdminRemoved Event

Parameters help
account
address help

TokenDeployed Event

Parameters help
contractAddress
address help
owner
address help
name
string help
symbol
string help

tokenAdmin Variable

address help

price Variable

uint256 help

admins Variable

Roles.Role help
Internal Variable

Functions Expand All Collapse All

isAdmin keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help view
Source Code
function isAdmin(address account) public view returns (bool) {
  return admins.has(account);
}

addAdmin keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyAdmin checks for the following:
null
Source Code
function addAdmin(address account) public onlyAdmin {
  _addAdmin(account);
}

removeAdmin keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyAdmin checks for the following:
null
Source Code
function removeAdmin(address account) public onlyAdmin {
  _removeAdmin(account);
}

setPrice keyboard_arrow_up

Parameters help

Name Type
newPrice
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyAdmin checks for the following:
null
Source Code
function setPrice(uint256 newPrice) public onlyAdmin {
  price = newPrice;
}

setTokenAdmin keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyAdmin checks for the following:
null
Source Code
function setTokenAdmin(address account) public onlyAdmin {
  tokenAdmin = account;
}

deployToken keyboard_arrow_up

Parameters help

Name Type
name
string help
symbol
string help
burnable
bool help
enumerable
bool help

Properties

Visibility help public
Mutability help payable

Requirements help

Source Code
function deployToken(
  string name,
  string symbol,
  bool burnable,
  bool enumerable
) public payable returns (address) {
  require(msg.value == price, "Must send price in ether to create a token");

  NfToken token = new NfToken(
    name,
    symbol,
    burnable,
    enumerable,
    msg.sender,
    tokenAdmin
  );
  emit TokenDeployed(token, msg.sender, name, symbol);
  return token;
}

withdraw keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyAdmin checks for the following:
null
Source Code
function withdraw() public onlyAdmin {
  msg.sender.transfer(address(this).balance);
}

Internal Functions Expand All Collapse All

Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.

internal AdminRole._addAdmin keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _addAdmin(address account) internal {
  admins.add(account);
  emit AdminAdded(account);
}

internal AdminRole._removeAdmin keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _removeAdmin(address account) internal {
  admins.remove(account);
  emit AdminRemoved(account);
}