Skip to content
Verified contractPartial

Serum

Address0xc0d9655d69bdb764ca3f69a8771e87e133fabd94
Balance

0 ETH

 

Transactions

3

 

Compiler

solc 0.4.19

 

Same code

2 more contracts

 

Details

Compiler
solc 0.4.19+commit.c4cbbb05
Language
solidity
Optimization
Yes, 200 runs
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
7,009,226
Creation transaction
0x7539e6c4a8…c8610c08e6

Serum.sol

pragma solidity ^0.4.19;

// Name your new coin. Make sure the constructor has the same name.
contract Serum {

    // This will be you, the minter. It is set in the constructor.
    address public minter;

    // This mapping stores everyone's balances.
    mapping (address => uint) public balances;

    // This event will track when someone sends some tokens.
    event Sent(address from, address to, uint amount);
    event Mint(uint amount);

    // This is the constructor. It runs only once, when the contract is created.
    function MyCoin() public {
        minter = msg.sender;
    }

    // Function to create some new coins for someone.
    // As the minter, only you will have access to this.
    function mint(address receiver, uint amount) public {
        if (msg.sender != minter) return;
        balances[receiver] += amount;
        Mint(amount);
    }

    // Function to send some coins. Anyone with coins can do this.
    function send(address receiver, uint amount) public {
        if (balances[msg.sender] < amount) return;
        balances[msg.sender] -= amount;
        balances[receiver] += amount;
        Sent(msg.sender, receiver, amount);
    }
}
Compiler settingsShow
{
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.