Address Contract Partially Verified
Address
0x4fA29fE6aFDd8142258bCb59917c90649eA68b29
Balance
0 ETH
Nonce
1
Code Size
3627 bytes
Creator
0xE53408a5...501C at tx 0xc497b1ed...1eb72c
Indexed Transactions
0
Contract Bytecode
3627 bytes
0x608060405234801561000f575f80fd5b50600436106100f0575f3560e01c8063313ce567116100935780638bca7879116100635780638bca78791461026c57806395d89b41146102a4578063a9059cbb146102ac578063dd62ed3e146102bf575f80fd5b8063313ce567146101ce5780635c658165146101ed5780636d6a6a4d1461022157806370a082311461023a575f80fd5b806318160ddd116100ce57806318160ddd1461014a5780631829d77d1461016657806323b872dd1461017957806327e235e31461018c575f80fd5b806306fdde03146100f4578063095ea7b3146101125780631798de8114610135575b5f80fd5b6100fc610301565b6040516101099190610b9f565b60405180910390f35b610125610120366004610c0d565b61038d565b6040519015158152602001610109565b610148610143366004610c4c565b61040c565b005b60035467ffffffffffffffff165b604051908152602001610109565b610148610174366004610c7d565b61062a565b610125610187366004610c9d565b610744565b6101b561019a366004610cd7565b60046020525f908152604090205467ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610109565b6002546101db9060ff1681565b60405160ff9091168152602001610109565b6101b56101fb366004610cf0565b600560209081525f928352604080842090915290825290205467ffffffffffffffff1681565b6002546101b590610100900467ffffffffffffffff1681565b610158610248366004610cd7565b6001600160a01b03165f9081526004602052604090205467ffffffffffffffff1690565b60025461028c90690100000000000000000090046001600160a01b031681565b6040516001600160a01b039091168152602001610109565b6100fc610917565b6101256102ba366004610c0d565b610923565b6101586102cd366004610cf0565b6001600160a01b039182165f90815260056020908152604080832093909416825291909152205467ffffffffffffffff1690565b6001805461030e90610d18565b80601f016020809104026020016040519081016040528092919081815260200182805461033a90610d18565b80156103855780601f1061035c57610100808354040283529160200191610385565b820191905f5260205f20905b81548152906001019060200180831161036857829003601f168201915b505050505081565b335f8181526005602090815260408083206001600160a01b038716808552908352818420805467ffffffffffffffff191667ffffffffffffffff881617905590518581529293909290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35060015b92915050565b600254690100000000000000000090046001600160a01b03161561049d5760405162461bcd60e51b815260206004820152602a60248201527f54686520636f6e74726163742068617320616c7265616479206265656e20696e60448201527f697469616c697a65642e0000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60025467ffffffffffffffff610100909104811690821610156105285760405162461bcd60e51b815260206004820152602260248201527f596f752063616e27742073656e64206c657373207468616e206f6e65204c797260448201527f612e0000000000000000000000000000000000000000000000000000000000006064820152608401610494565b600280547fffffff0000000000000000000000000000000000000000ffffffffffffffffff1669010000000000000000006001600160a01b03858116820292909217928390556040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015267ffffffffffffffff85166044820152920416906323b872dd906064016020604051808303815f875af11580156105d9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105fd9190610d69565b506003805467ffffffffffffffff191667ffffffffffffffff8316179055610626335f836109f6565b5050565b335f9081526004602052604090205467ffffffffffffffff808316911610156106955760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e00000000000000000000006044820152606401610494565b6002546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815233600482015267ffffffffffffffff8316602482015269010000000000000000009091046001600160a01b03169063a9059cbb906044016020604051808303815f875af1158015610711573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107359190610d69565b506107415f33836109f6565b50565b5f6001600160a01b03831661079b5760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152606401610494565b6001600160a01b0384165f9081526004602052604090205467ffffffffffffffff1682111561080c5760405162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e742066756e647300000000000000000000000000006044820152606401610494565b6001600160a01b0384165f90815260056020908152604080832033845290915290205467ffffffffffffffff168211156108885760405162461bcd60e51b815260206004820152601260248201527f416c6c6f77616e636520657863656564656400000000000000000000000000006044820152606401610494565b6001600160a01b0384165f9081526005602090815260408083203384529091529020546108c090839067ffffffffffffffff16610db5565b6001600160a01b0385165f9081526005602090815260408083203384529091529020805467ffffffffffffffff191667ffffffffffffffff9290921691909117905561090d8385846109f6565b5060019392505050565b5f805461030e90610d18565b5f6001600160a01b03831661097a5760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152606401610494565b335f9081526004602052604090205467ffffffffffffffff168211156109e25760405162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e742066756e647300000000000000000000000000006044820152606401610494565b6109ed8333846109f6565b50600192915050565b6001600160a01b03831630141580610a245750305f9081526004602052604090205467ffffffffffffffff16155b610a2c575f80fd5b6001600160a01b03831615610a97576001600160a01b0383165f9081526004602052604081208054839290610a6c90849067ffffffffffffffff16610dd5565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550610adc565b600380548291905f90610ab590849067ffffffffffffffff16610db5565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b6001600160a01b03821615610b43576001600160a01b0382165f9081526004602052604081208054839290610b1c90849067ffffffffffffffff16610db5565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b826001600160a01b0316826001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8367ffffffffffffffff16604051610b9291815260200190565b60405180910390a3505050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b80356001600160a01b0381168114610c08575f80fd5b919050565b5f8060408385031215610c1e575f80fd5b610c2783610bf2565b946020939093013593505050565b803567ffffffffffffffff81168114610c08575f80fd5b5f8060408385031215610c5d575f80fd5b610c6683610bf2565b9150610c7460208401610c35565b90509250929050565b5f60208284031215610c8d575f80fd5b610c9682610c35565b9392505050565b5f805f60608486031215610caf575f80fd5b610cb884610bf2565b9250610cc660208501610bf2565b929592945050506040919091013590565b5f60208284031215610ce7575f80fd5b610c9682610bf2565b5f8060408385031215610d01575f80fd5b610d0a83610bf2565b9150610c7460208401610bf2565b600181811c90821680610d2c57607f821691505b602082108103610d63577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b5f60208284031215610d79575f80fd5b81518015158114610c96575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b67ffffffffffffffff828116828216039081111561040657610406610d88565b67ffffffffffffffff818116838216019081111561040657610406610d8856fea2646970667358221220c5e4c424ed72013e366671d17a7a26c8de1c97d1c6a1fc545768d292338795bf64736f6c634300081a0033
Verified Source Code Partial Match
Compiler: v0.8.26+commit.8a97fa7a
EVM: cancun
Optimization: Yes (2000 runs)
MemeCoin.sol 139 lines
// SPDX-License-Identifier: Unliscense
pragma solidity ^0.8.26;
/*
This is a meme coin I'm creating just for lulz and experimentation with creating tokens, seeing what works and what doesn't,
mostly for learning, man. There is no promise or expectation of this coin to go up in value.
This contract doesn't actually *do* anything, other than provide you with the option to swap into Lyra. It's literally just a token called 'Jonald Brump',
so named as a confusion/combination of the names 'Joe Biden' and 'Donald Trump', with heavier emphasis on the latter name.
I've created a few other tokens:
- OpenRugPull V1 (0x871401E1126fFcd6DF23E42714Cc5B4b033Bd2F7)
- Malvan Lyra (0xc84f5F6f915EE476bB6D937dC849bf6237769baC, migrated holders from original contract 0x6985f4bedc0789a17f00638c1c0eb37e76d6350e)
Idk man, if this seems like a scam to you then don't buy. Also, if you can hack the contract please do, so I learn where the vulnerabilities are.
I wrote these contracts myself, based on some really old tokens I made in like 2017 or something. So if I made a mistake I'd like to know!!
*/
abstract contract ERC20Interface {
function totalSupply() public virtual view returns (uint);
function balanceOf(address tokenOwner) public virtual view returns (uint balance);
function allowance(address tokenOwner, address spender) public virtual view returns (uint remaining);
function transfer(address to, uint tokens) public virtual returns (bool success);
function approve(address spender, uint tokens) public virtual returns (bool success);
function transferFrom(address from, address to, uint tokens) public virtual returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract MemeCoin is ERC20Interface {
string public symbol;
string public name;
uint8 public decimals;
uint64 public decimalFactor;
ERC20Interface public lyra;
uint64 internal _totalSupply;
// I like to use the smallest type, so uint64 is plenty for what we're doing. Why use up 4x as much memory for the same thing?
// Maybe I'm too used to potato computers.
mapping(address => uint64) public balances;
mapping(address => mapping(address => uint64)) public allowed;
constructor() {
symbol = "JJB";
name = "Jonald J. Brump";
decimals = 8;
decimalFactor = uint64(10**uint(decimals));
_totalSupply = 0;
}
function initialize(address lyraAddress, uint64 tokens) public {
require(address(lyra) == address(0x0), "The contract has already been initialized.");
require(tokens >= decimalFactor, "You can't send less than one Lyra.");
lyra = ERC20Interface(lyraAddress);
// Fund this contract from the given token
lyra.transferFrom(msg.sender, address(this), tokens);
// Set up the supply counter
_totalSupply = uint64(tokens);
// Set up balances
_transfer(msg.sender, address(0x0), tokens);
}
// CLAIM LYRAS
function claimLyra(uint64 amount) public {
require(balances[msg.sender] >= amount, "Insufficient balance.");
// Give them their Lyras
lyra.transfer(msg.sender, amount);
// Burn the Jonald Brump tokens
_transfer(address(0x0), msg.sender, amount);
}
// THE ACTUAL METHODS
function totalSupply() public override view returns (uint) {
return _totalSupply;
}
function balanceOf(address tokenOwner) public override view returns (uint balance) {
return balances[tokenOwner];
}
function transfer(address to, uint tokens) public override returns (bool success) {
require(to!=address(0), "Invalid address");
require(tokens<=balances[msg.sender], "Insufficient funds");
_transfer(to, msg.sender, uint64(tokens));
return true;
}
function approve(address spender, uint tokens) public override returns (bool success) {
allowed[msg.sender][spender] = uint64(tokens);
emit Approval(msg.sender, spender, tokens);
return true;
}
function transferFrom(address from, address to, uint tokens) public override returns (bool success) {
require(to != address(0), "Invalid address");
require(tokens <= balances[from], "Insufficient funds");
require(tokens <= allowed[from][msg.sender], "Allowance exceeded");
allowed[from][msg.sender] = allowed[from][msg.sender] - uint64(tokens);
_transfer(to, from, uint64(tokens));
return true;
}
// I use the order 'to, from' because I'm used to memcpy, strcpy, x86 assembly, etc. It feels more natural to me.
function _transfer(address to, address from, uint64 tokens) internal {
require(to != address(this) || balances[address(this)] == 0);
// Check if this is a token burn
if (to != address(0x0))
balances[to] += tokens;
else
_totalSupply -= tokens;
// Check if this is a token mint
if (from != address(0x0))
balances[from] -= tokens;
emit Transfer(from, to, uint(tokens));
}
function allowance(address tokenOwner, address spender) public override view returns (uint remaining) {
return allowed[tokenOwner][spender];
}
}
Read Contract
allowance 0xdd62ed3e → uint256
allowed 0x5c658165 → uint64
balanceOf 0x70a08231 → uint256
balances 0x27e235e3 → uint64
decimalFactor 0x6d6a6a4d → uint64
decimals 0x313ce567 → uint8
lyra 0x8bca7879 → address
name 0x06fdde03 → string
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 5 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 tokens
returns: bool
claimLyra 0x1829d77d
uint64 amount
initialize 0x1798de81
address lyraAddress
uint64 tokens
transfer 0xa9059cbb
address to
uint256 tokens
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 tokens
returns: bool
Recent Transactions
No transactions found for this address