https://etherscan.io/address/0xa0872ee815b8dd0f6937386fd77134720d953581#code

pragma solidity ^0.4.18;

interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }

contract Token {

/// total amount of tokens
uint256 public totalSupply; /// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant public returns (uint256 balance); /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _value) public returns (bool success); /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); /// @notice `msg.sender` approves `_spender` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of tokens to be approved for transfer
/// @return Whether the approval was successful or not
function approve(address _spender, uint256 _value) public returns (bool success); /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent
function allowance(address _owner, address _spender) constant public returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);

}

/*

You should inherit from StandardToken or, for a token like you would want to

deploy in something like Mist, see HumanStandardToken.sol.

(This implements ONLY the standard functions and NOTHING else.

If you deploy this, you won't have anything useful.)

Implements ERC 20 Token standard: https://github.com/ethereum/EIPs/issues/20

.*/

contract StandardToken is Token {

function transfer(address _to, uint256 _value) public returns (bool success) {
// Prevent transfer to 0x0 address.
require(_to != 0x0);
// Check if the sender has enough
require(balances[msg.sender] >= _value);
// Check for overflows
require(balances[_to] + _value > balances[_to]); uint previousBalances = balances[msg.sender] + balances[_to];
balances[msg.sender] -= _value;
balances[_to] += _value;
Transfer(msg.sender, _to, _value);
// Asserts are used to use static analysis to find bugs in your code. They should never fail
assert(balances[msg.sender] + balances[_to] == previousBalances); return true;
} function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
/// same as above
require(_to != 0x0);
require(balances[_from] >= _value);
require(balances[_to] + _value > balances[_to]); uint previousBalances = balances[_from] + balances[_to];
balances[_from] -= _value;
balances[_to] += _value;
allowed[_from][msg.sender] -= _value;
Transfer(_from, _to, _value);
assert(balances[_from] + balances[_to] == previousBalances); return true;
} function balanceOf(address _owner) constant public returns (uint256 balance) {
return balances[_owner];
} function approve(address _spender, uint256 _value) public returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
} function allowance(address _owner, address _spender) constant public returns (uint256 remaining) {
return allowed[_owner][_spender];
} mapping (address => uint256) balances; /// balance amount of tokens for address
mapping (address => mapping (address => uint256)) allowed;

}

contract EduCoin is StandardToken {

function () payable public {
//if ether is sent to this address, send it back.
//throw;
require(false);
} string public constant name = "EduCoinToken";
string public constant symbol = "EDU";
uint256 private constant _INITIAL_SUPPLY = 15*10**27;
uint8 public decimals = 18;
uint256 public totalSupply;
//string public version = 'H0.1'; function EduCoin(
) public {
// init
balances[msg.sender] = _INITIAL_SUPPLY;
totalSupply = _INITIAL_SUPPLY; } /* Approves and then calls the receiving contract */
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}

}

Edu 0空投合约源码的更多相关文章

  1. Android7.0 Phone应用源码分析(二) phone来电流程分析

    接上篇博文:Android7.0 Phone应用源码分析(一) phone拨号流程分析 今天我们再来分析下Android7.0 的phone的来电流程 1.1TelephonyFramework 当有 ...

  2. Android7.0 Phone应用源码分析(一) phone拨号流程分析

    1.1 dialer拨号 拨号盘点击拨号DialpadFragment的onClick方法会被调用 public void onClick(View view) { int resId = view. ...

  3. robotlegs2.0框架实例源码带注释

    robotlegs2.0框架实例源码带注释 Robotlegs2的Starling扩展 有个老外写了robotleges2的starling扩展,地址是 https://github.com/brea ...

  4. Android7.0 Phone应用源码分析(三) phone拒接流程分析

    本文主要分析Android拒接电话的流程,下面先来看一下拒接电话流程时序图 步骤1:滑动按钮到拒接图标,会调用到AnswerFragment的onDecline方法 com.android.incal ...

  5. 购买的wemall 6.0商城系统源码分享

    使用方法 1.解压目录 2.cd wemall6 && npm i 3.配置config下的config.json 4.npm start 摒弃以往的开发框架thinkphp,使用no ...

  6. Android7.0 Phone应用源码分析(四) phone挂断流程分析

    电话挂断分为本地挂断和远程挂断,下面我们就针对这两种情况各做分析 先来看下本地挂断电话的时序图: 步骤1:点击通话界面的挂断按钮,会调用到CallCardPresenter的endCallClicke ...

  7. spring5.0.2.RELEASE源码环境构建

    Spring5 源码下载注意事项 首先你的JDK 需要升级到1.8 以上.Spring3.0 开始,Spring 源码采用github 托管,不再提供官网下载链接.大家可自行去github 网站下载, ...

  8. spring-boot-2.0.3启动源码篇二 - run方法(一)之SpringApplicationRunListener

    前言 Springboot启动源码系列还只写了一篇,已经过去一周,又到了每周一更的时间了(是不是很熟悉?),大家有没有很期待了?我会尽量保证启动源码系列每周一更,争取不让大家每周的期望落空.一周之中可 ...

  9. spring-boot-2.0.3启动源码篇 - 阶段总结

    前言 开心一刻 朋友喜欢去按摩,第一次推门进来的是一个学生美眉,感觉还不错:后来经常去,有时是护士,有时是空姐,有时候是教师.昨天晚上推门进去的是一个女警察,长得贼好看,身材也很好,朋友嗷的一声就扑上 ...

随机推荐

  1. [P1363] 幻想迷宫

    题目链接 很好的一道搜索题,应该是利用了离散化的思想我好蒟蒻呀 地图是根据给定的图无限的拼接的. 所以说暴力建图是不可取的. 其实不难看出,在跨越两张图时.我们就可以看做这个点时空穿梭一般.从底下回来 ...

  2. cudaMallocPitch()

  3. angularJS 提示

    1.通常angularJS应用程序将模块和控制器包含在JavaScript文件中. 2.在模块的定义中[]参数是用来表示模块的依赖关系. 3.中括号[]为空,表示该模块没有依赖关系,如果有依赖关系的话 ...

  4. CNN训练中的技巧

    转自: http://weibo.com/p/1001603816330729006673 说明:这个翻译应该是来自原文:http://yyue.blogspot.hk/2015/01/a-brief ...

  5. 在 publicId 和 systemId 之间需要有空格。

    spring  applicationContext_datasource.xml中约束错误 org.springframework.beans.factory.xml.XmlBeanDefiniti ...

  6. Eclipse+Python环境配置

    Eclipse+Pydev 1.安装Eclipse Eclipse可以在它的官方网站Eclipse.org找到并下载,通常我们可以选择适合自己的Eclipse版本,比如Eclipse Classic. ...

  7. 远程桌面连接失败,提示CredSSP加密Oracel修正问题解决

    今天远程桌面的时候失败了,出现以下提示 于是上网找解决办法,经过测试,该方法是可行的. 首先,在控制台中输入regedit,打开注册表

  8. 在win10上同时安装Python2/Python3

    如何在win10上同时安装python2和python3? 为了满足日常工作或者学习的需要,我们可能会经常用到python2和python3,下面是给大家在win10上同时安装两个版本的python的 ...

  9. Yii2实现跨mysql数据库关联查询排序功能

    遇到一个项目,需要跨表网上找了很多的资料,整理一下,方便以后再次使用 背景:在一个mysql服务器上(注意:两个数据库必须在同一个mysql服务器上)有两个数据库: memory (存储常规数据表) ...

  10. hibernate映射实体类查询时数据库空字段赋值给实体类报错的问题

    因为一直报实体类空异常,去网上查了资料只查到了并没有查到数据库空值时不给实体类赋值的属性 异常 org.hibernate.InvalidMappingException: Could not par ...