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
Gernot Pokorny
@gernotpokorny
On the blockchain contracts are stored as binary code?
Manish Ranjan
@bit-warrior
@gernotpokorny I have not seen anywhere in Ethereum specification any kind of recommendation about saving data in db vs file system. As long as you comply to the data structure recommended by specification , i guess u can choose to save anywhere you like.
Gernot Pokorny
@gernotpokorny
@bit-warrior I mean how does the geth implementation store the blockchain?
Manish Ranjan
@bit-warrior
Geth uses leveldb
Parity i guess uses Rocksdb
SkyClean
@SkyClean
@bit-warrior I"m deploying contract to rospen test Net
with metamask
but the contract has some big code amount.
so gas exceed error occurred
how can I avoid this error to make smart contract @bit-warrior
?
Destinatis
@destinatis
can someone help me
i deploy a smart contract, pass an address into a constructor
and store it
then i retrieve the address and its diffferent
are we not able to pass address type to constructor or something from remix?
Fatih AltuntaƟ
@altuntasfatih
Screen Shot 2018-03-20 at 07.21.22.png
in remix,you can do it like in picture
Destinatis
@destinatis
i see i need quotes
thanks man
Gernot Pokorny
@gernotpokorny
@bit-warrior Is information about accounts like balance and nonce etc also stored in the levelDB?
vasudev
@patelvasu
"gas required exceeds allowance or always failing transaction " this error get in remix
bluemoon2014
@bluemoon2014
what happened when i user new someContract? Does this deploy a new contract?
KarzanBotani
@KarzanBotani

Hey! Has anyone used React for their project? I'm having a very simple issue which is annyoing me a bit...

I'm trying to set one of my states to web3.eth.getAccounts() at 0. But it refuses.

class UserProfile extends Component {

  state = {
    accountAddress: ''
  };

  async getAccounts() {
    const accounts = await web3.eth.getAccounts();
    this.setState({ accountAddress: accounts[0] });

    console.log(accounts);

    return {};
  }

  render() {
    return (
      <Layout>
        <h3>UserProfile</h3>

        <h5>{this.state.accountAddress}</h5>
      </Layout>
    );
  };

};

export default UserProfile;
Mateja Trifunovski
@Matko95
@botanki AFAIK state should be declared like this
constructor(props) {
    super(props)
    this.state = {
      accountAddress: ''
    }
  }
KarzanBotani
@KarzanBotani
@Matko95 thx, I solved it! :) used componentDidMount instead
Ayush Gupta
@ayushgupta0610_twitter
How can I check and execute a transaction on the basis of a date (say like Dec 31st 2020) in my smart contract. If the date does not match the required date, the transaction should throw error.
Daniel
@DanielRX
Look up unix ts @ayushgupta0610_twitter
Then compare now to something in that form
Ayush Gupta
@ayushgupta0610_twitter
How exactly should I play with dates in my smart contract (being the right question)?
Daniel
@DanielRX
Using unix timestamps IMO
If now > 1521545800+ 1*days
(hint, the documentation tells you all of this)
Ayush Gupta
@ayushgupta0610_twitter
Cool, thanks @DanielRX !
conan789123
@conan789123
Cool.
billy rennekamp
@okwme
anyone know why the open-zeppelin ERC721 mock contract repeats the constructor?
contract ERC721TokenMock is ERC721Token {
  function ERC721TokenMock() ERC721Token() public { }
i thought this wasn't necessary when there's no additional parameters
Daniel
@DanielRX
@okwme It was made 2 months ago, that may be why, however it is still correct, just verbose, no?
Has anyone got extcodesize to work in their ASM?
billy rennekamp
@okwme
ok great, worried it was required and needed to construct all of my inherited, thanks for the reply @DanielRX
luisvazcarvalho
@luisvazcarvalho
Hello! I am doing a new smart contract and I have the following problem:
When a function is triggered I wan the smart contract to make a specific transaction after a few minutes, not in the moment
How can I do this?
Daniel
@DanielRX
Not possible purely on chain, you will need to monitor the contract and send a tx after a few mins
luisvazcarvalho
@luisvazcarvalho
And using an oracle will it be possible?
Daniel
@DanielRX
In theory, as I said, you could just run a node to watch the contract
tsavercool
@tsavercool
@luisvazcarvalho 1. Create a function that raises an on chain event
  1. create a watcher service that monitors for the event.
  2. read event data
  3. use service to execute second transaction at the right time
or subscribe to an Oracle service like Oraclize (sp?)
unixowl
@unixowl
it's not possible to do purely on chain. who would pay for gas if it was possible?
tsavercool
@tsavercool
it is not possible to do it on chain. remember that your transaction runs until it finishes and then is packed into the next block