Search content
Sort by

Showing 20 of 28 results by CryptoSi
Post
Topic
Board Altcoin Discussion
Question about ERC-20 Token
by
CryptoSi
on 28/09/2017, 02:13:03 UTC
Assuming a ERC-20 is deployed with the standard code from the website, why am I able to transfer tokens from the main address to any other ETH address with no issues, but when I send the tokens from that address to any other Ethereum address, calling "Function: transfer(address _to, uint256 _value) ***"

 it gives the following message in Etherscan:

 "Warning! Error encountered during contract execution [Bad instruction]"

What does this mean and how to fix this? Does the approve() function need to be called for every address before it can spend the tokens and can that approve function be called from the new address or must it be only from the original token creator address?




pragma solidity ^0.4.13;

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

contract Test {
    /* Public variables of the token */
    string public name;
    string public symbol;
    uint8 public decimals;
    uint256 public totalSupply;

    /* This creates an array with all balances */
    mapping (address => uint256) public balanceOf;
    mapping (address => mapping (address => uint256)) public allowance;

    /* This generates a public event on the blockchain that will notify clients */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /* This notifies clients about the amount burnt */
    event Burn(address indexed from, uint256 value);

    /* Initializes contract with initial supply tokens to the creator of the contract */
    function Test(
        uint256 initialSupply,
        string tokenName,
        uint8 decimalUnits,
        string tokenSymbol
        ) {
        balanceOf[msg.sender] = initialSupply;              // Give the creator all initial tokens
        totalSupply = initialSupply;                        // Update total supply
        name = tokenName;                                   // Set the name for display purposes
        symbol = tokenSymbol;                               // Set the symbol for display purposes
        decimals = decimalUnits;                            // Amount of decimals for display purposes
    }

    /* Internal transfer, only can be called by this contract */
    function _transfer(address _from, address _to, uint _value) internal {
        require (_to != 0x0);                               // Prevent transfer to 0x0 address. Use burn() instead
        require (balanceOf[_from] > _value);                // Check if the sender has enough
        require (balanceOf[_to] + _value > balanceOf[_to]); // Check for overflows
        balanceOf[_from] -= _value;                         // Subtract from the sender
        balanceOf[_to] += _value;                            // Add the same to the recipient
        Transfer(_from, _to, _value);
    }

    /// @notice Send `_value` tokens to `_to` from your account
    /// @param _to The address of the recipient
    /// @param _value the amount to send
    function transfer(address _to, uint256 _value) {
        _transfer(msg.sender, _to, _value);
    }

    /// @notice Send `_value` tokens to `_to` in behalf of `_from`
    /// @param _from The address of the sender
    /// @param _to The address of the recipient
    /// @param _value the amount to send
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
        require (_value < allowance[_from][msg.sender]);     // Check allowance
        allowance[_from][msg.sender] -= _value;
        _transfer(_from, _to, _value);
        return true;
    }

    /// @notice Allows `_spender` to spend no more than `_value` tokens in your behalf
    /// @param _spender The address authorized to spend
    /// @param _value the max amount they can spend
    function approve(address _spender, uint256 _value)
        returns (bool success) {
        allowance[msg.sender][_spender] = _value;
        return true;
    }

    /// @notice Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
    /// @param _spender The address authorized to spend
    /// @param _value the max amount they can spend
    /// @param _extraData some extra information to send to the approved contract
    function approveAndCall(address _spender, uint256 _value, bytes _extraData)
        returns (bool success) {
        tokenRecipient spender = tokenRecipient(_spender);
        if (approve(_spender, _value)) {
            spender.receiveApproval(msg.sender, _value, this, _extraData);
            return true;
        }
    }       

    /// @notice Remove `_value` tokens from the system irreversibly
    /// @param _value the amount of money to burn
    function burn(uint256 _value) returns (bool success) {
        require (balanceOf[msg.sender] > _value);            // Check if the sender has enough
        balanceOf[msg.sender] -= _value;                      // Subtract from the sender
        totalSupply -= _value;                                // Updates totalSupply
        Burn(msg.sender, _value);
        return true;
    }

    function burnFrom(address _from, uint256 _value) returns (bool success) {
        require(balanceOf[_from] >= _value);                // Check if the targeted balance is enough
        require(_value <= allowance[_from][msg.sender]);    // Check allowance
        balanceOf[_from] -= _value;                         // Subtract from the targeted balance
        allowance[_from][msg.sender] -= _value;             // Subtract from the sender's allowance
        totalSupply -= _value;                              // Update totalSupply
        Burn(_from, _value);
        return true;
    }
}
Post
Topic
Board Tokens (Altcoins)
Re: [PRE-ANN][ICO][BOUNTY] MEDIBOND[MEDI] - Healthcare In Your Hands || medibond.io
by
CryptoSi
on 05/08/2017, 16:20:27 UTC
just bought in! Seems like more and more people starting to invest, saw more transactions after last night :DDD
Post
Topic
Board Tokens (Altcoins)
Re: [PRE-ANN][ICO][BOUNTY] MEDIBOND[MEDI] - Healthcare In Your Hands || medibond.io
by
CryptoSi
on 25/07/2017, 16:30:28 UTC
What an interesting project here, an insurance is surely needed by many peoples, especially health insurance.
With this, it's surely going to bring goodness among peoples.


i mean I don't think this is "insurance" but it looks like a system to help reduce the problems that exist now in the healthcare community as there is a big monopoly between insurances software companies, hospitals, and pharmacies not to modernize technology and bureaucracy is in the way of it too since they set standards but hopefully this project will gain traction and help medical things move to the digital world, also their predictive diagnosis and treatments using artificial intelligence is very impressive if it can be implemented, I suggest more focus be given to AI and get that done first on roadmap
Post
Topic
Board Trading Discussion
Re: How do you guys keep track of all your cryptocurrency investments?
by
CryptoSi
on 22/07/2017, 19:19:52 UTC
some really good options here I didn't here about before, blockifolio and coin.fyi are very nice solutions, thanks for starting this thread!
Post
Topic
Board Project Development
Re: Profitable trading bot developed, need funds to invest!
by
CryptoSi
on 21/07/2017, 19:32:54 UTC
Hi,

I have developed a profitable trading bot which trades on the bittrex exchange and checks all coin pairs in 1 minute intervals for potential trends. So far I have turned 1 BTC into 2,6 BTC within just 24 hours. Currently the bot doesn't trade with real money because my bittrex balance is 0. If somebody sends me 0.05 BTC I will set up your own copy of the bot to trade live 24/7.

Eh, skeptical but PM me, I'm willing to try for 0.05 BTC, if you have a demo video or screenshots of actual statistics you've run with this bot that'd be fantastic!
Post
Topic
Board Tokens (Altcoins)
Re: [PRE-ANN][ICO][BOUNTY] MEDIBOND[MED] - Healthcare In Your Hands || medibond.io
by
CryptoSi
on 21/07/2017, 15:18:50 UTC
Other than bowhead health and patientory are there any other major healthcare related token projects that secure medical data? I know you guys want to do secure data but are you unique in that you do the multisignature between different insurance entities?  I know AI for doctors is unique as I haven't seen it elsewhere but is there more?
Post
Topic
Board Announcements (Altcoins)
Re: 💸💸💸 [BOUNTY] VOTES 💸💸💸
by
CryptoSi
on 20/07/2017, 18:26:56 UTC
Registered! good luck on this
Post
Topic
Board Tokens (Altcoins)
Re: [PRE-ANN][ICO][BOUNTY] MEDIBOND[MED] - Healthcare In Your Hands || medibond.io
by
CryptoSi
on 20/07/2017, 04:35:32 UTC
Planning to join the RT campaign bounty! The project looks very interesting, keeping an eye on this one
Post
Topic
Board Announcements (Altcoins)
Re: [ANN] KAPPA [ICO] July 10-24: Sarcastic cryptocurrency
by
CryptoSi
on 10/07/2017, 15:02:56 UTC
Interesting! Whitepaper not loading in Chrome, anything I should do?
If all you see is a white piece of paper, then it's loading just fine!  Wink

hehe, I understood that shortly after posting the reply here haha  Grin
Post
Topic
Board Announcements (Altcoins)
Re: [ANN] KAPPA [ICO] July 10-24: Sarcastic cryptocurrency
by
CryptoSi
on 10/07/2017, 14:28:55 UTC
Interesting! Whitepaper not loading in Chrome, anything I should do?
Post
Topic
Board Marketplace (Altcoins)
Re: DCR & Exodus.io Puzzle
by
CryptoSi
on 05/07/2017, 21:55:31 UTC
Just as an update it looks like the puzzle was solved now

https://twitter.com/decredproject/status/881945616892305408
Post
Topic
Board Trading Discussion
Re: Where should i invest 45 BTC risk free
by
CryptoSi
on 04/07/2017, 03:40:31 UTC
45 BTC is far too many to just invest in one place risk free. I'd suggest put some into a credible alt with a good staking return, give some of them out as loans on trusted and verified platforms, reserve some away just to not touch and maybe come back to in a couple years when Bitcoin is much higher, and the rest I'd suggest you trade with cautiously.
Post
Topic
Board Announcements (Altcoins)
Re: [ANN][DCR] Decred - Hybrid PoW/PoS | btcsuite Devs | Tons of New Features | Go
by
CryptoSi
on 28/06/2017, 02:52:09 UTC
where would you suggest is the best place to stake if you've got under 50 DCR?
Post
Topic
Board Marketplace (Altcoins)
Topic OP
DCR & Exodus.io Puzzle
by
CryptoSi
on 27/06/2017, 00:58:54 UTC
If you guys haven't checked it out, Decred & Exodus.io are doing a $5000.00 Puzzle Competition -> http://exodus.io/decred

We're on the final step! Join us on the Decred Slack (http://decred.slack.com) in the #puzzles channel for full updates and collaborated participation with other players!
Post
Topic
Board Bitcoin Discussion
Re: How do you store your bitcoins?
by
CryptoSi
on 20/06/2017, 03:14:26 UTC
I store some of my crypto assets in an interesting way - I make puzzles (images) out of them which only I know how to decipher with a certain scheme/maze. In the image are the priv keys. Perhaps not the safest but it works for me.
Post
Topic
Board Bitcoin Discussion
Re: Why Cash is better than Bitcoin.
by
CryptoSi
on 08/06/2017, 02:31:29 UTC
Bitcoin is already BETTER THAN the currently existing currency, its also BETTER THAN cash because you can do this through internet without any hustle in a rough way.

exactly. agreed
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin banned in Ecuador
by
CryptoSi
on 30/05/2017, 18:57:46 UTC
Quite foolish for any government to try and ban Bitcoin or any other p2p crypto currencies. It won't work.
Post
Topic
Board Bitcoin Discussion
Re: How to guarantee BTC growth
by
CryptoSi
on 29/05/2017, 13:50:47 UTC
In a way the reward halving and increasing difficulty to mine new Bitcoins almost makes it necessary for price to increase for miners to be interested to spend their money on power to continue to mine, so its kind of built in, reasons for BTC growth.
Post
Topic
Board Trading Discussion
Re: What is your trading strategy?
by
CryptoSi
on 26/05/2017, 18:34:56 UTC
Follow good traders on twitter

Follow the overall BTC/USD market (good for determining when to get into alts)

Follow major alts (LTC, ETH, DCR, UBQ, CLAM, XRP, etc) trends

Get into a good Telegram or Slack group of dedicated traders (since markets are 24/7, good to have people in other timezones who can follow markets at times you're not awake and can ping you messages or trends you missed)

Execute trades!
Post
Topic
Board Speculation
Re: Buy In The Dips Guys
by
CryptoSi
on 26/05/2017, 01:44:44 UTC
Difficult part will be to figure out how low the dips can go. So far if the fallout hasn't happened yet then it doesn't resemble any past trends w/regards to length of time in between swings. Will be an interesting ride forward.