Source Code
Overview
ETH Balance
0.01 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer | 2843284 | 8 days ago | IN | 0.01 ETH | 0.00040021 |
Loading...
Loading
Contract Name:
MyToken
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; contract MyToken { // 收到eth事件,记录amount和gas event Log(uint amount, uint gas); // receive方法,接收eth时被触发 receive() external payable{ emit Log(msg.value, gasleft()); } // 返回合约ETH余额 function getBalance() view public returns(uint) { return address(this).balance; } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "remappings": [] }
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"gas","type":"uint256"}],"name":"Log","type":"event"},{"inputs":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561000f575f80fd5b506101118061001d5f395ff3fe608060405260043610601e575f3560e01c806312065fe014605f57605b565b36605b577fbd0faddf87043dd749c1b9d4dca8a12589b8cb5e2106832111ce23f219b14367345a604051605192919060a1565b60405180910390a1005b5f80fd5b3480156069575f80fd5b5060706084565b604051607b919060c4565b60405180910390f35b5f47905090565b5f819050919050565b609b81608b565b82525050565b5f60408201905060b25f8301856094565b60bd60208301846094565b9392505050565b5f60208201905060d55f8301846094565b9291505056fea2646970667358221220b01dc24a74db9b9f4efc5930c5d54c162d038c63c94c4d940c81d8faa7493d4064736f6c63430008140033
Deployed Bytecode
0x608060405260043610601e575f3560e01c806312065fe014605f57605b565b36605b577fbd0faddf87043dd749c1b9d4dca8a12589b8cb5e2106832111ce23f219b14367345a604051605192919060a1565b60405180910390a1005b5f80fd5b3480156069575f80fd5b5060706084565b604051607b919060c4565b60405180910390f35b5f47905090565b5f819050919050565b609b81608b565b82525050565b5f60408201905060b25f8301856094565b60bd60208301846094565b9392505050565b5f60208201905060d55f8301846094565b9291505056fea2646970667358221220b01dc24a74db9b9f4efc5930c5d54c162d038c63c94c4d940c81d8faa7493d4064736f6c63430008140033
Loading...
Loading
[ 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.