Skip to content
Verified contractPartial

AssetToken

Address0xec301991a364fd034f010b19b0f09fbdf5f83b10
Balance

0 ETH

 

Transactions

34

 

Compiler

solc 0.4.15

 

Same code

Only this contract

 

Details

Compiler
solc 0.4.15+commit.bbb8e64f
Language
solidity
Optimization
No
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
4,596,013
Creation transaction
0x0c2a69af8b…a1d4f14395

AssetToken.sol

pragma solidity ^0.4.11;
 
contract admined {
	address public admin;

	function admined(){
		admin = msg.sender;
	}

	modifier onlyAdmin(){
		require(msg.sender == admin);
		_;
	}

	function transferAdminship(address newAdmin) onlyAdmin {
		admin = newAdmin;
	}

}

contract AIO {

	mapping (address => uint256) public balanceOf;
	string public name;
	string public symbol;
	uint8 public decimal; 
	uint256 public intialSupply=5000000;
	uint256 public totalSupply;
	
	
	event Transfer(address indexed from, address indexed to, uint256 value);


	function AIO (){
		balanceOf[msg.sender] = intialSupply;
		totalSupply = intialSupply;
		decimal = 0;
		symbol = "AIO";
		name = "AllInOne";
	}

	function transfer(address _to, uint256 _value){
		require(balanceOf[msg.sender] >= _value);
		require(balanceOf[_to] + _value >= balanceOf[_to]) ;
		

		balanceOf[msg.sender] -= _value;
		balanceOf[_to] += _value;
		Transfer(msg.sender, _to, _value);
	}

}

contract AssetToken is admined, AIO{
	mapping (address => bool) public frozenAccount;

	event FrozenFund(address target, bool frozen);

	function AssetToken() AIO (){
		totalSupply = 5000000;
		admin = msg.sender;
		balanceOf[admin] = 5000000;
		totalSupply = 5000000;	
	}

	function mintToken(address target, uint256 mintedAmount) onlyAdmin{
		balanceOf[target] += mintedAmount;
		totalSupply += mintedAmount;
		Transfer(0, this, mintedAmount);
		Transfer(this, target, mintedAmount);
	}

	function transfer(address _to, uint256 _value){
	    require(!frozenAccount[_to]);
		require(balanceOf[msg.sender] > 0);
		require(balanceOf[msg.sender] >= _value) ;
		require(balanceOf[_to] + _value >= balanceOf[_to]);
		
		balanceOf[msg.sender] -= _value;
		balanceOf[_to] += _value;
		Transfer(msg.sender, _to, _value);
	}
	
	function transferFrom(address _from, address _to, uint256 _value) onlyAdmin{
		
		require(!frozenAccount[_from]);
		
		require(balanceOf[_from] >= _value);
		
		require(balanceOf[_to] + _value >= balanceOf[_to]);
		balanceOf[_from] -= _value;
		balanceOf[_to] += _value;
		Transfer(_from, _to, _value);

	}
	
	
	function destroyCoins(address _from, address _to, uint256 _value) onlyAdmin{
		require(balanceOf[_from] >= _value);
		balanceOf[_from] -= _value;
		balanceOf[_to] += _value;
	}
	
		function freezeAccount(address target, bool freeze) onlyAdmin{
		frozenAccount[target] = freeze;
		FrozenFund(target, freeze);
    }

}
Compiler settingsShow
{
  "optimizer": {
    "runs": 0,
    "enabled": false
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.