ETH Price: $2,523.80 (-1.22%)

Transaction Decoder

Block:
12419641 at May-12-2021 12:36:58 PM +UTC
Transaction Fee:
0.010619880678 ETH $26.80
Gas Used:
46,458 Gas / 228.591 Gwei

Emitted Events:

284 MerchantToken.Approval( tokenOwner=[Sender] 0x84ca27831c8570e1dc904acfdb012a2d229cd36c, spender=0x7a250d56...659F2488D, tokens=115792089237316195423570985008687907853269984665640564039457584007913129639935 )

Account State Difference:

  Address   Before After State Difference Code
(Spark Pool)
19.733376651279606222 Eth19.743996531957606222 Eth0.010619880678
0x84Ca2783...d229cd36c
0.037901780607249402 Eth
Nonce: 16
0.027281899929249402 Eth
Nonce: 17
0.010619880678
0xE66b3AA3...69DB3324F

Execution Trace

MerchantToken.approve( spender=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, tokens=115792089237316195423570985008687907853269984665640564039457584007913129639935 ) => ( success=True )
pragma solidity ^0.5.0;


contract ERC20Interface {
    function totalSupply() public view returns (uint);
    function balanceOf(address tokenOwner) public view returns (uint balance);
    function allowance(address tokenOwner, address spender) public view returns (uint remaining);
    function transfer(address to, uint tokens) public returns (bool success);
    function approve(address spender, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint tokens) public returns (bool success);

    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}


contract SafeMath {
    function safeAdd(uint a, uint b) public pure returns (uint c) {
        c = a + b;
        require(c >= a);
    }
    function safeSub(uint a, uint b) public pure returns (uint c) {
        require(b <= a); c = a - b; } function safeMul(uint a, uint b) public pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); } function safeDiv(uint a, uint b) public pure returns (uint c) { require(b > 0);
        c = a / b;
    }
}


contract MerchantToken is ERC20Interface, SafeMath {
    string constant public name = "Merchant Token";
    string constant public symbol = "MTO";
    uint8 constant public decimals = 18;
    uint256 constant public _totalSupply = 100000000000000000000000000;
    
    mapping(address => uint) public balances;
    mapping(address => mapping(address => uint)) public allowed;

    constructor() public {
        balances[msg.sender] = _totalSupply;
        emit Transfer(address(0), msg.sender, _totalSupply);
    }

    function totalSupply() public view returns (uint) {
        return _totalSupply  - balances[address(0)];
    }

    function balanceOf(address tokenOwner) public view returns (uint balance) {
        return balances[tokenOwner];
    }

    function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
        return allowed[tokenOwner][spender];
    }

    function approve(address spender, uint tokens) public returns (bool success) {
        allowed[msg.sender][spender] = tokens;
        emit Approval(msg.sender, spender, tokens);
        return true;
    }
    
    function increaseApproval(address spender, uint tokens) public returns (bool success) {
        allowed[msg.sender][spender] = safeAdd(allowed[msg.sender][spender], tokens);
        return true;
    }
    
    function decreaseApproval(address spender, uint tokens) public returns (bool success) {
        allowed[msg.sender][spender] = safeSub(allowed[msg.sender][spender], tokens);
        return true;
    }

    function transfer(address to, uint tokens) public returns (bool success) {
        balances[msg.sender] = safeSub(balances[msg.sender], tokens);
        balances[to] = safeAdd(balances[to], tokens);
        emit Transfer(msg.sender, to, tokens);
        return true;
    }

    function transferFrom(address from, address to, uint tokens) public returns (bool success) {
        balances[from] = safeSub(balances[from], tokens);
        allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
        balances[to] = safeAdd(balances[to], tokens);
        emit Transfer(from, to, tokens);
        return true;
    }
}