These are chat archives for ethereum/tutorials

10th
Jun 2017
xch0911
@xch0911
Jun 10 2017 02:52
@pirapira I don't unerstand "danger that someone controlling 50%+1 of all the tokens ".Why?-------https://www.ethereum.org/crowdsale-----I have 100 gadgets. Why not sell them all?
icotrader
@icotrader
Jun 10 2017 18:09

hey guys, got some noobish questions about smart contracts.

i basically want to create a smart contract to accept ether, and once it receives a certain amount of either, fires off an action. is this possible?

from within a smart contract that has been deployed, does it have access to things like current date/time?
icotrader
@icotrader
Jun 10 2017 18:22
or the specific block number at any point in time?
Philippe Castonguay
@PhABC
Jun 10 2017 20:41
Yes
You would need to create a variable that counts the number of either
and make an assert function for a given condition with a call to another if condition is met
Perhaps not assert, but something similar (could just be an if statement)
block.number is a global variable saying what is the current block number
you can find more global variables that you might find useful here ; http://solidity.readthedocs.io/en/develop/units-and-global-variables.html