Transaction Hash:
Block:
13363351 at Oct-06-2021 04:38:08 AM +UTC
Transaction Fee:
0.00579003463961503 ETH
$21.07
Gas Used:
46,481 Gas / 124.56777263 Gwei
Emitted Events:
102 |
EtherollToken.Approval( _owner=[Sender] 0xe427a52824c5eab60a163e5d7f4f0970262d7c61, _spender=0xE592427A...C05861564, _value=115792089237316195423570985008687907853269984665640564039457584007913129639935 )
|
Account State Difference:
Address | Before | After | State Difference | ||
---|---|---|---|---|---|
0x2e071D29...7D6038A65 | |||||
0x829BD824...93333A830
Miner
| (F2Pool Old) | 4,223.253512135586503862 Eth | 4,223.253658502919779365 Eth | 0.000146367333275503 | |
0xe427A528...0262D7c61 |
0.008710520579691032 Eth
Nonce: 677
|
0.002920485940076002 Eth
Nonce: 678
| 0.00579003463961503 |
Execution Trace
EtherollToken.approve( _spender=0xE592427A0AEce92De3Edee1F18E0157C05861564, _value=115792089237316195423570985008687907853269984665640564039457584007913129639935 ) => ( success=True )
approve[EtherollToken (ln:152)]
Approval[EtherollToken (ln:159)]
pragma solidity ^0.4.2; /* `* is owned */ contract owned { address public owner; function owned() { owner = msg.sender; } modifier onlyOwner { if (msg.sender != owner) throw; _; } function ownerTransferOwnership(address newOwner) onlyOwner { owner = newOwner; } } /* * safe math */ contract DSSafeAddSub { function safeToAdd(uint a, uint b) internal returns (bool) { return (a + b >= a); } function safeAdd(uint a, uint b) internal returns (uint) { if (!safeToAdd(a, b)) throw; return a + b; } function safeToSubtract(uint a, uint b) internal returns (bool) { return (b <= a); } function safeSub(uint a, uint b) internal returns (uint) { if (!safeToSubtract(a, b)) throw; return a - b; } } /** * * @title EtherollToken * * The official token powering etheroll. * EtherollToken is a ERC.20 standard token with some custom functionality * */ contract EtherollToken is owned, DSSafeAddSub { /* check address */ modifier onlyBy(address _account) { if (msg.sender != _account) throw; _; } /* vars */ string public standard = 'Token 1.0'; string public name = "DICE"; string public symbol = "ROL"; uint8 public decimals = 16; uint public totalSupply = 250000000000000000000000; address public priviledgedAddress; bool public tokensFrozen; uint public crowdfundDeadline = now + 2 * 1 weeks; uint public nextFreeze = now + 12 * 1 weeks; uint public nextThaw = now + 13 * 1 weeks; /* map balances */ mapping (address => uint) public balanceOf; mapping (address => mapping (address => uint)) public allowance; /* events */ event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event LogTokensFrozen(bool indexed Frozen); /* * @notice sends all tokens to msg.sender on init */ function EtherollToken(){ /* send creator all initial tokens 25,000,000 */ balanceOf[msg.sender] = 250000000000000000000000; /* tokens are not frozen */ tokensFrozen = false; } /* * @notice public function * @param _to address to send tokens to * @param _value number of tokens to transfer * @returns boolean success */ function transfer(address _to, uint _value) public returns (bool success) { if(tokensFrozen && msg.sender != priviledgedAddress) return false; /* transfer only by priviledgedAddress during crowdfund or reward phases */ if (balanceOf[msg.sender] < _value) return false; /* check if the sender has enough */ if (balanceOf[_to] + _value < balanceOf[_to]) return false; /* check for overflows */ balanceOf[msg.sender] -= _value; /* subtract from the sender */ balanceOf[_to] += _value; /* add the same to the recipient */ Transfer(msg.sender, _to, _value); /* notify anyone listening that this transfer took place */ return true; } /* * @notice public function * @param _from address to send tokens from * @param _to address to send tokens to * @param _value number of tokens to transfer * @returns boolean success * another contract attempts to spend tokens on your behalf */ function transferFrom(address _from, address _to, uint _value) public returns (bool success) { if(tokensFrozen && msg.sender != priviledgedAddress) return false; /* transfer only by priviledgedAddress during crowdfund or reward phases */ if (balanceOf[_from] < _value) return false; /* check if the sender has enough */ if (balanceOf[_to] + _value < balanceOf[_to]) return false; /* check for overflows */ if (_value > allowance[_from][msg.sender]) return false; /* check allowance */ balanceOf[_from] -= _value; /* subtract from the sender */ balanceOf[_to] += _value; /* add the same to the recipient */ allowance[_from][msg.sender] -= _value; /* reduce allowance */ Transfer(_from, _to, _value); /* notify anyone listening that this transfer took place */ return true; } /* * @notice public function * @param _spender address being granted approval to spend on behalf of msg.sender * @param _value number of tokens granted approval for _spender to spend on behalf of msg.sender * @returns boolean success * approves another contract to spend some tokens on your behalf */ function approve(address _spender, uint _value) public returns (bool success) { /* set allowance for _spender on behalf of msg.sender */ allowance[msg.sender][_spender] = _value; /* log event about transaction */ Approval(msg.sender, _spender, _value); return true; } /* * @notice address restricted function * crowdfund contract calls this to burn its unsold coins */ function priviledgedAddressBurnUnsoldCoins() public /* only crowdfund contract can call this */ onlyBy(priviledgedAddress) { /* totalSupply should equal total tokens in circulation */ totalSupply = safeSub(totalSupply, balanceOf[priviledgedAddress]); /* burns unsold tokens from crowdfund address */ balanceOf[priviledgedAddress] = 0; } /* * @notice public function * locks/unlocks tokens on a recurring cycle */ function updateTokenStatus() public { /* locks tokens during initial crowdfund period */ if(now < crowdfundDeadline){ tokensFrozen = true; LogTokensFrozen(tokensFrozen); } /* locks tokens */ if(now >= nextFreeze){ tokensFrozen = true; LogTokensFrozen(tokensFrozen); } /* unlocks tokens */ if(now >= nextThaw){ tokensFrozen = false; nextFreeze = now + 12 * 1 weeks; nextThaw = now + 13 * 1 weeks; LogTokensFrozen(tokensFrozen); } } /* * @notice owner restricted function * @param _newPriviledgedAddress the address * only this address can burn unsold tokens * transfer tokens only by priviledgedAddress during crowdfund or reward phases */ function ownerSetPriviledgedAddress(address _newPriviledgedAddress) public onlyOwner { priviledgedAddress = _newPriviledgedAddress; } }