by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 10 2017 22:42
    @jpitts banned @etherchamp1_twitter
  • Jun 05 2016 10:33
    @chriseth banned @adamskee
Ravi Shankar
@India1729
Hello, Freinds I am getting error in migrating solidity truffle migrate. I am using windows. Error is
Microsoft JScript compilation error 800A0404.
Lauri Peltonen
@microbecode
If I remember right you should try to run truffle.cmd instead of just truffle
Or was it .bat
Ravi Shankar
@India1729

This is my code:
`pragma solidity >=0.4.20;
// pragma solidity >=0.4.16 <0.8.0;
contract DappToken {
// Constructor
// Set the total number of tokens
// Read the total number of tokens
uint256 public totalSupply;

function DappToken ()  public pure {
    totalSupply = 1000000;
}

}`

I am getting error of: solidity warning this declaration shadows an existing declaration. How I can fix this issue.
To be an exact error is.
Econymous
@Econymous
image.png
i think it's because you're not using constructor() ... but then again. i think what you're doing is valid for the version of solidity you're in
@India1729
I hope that helps. I know it's sparce out here
Econymous
@Econymous
Comments are data. But are comments deployed or do they just show up on etherscan?
@India1729 yeah. It is because you are not using the constructor key word
Econymous
@Econymous
image.png
so i think that this increases my contract size .... a bit too much
is that right? i can compress it
Lauri Peltonen
@microbecode
Econymous: they are not deployed I think. Etherscan simply ignores them when comparing the bytecodes.
Etherscan needs someone to manually submit the source code, otherwise it can't display the real source code
David Roon
@adridadou
@mudgen sorry for the late reply. I haven't tried without payable. The function I'm trying to call is irrelevant since it's a compilation issue and I'm passing the calldata. Which function is being called is defined outside of this smart contract. The whole point is to be able to pass calldata, it doesn't make much sense to do call without data no ?
Yume-rain
@Yume-rain
Hello QWQ
Nick Mudge
@mudgen
@adridadou I see, so you are getting a syntax error? What's the full error? The reason to do a call without call data is if you just want to send ether somewhere.
@adridadou externalAddress.call does not work with a try/catch
Nick Mudge
@mudgen
@adridadou But externalAddress.call returns a bool success value that you can check to see if the external call was successful or not, but I think it also returns true if address is not a contract
Nick Mudge
@mudgen
@adridadou Check the solidity documentation for the return values of externalAddress.call
LordXyTh
@LordXyTh
Hi all, im just starting to dive into solidity and eth development as a long time web dev. Quick question for you, i understand that the .sol files get compiled and deployed on a network. But I have a question re: the HTML/CSS/JS. Are these deployed and served from a traditional webserver?
David Roon
@adridadou
@mudgen so if I get this right, there is no way to get the error message from a contract call if we use externalAddress.call ? Or is there another way (not with try) to do this? I was trying to use try / catch so I can show the underlying issue and help me debug any failed transaction
Chiro Hiro
@chiro-hiro
@mudgen Actually it returns (bool isSuccess, bytes memory data).
This useful function is from zeppelin solidity:
  function isContract(address payable account) internal view returns (bool) {
        // This method relies in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.
        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
  }
David Roon
@adridadou
@mudgen .call is not only to send eth to an address, it can be used to do a low level call actually. This is used in every smart contract wallet and in minion Moloch DAO for example. My usecase here is that I want to be able to retrieve any revert reason if the call didn't succeed so I can retrieve it.
Econymous
@Econymous
does the compiler version (0.7.0) require the EVM/blockhain to be updated ?
matrixbot
@matrixbot
KaiRo not compared to 0.6 AFAIK
Njoku Emmanuel
@Khay-EMMA
Hey Guys.
I'm currently in need of a Junior Blockchain Developer or Solidity Developer role. Open to full time and remote roles
Here's my github repo. https://github.com/Khay-EMMA
Feel free to drop a mail at kalunjoku123@gmail.com
Ilan Doron
@ilanDoron

Hi all

is anyone aware of a solidity pre compiler?

Ben Siraphob
@siraben
@ilanDoron What's a pre-compiler?
Dimitar Bounov
@cd1m0
@here has anyone ran into the following exception with 0.6.12
 | TypeError: soljson.Pointer_stringify is not a function
 |     at /contracts/zero-ex/home/dimo/work/consensys/clients/0x-monorepo/node_modules/solc/wrapper.js:18:37
 |     at null.<anonymous> (wasm://wasm/040d0742:0:16055879)
 |     at Ob (wasm://wasm/040d0742:0:5658172)
 |     at invoke_viiii contracts/zero-ex/(/home/dimo/work/consensys/clients/0x-monorepo/packages/sol-compiler/solc_bin/soljson-v0.6.12+commit.27d51765.js:1:22704199)
 |     at null.<anonymous> (wasm://wasm/040d0742:0:9477757)
 |     at Ob (wasm://wasm/040d0742:0:5658172)
 |     at invoke_viiii contracts/zero-ex/(/home/dimo/work/consensys/clients/0x-monorepo/packages/sol-compiler/solc_bin/soljson-v0.6.12+commit.27d51765.js:1:22704199)
 |     at null.<anonymous> (wasm://wasm/040d0742:0:2680876)
 |     at null.<anonymous> (wasm://wasm/040d0742:0:9435034)
 |     at xc (wasm://wasm/040d0742:0:5656968)
Alex Coventry
@coventry
This message was deleted
Nick Mudge
@mudgen
Hey did you know that Solidity libraries actual can have state variables?
@adridadou Hey, so the error will be the return value of the function
@adridadou So the call function has this return value: (bool isSuccess, bytes memory data).
The error will be in "data". Do you just need to parse "data" to get the error
Nick Mudge
@mudgen
The Solidity documentation will tell you the format of the error so you can parse it or you could just use 'data' as your error data and not parse it.
Nick Mudge
@mudgen
Hey did you know that Solidity libraries actual can have state variables? Yea, I'm talking to you if you are reading this.
noman
@noman-land
Does anyone know if it's possible to represent a nested json-like structure as a merkle tree so that certain data in certain positions can be proven?
ymm0901
@yan0327
Hello´╝îMy question is /// Place a blinded bid with _blindedBid =
/// keccak256(abi.encodePacked(value, fake, secret)).
I don't know how to set value about bytes32 _blindedBid
make if(bidToCheck.blindedBid != keccak256(abi.encodePacked(value, fake, secret))) become true
anyone can give me some help? thanks!!!
David Roon
@adridadou
@mudgen yes exactly. I've created an issue about it ethereum/solidity#9592
there is a link with an example on how to retrieve the message