Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 05 2016 10:31
    @alexvandesande banned @adamskee
  • Mar 16 2016 01:12
    @alexvandesande banned @scbosse
IT-virtual entity
@xarihanTW_twitter
main question is: can i create tokens without github
nafroman
@nafroman
is there a tutorial that shows interacting with the mainnet? I have a contract deployed and a javascript file that does what i need it to but i cannot seem to connect a webpage to visualise it all
Krishan Gupta
@krishangupta
On this page it uses a depricated standard for constructor MyToken(uint256 initialSetup)... should be constructor(uint256 initialSetup)` if I understand correctly
Jay Rajput
@beingjsr
hi
I am Jay from India
Anyone gonna help how to create my token
Kapsel2018
@Kapsel2018
Hej
I have problem: Copy the code for my token and show this:

Could not compile source code.

Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
function TokenERC20(
^ (Relevant source part starts here and spans across multiple lines).

Alifff
@Alifff

hi, I am using Pragma and Metamask to create and deploy contract (using kovan testnet) but when I try to deploy my contract, it gives me error message like this : You need some ETH
Looks like you don't have any ETH on Kovan.

You can click here to get some.

Get some ETH.

I have 4 Eth in my account
pat22rpc
@pat22rpc
idem

I have problem: Copy the code for my token and show this:
Could not compile source code.

Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
function TokenERC20(
^ (Relevant source part starts here and spans across multiple lines).

Emily C.
@dreamthink
@pat22rpc Instead of using function MyToken, use constructor()
pat22rpc
@pat22rpc
ok
thank
PhySysDavid
@PhySysDavid
Hi - the page https://www.ethereum.org/token appears to be quite out of date. Any idea if the intention is to update it? Thank you.
PhySysDavid
@PhySysDavid
The page talks about the importance of naming a function the same as the associated contract, except that feature has been deprecated (apparently).
Biky Chowhan
@virus5251
how to install mist in raspberry pi
Ofir Bar
@ofir-bar

hi all. how do I overcome the barrier of mathematics in cryptocurrencies?

whenever I come across mathematical formulas, i can't relate.

How is this book to solve this problem? https://www.amazon.com/Concrete-Mathematics-Foundation-Computer-Science-ebook/dp/B07C2HMZQR/ref=sr_1_2?ie=UTF8&qid=1540742971&sr=8-2&keywords=concrete+mathematics

Or do you have any other resources, focused on cryptocurrencies?

4hiphop
@4hiphopteam
I am receiving an error message at the final stage of token create.
I am cutting and pasting the MINIMUM VIABLE TOKEN code into remix complier but I am unable to complete good code for I have zero knowledge of coding.
Manish Ranjan
@bit-warrior
Guys please try and give feedback on this tool https://blockaction.io
JANDRILOPEZ
@JANDRILOPEZ
can i create it with my mac book pro 2015 ??
Melvin Olive
@molive14
Hello I am trying to create a new token and I do not have the select contract to deploy option
sindibadthesailor2013
@sindibadthesailor2013
hi
Melvin Olive
@molive14
I have tried to deploy the contract but it will not deploy
Jeffrey Anthony
@jeffanthony
@molive14 are you still struggling?
DAppster87
@DAppster87
Hi, I have the same problem as Melvin Olive. I don't have the select contract to deploy options...
Is there any solution for it?
dave90dave
@dave90dave
Hello, I got a problem with compiling the contract code from https://ethereum.org/token#the-code, it gives my the following error and I'm very confused, how can I solve this problem: Expected pragma, import directive or contract/interface/library definition.
function MyToken() public {
^------^
Melvin Olive
@molive14
Hello who is the COKE PLUG
Jeffrey Anthony
@jeffanthony
@dave90dave nowadays the solidity compiler expects the contract to begin with pragma solidity ^0.4.25 //or whatever solidity version you're using.
as solidity matures as smart contract code (currently 0.5.0 iirc) the pragma number will tell the compiler which version of the compiler to use
@molive14 & @DAppster87 it's likely you're not passing the arguments correctly, not enough arguments, or not at all
Tip: it is simpler to initialize your attributes directly within the contract
ciegovolador
@ciegovolador
Hello
I am testing the dao code from ethereum home page
I have bug fixed some minus trouble with the encode in keccak256 and constructor functions
where can I send the pull request?
Also I am getting troubles wen I try to deploy the token contract
can someone bring me some help?
Christian021
@Christian021
hi is anyone willing to help me in my c programming exercise?
Nicole Zhu
@nczhu

Hey guys, wanted to share Solidity Koans here for folks learning Solidity: https://hackernoon.com/introducing-solidity-koans-cf51a5bc25e5

Like Ruby Koans, Solidity Koans guides you through simple, bite-sized programming exercises to learn Solidity through TDD. The goal is to learn the Solidity language, syntax, structure, and how to create secure and gas-efficient smart contracts. Let me know what you guys think!

EthHeads
@EthHeads
ETH 2.0 main chain will have same transaction speed as ETH
improvements are only on side chains
AlexYu.StudyList
@yujiye
How can I create a token?
@nczhu nice job, I will check it out over the weekend and leave some feedback. looks super nice at first glance. If you build a GUI for it it could be on the same pedistle as cryptozombies and ethernaut perhaps :)
Nico Vergauwen
@kyriediculous

I would change the naming convention to

<number>test<type>.sol , so eg. 1_test_assert.sol
Easier to type because no capitals and the tests will apear in order in the filesystem.

In Koans.sol I would replace the hardcoded value with the underflow just for simplicity (and perhaps demonstrating under/overflows)
uint256 max = uint256(0-1);

For your function getStorageSize() there is no fix, this is intended behaviour as unset values are initiated as 0. As far as I'm aware you can not 'hack' around this. The only 'fix' I can think of is checking the next value in storage and terminate the loop once the current and nextVal is unset , this is is probabilistic slightly better @nczhu

Nico Vergauwen
@kyriediculous
Also shared it on my Linkedin :)
Kevin
@ZhangKuixun

pragma solidity ^0.4.16;

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

contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
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);

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

/**
 * Internal transfer, only can be called by this contract
 */
function _transfer(address _from, address _to, uint _value) internal {
    // Prevent transfer to 0x0 address. Use burn() instead
    require(_to != 0x0);
    // Check if the sender has enough
    require(balanceOf[_from] >= _value);
    // Check for overflows
    require(balanceOf[_to] + _value > balanceOf[_to]);
    // Save this for an assertion in the future
    uint previousBalances = balanceOf[_from] + balanceOf[_to];
    // Subtract from the sender
    balanceOf[_from] -= _value;
    // Add the same to the recipient
    balanceOf[_to] += _value;
    Transfer(_from, _to, _value);
    // Asserts are used to use static analysis to find bugs in your code. They should never fail
    assert(balanceOf[_from] + balanceOf[_to] == previousBalances);
}

/**
 * Transfer tokens
 *
 * 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) public {
    _transfer(msg.sender, _to, _value);
}

/**
 * Transfer tokens from other address
 *
 * Send `_value` tokens to `_to` on 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) public returns (bool success) {
    require(_value <= allowance[_from][msg.sender]);     // Check allowance
    allowance[_from][msg.sender] -= _value;
    _transfer(_from, _to, _value);
    return true;
}

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

/**
 * Set allowance for other address and notify
 *
 * Allows `_spender` to spend no more than `_value` tokens on 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
 */
funct