Questions tagged [contract-development]

Questions regarding the development of smart contracts

Questions regarding the development of smart contracts

Smart contracts are computerized self-enforceable, trustless pieces of code. Smart contracts are applications that run exactly as programmed without any possibility of downtime, censorship, fraud, or third party interference.

4702 questions
7
votes
4 answers

How to airdrop tokens to multiple addresses in one transaction

I am trying to host an airdrop but sending the tokens individually to thousands of people would take forever. Is there a way to do it in one transaction with multiple recipients. If so, could you please provide me with some code. Thanks
Dylan
  • 71
  • 1
  • 2
7
votes
1 answer

Is there a dead man switch functionality in Ethereum? Say I died and I wanted to send all my coins to my children

If I died one day, would there be some type of function where I can send all my coins to another account I trusted? How would this be done? Say we had an oracle that just monitored public death records and if something matches, it would send all my…
Patoshi パトシ
  • 4,800
  • 7
  • 45
  • 93
7
votes
4 answers

Is a smart contract analogous to an OOP class?

Can I think of a smart contract as being analogous to a Class in an object-oriented programming language (e.g., Java)? Each transaction that uses the contract essentially instantiates an object of the contract (or class), and then that object…
David
  • 301
  • 2
  • 7
6
votes
1 answer

how to interact with the contract with more complex arguments(sort of a string of struct)

I want develop a contract that can be interacted from outside with a considerably complex argument(like a string of struct), but the Ethereum seems that the contracts can only be communicated with functions using simple arguments like type uint,…
Wang
  • 2,416
  • 4
  • 19
  • 28
6
votes
1 answer

Create contract using geth testnet

I have tried this code and got this error below. How to solve this? And i'm using in geth testnet console. var greeter = greeterContract.new( _greeting, { from: eth.accounts[0], data:…
5
votes
1 answer

Group sorting algorithm using max hash and quantity of accounts

Would it be possible to design an algorithm for pseudo-randomly sorting accounts into groups, by using the maximum number of accounts on Ethereum, the max value of a 256-bit number,…
Euclid
  • 51
  • 1
5
votes
4 answers

What is Etherparty?

Etherparty is a platform that removes the complexity and management of creating and executing smart contracts. What exactly does that mean, and how does that work?
q9f
  • 32,913
  • 47
  • 156
  • 395
5
votes
1 answer

Variable storage or persistency

Variables used in contracts do they get stored in Blockchain? If so does it require ether? If not how is persistent where is it stored?
Mighty Proton
  • 307
  • 2
  • 8
4
votes
2 answers

Function takes input of 400 accounts, should output 400, outputs only 399. Why?

If more than 350 accounts are sent to this group-sorting algorithm, then it begins to just loose accounts. If 400 accounts are sent in, then only 399 accounts are added to hangoutGroups[][] function commit(bytes32 POIuser) { uint groupNumber =…
4
votes
1 answer

Can I limit the amount a contract can spend of my token per day?

For some reason, I'd like to create a kind of token which is limiting the amount someone can send daily (calendar day in a particular country) to others. The reference time should be the time of the request for the movement. I guess it may work…
4
votes
1 answer

How to delete or bug fix smart contracts

If I plan to have a develop on DApp, how can I retain control over it. Either for doing further enhancements or bug fixes. Can I able to delete any abandoned contracts?
eth.dev
  • 239
  • 2
  • 12
4
votes
2 answers

how smart contract work, does every peer has same copy of smarcontract?

If yes then how smart contract interact with each other in network? Actually I was facing issue with understanding contract interaction
khetesh
  • 41
  • 1
4
votes
2 answers

Smart contract for company stock

I'm new to Ethereum and would like to make a company stock contract. shareholders would vote on company policies dividend can be distributed to shareholders and the shareholders can vote on a stock split or reverse split. I have been reading all the…
3
votes
1 answer

Unable to deposit ETH to simplest-possible contract

contract MyContract{ } With Ethereum-wallet on the Morden testnet, if I try to send or deposit ETH, it gives an exception. In browser-solidity, if I call the fallback function with msg.value = 10, it also throws an exception.
vera34
  • 157
  • 1
  • 1
  • 3
3
votes
1 answer

Function with 3 return values returning zeros, but was working fine for 2 return values

I have this sample contract that I am trying to run. The function getvalues returns me correct values set earlier, when the setvalues function was written to set 2 values. when i modified the contract to set & return 3 values instead of 2, contract…
eNVy
  • 45
  • 5
1
2 3
13 14