Sonic Blaze Testnet

Contract

0xE8FE0A44315b93bE000c2baB8e60D0b5890668A2

Overview

S Balance

Sonic Blaze LogoSonic Blaze LogoSonic Blaze Logo0 S

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Minter80072022024-12-29 12:22:124 days ago1735474932IN
0xE8FE0A44...5890668A2
0 S0.000029751.1
Approve77811312024-12-28 16:23:585 days ago1735403038IN
0xE8FE0A44...5890668A2
0 S0.000050871.1
Approve77587132024-12-28 14:28:565 days ago1735396136IN
0xE8FE0A44...5890668A2
0 S0.000077351.1
Approve77585782024-12-28 14:28:155 days ago1735396095IN
0xE8FE0A44...5890668A2
0 S0.000050831.1
Approve77584652024-12-28 14:27:415 days ago1735396061IN
0xE8FE0A44...5890668A2
0 S0.000050811.1
Approve77518132024-12-28 13:53:215 days ago1735394001IN
0xE8FE0A44...5890668A2
0 S0.000050811.1
Set Minter74422662024-12-27 11:37:406 days ago1735299460IN
0xE8FE0A44...5890668A2
0 S0.000029751.1

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
93133662025-01-03 0:59:003 hrs ago1735865940
0xE8FE0A44...5890668A2
0 S
93131682025-01-03 0:58:004 hrs ago1735865880
0xE8FE0A44...5890668A2
0 S
93129702025-01-03 0:57:004 hrs ago1735865820
0xE8FE0A44...5890668A2
0 S
93127642025-01-03 0:56:004 hrs ago1735865760
0xE8FE0A44...5890668A2
0 S
93125742025-01-03 0:55:014 hrs ago1735865701
0xE8FE0A44...5890668A2
0 S
93123682025-01-03 0:54:014 hrs ago1735865641
0xE8FE0A44...5890668A2
0 S
93121682025-01-03 0:53:004 hrs ago1735865580
0xE8FE0A44...5890668A2
0 S
93119682025-01-03 0:52:004 hrs ago1735865520
0xE8FE0A44...5890668A2
0 S
93117762025-01-03 0:51:004 hrs ago1735865460
0xE8FE0A44...5890668A2
0 S
93115812025-01-03 0:50:004 hrs ago1735865400
0xE8FE0A44...5890668A2
0 S
93113862025-01-03 0:49:004 hrs ago1735865340
0xE8FE0A44...5890668A2
0 S
93111822025-01-03 0:48:004 hrs ago1735865280
0xE8FE0A44...5890668A2
0 S
93109802025-01-03 0:47:004 hrs ago1735865220
0xE8FE0A44...5890668A2
0 S
93107752025-01-03 0:46:014 hrs ago1735865161
0xE8FE0A44...5890668A2
0 S
93105832025-01-03 0:45:004 hrs ago1735865100
0xE8FE0A44...5890668A2
0 S
93103892025-01-03 0:44:004 hrs ago1735865040
0xE8FE0A44...5890668A2
0 S
93101822025-01-03 0:43:014 hrs ago1735864981
0xE8FE0A44...5890668A2
0 S
93099732025-01-03 0:42:004 hrs ago1735864920
0xE8FE0A44...5890668A2
0 S
93097852025-01-03 0:41:004 hrs ago1735864860
0xE8FE0A44...5890668A2
0 S
93095942025-01-03 0:40:004 hrs ago1735864800
0xE8FE0A44...5890668A2
0 S
93094012025-01-03 0:39:004 hrs ago1735864740
0xE8FE0A44...5890668A2
0 S
93091952025-01-03 0:38:004 hrs ago1735864680
0xE8FE0A44...5890668A2
0 S
93090102025-01-03 0:37:004 hrs ago1735864620
0xE8FE0A44...5890668A2
0 S
93088182025-01-03 0:36:004 hrs ago1735864560
0xE8FE0A44...5890668A2
0 S
93086382025-01-03 0:35:014 hrs ago1735864501
0xE8FE0A44...5890668A2
0 S
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SWPx

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 2 : SWPx.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.13;

import {ISWPx} from "./interfaces/ISWPx.sol";

contract SWPx is ISWPx {

    string public constant name = "SwapX";
    string public constant symbol = "SWPx";
    uint8 public constant decimals = 18;
    uint public totalSupply = 0;

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

    bool public initialMinted;
    address public minter;

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

    constructor() {
        minter = msg.sender;
        _mint(msg.sender, 0);
    }

    // No checks as its meant to be once off to set minting rights to BaseV1 Minter
    function setMinter(address _minter) external {
        require(msg.sender == minter);
        minter = _minter;
    }


    // Initial mint: total 40M
    function initialMint(address _recipient) external {
        require(msg.sender == minter && !initialMinted);
        initialMinted = true;
        _mint(_recipient, 40 * 1e6 * 1e18);
    }

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

    function _mint(address _to, uint _amount) internal returns (bool) {
        totalSupply += _amount;
        unchecked {
            balanceOf[_to] += _amount;
        }
        emit Transfer(address(0x0), _to, _amount);
        return true;
    }

    function _burn(address account, uint256 amount) internal {
        uint256 accountBalance = balanceOf[account];
        require(accountBalance >= amount && amount > 0, "burn amount exceeds balance or zero");
        unchecked {
            balanceOf[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            totalSupply -= amount;
        }

        emit Transfer(account, address(0), amount);
    }

    function _transfer(address _from, address _to, uint _value) internal returns (bool) {
        balanceOf[_from] -= _value;
        unchecked {
            balanceOf[_to] += _value;
        }
        emit Transfer(_from, _to, _value);
        return true;
    }

    function transfer(address _to, uint _value) external returns (bool) {
        return _transfer(msg.sender, _to, _value);
    }

    function transferFrom(address _from, address _to, uint _value) external returns (bool) {
        uint allowed_from = allowance[_from][msg.sender];
        if (allowed_from != type(uint).max) {
            allowance[_from][msg.sender] -= _value;
        }
        return _transfer(_from, _to, _value);
    }

    function mint(address account, uint amount) external returns (bool) {
        require(msg.sender == minter, 'not allowed');
        _mint(account, amount);
        return true;
    }

    function burn(uint amount) external {
        _burn(msg.sender, amount);
    }

}

File 2 of 2 : ISWPx.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

interface ISWPx {
    function initialMint(address _recipient) external;
    function totalSupply() external view returns (uint);
    function balanceOf(address) external view returns (uint);
    function approve(address spender, uint value) external returns (bool);
    function transfer(address, uint) external returns (bool);
    function transferFrom(address,address,uint) external returns (bool);
    function mint(address, uint) external returns (bool);
    function minter() external returns (address);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"initialMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

60806040526000805534801561001457600080fd5b5060038054610100600160a81b0319163361010081029190911790915561003c906000610042565b506100d9565b60008160008082825461005591906100b3565b90915550506001600160a01b0383166000818152600160209081526040808320805487019055518581527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a350600192915050565b600082198211156100d457634e487b7160e01b600052601160045260246000fd5b500190565b610840806100e86000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806342966c6811610097578063c268f9ba11610066578063c268f9ba14610249578063ca1c4de91461025c578063dd62ed3e14610269578063fca3b5aa1461029457600080fd5b806342966c68146101de57806370a08231146101f357806395d89b4114610213578063a9059cbb1461023657600080fd5b806318160ddd116100d357806318160ddd1461018757806323b872dd1461019e578063313ce567146101b157806340c10f19146101cb57600080fd5b806306fdde03146100fa5780630754617214610134578063095ea7b314610164575b600080fd5b61011e604051806040016040528060058152602001640a6eec2e0b60db1b81525081565b60405161012b9190610687565b60405180910390f35b60035461014c9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161012b565b6101776101723660046106f8565b6102a7565b604051901515815260200161012b565b61019060005481565b60405190815260200161012b565b6101776101ac366004610722565b610313565b6101b9601281565b60405160ff909116815260200161012b565b6101776101d93660046106f8565b61038d565b6101f16101ec36600461075e565b6103f6565b005b610190610201366004610777565b60016020526000908152604090205481565b61011e604051806040016040528060048152602001630a6aea0f60e31b81525081565b6101776102443660046106f8565b610403565b6101f1610257366004610777565b610417565b6003546101779060ff1681565b610190610277366004610792565b600260209081526000928352604080842090915290825290205481565b6101f16102a2366004610777565b610468565b3360008181526002602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103029086815260200190565b60405180910390a350600192915050565b6001600160a01b03831660009081526002602090815260408083203384529091528120546000198114610379576001600160a01b0385166000908152600260209081526040808320338452909152812080548592906103739084906107db565b90915550505b6103848585856104ac565b95945050505050565b60035460009061010090046001600160a01b031633146103e25760405162461bcd60e51b815260206004820152600b60248201526a1b9bdd08185b1b1bddd95960aa1b60448201526064015b60405180910390fd5b6103ec8383610543565b5060019392505050565b61040033826105a8565b50565b60006104103384846104ac565b9392505050565b60035461010090046001600160a01b031633148015610439575060035460ff16155b61044257600080fd5b6003805460ff19166001179055610464816a2116545850052128000000610543565b5050565b60035461010090046001600160a01b0316331461048457600080fd5b600380546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6001600160a01b0383166000908152600160205260408120805483919083906104d69084906107db565b90915550506001600160a01b03808416600081815260016020526040908190208054860190555190918616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906105319086815260200190565b60405180910390a35060019392505050565b60008160008082825461055691906107f2565b90915550506001600160a01b0383166000818152600160209081526040808320805487019055518581527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610302565b6001600160a01b0382166000908152600160205260409020548181108015906105d15750600082115b6106295760405162461bcd60e51b815260206004820152602360248201527f6275726e20616d6f756e7420657863656564732062616c616e6365206f72207a60448201526265726f60e81b60648201526084016103d9565b6001600160a01b0383166000818152600160209081526040808320868603905582548690038355518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600060208083528351808285015260005b818110156106b457858101830151858201604001528201610698565b818111156106c6576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b03811681146106f357600080fd5b919050565b6000806040838503121561070b57600080fd5b610714836106dc565b946020939093013593505050565b60008060006060848603121561073757600080fd5b610740846106dc565b925061074e602085016106dc565b9150604084013590509250925092565b60006020828403121561077057600080fd5b5035919050565b60006020828403121561078957600080fd5b610410826106dc565b600080604083850312156107a557600080fd5b6107ae836106dc565b91506107bc602084016106dc565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b6000828210156107ed576107ed6107c5565b500390565b60008219821115610805576108056107c5565b50019056fea264697066735822122081235b6e14b13b4623b22a7a533a83320b771f18a4e5f2adb189036c03eb3a6464736f6c634300080d0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806342966c6811610097578063c268f9ba11610066578063c268f9ba14610249578063ca1c4de91461025c578063dd62ed3e14610269578063fca3b5aa1461029457600080fd5b806342966c68146101de57806370a08231146101f357806395d89b4114610213578063a9059cbb1461023657600080fd5b806318160ddd116100d357806318160ddd1461018757806323b872dd1461019e578063313ce567146101b157806340c10f19146101cb57600080fd5b806306fdde03146100fa5780630754617214610134578063095ea7b314610164575b600080fd5b61011e604051806040016040528060058152602001640a6eec2e0b60db1b81525081565b60405161012b9190610687565b60405180910390f35b60035461014c9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161012b565b6101776101723660046106f8565b6102a7565b604051901515815260200161012b565b61019060005481565b60405190815260200161012b565b6101776101ac366004610722565b610313565b6101b9601281565b60405160ff909116815260200161012b565b6101776101d93660046106f8565b61038d565b6101f16101ec36600461075e565b6103f6565b005b610190610201366004610777565b60016020526000908152604090205481565b61011e604051806040016040528060048152602001630a6aea0f60e31b81525081565b6101776102443660046106f8565b610403565b6101f1610257366004610777565b610417565b6003546101779060ff1681565b610190610277366004610792565b600260209081526000928352604080842090915290825290205481565b6101f16102a2366004610777565b610468565b3360008181526002602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103029086815260200190565b60405180910390a350600192915050565b6001600160a01b03831660009081526002602090815260408083203384529091528120546000198114610379576001600160a01b0385166000908152600260209081526040808320338452909152812080548592906103739084906107db565b90915550505b6103848585856104ac565b95945050505050565b60035460009061010090046001600160a01b031633146103e25760405162461bcd60e51b815260206004820152600b60248201526a1b9bdd08185b1b1bddd95960aa1b60448201526064015b60405180910390fd5b6103ec8383610543565b5060019392505050565b61040033826105a8565b50565b60006104103384846104ac565b9392505050565b60035461010090046001600160a01b031633148015610439575060035460ff16155b61044257600080fd5b6003805460ff19166001179055610464816a2116545850052128000000610543565b5050565b60035461010090046001600160a01b0316331461048457600080fd5b600380546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6001600160a01b0383166000908152600160205260408120805483919083906104d69084906107db565b90915550506001600160a01b03808416600081815260016020526040908190208054860190555190918616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906105319086815260200190565b60405180910390a35060019392505050565b60008160008082825461055691906107f2565b90915550506001600160a01b0383166000818152600160209081526040808320805487019055518581527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610302565b6001600160a01b0382166000908152600160205260409020548181108015906105d15750600082115b6106295760405162461bcd60e51b815260206004820152602360248201527f6275726e20616d6f756e7420657863656564732062616c616e6365206f72207a60448201526265726f60e81b60648201526084016103d9565b6001600160a01b0383166000818152600160209081526040808320868603905582548690038355518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600060208083528351808285015260005b818110156106b457858101830151858201604001528201610698565b818111156106c6576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b03811681146106f357600080fd5b919050565b6000806040838503121561070b57600080fd5b610714836106dc565b946020939093013593505050565b60008060006060848603121561073757600080fd5b610740846106dc565b925061074e602085016106dc565b9150604084013590509250925092565b60006020828403121561077057600080fd5b5035919050565b60006020828403121561078957600080fd5b610410826106dc565b600080604083850312156107a557600080fd5b6107ae836106dc565b91506107bc602084016106dc565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b6000828210156107ed576107ed6107c5565b500390565b60008219821115610805576108056107c5565b50019056fea264697066735822122081235b6e14b13b4623b22a7a533a83320b771f18a4e5f2adb189036c03eb3a6464736f6c634300080d0033

Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.