ETH Price: $3,768.61 (-12.87%)

Transaction Decoder

Block:
22084078 at Mar-19-2025 11:04:11 PM +UTC
Transaction Fee:
0.000021469565874627 ETH $0.08
Gas Used:
43,121 Gas / 0.497891187 Gwei

Account State Difference:

  Address   Before After State Difference Code
(Titan Builder)
10.762047962627356252 Eth10.762050376706693376 Eth0.000002414079337124
0xA22F1AC0...a7465b250
0.113076605965000482 Eth
Nonce: 93909
0.113055136399125855 Eth
Nonce: 93910
0.000021469565874627
0xE73d53e3...B256Cc243

Execution Trace

N.CALL( )
pragma solidity ^0.8.0;

/*

Some say the world will end in fire,
Some say in ice.
From what I’ve tasted of desire
I hold with those who favor fire.
But if it had to perish twice,
I think I know enough of hate
To say that for destruction ice
Is also great
And would suffice.

The following is a simple contract for a token, "N", with a bound supply curve.
Every block a new token is made available for minting.
Every 4 years a "doubling" occurs, wherein the number of blocks passed required to mint a new token doubles.
Following this schedule, in roughly 92 years it will take 4 years to mint a single token, at which point the supply will be roughly ~21,000,000.
The supply is technically uncapped, but after 92 years no more than a handful of tokens could ever be minted before the heat death of the universe.

Alea iacta est

*/

contract N {
    string public name = "N";
    string public symbol = "N";
    uint8 public decimals = 18;
    uint256 public totalSupply;
    uint8 public epoch = 0;
    uint256 public lastDoublingBlock;
    uint256 public nextDoublingBlock;
    uint256 public lastMintingBlock;
    

    mapping(address => uint256) public balanceOf;
    mapping(address => mapping(address => uint256)) public allowance;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    constructor() {
        totalSupply = 1e18;
        balanceOf[msg.sender] = totalSupply;
        emit Transfer(address(0), msg.sender, totalSupply);
        lastDoublingBlock = block.number;
        nextDoublingBlock = block.number + 10519200; //((86400*365*4)+86400)/12 (4 years and one day of blocks, with leap day)
        lastMintingBlock = block.number;
    }

    function transfer(address _to, uint256 _value) public returns (bool success) {
        require(balanceOf[msg.sender] >= _value, "Insufficient balance");
        balanceOf[msg.sender] -= _value;
        balanceOf[_to] += _value;
        emit Transfer(msg.sender, _to, _value);
        return true;
    }

    function approve(address _spender, uint256 _value) public returns (bool success) {
        allowance[msg.sender][_spender] = _value;
        emit Approval(msg.sender, _spender, _value);
        return true;
    }

    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
        require(_value <= balanceOf[_from], "Insufficient balance");
        require(_value <= allowance[_from][msg.sender], "Insufficient allowance");
        balanceOf[_from] -= _value;
        balanceOf[_to] += _value;
        allowance[_from][msg.sender] -= _value;
        emit Transfer(_from, _to, _value);
        return true;
    }

    function mint() public {
        uint256 numberToMint = mintable();
        totalSupply+= numberToMint;
        balanceOf[msg.sender]+= numberToMint;
        if(block.number >= nextDoublingBlock) {
            lastDoublingBlock = block.number;
            lastMintingBlock = block.number;
            nextDoublingBlock = block.number + 10519200;
            epoch++;
        }
    }

    function mintable() internal returns (uint256 numberToMint) {
        uint256 blocksBetweenMints = block.number-lastMintingBlock;
        if(blocksBetweenMints >= 2**epoch) {
            numberToMint = (blocksBetweenMints/(2**epoch))*1e18;
            lastMintingBlock = block.number - (blocksBetweenMints % (2**epoch));
            return (numberToMint);
        } else revert();
    }
}