Blockwell

Reputation

About link

Augur (REP) is a cryptocurrency and operates on the Ethereum platform. Augur has a current supply of 11,000,000. The last known price of Augur is 21.03567151 USD and is up 23.30 over the last 24 hours. It is currently trading on 83 active market(s) with $463,496,024.39 traded over the last 24 hours. More information can be found at http://www.augur.net/.

Stats

Public Functions 3
Event Types 0
Code Size 35,565 bytes

controllerLookupName Variable

bytes32 help

controller Variable

IController 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 getController() public view returns (IController) {
  return controller;
}

Parameters help

Name Type
_controller
IController help

Properties

Visibility help public
Mutability help transaction
Source Code
function setController(IController _controller)
  public
  onlyControllerCaller
  returns (bool)
{
  controller = _controller;
  return true;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
function() external payable {
  // Do nothing if we haven't properly set up the delegator to delegate calls
  if (controllerLookupName == 0) {
    return;
  }

  // Get the delegation target contract
  address _target = controller.lookup(controllerLookupName);

  assembly {
    //0x40 is the address where the next free memory slot is stored in Solidity
    let _calldataMemoryOffset := mload(0x40)
    // new "memory end" including padding. The bitwise operations here ensure we get rounded up to the nearest 32 byte boundary
    let _size := and(add(calldatasize, 0x1f), not(0x1f))
    // Update the pointer at 0x40 to point at new free memory location so any theoretical allocation doesn't stomp our memory in this call
    mstore(0x40, add(_calldataMemoryOffset, _size))
    // Copy method signature and parameters of this call into memory
    calldatacopy(_calldataMemoryOffset, 0x0, calldatasize)
    // Call the actual method via delegation
    let _retval := delegatecall(
      gas,
      _target,
      _calldataMemoryOffset,
      calldatasize,
      0,
      0
    )
    switch _retval
    case 0 {
      // 0 == it threw, so we revert
      revert(0, 0)
    }
    default {
      // If the call succeeded return the return data from the delegate call
      let _returndataMemoryOffset := mload(0x40)
      // Update the pointer at 0x40 again to point at new free memory location so any theoretical allocation doesn't stomp our memory in this call
      mstore(0x40, add(_returndataMemoryOffset, returndatasize))
      returndatacopy(_returndataMemoryOffset, 0x0, returndatasize)
      return(_returndataMemoryOffset, returndatasize)
    }
  }
}

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.