Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Micah Dameron
    Writing the question shortly and concisely is more likely to get you an answer, and makes it so you don't have to send your whole contract into the chat prematurely. :)
    Nick Mudge
    I recently wrote EIP 173: Contract Ownership Standard: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-173.md
    Looking for feedback about the standard here: ethereum/EIPs#173
    Manoj Hulmani
    @chronaeon while I appreciate you helping me out... I would like to point out that some people like me want context and samples... I am not sure how much questions you have asked and answered, I have seen so many ask for samples... so I like to be efficient and ask the question providing all the relevant information :smile: no offense...
    Micah Dameron
    Duly noted; thanks for the feedback
    Interested to know what the Truffle folks think of this issue
    Did you get a chance to ask in the Truffle channel?
    Does anyone know how to fix truffle compile if it isn't working on a OS device? I can't compile my smart contracts and its irking me.
    Manoj Hulmani
    @chronaeon Yes, I posted there before I posted here (cause I did not get a response for a while).... I used asyn/await to solve the issues, still struggling to find out how to solve without using aysn/await...
    Micah Dameron
    @tuckherin as an alternative compiler to Truffle, I recommend solc. Here's how to install it on a variety of devices.
    prapat polchan

    hello i deploy
    function deposit(uint256 amount) {

    // transfer the tokens from the sender to this contract
    balances[msg.sender] = balances[msg.sender].add(amount);
    ERC20(tracker_0x_address).transferFrom(msg.sender, this, amount);


    when call deposit remix alert

    Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
    Error: gas required exceeds allowance or always failing transaction at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:1402159 at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:932233 at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:350777 at o (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:369008) at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:353607 at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:350777 at c (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:353883) at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:353921 at Ht (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:363290) at Object.<anonymous> (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:354010) at e.value (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:933148) at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:932715 at n (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:368952) at o (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:369030) at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:353607 at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:932681 at n (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:368952) at o (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:369030) at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:353607 at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:933054 at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:354417 at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:350777 at c (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:353883) at s (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:353805) at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:353607 at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:354397 at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:932936 at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:931373 at i (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.js:1:1070602)

    Micah Dameron
    This error is being generated by MetaMask. Looks like someone started an issue about it here, but it hasn't been solved yet. Make sure to enter in your solution when you figure it out.
    Hey guys when i try to run truffle migrate i get this error
    Error encountered, bailing. Network state unknown. Review successful transactions manually.
    Error: Migrations contract constructor expected 1 arguments, received 0
    @MushroomMaula have you tried this option:
    truffle migrate --reset
    $ truffle init
    Error: Error making request to https://raw.githubusercontent.com/truffle-box/bar e-box/master/truffle.js. Got error: getaddrinfo ENOTFOUND raw.githubusercontent. com raw.githubusercontent.com:443. Please check the format of the requested reso urce.
    at Request._callback (C:\Users\blockchain\AppData\Roaming\npm\node_modules\t ruffle\build\webpack:~\truffle-box\lib\utils\unbox.js:45:1)
    at self.callback (C:\Users\blockchain\AppData\Roaming\npm\node_modules\truff le\build\webpack:~\request\request.js:185:1)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at Request.onRequestError (C:\Users\blockchain\AppData\Roaming\npm\node_modu les\truffle\build\webpack:~\request\request.js:877:1)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at TLSSocket.socketErrorListener (_http_client.js:387:9)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
    please give the instructions how to resolve it
    hello everyone im trying in my crowdsale to send back ether if someone bought above on the supply but it always revert because of transfer()
    if(receiveBGL > SALESUPPLY.sub(TokenSold)){
                //Calculation remaining tokens
                uint remainingTokens = SALESUPPLY.sub(TokenSold);
                emit LogDebug(remainingTokens);
                //Calculating price of token left
                uint tokenPriceInWei = remainingTokens.div(rate);
                emit LogDebug(tokenPriceInWei);
                //Calculation amount of wei to send back
                uint amountExceeds = weiPayment.sub(tokenPriceInWei);
                emit LogDebug(amountExceeds);
                //Sending back to recipient
                //Updating token that recipient will receive
                receive = remainingTokens;
    prapat polchan

    contract contractB {
    using SafeMath for uint256;
    address tracker_0x_address = 0x6b42FE821b653A0eae1a52249BF5cd58D1100890; // ContractA Address
    address to_address = 0xe459024A10b6Ed6189998706B8fd72fD0Dd00b97;
    mapping ( address => uint256 ) public balances;

    function sendTokens (uint256 amount) public
       //tokenAddress is the address of the ERC20 token deployed on Ropsten
        ERC20(tracker_0x_address).transfer(to_address, amount);


    this my contract
    why fail on call this function
    Micah Dameron
    @ManZerAirBow_twitter can you link the whole contract
    Affan Khan
    Hi, I need to write a solidity contract in which i can generate ethereum address and a function flush to send all addresses funds to destination address
    Hello everyone. I'm new to the blockchain technology. I wanted to learn the technical and development aspect of it. So how do I start? . Any sort of help would be appreciated. Thank you.
    Ben DiFrancesco
    Hey y’all, I have a smart contract with two public properties. One is an address and the other a uint. In my web3 front end, I almost always want to get both of these properties at the same time. I’ve implemented a get method in the contract that returns both properteis together, and I’m using this rather than declaring each property public. This makes accessing the data in my frontend easier, and actually requires about 1,000 less gas on deployment. Is there any downside to this approach that I’m missing?
    Adam Martin
    No issue that I know of.
    Hi, is it possible to deploy a token first, then deploy a separate contract at a later time for a public sale of the earlier deployed token?

    Hi I'm trying to create a crowdfund type contract whereby someone can create a 'mother' token and then go on to create child tokens that are forever attached to the mother.

    I had a little search and came up with the following code:

    import './Child.sol';
    mapping(bytes32 => Child) childList;
    mapping(bytes32 => Child) childList;
    function createMotherToken (address producer) public  {
        producer = msg.sender;
     function spawnChild(bytes32 childId) {
        Child current = new Child();
        childList[childId] = current;
    function callChildFunction(bytes32 childId) {


    Are there issues with this; and I'm assuming the import would go into my JS file? I am complete noob, so please go easy on me. Thanks for help..
    Vishal Waman


    We are using https://mainnet.infura.io/ with our Web3.js to listen events from Ethereum
    we receive almost 90% or events but 10% are never received

    Can anyone guide us on this ?


    Micah Dameron
    @apbendi , it's best to explicitly mark the visibility of your functions in callouts and state variables.
    @VishalWaman did you try the Infura gitter channel?
    Ben DiFrancesco
    Thanks @chronaeon , here’s my very simple contract. Note I have a public method for returning all contract state, as opposed to marking each property as public. Do you see a downside to this: https://github.com/apbendi/hodl_wallet/blob/master/contracts/HodlWallet.sol#L20
    @apbendi security wise, no downside. Possible downside is interoperability, ie. if other contracts want to get one or two values, they'll pay a bit more gas and have to handle the 4 return values. Cost of making all those values public is just a bit more bytecode to deploy.
    Ben DiFrancesco
    Thanks @maurelian, these all make sense. Just wanted to make sure I wasn’t missing anything else :)
    Hello, I have a smart contract and when trying to initialize it in a website, the address' for the token and token sale wont initialize, I am a newbie so any help will be appreciated! ( solidity, web3js )
    hi, I got this error message when I tried to truffle migrate my contracts to ropsten today
    Error encountered, bailing. Network state unknown. Review successful transactions manually. exceeds block gas limit
    anyone got this message ?
    I deployed successful few days ago
    sorry for asking this question here, but I don't know where to ask such as this question :(
    it seem to work now :( sorry everybody here
    Mayuresh Khalane
    Hello.. m facing a problem. When i try to compile Webpack using truffle it says :- Error couldn't find the module 'babley-register' .. please help
    People, there is a truffle chat room: https://gitter.im/ConsenSys/truffle
    Micah Dameron
    Hi All
    is there any concept where we can use any database (like mysql or postgress )with smart contract or blockchain?
    if yes how can I implement it ?
    please share your views
    Nick Mudge
    Does anybody know how to resolve the url not parseableFile.sol error in remix? Am trying to create a child file and remix won't compile, am totally stuck.
    @mudgen_twitter Sorry, would love to help but that is way beyond me at the moment.
    Can somebody help me to create a small app using smart contract with some UI, except pet shop ?
    Help will be appreciated