Skip to content

avontrustlabs/Unbankedx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UnbankedX Smart contract

0x5e7282e224ecd303d6484c1ce4d93ff076d911c0 https://etherscan.io/address/0x5e7282e224ecd303d6484c1ce4d93ff076d911c0

pragma solidity ^0.4.11;

contract Unbankedx { uint public _totalSupply = 1000000000000000000000000000;

string public constant symbol = "UBX"; string public constant name = "UnbankedX Token"; uint8 public constant decimals = 18;

address public owner; bool public freeTransfer = false; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed;

function Unbankedx(address _multisig) { balances[_multisig] = _totalSupply; owner = _multisig; }

modifier onlyOwner() { require(msg.sender == owner); _; }

modifier ownerOrEnabledTransfer() { require(freeTransfer || msg.sender == owner); _; }

function enableTransfer() onlyOwner() { freeTransfer = true; } function disableTransfer() onlyOwner() { freeTransfer = false; }

function totalSupply() constant returns (uint256 totalSupply){ return _totalSupply; }

function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; }

function transfer(address _to, uint256 _value) ownerOrEnabledTransfer public returns (bool) { require( balances[msg.sender]>= _value && _value > 0 ); balances[msg.sender] -= _value; balances[_to] += _value; Transfer(msg.sender, _to, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) ownerOrEnabledTransfer public returns (bool success) { require( allowed[_from][msg.sender] >= _value && balances[_from] >= _value && _value > 0 ); balances[_from] -= _value; balances[_to] += _value; allowed[_from][msg.sender] -= _value; Transfer(_from, _to, _value); return true; } function approve(address _spender, uint256 _value) public returns (bool success) { // To change the approve amount you first have to reduce the addresses// allowance to zero by callingapprove(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // ethereum/EIPs#20 (comment) require(_value == 0 || allowed[msg.sender][_spender] == 0); allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } function transferOwnership(address newOwner) public onlyOwner returns (bool) { require(newOwner != address(0)); owner = newOwner; } event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Transfer(address indexed _from, address indexed _to, uint256 _value); }

ABI

[ { "anonymous": false, "inputs": [ { "indexed": true, "name": "_from", "type": "address" }, { "indexed": true, "name": "_to", "type": "address" }, { "indexed": false, "name": "_value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "constant": false, "inputs": [ { "name": "_spender", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "approve", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "disableTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "enableTransfer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_to", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "transfer", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_from", "type": "address" }, { "name": "_to", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "_owner", "type": "address" }, { "indexed": true, "name": "_spender", "type": "address" }, { "indexed": false, "name": "_value", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "inputs": [ { "name": "_multisig", "type": "address" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "constant": true, "inputs": [], "name": "_totalSupply", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_owner", "type": "address" }, { "name": "_spender", "type": "address" } ], "name": "allowance", "outputs": [ { "name": "remaining", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_owner", "type": "address" } ], "name": "balanceOf", "outputs": [ { "name": "balance", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [ { "name": "", "type": "uint8" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "freeTransfer", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "name", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "symbol", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ { "name": "totalSupply", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" } ]

About

Cryptobank Deposits/Lending/Custody/Fiat-Crypto + My Global Identity KYC Dapp + Waves token stablecoin + DBS Citibank integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages