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
Alex Zanfir
@AlexZan
is there a way to test of a factory created my contract? like get the address from receipt and check its type or something?
mikedeshazer
@mikedeshazer
Hey wonderful Solidity devs. Hope you're having a great weekend. I've personally been spending my weekend pulling out my hair writing solidity code that can interface with 0x Protocol to do price discovery. If anyone has any advice, would be much appreciated. Here's a full breakdown of the problem if you feel charitable and brilliant today https://gitcoin.co/issue/ProofSuite/OrFeedSmartContracts/10/3748 . There's a bounty too if you're no feeling charitable, but capitalistic and brilliant.
And now I'll go back to being disappointed and sad, especially as one of the many issues surrounding this seems to come from the fact that you can return structs in solidity, but clients that you might test a contracts response on (Etherscan contract reader etc) can't support that because web3 doesn't support that, giving weird tuples dont work response... or something like that.
Neil Duffy
@skiv71
gitcoin is all about the bounty, now? prob why you're doing it :smile:
matrixbot
@matrixbot
aliatiia Does the EVM have access to something like TOTAL_GAS_CONSUMED and TOTAL_WEI_SPENT (on gas) of a previous block ?
aliatiia (haven't found anything in the solidity docs but I am asking here to make sure I didn't just miss it)
Lauri Peltonen
@microbecode
EVM doesn't understand anything about different blocks as such
all it cares about is processing a transaction and other managerial duties such as consensus
so I don't think you have any visibility to anything outside your current transaction scope
at least can't think of any such data
matrixbot
@matrixbot
aliatiia Lauri Peltonen (Gitter): but it does have access to variables like previous block hash and block number etc
Lauri Peltonen
@microbecode
ah, I stand corrected, now googled for that, sorry :)
anyway, here's all of it, I guess you already went through the list: https://solidity.readthedocs.io/en/v0.5.12/units-and-global-variables.html#special-variables-and-functions
matrixbot
@matrixbot
aliatiia thanks yup I saw that, just asking here to make sure I haven't missed it (im still relatively new to solidity)
matrixbot
@matrixbot
aliatiia * thanks yup I saw that, just asking here to make sure I haven't missed anything (im still relatively new to solidity)
mikedeshazer
@mikedeshazer
@skiv71 yeah I posted the bounty to get help solving the problem
According to this thread, https://ethereum.stackexchange.com/questions/36229/invalid-solidity-type-tuple, the new web3 supports tuple responses from smart contract. Not sure why Etherscan has not integrated it... Any one have suggestions on a better smart contract interface (GUI) that uses the latest. Remix is good for contracts you're writing, but I mean for other's contracts/reading/writing to them?
Syahmi
@syahmikml_twitter
 constructor(uint _totSupply, string memory _tokenName, string memory _tokenSymbol, string memory _voteName, string memory _voteDesc, uint _startDate, uint _endDate, bytes32[] memory _nameOption, bytes32[] memory _descOption
      ) public {

        owner = msg.sender;
        totalSupply = _totSupply * 10 ** uint(0);
        balances[owner] = totalSupply;
        tokenName = _tokenName;
        tokenSymbol = _tokenSymbol;
        vote.voteName = _voteName;
        vote.voteDesc = _voteDesc;
        vote.startDate = _startDate;
        vote.endDate = _endDate;
do you have any idea how to pass value by bytes32 in array?
from constructor of course
mikedeshazer
@mikedeshazer
@syahmikml_twitter you pass bytes in an array the same way you pass in addresses in an array... [0x000123ab, 0x000456cd]
Neil Duffy
@skiv71
I have a specific workflow for the dapp we have
and i prefer ethers
but i have a wrapper, which makes contract deployment and interaction easier
matrixbot
@matrixbot
Steven Y hello
Gaurav
@buddies2705
anyone building cool new project? Ping me
Muhammed Hafil
@hafizc007_twitter
is there any way to hold a transaction till a certain condition is met?
Ethereum alarm clock is based on time checking, right?
Lauri Peltonen
@microbecode
basically not without an external service
you can't "hold" transactions which are sent to the blockchain
Muhammed Hafil
@hafizc007_twitter
@microbecode what are the external services available?
is it possible to wait a smart contract till a condition is met?
  1. user initiates the transaction
  2. smart contract execution waits till a smart contract value condition checking is met
matrixbot
@matrixbot
Knuckle Noise Hello everyone, do any of you know of a list of blockchain projects that use Solidity? I don't mean tokens like BAT or ENJ, etc. but blockchains where you can create smart contracts with Solidity. Like Ethereum, Tron, ThunderCore, etc. Are there more projects in this direction?
Lauri Peltonen
@microbecode
smart contract execution can never wait, there is no such possibility. so basically you can use something external, alarm clock is one possibility
Péter Szilágyi
@karalabe
Hey all, am currently debugging some peculiarity in Solidity contract deploys
Wondering what the purpose of that SLOAD at the 6th instruction is?
[We're trying to optimize state accesses for Geth, and this SLOAD really bothers me as it skews my metrics, trying to figure out what it is]
chriseth
@chriseth
@karalabe do you have the source?
@karalabe ah! Yeah, this is gavin's great suggestion to pack multiple elements in a single storage slot to save gas
so you of course have to first read the slot and then or the new stuff in
the problem is that it is rather tricky to determine if there actually is anything else in the slot or not
chriseth
@chriseth
actually I think the most important and dangerous part here is conract upgrades:
contract Version1 {
  address owner;
}
contract Version2 {
  address owner;
  bool disabled;
}
If we enable this optimization, then code that works on version 1 might just use a plain sstore, while code working on version2 needs sload+sstore.
Of course, if all the code is updated in one run, then this is fine, but I'm still not very sure we should do this.
chriseth
@chriseth
Péter Szilágyi
@karalabe
I was hoping that it's a fluke that we can get rid of (accessing a slot uselessly). Unfortunately SSTORE still needs to SLOAD internally to figure out the correct gas cost (zero or non zero), so it doesn't help me optimize access patterns
xxs
@xxs-Heung
hey, any guy knows when will the solidity0.6.0 release? thanks.
chriseth
@chriseth
@xxs-Heung any time now
@xxs-Heung did you try any of the nightly development builds?
Aveesh Shetty
@Aveesh52
Hey
Can you anyone help ?
I have a doubt