Blockwell

pTokens TLOS

ERC20

This contract is an ERC20 token.

Name pTokens TLOS
Symbol TLOS
Decimals 18
Total Supply 19,191,574 TLOS

About link description

Telos (TLOS) is a cryptocurrency and operates on the Ethereum platform. Telos has a current supply of 355,208,370.6674 with 270,123,443.8443 in circulation. The last known price of Telos is 0.13428701 USD and is down -0.04 over the last 24 hours. It is currently trading on 9 active market(s) with $217,792.92 traded over the last 24 hours. More information can be found at https://telos.net/.

Stats

Public Functions 34
Event Types 11
Code Size 83,068 bytes

Events (11) keyboard_arrow_up

AdminOperatorChange Event

Parameters help
oldOperator
address help
newOperator
address help

AdminTransferInvoked Event

Parameters help
operator
address help

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

AuthorizedOperator Event

Parameters help
operator
address help
tokenHolder
address help

Burned Event

Parameters help
operator
address help
from
address help
amount
uint256 help
data
bytes help
operatorData
bytes help

Minted Event

Parameters help
operator
address help
to
address help
amount
uint256 help
data
bytes help
operatorData
bytes help

Redeem Event

Parameters help
redeemer
address help
value
uint256 help
underlyingAssetRecipient
string help

RelayHubChanged Event

Parameters help
oldRelayHub
address help
newRelayHub
address help

RevokedOperator Event

Parameters help
operator
address help
tokenHolder
address help

Sent Event

Parameters help
operator
address help
from
address help
to
address help
amount
uint256 help
data
bytes help
operatorData
bytes help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

ERC1820_REGISTRY Constant

IERC1820Registry help

TOKENS_SENDER_INTERFACE_HASH Constant

bytes32 help
0x29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe895

TOKENS_RECIPIENT_INTERFACE_HASH Constant

bytes32 help
0xb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b

TOKENS_RECIPIENT_INTERFACE_HASH Constant

bytes32 help
0xb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b

GSN_RATE_UNIT Constant

uint256 help
UNKNOWN VALUE

RELAYED_CALL_ACCEPTED Constant

uint256 help
0

RELAYED_CALL_REJECTED Constant

uint256 help
11

POST_RELAYED_CALL_MAX_GAS Constant

uint256 help
100000

pNetwork Variable

address help

gsnTrustedSigner Variable

address help

gsnFeeTarget Variable

address help

gsnExtraGas Variable

uint256 help

adminOperator Variable

address help

_balances Variable

mapping(address => uint256) help
Internal Variable

_totalSupply Variable

uint256 help
Internal Variable

_name Variable

string help
Internal Variable

_symbol Variable

string help
Internal Variable

_defaultOperatorsArray Variable

address[] help
Internal Variable

_defaultOperators Variable

mapping(address => bool) help
Internal Variable

_operators Variable

mapping(address => mapping(address => bool)) help
Internal Variable

_revokedDefaultOperators Variable

mapping(address => mapping(address => bool)) help
Internal Variable

_allowances Variable

mapping(address => mapping(address => uint256)) help
Internal Variable

_relayHub Variable

address help
Internal Variable

Functions Expand All Collapse All

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function name() public view returns (string memory) {
  return _name;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function symbol() public view returns (string memory) {
  return _symbol;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help pure
Source Code
function decimals() public pure returns (uint8) {
  return 18;
}

granularity keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function granularity() public view returns (uint256) {
  return 1;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function totalSupply() public view returns (uint256) {
  return _totalSupply;
}

Parameters help

Name Type
tokenHolder
address help

Properties

Visibility help public
Mutability help view
Source Code
function balanceOf(address tokenHolder) public view returns (uint256) {
  return _balances[tokenHolder];
}

send keyboard_arrow_up

Parameters help

Name Type
recipient
address help
amount
uint256 help
data
bytes help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function send(
  address recipient,
  uint256 amount,
  bytes memory data
) public {
  _send(_msgSender(), _msgSender(), recipient, amount, data, "", true);
}

Parameters help

Name Type
recipient
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transfer(address recipient, uint256 amount) public returns (bool) {
  require(recipient != address(0), "ERC777: transfer to the zero address");

  address from = _msgSender();

  _callTokensToSend(from, from, recipient, amount, "", "");

  _move(from, from, recipient, amount, "", "");

  _callTokensReceived(from, from, recipient, amount, "", "", false);

  return true;
}

burn keyboard_arrow_up

Parameters help

Name Type
amount
uint256 help
data
bytes help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function burn(uint256 amount, bytes memory data) public {
  _burn(_msgSender(), _msgSender(), amount, data, "");
}

isOperatorFor keyboard_arrow_up

Parameters help

Name Type
operator
address help
tokenHolder
address help

Properties

Visibility help public
Mutability help view
Source Code
function isOperatorFor(address operator, address tokenHolder)
  public
  view
  returns (bool)
{
  return
    operator == tokenHolder ||
    (_defaultOperators[operator] &&
      !_revokedDefaultOperators[tokenHolder][operator]) ||
    _operators[tokenHolder][operator];
}

authorizeOperator keyboard_arrow_up

Parameters help

Name Type
operator
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function authorizeOperator(address operator) public {
  require(_msgSender() != operator, "ERC777: authorizing self as operator");

  if (_defaultOperators[operator]) {
    delete _revokedDefaultOperators[_msgSender()][operator];
  } else {
    _operators[_msgSender()][operator] = true;
  }

  emit AuthorizedOperator(operator, _msgSender());
}

revokeOperator keyboard_arrow_up

Parameters help

Name Type
operator
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function revokeOperator(address operator) public {
  require(operator != _msgSender(), "ERC777: revoking self as operator");

  if (_defaultOperators[operator]) {
    _revokedDefaultOperators[_msgSender()][operator] = true;
  } else {
    delete _operators[_msgSender()][operator];
  }

  emit RevokedOperator(operator, _msgSender());
}

defaultOperators keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function defaultOperators() public view returns (address[] memory) {
  return _defaultOperatorsArray;
}

operatorSend keyboard_arrow_up

Parameters help

Name Type
sender
address help
recipient
address help
amount
uint256 help
data
bytes help
operatorData
bytes help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function operatorSend(
  address sender,
  address recipient,
  uint256 amount,
  bytes memory data,
  bytes memory operatorData
) public {
  require(
    isOperatorFor(_msgSender(), sender),
    "ERC777: caller is not an operator for holder"
  );
  _send(_msgSender(), sender, recipient, amount, data, operatorData, true);
}

operatorBurn keyboard_arrow_up

Parameters help

Name Type
account
address help
amount
uint256 help
data
bytes help
operatorData
bytes help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function operatorBurn(
  address account,
  uint256 amount,
  bytes memory data,
  bytes memory operatorData
) public {
  require(
    isOperatorFor(_msgSender(), account),
    "ERC777: caller is not an operator for holder"
  );
  _burn(_msgSender(), account, amount, data, operatorData);
}

Parameters help

Name Type
holder
address help
spender
address help

Properties

Visibility help public
Mutability help view
Source Code
function allowance(address holder, address spender)
  public
  view
  returns (uint256)
{
  return _allowances[holder][spender];
}

Parameters help

Name Type
spender
address help
value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function approve(address spender, uint256 value) public returns (bool) {
  address holder = _msgSender();
  _approve(holder, spender, value);
  return true;
}

Parameters help

Name Type
holder
address help
recipient
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferFrom(
  address holder,
  address recipient,
  uint256 amount
) public returns (bool) {
  require(recipient != address(0), "ERC777: transfer to the zero address");
  require(holder != address(0), "ERC777: transfer from the zero address");

  address spender = _msgSender();

  _callTokensToSend(spender, holder, recipient, amount, "", "");

  _move(spender, holder, recipient, amount, "", "");
  _approve(
    holder,
    spender,
    _allowances[holder][spender].sub(
      amount,
      "ERC777: transfer amount exceeds allowance"
    )
  );

  _callTokensReceived(spender, holder, recipient, amount, "", "", false);

  return true;
}

adminTransfer keyboard_arrow_up

Parameters help

Name Type
sender
address help
recipient
address help
amount
uint256 help
data
bytes help
operatorData
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
function adminTransfer(
  address sender,
  address recipient,
  uint256 amount,
  bytes memory data,
  bytes memory operatorData
) public {
  require(_msgSender() == adminOperator, "caller is not the admin operator");
  _send(adminOperator, sender, recipient, amount, data, operatorData, false);
  emit AdminTransferInvoked(adminOperator);
}

setAdminOperator keyboard_arrow_up

Parameters help

Name Type
adminOperator_
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setAdminOperator(address adminOperator_) public {
  require(
    msg.sender == adminOperator,
    "Only the actual admin operator can change the address"
  );
  emit AdminOperatorChange(adminOperator, adminOperator_);
  adminOperator = adminOperator_;
}

getHubAddr keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function getHubAddr() public view returns (address) {
  return _relayHub;
}

relayHubVersion keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function relayHubVersion() public view returns (string memory) {
  this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  return "1.0.0";
}

preRelayedCall keyboard_arrow_up

Parameters help

Name Type
context
bytes help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function preRelayedCall(bytes calldata context) external returns (bytes32) {
  require(msg.sender == getHubAddr(), "GSNRecipient: caller is not RelayHub");
  return _preRelayedCall(context);
}

postRelayedCall keyboard_arrow_up

Parameters help

Name Type
context
bytes help
success
bool help
actualCharge
uint256 help
preRetVal
bytes32 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function postRelayedCall(
  bytes calldata context,
  bool success,
  uint256 actualCharge,
  bytes32 preRetVal
) external {
  require(msg.sender == getHubAddr(), "GSNRecipient: caller is not RelayHub");
  _postRelayedCall(context, success, actualCharge, preRetVal);
}

setTrustedSigner keyboard_arrow_up

Parameters help

Name Type
_gsnTrustedSigner
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOwner checks for the following:
null

Requirements help

Source Code
function setTrustedSigner(address _gsnTrustedSigner) public onlyOwner {
  require(
    _gsnTrustedSigner != address(0),
    "trusted signer is the zero address"
  );
  gsnTrustedSigner = _gsnTrustedSigner;
}

setFeeTarget keyboard_arrow_up

Parameters help

Name Type
_gsnFeeTarget
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOwner checks for the following:
null

Requirements help

Source Code
function setFeeTarget(address _gsnFeeTarget) public onlyOwner {
  require(_gsnFeeTarget != address(0), "fee target is the zero address");
  gsnFeeTarget = _gsnFeeTarget;
}

setGSNExtraGas keyboard_arrow_up

Parameters help

Name Type
_gsnExtraGas
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOwner checks for the following:
null
Source Code
function setGSNExtraGas(uint256 _gsnExtraGas) public onlyOwner {
  gsnExtraGas = _gsnExtraGas;
}

acceptRelayedCall keyboard_arrow_up

Parameters help

Name Type
relay
address help
from
address help
encodedFunction
bytes help
transactionFee
uint256 help
gasPrice
uint256 help
gasLimit
uint256 help
nonce
uint256 help
approvalData
bytes help
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function acceptRelayedCall(
  address relay,
  address from,
  bytes memory encodedFunction,
  uint256 transactionFee,
  uint256 gasPrice,
  uint256 gasLimit,
  uint256 nonce,
  bytes memory approvalData,
  uint256 /* maxPossibleCharge */
) public view returns (uint256, bytes memory) {
  (uint256 feeRate, bytes memory signature) = abi.decode(
    approvalData,
    (uint256, bytes)
  );
  bytes memory blob = abi.encodePacked(
    feeRate,
    relay,
    from,
    encodedFunction,
    transactionFee,
    gasPrice,
    gasLimit,
    nonce, // Prevents replays on RelayHub
    getHubAddr(), // Prevents replays in multiple RelayHubs
    address(this) // Prevents replays in multiple recipients
  );
  if (
    keccak256(blob).toEthSignedMessageHash().recover(signature) ==
    gsnTrustedSigner
  ) {
    return
      _approveRelayedCall(abi.encode(feeRate, from, transactionFee, gasPrice));
  } else {
    return _rejectRelayedCall(uint256(GSNErrorCodes.INVALID_SIGNER));
  }
}

changePNetwork keyboard_arrow_up

Parameters help

Name Type
newPNetwork
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function changePNetwork(address newPNetwork) external {
  require(
    _msgSender() == pNetwork,
    "Only the pNetwork can change the `pNetwork` account!"
  );
  require(newPNetwork != address(0), "pNetwork cannot be the zero address!");
  pNetwork = newPNetwork;
}

mint keyboard_arrow_up

Parameters help

Name Type
recipient
address help
value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function mint(address recipient, uint256 value) external returns (bool) {
  mint(recipient, value, "", "");
  return true;
}

mint keyboard_arrow_up

Parameters help

Name Type
recipient
address help
value
uint256 help
userData
bytes help
operatorData
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
function mint(
  address recipient,
  uint256 value,
  bytes memory userData,
  bytes memory operatorData
) public returns (bool) {
  require(_msgSender() == pNetwork, "Only the pNetwork can mint tokens!");
  require(recipient != address(0), "pToken: Cannot mint to the zero address!");
  _mint(pNetwork, recipient, value, userData, operatorData);
  return true;
}

redeem keyboard_arrow_up

Parameters help

Name Type
amount
uint256 help
underlyingAssetRecipient
string help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function redeem(uint256 amount, string calldata underlyingAssetRecipient)
  external
  returns (bool)
{
  redeem(amount, "", underlyingAssetRecipient);
  return true;
}

redeem keyboard_arrow_up

Parameters help

Name Type
amount
uint256 help
data
bytes help
underlyingAssetRecipient
string help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function redeem(
  uint256 amount,
  bytes memory data,
  string memory underlyingAssetRecipient
) public {
  _burn(_msgSender(), _msgSender(), amount, data, "");
  emit Redeem(msg.sender, amount, underlyingAssetRecipient);
}

operatorRedeem keyboard_arrow_up

Parameters help

Name Type
account
address help
amount
uint256 help
data
bytes help
operatorData
bytes help
underlyingAssetRecipient
string help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function operatorRedeem(
  address account,
  uint256 amount,
  bytes calldata data,
  bytes calldata operatorData,
  string calldata underlyingAssetRecipient
) external {
  require(
    isOperatorFor(_msgSender(), account),
    "ERC777: caller is not an operator for holder"
  );
  _burn(_msgSender(), account, amount, data, operatorData);
  emit Redeem(account, amount, underlyingAssetRecipient);
}

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 PToken.owner keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function owner() internal view returns (address) {
  return pNetwork;
}

internal AbstractOwnable.owner keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function owner() internal view returns (address);

internal AbstractOwnable.isOwner keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function isOwner() internal view returns (bool) {
  return msg.sender == owner();
}

internal ERC777._mint keyboard_arrow_up

Parameters help

Name Type
operator
address help
account
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _mint(
  address operator,
  address account,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData
) internal {
  require(account != address(0), "ERC777: mint to the zero address");

  // Update state variables
  _totalSupply = _totalSupply.add(amount);
  _balances[account] = _balances[account].add(amount);

  _callTokensReceived(
    operator,
    address(0),
    account,
    amount,
    userData,
    operatorData,
    true
  );

  emit Minted(operator, account, amount, userData, operatorData);
  emit Transfer(address(0), account, amount);
}

internal ERC777._send keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help
requireReceptionAck
bool help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _send(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData,
  bool requireReceptionAck
) internal {
  require(operator != address(0), "ERC777: operator is the zero address");
  require(from != address(0), "ERC777: send from the zero address");
  require(to != address(0), "ERC777: send to the zero address");

  _callTokensToSend(operator, from, to, amount, userData, operatorData);

  _move(operator, from, to, amount, userData, operatorData);

  _callTokensReceived(
    operator,
    from,
    to,
    amount,
    userData,
    operatorData,
    requireReceptionAck
  );
}

internal ERC777._burn keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
amount
uint256 help
data
bytes help
operatorData
bytes help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _burn(
  address operator,
  address from,
  uint256 amount,
  bytes memory data,
  bytes memory operatorData
) internal {
  require(from != address(0), "ERC777: burn from the zero address");

  _callTokensToSend(operator, from, address(0), amount, data, operatorData);

  // Update state variables
  _balances[from] = _balances[from].sub(
    amount,
    "ERC777: burn amount exceeds balance"
  );
  _totalSupply = _totalSupply.sub(amount);

  emit Burned(operator, from, amount, data, operatorData);
  emit Transfer(from, address(0), amount);
}

internal ERC777._move keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help

Properties

Visibility help private
Mutability help transaction
Source Code
function _move(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData
) private {
  _balances[from] = _balances[from].sub(
    amount,
    "ERC777: transfer amount exceeds balance"
  );
  _balances[to] = _balances[to].add(amount);

  emit Sent(operator, from, to, amount, userData, operatorData);
  emit Transfer(from, to, amount);
}

internal ERC777._approve keyboard_arrow_up

Parameters help

Name Type
holder
address help
spender
address help
value
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _approve(
  address holder,
  address spender,
  uint256 value
) internal {
  require(holder != address(0), "ERC777: approve from the zero address");
  require(spender != address(0), "ERC777: approve to the zero address");

  _allowances[holder][spender] = value;
  emit Approval(holder, spender, value);
}

internal ERC777._callTokensToSend keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _callTokensToSend(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData
) internal {
  address implementer = ERC1820_REGISTRY.getInterfaceImplementer(
    from,
    TOKENS_SENDER_INTERFACE_HASH
  );
  if (implementer != address(0)) {
    IERC777Sender(implementer).tokensToSend(
      operator,
      from,
      to,
      amount,
      userData,
      operatorData
    );
  }
}

internal ERC777._callTokensReceived keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help
requireReceptionAck
bool help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _callTokensReceived(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData,
  bool requireReceptionAck
) internal {
  address implementer = ERC1820_REGISTRY.getInterfaceImplementer(
    to,
    TOKENS_RECIPIENT_INTERFACE_HASH
  );
  if (implementer != address(0)) {
    IERC777Recipient(implementer).tokensReceived(
      operator,
      from,
      to,
      amount,
      userData,
      operatorData
    );
  } else if (requireReceptionAck) {
    require(
      !to.isContract(),
      "ERC777: token recipient contract has no implementer for ERC777TokensRecipient"
    );
  }
}

internal Context.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor() internal {}

internal Context._msgSender keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgSender() internal view returns (address payable) {
  return msg.sender;
}

internal Context._msgData keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgData() internal view returns (bytes memory) {
  this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  return msg.data;
}

internal ERC777OptionalAckOnMint._callTokensReceived keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help
requireReceptionAck
bool help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _callTokensReceived(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData,
  bool requireReceptionAck
) internal {
  address implementer = ERC1820_REGISTRY.getInterfaceImplementer(
    to,
    TOKENS_RECIPIENT_INTERFACE_HASH
  );
  if (implementer != address(0)) {
    IERC777Recipient(implementer).tokensReceived(
      operator,
      from,
      to,
      amount,
      userData,
      operatorData
    );
  } else if (requireReceptionAck && from != address(0)) {
    require(
      !to.isContract(),
      "ERC777: token recipient contract has no implementer for ERC777TokensRecipient"
    );
  }
}

internal ERC777._mint keyboard_arrow_up

Parameters help

Name Type
operator
address help
account
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _mint(
  address operator,
  address account,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData
) internal {
  require(account != address(0), "ERC777: mint to the zero address");

  // Update state variables
  _totalSupply = _totalSupply.add(amount);
  _balances[account] = _balances[account].add(amount);

  _callTokensReceived(
    operator,
    address(0),
    account,
    amount,
    userData,
    operatorData,
    true
  );

  emit Minted(operator, account, amount, userData, operatorData);
  emit Transfer(address(0), account, amount);
}

internal ERC777._send keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help
requireReceptionAck
bool help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _send(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData,
  bool requireReceptionAck
) internal {
  require(operator != address(0), "ERC777: operator is the zero address");
  require(from != address(0), "ERC777: send from the zero address");
  require(to != address(0), "ERC777: send to the zero address");

  _callTokensToSend(operator, from, to, amount, userData, operatorData);

  _move(operator, from, to, amount, userData, operatorData);

  _callTokensReceived(
    operator,
    from,
    to,
    amount,
    userData,
    operatorData,
    requireReceptionAck
  );
}

internal ERC777._burn keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
amount
uint256 help
data
bytes help
operatorData
bytes help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _burn(
  address operator,
  address from,
  uint256 amount,
  bytes memory data,
  bytes memory operatorData
) internal {
  require(from != address(0), "ERC777: burn from the zero address");

  _callTokensToSend(operator, from, address(0), amount, data, operatorData);

  // Update state variables
  _balances[from] = _balances[from].sub(
    amount,
    "ERC777: burn amount exceeds balance"
  );
  _totalSupply = _totalSupply.sub(amount);

  emit Burned(operator, from, amount, data, operatorData);
  emit Transfer(from, address(0), amount);
}

internal ERC777._move keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help

Properties

Visibility help private
Mutability help transaction
Source Code
function _move(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData
) private {
  _balances[from] = _balances[from].sub(
    amount,
    "ERC777: transfer amount exceeds balance"
  );
  _balances[to] = _balances[to].add(amount);

  emit Sent(operator, from, to, amount, userData, operatorData);
  emit Transfer(from, to, amount);
}

internal ERC777._approve keyboard_arrow_up

Parameters help

Name Type
holder
address help
spender
address help
value
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _approve(
  address holder,
  address spender,
  uint256 value
) internal {
  require(holder != address(0), "ERC777: approve from the zero address");
  require(spender != address(0), "ERC777: approve to the zero address");

  _allowances[holder][spender] = value;
  emit Approval(holder, spender, value);
}

internal ERC777._callTokensToSend keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _callTokensToSend(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData
) internal {
  address implementer = ERC1820_REGISTRY.getInterfaceImplementer(
    from,
    TOKENS_SENDER_INTERFACE_HASH
  );
  if (implementer != address(0)) {
    IERC777Sender(implementer).tokensToSend(
      operator,
      from,
      to,
      amount,
      userData,
      operatorData
    );
  }
}

internal ERC777._callTokensReceived keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help
requireReceptionAck
bool help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _callTokensReceived(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData,
  bool requireReceptionAck
) internal {
  address implementer = ERC1820_REGISTRY.getInterfaceImplementer(
    to,
    TOKENS_RECIPIENT_INTERFACE_HASH
  );
  if (implementer != address(0)) {
    IERC777Recipient(implementer).tokensReceived(
      operator,
      from,
      to,
      amount,
      userData,
      operatorData
    );
  } else if (requireReceptionAck) {
    require(
      !to.isContract(),
      "ERC777: token recipient contract has no implementer for ERC777TokensRecipient"
    );
  }
}

internal Context.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor() internal {}

internal Context._msgSender keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgSender() internal view returns (address payable) {
  return msg.sender;
}

internal Context._msgData keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgData() internal view returns (bytes memory) {
  this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  return msg.data;
}

internal ERC777GSN._msgSender keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgSender() internal view returns (address payable) {
  return GSNRecipient._msgSender();
}

internal ERC777GSN._msgData keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgData() internal view returns (bytes memory) {
  return GSNRecipient._msgData();
}

internal ERC777GSN._preRelayedCall keyboard_arrow_up

Parameters help

Name Type
context
bytes help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _preRelayedCall(bytes memory context) internal returns (bytes32) {}

internal ERC777GSN._postRelayedCall keyboard_arrow_up

Parameters help

Name Type
context
bytes help
bool help
actualCharge
uint256 help
bytes32 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _postRelayedCall(
  bytes memory context,
  bool,
  uint256 actualCharge,
  bytes32
) internal {
  (
    uint256 feeRate,
    address from,
    uint256 transactionFee,
    uint256 gasPrice
  ) = abi.decode(context, (uint256, address, uint256, uint256));

  // actualCharge is an _estimated_ charge, which assumes postRelayedCall will use all available gas.
  // This implementation's gas cost can be roughly estimated as 10k gas, for the two SSTORE operations in an
  // ERC20 transfer.
  uint256 overestimation = _computeCharge(
    POST_RELAYED_CALL_MAX_GAS.sub(gsnExtraGas),
    gasPrice,
    transactionFee
  );
  uint256 fee = actualCharge.sub(overestimation).mul(feeRate).div(
    GSN_RATE_UNIT
  );

  if (fee > 0) {
    _send(_msgSender(), from, gsnFeeTarget, fee, "", "", false);
  }
}

internal AbstractOwnable.owner keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function owner() internal view returns (address);

internal AbstractOwnable.isOwner keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function isOwner() internal view returns (bool) {
  return msg.sender == owner();
}

internal GSNRecipient._upgradeRelayHub keyboard_arrow_up

Parameters help

Name Type
newRelayHub
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _upgradeRelayHub(address newRelayHub) internal {
  address currentRelayHub = _relayHub;
  require(
    newRelayHub != address(0),
    "GSNRecipient: new RelayHub is the zero address"
  );
  require(
    newRelayHub != currentRelayHub,
    "GSNRecipient: new RelayHub is the current one"
  );

  emit RelayHubChanged(currentRelayHub, newRelayHub);

  _relayHub = newRelayHub;
}

internal GSNRecipient._withdrawDeposits keyboard_arrow_up

Parameters help

Name Type
amount
uint256 help
payee
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _withdrawDeposits(uint256 amount, address payable payee) internal {
  IRelayHub(_relayHub).withdraw(amount, payee);
}

internal GSNRecipient._msgSender keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgSender() internal view returns (address payable) {
  if (msg.sender != _relayHub) {
    return msg.sender;
  } else {
    return _getRelayedCallSender();
  }
}

internal GSNRecipient._msgData keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgData() internal view returns (bytes memory) {
  if (msg.sender != _relayHub) {
    return msg.data;
  } else {
    return _getRelayedCallData();
  }
}

internal GSNRecipient._preRelayedCall keyboard_arrow_up

Parameters help

Name Type
context
bytes help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _preRelayedCall(bytes memory context) internal returns (bytes32);

internal GSNRecipient._postRelayedCall keyboard_arrow_up

Parameters help

Name Type
context
bytes help
success
bool help
actualCharge
uint256 help
preRetVal
bytes32 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _postRelayedCall(
  bytes memory context,
  bool success,
  uint256 actualCharge,
  bytes32 preRetVal
) internal;

internal GSNRecipient._approveRelayedCall keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help pure
Source Code
function _approveRelayedCall() internal pure returns (uint256, bytes memory) {
  return _approveRelayedCall("");
}

internal GSNRecipient._approveRelayedCall keyboard_arrow_up

Parameters help

Name Type
context
bytes help

Properties

Visibility help internal
Mutability help pure
Source Code
function _approveRelayedCall(bytes memory context)
  internal
  pure
  returns (uint256, bytes memory)
{
  return (RELAYED_CALL_ACCEPTED, context);
}

internal GSNRecipient._rejectRelayedCall keyboard_arrow_up

Parameters help

Name Type
errorCode
uint256 help

Properties

Visibility help internal
Mutability help pure
Source Code
function _rejectRelayedCall(uint256 errorCode)
  internal
  pure
  returns (uint256, bytes memory)
{
  return (RELAYED_CALL_REJECTED + errorCode, "");
}

internal GSNRecipient._computeCharge keyboard_arrow_up

Parameters help

Name Type
gas
uint256 help
gasPrice
uint256 help
serviceFee
uint256 help

Properties

Visibility help internal
Mutability help pure
Source Code
function _computeCharge(
  uint256 gas,
  uint256 gasPrice,
  uint256 serviceFee
) internal pure returns (uint256) {
  // The fee is expressed as a percentage. E.g. a value of 40 stands for a 40% fee, so the recipient will be
  // charged for 1.4 times the spent amount.
  return (gas * gasPrice * (100 + serviceFee)) / 100;
}

internal GSNRecipient._getRelayedCallSender keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help pure
Source Code
function _getRelayedCallSender() private pure returns (address payable result) {
  // We need to read 20 bytes (an address) located at array index msg.data.length - 20. In memory, the array
  // is prefixed with a 32-byte length value, so we first add 32 to get the memory read index. However, doing
  // so would leave the address in the upper 20 bytes of the 32-byte word, which is inconvenient and would
  // require bit shifting. We therefore subtract 12 from the read index so the address lands on the lower 20
  // bytes. This can always be done due to the 32-byte prefix.

  // The final memory read index is msg.data.length - 20 + 32 - 12 = msg.data.length. Using inline assembly is the
  // easiest/most-efficient way to perform this operation.

  // These fields are not accessible from assembly
  bytes memory array = msg.data;
  uint256 index = msg.data.length;

  // solhint-disable-next-line no-inline-assembly
  assembly {
    // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
    result := and(
      mload(add(array, index)),
      0xffffffffffffffffffffffffffffffffffffffff
    )
  }
  return result;
}

internal GSNRecipient._getRelayedCallData keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help pure
Source Code
function _getRelayedCallData() private pure returns (bytes memory) {
  // RelayHub appends the sender address at the end of the calldata, so in order to retrieve the actual msg.data,
  // we must strip the last 20 bytes (length of an address type) from it.

  uint256 actualDataLength = msg.data.length - 20;
  bytes memory actualData = new bytes(actualDataLength);

  for (uint256 i = 0; i < actualDataLength; ++i) {
    actualData[i] = msg.data[i];
  }

  return actualData;
}

internal Context.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor() internal {}

internal Context._msgSender keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgSender() internal view returns (address payable) {
  return msg.sender;
}

internal Context._msgData keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgData() internal view returns (bytes memory) {
  this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  return msg.data;
}

internal ERC777._mint keyboard_arrow_up

Parameters help

Name Type
operator
address help
account
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _mint(
  address operator,
  address account,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData
) internal {
  require(account != address(0), "ERC777: mint to the zero address");

  // Update state variables
  _totalSupply = _totalSupply.add(amount);
  _balances[account] = _balances[account].add(amount);

  _callTokensReceived(
    operator,
    address(0),
    account,
    amount,
    userData,
    operatorData,
    true
  );

  emit Minted(operator, account, amount, userData, operatorData);
  emit Transfer(address(0), account, amount);
}

internal ERC777._send keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help
requireReceptionAck
bool help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _send(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData,
  bool requireReceptionAck
) internal {
  require(operator != address(0), "ERC777: operator is the zero address");
  require(from != address(0), "ERC777: send from the zero address");
  require(to != address(0), "ERC777: send to the zero address");

  _callTokensToSend(operator, from, to, amount, userData, operatorData);

  _move(operator, from, to, amount, userData, operatorData);

  _callTokensReceived(
    operator,
    from,
    to,
    amount,
    userData,
    operatorData,
    requireReceptionAck
  );
}

internal ERC777._burn keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
amount
uint256 help
data
bytes help
operatorData
bytes help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _burn(
  address operator,
  address from,
  uint256 amount,
  bytes memory data,
  bytes memory operatorData
) internal {
  require(from != address(0), "ERC777: burn from the zero address");

  _callTokensToSend(operator, from, address(0), amount, data, operatorData);

  // Update state variables
  _balances[from] = _balances[from].sub(
    amount,
    "ERC777: burn amount exceeds balance"
  );
  _totalSupply = _totalSupply.sub(amount);

  emit Burned(operator, from, amount, data, operatorData);
  emit Transfer(from, address(0), amount);
}

internal ERC777._move keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help

Properties

Visibility help private
Mutability help transaction
Source Code
function _move(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData
) private {
  _balances[from] = _balances[from].sub(
    amount,
    "ERC777: transfer amount exceeds balance"
  );
  _balances[to] = _balances[to].add(amount);

  emit Sent(operator, from, to, amount, userData, operatorData);
  emit Transfer(from, to, amount);
}

internal ERC777._approve keyboard_arrow_up

Parameters help

Name Type
holder
address help
spender
address help
value
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _approve(
  address holder,
  address spender,
  uint256 value
) internal {
  require(holder != address(0), "ERC777: approve from the zero address");
  require(spender != address(0), "ERC777: approve to the zero address");

  _allowances[holder][spender] = value;
  emit Approval(holder, spender, value);
}

internal ERC777._callTokensToSend keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _callTokensToSend(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData
) internal {
  address implementer = ERC1820_REGISTRY.getInterfaceImplementer(
    from,
    TOKENS_SENDER_INTERFACE_HASH
  );
  if (implementer != address(0)) {
    IERC777Sender(implementer).tokensToSend(
      operator,
      from,
      to,
      amount,
      userData,
      operatorData
    );
  }
}

internal ERC777._callTokensReceived keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help
requireReceptionAck
bool help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _callTokensReceived(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData,
  bool requireReceptionAck
) internal {
  address implementer = ERC1820_REGISTRY.getInterfaceImplementer(
    to,
    TOKENS_RECIPIENT_INTERFACE_HASH
  );
  if (implementer != address(0)) {
    IERC777Recipient(implementer).tokensReceived(
      operator,
      from,
      to,
      amount,
      userData,
      operatorData
    );
  } else if (requireReceptionAck) {
    require(
      !to.isContract(),
      "ERC777: token recipient contract has no implementer for ERC777TokensRecipient"
    );
  }
}

internal Context.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor() internal {}

internal Context._msgSender keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgSender() internal view returns (address payable) {
  return msg.sender;
}

internal Context._msgData keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgData() internal view returns (bytes memory) {
  this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  return msg.data;
}

internal ERC777._mint keyboard_arrow_up

Parameters help

Name Type
operator
address help
account
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _mint(
  address operator,
  address account,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData
) internal {
  require(account != address(0), "ERC777: mint to the zero address");

  // Update state variables
  _totalSupply = _totalSupply.add(amount);
  _balances[account] = _balances[account].add(amount);

  _callTokensReceived(
    operator,
    address(0),
    account,
    amount,
    userData,
    operatorData,
    true
  );

  emit Minted(operator, account, amount, userData, operatorData);
  emit Transfer(address(0), account, amount);
}

internal ERC777._send keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help
requireReceptionAck
bool help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _send(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData,
  bool requireReceptionAck
) internal {
  require(operator != address(0), "ERC777: operator is the zero address");
  require(from != address(0), "ERC777: send from the zero address");
  require(to != address(0), "ERC777: send to the zero address");

  _callTokensToSend(operator, from, to, amount, userData, operatorData);

  _move(operator, from, to, amount, userData, operatorData);

  _callTokensReceived(
    operator,
    from,
    to,
    amount,
    userData,
    operatorData,
    requireReceptionAck
  );
}

internal ERC777._burn keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
amount
uint256 help
data
bytes help
operatorData
bytes help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _burn(
  address operator,
  address from,
  uint256 amount,
  bytes memory data,
  bytes memory operatorData
) internal {
  require(from != address(0), "ERC777: burn from the zero address");

  _callTokensToSend(operator, from, address(0), amount, data, operatorData);

  // Update state variables
  _balances[from] = _balances[from].sub(
    amount,
    "ERC777: burn amount exceeds balance"
  );
  _totalSupply = _totalSupply.sub(amount);

  emit Burned(operator, from, amount, data, operatorData);
  emit Transfer(from, address(0), amount);
}

internal ERC777._move keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help

Properties

Visibility help private
Mutability help transaction
Source Code
function _move(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData
) private {
  _balances[from] = _balances[from].sub(
    amount,
    "ERC777: transfer amount exceeds balance"
  );
  _balances[to] = _balances[to].add(amount);

  emit Sent(operator, from, to, amount, userData, operatorData);
  emit Transfer(from, to, amount);
}

internal ERC777._approve keyboard_arrow_up

Parameters help

Name Type
holder
address help
spender
address help
value
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _approve(
  address holder,
  address spender,
  uint256 value
) internal {
  require(holder != address(0), "ERC777: approve from the zero address");
  require(spender != address(0), "ERC777: approve to the zero address");

  _allowances[holder][spender] = value;
  emit Approval(holder, spender, value);
}

internal ERC777._callTokensToSend keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _callTokensToSend(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData
) internal {
  address implementer = ERC1820_REGISTRY.getInterfaceImplementer(
    from,
    TOKENS_SENDER_INTERFACE_HASH
  );
  if (implementer != address(0)) {
    IERC777Sender(implementer).tokensToSend(
      operator,
      from,
      to,
      amount,
      userData,
      operatorData
    );
  }
}

internal ERC777._callTokensReceived keyboard_arrow_up

Parameters help

Name Type
operator
address help
from
address help
to
address help
amount
uint256 help
userData
bytes help
operatorData
bytes help
requireReceptionAck
bool help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _callTokensReceived(
  address operator,
  address from,
  address to,
  uint256 amount,
  bytes memory userData,
  bytes memory operatorData,
  bool requireReceptionAck
) internal {
  address implementer = ERC1820_REGISTRY.getInterfaceImplementer(
    to,
    TOKENS_RECIPIENT_INTERFACE_HASH
  );
  if (implementer != address(0)) {
    IERC777Recipient(implementer).tokensReceived(
      operator,
      from,
      to,
      amount,
      userData,
      operatorData
    );
  } else if (requireReceptionAck) {
    require(
      !to.isContract(),
      "ERC777: token recipient contract has no implementer for ERC777TokensRecipient"
    );
  }
}

internal Context.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor() internal {}

internal Context._msgSender keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgSender() internal view returns (address payable) {
  return msg.sender;
}

internal Context._msgData keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgData() internal view returns (bytes memory) {
  this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  return msg.data;
}