Address Contract Partially Verified
Address
0x04abEdA201850aC0124161F037Efd70c74ddC74C
Balance
0 ETH
Nonce
1
Code Size
4366 bytes
Creator
0xA38afc5c...4882 at tx 0x1e421d31...b06b75
Indexed Transactions
0
Contract Bytecode
4366 bytes
0x6080604052600436106100c65760e060020a600035046306fdde0381146100cb578063095ea7b31461015557806318160ddd146101a257806323b872dd146101c95780632ff2e9dc1461020c578063313ce56714610221578063661884631461024c57806370a08231146102855780637e0c5747146102b857806395d89b4114610305578063a9059cbb1461031a578063b8ba5c2014610353578063cf2adac814610368578063d1505c5d14610392578063d73dd623146103bc578063dd62ed3e146103f5575b600080fd5b3480156100d757600080fd5b506100e0610430565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561011a578181015183820152602001610102565b50505050905090810190601f1680156101475780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016157600080fd5b5061018e6004803603604081101561017857600080fd5b50600160a060020a0381351690602001356104be565b604080519115158252519081900360200190f35b3480156101ae57600080fd5b506101b7610524565b60408051918252519081900360200190f35b3480156101d557600080fd5b5061018e600480360360608110156101ec57600080fd5b50600160a060020a0381358116916020810135909116906040013561052a565b34801561021857600080fd5b506101b7610929565b34801561022d57600080fd5b5061023661092f565b6040805160ff9092168252519081900360200190f35b34801561025857600080fd5b5061018e6004803603604081101561026f57600080fd5b50600160a060020a038135169060200135610938565b34801561029157600080fd5b506101b7600480360360208110156102a857600080fd5b5035600160a060020a0316610a27565b3480156102c457600080fd5b506102e2600480360360208110156102db57600080fd5b5035610abf565b60408051600160a060020a03909316835260208301919091528051918290030190f35b34801561031157600080fd5b506100e0610b5e565b34801561032657600080fd5b5061018e6004803603604081101561033d57600080fd5b50600160a060020a038135169060200135610bb9565b34801561035f57600080fd5b506101b7610eb9565b34801561037457600080fd5b506101b76004803603602081101561038b57600080fd5b5035610f3f565b34801561039e57600080fd5b5061018e600480360360208110156103b557600080fd5b5035610f9c565b3480156103c857600080fd5b5061018e600480360360408110156103df57600080fd5b50600160a060020a038135169060200135610ff9565b34801561040157600080fd5b506101b76004803603604081101561041857600080fd5b50600160a060020a0381358116916020013516611092565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104b65780601f1061048b576101008083540402835291602001916104b6565b820191906000526020600020905b81548152906001019060200180831161049957829003601f168201915b505050505081565b336000818152600460209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60035490565b6040805160e160020a63262f0e57028152600060048201819052600160a060020a038616602483015291517303c513ffbdbda34b4a66b3052fa5e0e6606e531b91634c5e1cae916044808301926020929190829003018186803b15801561059057600080fd5b505af41580156105a4573d6000803e3d6000fd5b505050506040513d60208110156105ba57600080fd5b50518211156105c857600080fd5b600160a060020a03841660009081526004602090815260408083203384529091529020548211156105f857600080fd5b600160a060020a038316151561060d57600080fd5b7303c513ffbdbda34b4a66b3052fa5e0e6606e531b63ab517b4f6000866106d3867303c513ffbdbda34b4a66b3052fa5e0e6606e531b634c5e1cae60008c6040518363ffffffff1660e060020a0281526004018083815260200182600160a060020a0316600160a060020a031681526020019250505060206040518083038186803b15801561069b57600080fd5b505af41580156106af573d6000803e3d6000fd5b505050506040513d60208110156106c557600080fd5b50519063ffffffff6110bd16565b6040518463ffffffff1660e060020a0281526004018084815260200183600160a060020a0316600160a060020a03168152602001828152602001935050505060206040518083038186803b15801561072a57600080fd5b505af415801561073e573d6000803e3d6000fd5b505050506040513d602081101561075457600080fd5b50506040805160e160020a63262f0e57028152600060048201819052600160a060020a038616602483015291517303c513ffbdbda34b4a66b3052fa5e0e6606e531b9263ab517b4f92909187916108079188918791634c5e1cae91604480820192602092909190829003018186803b1580156107cf57600080fd5b505af41580156107e3573d6000803e3d6000fd5b505050506040513d60208110156107f957600080fd5b50519063ffffffff6110cf16565b6040518463ffffffff1660e060020a0281526004018084815260200183600160a060020a0316600160a060020a03168152602001828152602001935050505060206040518083038186803b15801561085e57600080fd5b505af4158015610872573d6000803e3d6000fd5b505050506040513d602081101561088857600080fd5b5050600160a060020a03841660009081526004602090815260408083203384529091529020546108be908363ffffffff6110bd16565b600160a060020a03808616600081815260046020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60085481565b60075460ff1681565b336000908152600460209081526040808320600160a060020a038616845290915281205480831061098c57336000908152600460209081526040808320600160a060020a03881684529091528120556109c1565b61099c818463ffffffff6110bd16565b336000908152600460209081526040808320600160a060020a03891684529091529020555b336000818152600460209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6040805160e160020a63262f0e57028152600060048201819052600160a060020a038416602483015291517303c513ffbdbda34b4a66b3052fa5e0e6606e531b91634c5e1cae916044808301926020929190829003018186803b158015610a8d57600080fd5b505af4158015610aa1573d6000803e3d6000fd5b505050506040513d6020811015610ab757600080fd5b505192915050565b6000806000807303c513ffbdbda34b4a66b3052fa5e0e6606e531b6375a3e8e86000876040518363ffffffff1660e060020a0281526004018083815260200182815260200192505050604080518083038186803b158015610b1f57600080fd5b505af4158015610b33573d6000803e3d6000fd5b505050506040513d6040811015610b4957600080fd5b50805160209091015190945092505050915091565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104b65780601f1061048b576101008083540402835291602001916104b6565b6040805160e160020a63262f0e5702815260006004820181905233602483015291517303c513ffbdbda34b4a66b3052fa5e0e6606e531b91634c5e1cae916044808301926020929190829003018186803b158015610c1657600080fd5b505af4158015610c2a573d6000803e3d6000fd5b505050506040513d6020811015610c4057600080fd5b5051821115610c4e57600080fd5b600160a060020a0383161515610c6357600080fd5b7303c513ffbdbda34b4a66b3052fa5e0e6606e531b63ab517b4f600033610cf1867303c513ffbdbda34b4a66b3052fa5e0e6606e531b634c5e1cae6000336040518363ffffffff1660e060020a0281526004018083815260200182600160a060020a0316600160a060020a031681526020019250505060206040518083038186803b15801561069b57600080fd5b6040518463ffffffff1660e060020a0281526004018084815260200183600160a060020a0316600160a060020a03168152602001828152602001935050505060206040518083038186803b158015610d4857600080fd5b505af4158015610d5c573d6000803e3d6000fd5b505050506040513d6020811015610d7257600080fd5b50506040805160e160020a63262f0e57028152600060048201819052600160a060020a038616602483015291517303c513ffbdbda34b4a66b3052fa5e0e6606e531b9263ab517b4f9290918791610ded9188918791634c5e1cae91604480820192602092909190829003018186803b1580156107cf57600080fd5b6040518463ffffffff1660e060020a0281526004018084815260200183600160a060020a0316600160a060020a03168152602001828152602001935050505060206040518083038186803b158015610e4457600080fd5b505af4158015610e58573d6000803e3d6000fd5b505050506040513d6020811015610e6e57600080fd5b5050604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b60007303c513ffbdbda34b4a66b3052fa5e0e6606e531b63a21ab71660006040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b158015610f0e57600080fd5b505af4158015610f22573d6000803e3d6000fd5b505050506040513d6020811015610f3857600080fd5b5051905090565b60007303c513ffbdbda34b4a66b3052fa5e0e6606e531b6388d044376000846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b158015610a8d57600080fd5b60007303c513ffbdbda34b4a66b3052fa5e0e6606e531b63c8fccc696000846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b158015610a8d57600080fd5b336000908152600460209081526040808320600160a060020a038616845290915281205461102d908363ffffffff6110cf16565b336000818152600460209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205490565b6000828211156110c957fe5b50900390565b818101828110156110dc57fe5b9291505056fea165627a7a72305820caf1607933189193333093ae5321813a10ebc423ab81622940e9de7df6f4547b0029
Verified Source Code Partial Match
Compiler: v0.5.1+commit.c8a2cb62
EVM: byzantium
Optimization: Yes (200 runs)
IBNEST.sol 346 lines
pragma solidity ^0.5.1;
library IterableMapping {
struct itmap
{
mapping(address => IndexValue) data;
KeyFlag[] keys;
uint size;
}
struct IndexValue { uint keyIndex; uint value; }
struct KeyFlag { address key; bool deleted; }
function insert(itmap storage self, address key, uint value) public returns (bool replaced)
{
uint keyIndex = self.data[key].keyIndex;
self.data[key].value = value;
if (keyIndex > 0)
return true;
else
{
keyIndex = self.keys.length++;
self.data[key].keyIndex = keyIndex + 1;
self.keys[keyIndex].key = key;
self.size++;
return false;
}
}
function remove(itmap storage self, address key) public returns (bool success)
{
uint keyIndex = self.data[key].keyIndex;
if (keyIndex == 0)
return false;
delete self.data[key];
self.keys[keyIndex - 1].deleted = true;
self.size --;
}
function contains(itmap storage self, address key) public view returns (bool)
{
return self.data[key].keyIndex > 0;
}
function iterate_start(itmap storage self) public view returns (uint keyIndex)
{
return iterate_next(self, uint(-1));
}
function iterate_valid(itmap storage self, uint keyIndex) public view returns (bool)
{
return keyIndex < self.keys.length;
}
function iterate_next(itmap storage self, uint keyIndex) public view returns (uint r_keyIndex)
{
keyIndex++;
while (keyIndex < self.keys.length && self.keys[keyIndex].deleted)
keyIndex++;
return keyIndex;
}
function iterate_get(itmap storage self, uint keyIndex) public view returns (address key, uint value)
{
key = self.keys[keyIndex].key;
value = self.data[key].value;
}
function iterate_getValue(itmap storage self, address key) public view returns (uint value) {
return self.data[key].value;
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (_a == 0) {
return 0;
}
c = _a * _b;
assert(c / _a == _b);
return c;
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
assert(_b > 0); // Solidity automatically throws when dividing by 0
uint256 c = _a / _b;
assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold
return _a / _b;
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
assert(_b <= _a);
return _a - _b;
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
c = _a + _b;
assert(c >= _a);
return c;
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* See https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address _who) public view returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
IterableMapping.itmap balances;
uint256 internal totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev Transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
require(_value <= IterableMapping.iterate_getValue(balances, msg.sender));
require(_to != address(0));
IterableMapping.insert(balances, msg.sender, IterableMapping.iterate_getValue(balances, msg.sender).sub(_value));
IterableMapping.insert(balances, _to, IterableMapping.iterate_getValue(balances, _to).add(_value));
emit Transfer(msg.sender, _to, _value);
return true;
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256) {
return IterableMapping.iterate_getValue(balances, _owner);
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address _owner, address _spender)
public view returns (uint256);
function transferFrom(address _from, address _to, uint256 _value)
public returns (bool);
function approve(address _spender, uint256 _value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/issues/20
* Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
require(_value <= IterableMapping.iterate_getValue(balances, _from));
require(_value <= allowed[_from][msg.sender]);
require(_to != address(0));
IterableMapping.insert(balances, _from, IterableMapping.iterate_getValue(balances, _from).sub(_value));
IterableMapping.insert(balances, _to, IterableMapping.iterate_getValue(balances, _to).add(_value));
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
emit Transfer(_from, _to, _value);
return true;
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
return allowed[_owner][_spender];
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(
address _spender,
uint256 _addedValue
)
public
returns (bool)
{
allowed[msg.sender][_spender] = (
allowed[msg.sender][_spender].add(_addedValue));
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(
address _spender,
uint256 _subtractedValue
)
public
returns (bool)
{
uint256 oldValue = allowed[msg.sender][_spender];
if (_subtractedValue >= oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
}
contract IBNEST is StandardToken {
string public name = "NEST";
string public symbol = "NEST";
uint8 public decimals = 18;
uint256 public INITIAL_SUPPLY = 10000000000 ether;
constructor () public {
totalSupply_ = INITIAL_SUPPLY;
IterableMapping.insert(balances, tx.origin, INITIAL_SUPPLY);
}
function balancesStart() public view returns(uint256) {
return IterableMapping.iterate_start(balances);
}
function balancesGetBool(uint256 num) public view returns(bool){
return IterableMapping.iterate_valid(balances, num);
}
function balancesGetNext(uint256 num) public view returns(uint256) {
return IterableMapping.iterate_next(balances, num);
}
function balancesGetValue(uint256 num) public view returns(address, uint256) {
address key;
uint256 value;
(key, value) = IterableMapping.iterate_get(balances, num);
return (key, value);
}
}
Read Contract
INITIAL_SUPPLY 0x2ff2e9dc → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
balancesGetBool 0xd1505c5d → bool
balancesGetNext 0xcf2adac8 → uint256
balancesGetValue 0x7e0c5747 → address, uint256
balancesStart 0xb8ba5c20 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 5 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
decreaseApproval 0x66188463
address _spender
uint256 _subtractedValue
returns: bool
increaseApproval 0xd73dd623
address _spender
uint256 _addedValue
returns: bool
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
Recent Transactions
No transactions found for this address