Transaction Hash:
Block:
10077379 at May-16-2020 01:22:46 PM +UTC
Transaction Fee:
0.000509698 ETH
$1.02
Gas Used:
36,407 Gas / 14 Gwei
Emitted Events:
| 115 |
RaeToken.Transfer( from=[Sender] 0xf925df4b2fa4a3a887b008cfc0b23cd12cf3cff9, to=0x0000000000000000000000000000000000000000, value=27702633638208778028 )
|
Account State Difference:
| Address | Before | After | State Difference | ||
|---|---|---|---|---|---|
|
0x5A0b54D5...D3E029c4c
Miner
| (Spark Pool) | 92.435644256515010841 Eth | 92.436153954515010841 Eth | 0.000509698 | |
| 0xE5a3229C...dCd948756 | |||||
| 0xF925DF4B...12CF3CfF9 | (RAE: Deployer) |
1.712396266875663239 Eth
Nonce: 24621
|
1.711886568875663239 Eth
Nonce: 24622
| 0.000509698 |
Execution Trace
RaeToken.burn( value=27702633638208778028 )
{"ERC20.sol":{"content":"pragma solidity ^0.5.2;\n\nimport \"./IERC20.sol\";\nimport \"./SafeMath.sol\";\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * https://eips.ethereum.org/EIPS/eip-20\n * Originally based on code by FirstBlood:\n * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n *\n * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for\n * all accounts just by listening to said events. Note that this isn\u0027t required by the specification, and other\n * compliant implementations may not do it.\n */\ncontract ERC20 is IERC20 {\n using SafeMath for uint256;\n\n mapping (address =\u003e uint256) private _balances;\n\n mapping (address =\u003e mapping (address =\u003e uint256)) private _allowed;\n\n uint256 private _totalSupply;\n\n /**\n * @dev Total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner The address to query the balance of.\n * @return A uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address owner) public view returns (uint256) {\n return _balances[owner];\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param owner address The address which owns the funds.\n * @param spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address owner, address spender) public view returns (uint256) {\n return _allowed[owner][spender];\n }\n\n /**\n * @dev Transfer token to a specified address\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n */\n function transfer(address to, uint256 value) public returns (bool) {\n _transfer(msg.sender, to, value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender\u0027s allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n */\n function approve(address spender, uint256 value) public returns (bool) {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Transfer tokens from one address to another.\n * Note that while this function emits an Approval event, this is not required as per the specification,\n * and other compliant implementations may not emit the event.\n * @param from address The address which you want to send tokens from\n * @param to address The address which you want to transfer to\n * @param value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address from, address to, uint256 value) public returns (bool) {\n _transfer(from, to, value);\n _approve(from, msg.sender, _allowed[from][msg.sender].sub(value));\n return true;\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n * approve should be called when _allowed[msg.sender][spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * Emits an Approval event.\n * @param spender The address which will spend the funds.\n * @param addedValue The amount of tokens to increase the allowance by.\n */\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n _approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue));\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n * approve should be called when _allowed[msg.sender][spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * Emits an Approval event.\n * @param spender The address which will spend the funds.\n * @param subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n _approve(msg.sender, spender, _allowed[msg.sender][spender].sub(subtractedValue));\n return true;\n }\n\n /**\n * @dev Transfer token for a specified addresses\n * @param from The address to transfer from.\n * @param to The address to transfer to.\n * @param value The amount to be transferred.\n */\n function _transfer(address from, address to, uint256 value) internal {\n require(to != address(0));\n\n _balances[from] = _balances[from].sub(value);\n _balances[to] = _balances[to].add(value);\n emit Transfer(from, to, value);\n }\n\n /**\n * @dev Internal function that mints an amount of the token and assigns it to\n * an account. This encapsulates the modification of balances such that the\n * proper events are emitted.\n * @param account The account that will receive the created tokens.\n * @param value The amount that will be created.\n */\n function _mint(address account, uint256 value) internal {\n require(account != address(0));\n\n _totalSupply = _totalSupply.add(value);\n _balances[account] = _balances[account].add(value);\n emit Transfer(address(0), account, value);\n }\n\n /**\n * @dev Internal function that burns an amount of the token of a given\n * account.\n * @param account The account whose tokens will be burnt.\n * @param value The amount that will be burnt.\n */\n function _burn(address account, uint256 value) internal {\n require(account != address(0));\n\n _totalSupply = _totalSupply.sub(value);\n _balances[account] = _balances[account].sub(value);\n emit Transfer(account, address(0), value);\n }\n\n /**\n * @dev Approve an address to spend another addresses\u0027 tokens.\n * @param owner The address that owns the tokens.\n * @param spender The address that will spend the tokens.\n * @param value The number of tokens that can be spent.\n */\n function _approve(address owner, address spender, uint256 value) internal {\n require(spender != address(0));\n require(owner != address(0));\n\n _allowed[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n /**\n * @dev Internal function that burns an amount of the token of a given\n * account, deducting from the sender\u0027s allowance for said account. Uses the\n * internal burn function.\n * Emits an Approval event (reflecting the reduced allowance).\n * @param account The account whose tokens will be burnt.\n * @param value The amount that will be burnt.\n */\n function _burnFrom(address account, uint256 value) internal {\n _burn(account, value);\n _approve(account, msg.sender, _allowed[account][msg.sender].sub(value));\n }\n}\n"},"ERC20Burnable.sol":{"content":"pragma solidity ^0.5.2;\n\nimport \"./ERC20.sol\";\n\n/**\n * @title Burnable Token\n * @dev Token that can be irreversibly burned (destroyed).\n */\ncontract ERC20Burnable is ERC20 {\n /**\n * @dev Burns a specific amount of tokens.\n * @param value The amount of token to be burned.\n */\n function burn(uint256 value) public {\n _burn(msg.sender, value);\n }\n\n /**\n * @dev Burns a specific amount of tokens from the target address and decrements allowance\n * @param from address The account whose tokens will be burned.\n * @param value uint256 The amount of token to be burned.\n */\n function burnFrom(address from, uint256 value) public {\n _burnFrom(from, value);\n }\n}\n"},"ERC20Capped.sol":{"content":"pragma solidity ^0.5.2;\n\nimport \"./ERC20Mintable.sol\";\n\n/**\n * @title Capped token\n * @dev Mintable token with a token cap.\n */\ncontract ERC20Capped is ERC20Mintable {\n uint256 private _cap;\n\n constructor (uint256 cap) public {\n require(cap \u003e 0);\n _cap = cap;\n }\n\n /**\n * @return the cap for the token minting.\n */\n function cap() public view returns (uint256) {\n return _cap;\n }\n\n function _mint(address account, uint256 value) internal {\n require(totalSupply().add(value) \u003c= _cap);\n super._mint(account, value);\n }\n}\n"},"ERC20Detailed.sol":{"content":"pragma solidity ^0.5.2;\n\nimport \"./IERC20.sol\";\n\n/**\n * @title ERC20Detailed token\n * @dev The decimals are only for visualization purposes.\n * All the operations are done using the smallest and indivisible token unit,\n * just as on Ethereum all the operations are done in wei.\n */\ncontract ERC20Detailed is IERC20 {\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n constructor (string memory name, string memory symbol, uint8 decimals) public {\n _name = name;\n _symbol = symbol;\n _decimals = decimals;\n }\n\n /**\n * @return the name of the token.\n */\n function name() public view returns (string memory) {\n return _name;\n }\n\n /**\n * @return the symbol of the token.\n */\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @return the number of decimals of the token.\n */\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n}\n"},"ERC20Mintable.sol":{"content":"pragma solidity ^0.5.2;\n\nimport \"./ERC20.sol\";\nimport \"./MinterRole.sol\";\n\n/**\n * @title ERC20Mintable\n * @dev ERC20 minting logic\n */\ncontract ERC20Mintable is ERC20, MinterRole {\n /**\n * @dev Function to mint tokens\n * @param to The address that will receive the minted tokens.\n * @param value The amount of tokens to mint.\n * @return A boolean that indicates if the operation was successful.\n */\n function mint(address to, uint256 value) public onlyMinter returns (bool) {\n _mint(to, value);\n return true;\n }\n}\n"},"ERC20Pausable.sol":{"content":"pragma solidity ^0.5.2;\n\nimport \"./ERC20.sol\";\nimport \"./Pausable.sol\";\n\n/**\n * @title Pausable token\n * @dev ERC20 modified with pausable transfers.\n */\ncontract ERC20Pausable is ERC20, Pausable {\n function transfer(address to, uint256 value) public whenNotPaused returns (bool) {\n return super.transfer(to, value);\n }\n\n function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) {\n return super.transferFrom(from, to, value);\n }\n\n function approve(address spender, uint256 value) public whenNotPaused returns (bool) {\n return super.approve(spender, value);\n }\n\n function increaseAllowance(address spender, uint addedValue) public whenNotPaused returns (bool success) {\n return super.increaseAllowance(spender, addedValue);\n }\n\n function decreaseAllowance(address spender, uint subtractedValue) public whenNotPaused returns (bool success) {\n return super.decreaseAllowance(spender, subtractedValue);\n }\n}\n"},"IERC20.sol":{"content":"pragma solidity ^0.5.2;\n\n/**\n * @title ERC20 interface\n * @dev see https://eips.ethereum.org/EIPS/eip-20\n */\ninterface IERC20 {\n function transfer(address to, uint256 value) external returns (bool);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address who) external view returns (uint256);\n\n function allowance(address owner, address spender) external view returns (uint256);\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"},"MinterRole.sol":{"content":"pragma solidity ^0.5.2;\n\nimport \"./Roles.sol\";\n\ncontract MinterRole {\n using Roles for Roles.Role;\n\n event MinterAdded(address indexed account);\n event MinterRemoved(address indexed account);\n\n Roles.Role private _minters;\n\n constructor () internal {\n _addMinter(msg.sender);\n }\n\n modifier onlyMinter() {\n require(isMinter(msg.sender));\n _;\n }\n\n function isMinter(address account) public view returns (bool) {\n return _minters.has(account);\n }\n\n function addMinter(address account) public onlyMinter {\n _addMinter(account);\n }\n\n function renounceMinter() public {\n _removeMinter(msg.sender);\n }\n\n function _addMinter(address account) internal {\n _minters.add(account);\n emit MinterAdded(account);\n }\n\n function _removeMinter(address account) internal {\n _minters.remove(account);\n emit MinterRemoved(account);\n }\n}\n"},"Pausable.sol":{"content":"pragma solidity ^0.5.2;\n\nimport \"./PauserRole.sol\";\n\n/**\n * @title Pausable\n * @dev Base contract which allows children to implement an emergency stop mechanism.\n */\ncontract Pausable is PauserRole {\n event Paused(address account);\n event Unpaused(address account);\n\n bool private _paused;\n\n constructor () internal {\n _paused = false;\n }\n\n /**\n * @return true if the contract is paused, false otherwise.\n */\n function paused() public view returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n */\n modifier whenNotPaused() {\n require(!_paused);\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n */\n modifier whenPaused() {\n require(_paused);\n _;\n }\n\n /**\n * @dev called by the owner to pause, triggers stopped state\n */\n function pause() public onlyPauser whenNotPaused {\n _paused = true;\n emit Paused(msg.sender);\n }\n\n /**\n * @dev called by the owner to unpause, returns to normal state\n */\n function unpause() public onlyPauser whenPaused {\n _paused = false;\n emit Unpaused(msg.sender);\n }\n}\n"},"PauserRole.sol":{"content":"pragma solidity ^0.5.2;\n\nimport \"./Roles.sol\";\n\ncontract PauserRole {\n using Roles for Roles.Role;\n\n event PauserAdded(address indexed account);\n event PauserRemoved(address indexed account);\n\n Roles.Role private _pausers;\n\n constructor () internal {\n _addPauser(msg.sender);\n }\n\n modifier onlyPauser() {\n require(isPauser(msg.sender));\n _;\n }\n\n function isPauser(address account) public view returns (bool) {\n return _pausers.has(account);\n }\n\n function addPauser(address account) public onlyPauser {\n _addPauser(account);\n }\n\n function renouncePauser() public {\n _removePauser(msg.sender);\n }\n\n function _addPauser(address account) internal {\n _pausers.add(account);\n emit PauserAdded(account);\n }\n\n function _removePauser(address account) internal {\n _pausers.remove(account);\n emit PauserRemoved(account);\n }\n}\n"},"RaeToken.sol":{"content":"pragma solidity 0.5.7;\n\nimport \"./ERC20Detailed.sol\";\nimport \"./ERC20Burnable.sol\";\nimport \"./ERC20Capped.sol\";\nimport \"./ERC20Pausable.sol\";\n\n\n/**\n@dev RaeToken Contract\nrequirements:\n - address that deployed RaeToken can pause contract and release pauseRole in future\n - address that deployed RaeToken has mintRole and can release mintRole in future\n - RaeMintContract has mintRole after deployment\n - totalSupply is capped at 34 million RAE = 34000000 RAE, or 34000000e18 ROK (1 RAE = 1e18 ROK)\n - every 1700 _mintPeriods _mintAmount is halved\n - _mintAmount starts at 10000 RAE = 10000e18 ROK\n - halveEvery can never be changed\n */\ncontract RaeToken is ERC20Detailed, ERC20Capped, ERC20Burnable, ERC20Pausable {\n uint256 private _mintAmount = 216000e18;\n uint256 private _mintPeriods = 0;\n uint256 private _totalInPeriod = 0;\n uint256 constant private _halveEvery = 1700; // halve mint amount every 1700 mint periods\n mapping (address =\u003e uint256) private _balances;\n\n constructor(string memory name, string memory symbol, uint8 decimals, uint256 cap)\n ERC20Burnable()\n ERC20Mintable()\n ERC20Capped(cap)\n ERC20Detailed(name, symbol, decimals)\n ERC20Pausable()\n ERC20()\n public \n {\n _mint(msg.sender, 84000e18);\n }\n\n /**\n * @dev perform a minting period\n * requirements:\n * - addresses.length == values.length != 0\n * - only addresses with minter role should be able to call this function\n * - totalSent == _mintAmount\n * - every time this function returns successfully (true) _mintPeriods is incremented by 1\n * - every 1700 _mintPeriods _mintAmount is halved. e.g. when _mintPeriods = 1700 then _mintAmount = 5000e18\n * - addresses[i] is minted values[i], accepatable to have duplicate addresses\n @param addresses array of addresses where amount minted to addresses[i] is values[i]\n @param values array of token amounts that add up to _mintAmount\n */\n function mintBulk(address[] calldata addresses, uint256[] calldata values) external whenNotPaused onlyMinter returns (bool) {\n \n require(addresses.length \u003e 0);\n require(addresses.length == values.length);\n\n for(uint256 i = 0; i \u003c addresses.length; ++i) {\n _totalInPeriod = _totalInPeriod.add(values[i]);\n _mint(addresses[i], values[i]);\n }\n require(_totalInPeriod \u003c= _mintAmount);\n if( _totalInPeriod == _mintAmount) _updateMintParams();\n\n return true;\n }\n\n\n function period() external view returns (uint256){\n return _mintPeriods;\n }\n\n function mintAmount() external view returns (uint256){\n return _mintAmount;\n }\n\n function _updateMintParams() internal returns (bool) {\n // first period is for 216,000 RAE, after this will go to 10000 RAE until decay\n if(_mintPeriods == 0) _mintAmount = 10000e18;\n\n // increment period\n _mintPeriods = _mintPeriods.add(1);\n\n // decay if _mintPeriods is 1700, 3400, 5100, etc. Target for 1 mint per day\n if(_mintPeriods % _halveEvery == 0) _mintAmount = _mintAmount.div(2);\n\n // reset the _totalInPeriod to 0\n _totalInPeriod = 0;\n\n return true;\n }\n\n function remainingInPeriod() external view returns (uint256) {\n return _mintAmount - _totalInPeriod;\n }\n\n function totalInPeriod() external view returns (uint256) {\n return _totalInPeriod;\n }\n\n /**\n @dev do not allow mint during pause\n */\n function mint(address to, uint256 value) public whenNotPaused onlyMinter returns (bool) {\n //super.mint(to, value);\n revert();\n }\n\n /**\n @dev do not allow burn during pause\n */\n function burn(uint256 value) public whenNotPaused {\n super.burn(value);\n }\n\n function burnFrom(address from, uint256 value) public whenNotPaused {\n super.burnFrom(from, value);\n }\n\n}"},"Roles.sol":{"content":"pragma solidity ^0.5.2;\n\n/**\n * @title Roles\n * @dev Library for managing addresses assigned to a Role.\n */\nlibrary Roles {\n struct Role {\n mapping (address =\u003e bool) bearer;\n }\n\n /**\n * @dev give an account access to this role\n */\n function add(Role storage role, address account) internal {\n require(account != address(0));\n require(!has(role, account));\n\n role.bearer[account] = true;\n }\n\n /**\n * @dev remove an account\u0027s access to this role\n */\n function remove(Role storage role, address account) internal {\n require(account != address(0));\n require(has(role, account));\n\n role.bearer[account] = false;\n }\n\n /**\n * @dev check if an account has this role\n * @return bool\n */\n function has(Role storage role, address account) internal view returns (bool) {\n require(account != address(0));\n return role.bearer[account];\n }\n}\n"},"SafeMath.sol":{"content":"pragma solidity ^0.5.2;\n\n/**\n * @title SafeMath\n * @dev Unsigned math operations with safety checks that revert on error\n */\nlibrary SafeMath {\n /**\n * @dev Multiplies two unsigned integers, reverts on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring \u0027a\u0027 not being zero, but the\n // benefit is lost if \u0027b\u0027 is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b);\n\n return c;\n }\n\n /**\n * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b \u003e 0);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn\u0027t hold\n\n return c;\n }\n\n /**\n * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b \u003c= a);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Adds two unsigned integers, reverts on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c \u003e= a);\n\n return c;\n }\n\n /**\n * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),\n * reverts when dividing by zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b != 0);\n return a % b;\n }\n}\n"}}