Contract 0xB61bbdbf2CF58701772D4722AE02da3403ca6593

Contract Overview

Balance:
0 MATIC
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0xedc4aed7e4cd0f595ec19e89fcf3ffd71f85b275e20aedfb8ff1f15f3ca340520x60806040336382262023-03-27 16:51:5773 days 7 hrs ago0xac714da06c93b0cf4450b78ba07ee6b589ed9a0e IN  Create: MetaCoin0 MATIC0.001020890006 2.500000016
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading
This contract contains unverified libraries: ConvertLib
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
MetaCoin

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 2 : MetaCoin.sol
// SPDX-License-Identifier: MIT
// Tells the Solidity compiler to compile only from v0.8.13 to v0.9.0
pragma solidity =0.8.4;

import "./ConvertLib.sol";

// This is just a simple example of a coin-like contract.
// It is not ERC20 compatible and cannot be expected to talk to other
// coin/token contracts.

contract MetaCoin {
    mapping(address => uint) balances;

    event Transfer(address indexed _from, address indexed _to, uint256 _value);

    constructor() {
        balances[tx.origin] = 10000;
    }

    function sendCoin(
        address receiver,
        uint amount
    ) public returns (bool sufficient) {
        if (balances[msg.sender] < amount) return false;
        balances[msg.sender] -= amount;
        balances[receiver] += amount;
        emit Transfer(msg.sender, receiver, amount);
        return true;
    }

    function getBalanceInEth(address addr) public view returns (uint) {
        return ConvertLib.convert(getBalance(addr), 2);
    }

    function getBalance(address addr) public view returns (uint) {
        return balances[addr];
    }
}

File 2 of 2 : ConvertLib.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.4;

// A library is like a contract with reusable code, which can be called by other contracts.
// Deploying common code can reduce gas costs.
library ConvertLib {
    function convert(
        uint amount,
        uint conversionRate
    ) public pure returns (uint convertedAmount) {
        return amount * conversionRate;
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {
    "/contracts/ConvertLib.sol": {
      "ConvertLib": "0xf0Cd67e684fb8BB227c7d9Dc6ff96184C9a72e7c"
    }
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":"addr","type":"address"}],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getBalanceInEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sendCoin","outputs":[{"internalType":"bool","name":"sufficient","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506127106000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610603806100656000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80637bd703e81461004657806390b98a1114610076578063f8b2cb4f146100a6575b600080fd5b610060600480360381019061005b9190610363565b6100d6565b60405161006d9190610448565b60405180910390f35b610090600480360381019061008b919061038c565b610171565b60405161009d919061042d565b60405180910390f35b6100c060048036038101906100bb9190610363565b6102dc565b6040516100cd9190610448565b60405180910390f35b600073f0cd67e684fb8bb227c7d9dc6ff96184c9a72e7c6396e4ee3d6100fb846102dc565b60026040518363ffffffff1660e01b815260040161011a929190610463565b60206040518083038186803b15801561013257600080fd5b505af4158015610146573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061016a91906103c8565b9050919050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156101c257600090506102d6565b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461021091906104e2565b92505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610265919061048c565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516102c99190610448565b60405180910390a3600190505b92915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000813590506103338161059f565b92915050565b600081359050610348816105b6565b92915050565b60008151905061035d816105b6565b92915050565b60006020828403121561037557600080fd5b600061038384828501610324565b91505092915050565b6000806040838503121561039f57600080fd5b60006103ad85828601610324565b92505060206103be85828601610339565b9150509250929050565b6000602082840312156103da57600080fd5b60006103e88482850161034e565b91505092915050565b6103fa81610528565b82525050565b6104098161055e565b82525050565b61041881610554565b82525050565b61042781610554565b82525050565b600060208201905061044260008301846103f1565b92915050565b600060208201905061045d600083018461040f565b92915050565b6000604082019050610478600083018561041e565b6104856020830184610400565b9392505050565b600061049782610554565b91506104a283610554565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156104d7576104d6610570565b5b828201905092915050565b60006104ed82610554565b91506104f883610554565b92508282101561050b5761050a610570565b5b828203905092915050565b600061052182610534565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061056982610554565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6105a881610516565b81146105b357600080fd5b50565b6105bf81610554565b81146105ca57600080fd5b5056fea264697066735822122028c8ed711f4e95199fab5bc5357ad1d6e9b3485b5b0571ceeb429c6d817a999364736f6c63430008040033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading