Blockwell

Revain

ERC20

This contract is an ERC20 token.

Name Revain
Symbol REV
Decimals 6
Total Supply 60,550,308,334 REV

About link description

Revain (REV) is a cryptocurrency and operates on the Ethereum platform. Revain has a current supply of 85,061,485,689.83401. The last known price of Revain is 0.0076934 USD and is up 0.14 over the last 24 hours. It is currently trading on 20 active market(s) with $4,881,157.77 traded over the last 24 hours. More information can be found at https://revain.org/.

Stats

Public Functions 14
Event Types 6
Code Size 69,959 bytes

Events (6) keyboard_arrow_up

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint256 help

CustodianChangeConfirmed Event

Parameters help
_lockId
bytes32 help
_newCustodian
address help

CustodianChangeRequested Event

Parameters help
_lockId
bytes32 help
_msgSender
address help
_proposedCustodian
address help

ImplChangeConfirmed Event

Parameters help
_lockId
bytes32 help
_newImpl
address help

ImplChangeRequested Event

Parameters help
_lockId
bytes32 help
_msgSender
address help
_proposedImpl
address help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

name Variable

string help

symbol Variable

string help

decimals Variable

uint8 help

erc20Impl Variable

address help

custodian Variable

address help

lockRequestCount Variable

uint256 help

implChangeReqs Variable

mapping(bytes32 => ImplChangeRequest) help
Internal Variable

custodianChangeReqs Variable

mapping(bytes32 => CustodianChangeRequest) help
Internal Variable

Functions Expand All Collapse All

requestCustodianChange keyboard_arrow_up

Parameters help

Name Type
_proposedCustodian
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function requestCustodianChange(address _proposedCustodian)
  public
  returns (bytes32 lockId)
{
  require(
    _proposedCustodian != address(0),
    "no null value for `_proposedCustodian`"
  );

  lockId = generateLockId();

  custodianChangeReqs[lockId] = CustodianChangeRequest({
    proposedNew: _proposedCustodian
  });

  emit CustodianChangeRequested(lockId, msg.sender, _proposedCustodian);
}

confirmCustodianChange keyboard_arrow_up

Parameters help

Name Type
_lockId
bytes32 help

Properties

Visibility help public
Mutability help transaction
Source Code
function confirmCustodianChange(bytes32 _lockId) public onlyCustodian {
  custodian = getCustodianChangeReq(_lockId);

  delete custodianChangeReqs[_lockId];

  emit CustodianChangeConfirmed(_lockId, custodian);
}

requestImplChange keyboard_arrow_up

Parameters help

Name Type
_proposedImpl
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function requestImplChange(address _proposedImpl)
  public
  returns (bytes32 lockId)
{
  require(_proposedImpl != address(0), "no null value for `_proposedImpl`");

  lockId = generateLockId();

  implChangeReqs[lockId] = ImplChangeRequest({proposedNew: _proposedImpl});

  emit ImplChangeRequested(lockId, msg.sender, _proposedImpl);
}

confirmImplChange keyboard_arrow_up

Parameters help

Name Type
_lockId
bytes32 help

Properties

Visibility help public
Mutability help transaction
Source Code
function confirmImplChange(bytes32 _lockId) public onlyCustodian {
  erc20Impl = getImplChangeReq(_lockId);

  delete implChangeReqs[_lockId];

  emit ImplChangeConfirmed(_lockId, address(erc20Impl));
}

Parameters help

This function has no parameters.

Properties

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

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help view
Source Code
function balanceOf(address _owner) public view returns (uint256 balance) {
  return erc20Impl.balanceOf(_owner);
}

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function transfer(address _to, uint256 _value) public returns (bool success) {
  return erc20Impl.transferWithSender(msg.sender, _to, _value);
}

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) public returns (bool success) {
  return erc20Impl.transferFromWithSender(msg.sender, _from, _to, _value);
}

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function approve(address _spender, uint256 _value)
  public
  returns (bool success)
{
  return erc20Impl.approveWithSender(msg.sender, _spender, _value);
}

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

Visibility help public
Mutability help view
Source Code
function allowance(address _owner, address _spender)
  public
  view
  returns (uint256 remaining)
{
  return erc20Impl.allowance(_owner, _spender);
}

emitTransfer keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function emitTransfer(
  address _from,
  address _to,
  uint256 _value
) public onlyImpl {
  emit Transfer(_from, _to, _value);
}

emitApproval keyboard_arrow_up

Parameters help

Name Type
_owner
address help
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function emitApproval(
  address _owner,
  address _spender,
  uint256 _value
) public onlyImpl {
  emit Approval(_owner, _spender, _value);
}

increaseApproval keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_addedValue
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function increaseApproval(address _spender, uint256 _addedValue)
  public
  returns (bool success)
{
  return
    erc20Impl.increaseApprovalWithSender(msg.sender, _spender, _addedValue);
}

decreaseApproval keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_subtractedValue
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function decreaseApproval(address _spender, uint256 _subtractedValue)
  public
  returns (bool success)
{
  return
    erc20Impl.decreaseApprovalWithSender(
      msg.sender,
      _spender,
      _subtractedValue
    );
}

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 ERC20ImplUpgradeable.getImplChangeReq keyboard_arrow_up

Parameters help

Name Type
_lockId
bytes32 help

Properties

Visibility help private
Mutability help view

Requirements help

Source Code
function getImplChangeReq(bytes32 _lockId)
  private
  view
  returns (ERC20Impl _proposedNew)
{
  ImplChangeRequest storage changeRequest = implChangeReqs[_lockId];

  // reject ‘null’ results from the map lookup
  // this can only be the case if an unknown `_lockId` is received
  require(
    changeRequest.proposedNew != address(0),
    "reject ‘null’ results from the map lookup"
  );

  return ERC20Impl(changeRequest.proposedNew);
}

internal CustodianUpgradeable.getCustodianChangeReq keyboard_arrow_up

Parameters help

Name Type
_lockId
bytes32 help

Properties

Visibility help private
Mutability help view

Requirements help

Source Code
function getCustodianChangeReq(bytes32 _lockId)
  private
  view
  returns (address _proposedNew)
{
  CustodianChangeRequest storage changeRequest = custodianChangeReqs[_lockId];

  // reject ‘null’ results from the map lookup
  // this can only be the case if an unknown `_lockId` is received
  require(
    changeRequest.proposedNew != address(0),
    "reject ‘null’ results from the map lookup"
  );

  return changeRequest.proposedNew;
}

internal LockRequestable.generateLockId keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
function generateLockId() internal returns (bytes32 lockId) {
  return
    keccak256(
      abi.encodePacked(
        blockhash(block.number - 1),
        address(this),
        ++lockRequestCount
      )
    );
}