ERC20
This contract is an ERC20 token.
Name
Amp
Symbol
AMP
Decimals
18
Total Supply
89,767,795,053 AMP
About
link
Amp (AMP) is a cryptocurrency token and operates on the Ethereum platform. Amp has a current supply of 85,231,428,501 with 4,224,314,276 in circulation. The last known price of Amp is $0.006500 USD and is down -2.07% over the last 24 hours. It is currently trading on 6 active market(s) with $268,475.897 traded over the last 24 hours. More information can be found at https://amptoken.org.
Stats
Public Functions
37
Event Types
15
Code Size
80,206 bytes
Library Use
Uses SafeMath for uint256.
Events (15) keyboard_arrow_up
Functions
owner keyboard_arrow_up
authorizedNewOwner keyboard_arrow_up
authorizeOwnershipTransfer keyboard_arrow_up
assumeOwnership keyboard_arrow_up
Parameters help
This function has no parameters.
Requirements help
Source Code
function assumeOwnership() external {
require(msg.sender == _authorizedNewOwner, "Invalid sender");
address oldValue = _owner;
_owner = _authorizedNewOwner;
_authorizedNewOwner = address(0);
emit OwnerUpdate(oldValue, _owner);
}
canImplementInterfaceForAddress keyboard_arrow_up
Source Code
function canImplementInterfaceForAddress(
bytes32 _interfaceHash,
address // Comments to avoid compilation warnings for unused variables. /*addr*/
) external view returns (bytes32) {
if (_interfaceHashes[_interfaceHash]) {
return ERC1820_ACCEPT_MAGIC;
} else {
return "";
}
}
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Requirements help
_value
must be less than or equal to
_balanceOfByPartition for the sender's address for defaultPartition
Source Code
function transfer(address _to, uint256 _value) external override returns (bool) {
_transferByDefaultPartition(msg.sender, msg.sender, _to, _value, "");
return true;
}
transferFrom keyboard_arrow_up
Requirements help
_value
must be less than or equal to
_balanceOfByPartition for the sender's address for defaultPartition
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) external override returns (bool) {
_transferByDefaultPartition(msg.sender, _from, _to, _value, "");
return true;
}
allowance keyboard_arrow_up
approve keyboard_arrow_up
Requirements help
Source Code
function approve(address _spender, uint256 _value) external override returns (bool) {
_approveByPartition(defaultPartition, msg.sender, _spender, _value);
return true;
}
increaseAllowance keyboard_arrow_up
Requirements help
Source Code
function increaseAllowance(address _spender, uint256 _addedValue)
external
returns (bool)
{
_approveByPartition(
defaultPartition,
msg.sender,
_spender,
_allowedByPartition[defaultPartition][msg.sender][_spender].add(_addedValue)
);
return true;
}
decreaseAllowance keyboard_arrow_up
Requirements help
Source Code
function decreaseAllowance(address _spender, uint256 _subtractedValue)
external
returns (bool)
{
_approveByPartition(
defaultPartition,
msg.sender,
_spender,
_allowedByPartition[defaultPartition][msg.sender][_spender].sub(
_subtractedValue
)
);
return true;
}
swap keyboard_arrow_up
Source Code
function swap(address _from) public {
uint256 amount = swapToken.allowance(_from, address(this));
require(amount > 0, EC_53_INSUFFICIENT_ALLOWANCE);
require(
swapToken.transferFrom(_from, swapTokenGraveyard, amount),
EC_60_SWAP_TRANSFER_FAILURE
);
_mint(msg.sender, _from, amount);
emit Swap(msg.sender, _from, amount);
}
balanceOfByPartition keyboard_arrow_up
Source Code
function balanceOfByPartition(bytes32 _partition, address _tokenHolder)
external
view
returns (uint256)
{
return _balanceOfByPartition[_tokenHolder][_partition];
}
partitionsOf keyboard_arrow_up
transferByPartition keyboard_arrow_up
Parameters help
Requirements help
_value
must be less than or equal to
_balanceOfByPartition for the sender's address for defaultPartition
Source Code
function transferByPartition(
bytes32 _partition,
address _from,
address _to,
uint256 _value,
bytes calldata _data,
bytes calldata _operatorData
) external returns (bytes32) {
return
_transferByPartition(
_partition,
msg.sender,
_from,
_to,
_value,
_data,
_operatorData
);
}
authorizeOperator keyboard_arrow_up
revokeOperator keyboard_arrow_up
Requirements help
Source Code
function revokeOperator(address _operator) external {
require(_operator != msg.sender, EC_58_INVALID_OPERATOR);
_authorizedOperator[msg.sender][_operator] = false;
emit RevokedOperator(_operator, msg.sender);
}
authorizeOperatorByPartition keyboard_arrow_up
revokeOperatorByPartition keyboard_arrow_up
Requirements help
Source Code
function revokeOperatorByPartition(bytes32 _partition, address _operator) external {
require(_operator != msg.sender, EC_58_INVALID_OPERATOR);
_authorizedOperatorByPartition[msg.sender][_partition][_operator] = false;
emit RevokedOperatorByPartition(_partition, _operator, msg.sender);
}
isOperator keyboard_arrow_up
isOperatorForPartition keyboard_arrow_up
Source Code
function isOperatorForPartition(
bytes32 _partition,
address _operator,
address _tokenHolder
) external view returns (bool) {
return _isOperatorForPartition(_partition, _operator, _tokenHolder);
}
isOperatorForCollateralManager keyboard_arrow_up
Parameters help
Source Code
function isOperatorForCollateralManager(
bytes32 _partition,
address _operator,
address _collateralManager
) external view returns (bool) {
return
_isCollateralManager[_collateralManager] &&
(_isOperator(_operator, _collateralManager) ||
_authorizedOperatorByPartition[_collateralManager][_partition][_operator]);
}
name keyboard_arrow_up
symbol keyboard_arrow_up
decimals keyboard_arrow_up
granularity keyboard_arrow_up
totalPartitions keyboard_arrow_up
allowanceByPartition keyboard_arrow_up
Source Code
function allowanceByPartition(
bytes32 _partition,
address _owner,
address _spender
) external view returns (uint256) {
return _allowedByPartition[_partition][_owner][_spender];
}
approveByPartition keyboard_arrow_up
Requirements help
Source Code
function approveByPartition(
bytes32 _partition,
address _spender,
uint256 _value
) external returns (bool) {
_approveByPartition(_partition, msg.sender, _spender, _value);
return true;
}
increaseAllowanceByPartition keyboard_arrow_up
Requirements help
Source Code
function increaseAllowanceByPartition(
bytes32 _partition,
address _spender,
uint256 _addedValue
) external returns (bool) {
_approveByPartition(
_partition,
msg.sender,
_spender,
_allowedByPartition[_partition][msg.sender][_spender].add(_addedValue)
);
return true;
}
decreaseAllowanceByPartition keyboard_arrow_up
Parameters help
Requirements help
Source Code
function decreaseAllowanceByPartition(
bytes32 _partition,
address _spender,
uint256 _subtractedValue
) external returns (bool) {
// TOOD: Figure out if safe math will panic below 0
_approveByPartition(
_partition,
msg.sender,
_spender,
_allowedByPartition[_partition][msg.sender][_spender].sub(_subtractedValue)
);
return true;
}
registerCollateralManager keyboard_arrow_up
Parameters help
This function has no parameters.
Requirements help
Source Code
function registerCollateralManager() external {
// Short circuit a double registry
require(!_isCollateralManager[msg.sender], EC_5C_ADDRESS_CONFLICT);
collateralManagers.push(msg.sender);
_isCollateralManager[msg.sender] = true;
emit CollateralManagerRegistered(msg.sender);
}
isCollateralManager keyboard_arrow_up
setPartitionStrategy keyboard_arrow_up
Requirements help
Source Code
function setPartitionStrategy(bytes4 _prefix, address _implementation) external {
require(msg.sender == owner(), EC_56_INVALID_SENDER);
require(!_isPartitionStrategy[_prefix], EC_5E_PARTITION_PREFIX_CONFLICT);
require(_prefix != ZERO_PREFIX, EC_5F_INVALID_PARTITION_PREFIX_0);
string memory iname = PartitionUtils._getPartitionStrategyValidatorIName(_prefix);
ERC1820Client.setInterfaceImplementation(iname, _implementation);
partitionStrategies.push(_prefix);
_isPartitionStrategy[_prefix] = true;
emit PartitionStrategySet(_prefix, iname, _implementation);
}