Bitcoin Forum
May 03, 2024, 01:02:02 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Can we write a solidity smart contract which automatically distributes tokens to  (Read 347 times)
Bitcoinmeetups.org (OP)
Hero Member
*****
Offline Offline

Activity: 976
Merit: 1002


Bitcoinmeetups.org


View Profile WWW
October 19, 2017, 03:05:27 AM
 #1

Can we write a solidity smart contract which automatically distributes tokens to anyone that sends ETH or other useful tokens to the contract?

Hello,

I have an idea about a smart contract.

If a user sends ETH or another valid token to the contract it automatically sends a corresponding amount of tokens back to the sender.

I have started an empty .sol git file below and you can edit it if you know how to write this.

https://github.com/bitcoinmeetups/bitcoinmeetups.github.com/edit/master/token-dispatch.sol

Bmeet

http://bitcoinmeetups.org

Bitcoinmeetups.org: Writing, Blockchain and AI Project Development.
Telegram: Apply to join us here: https://t.me/joinchat/KU7ltBBaG59499AJ0Az4nw
Web: http://www.bitcoinmeetups.org
"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714698122
Hero Member
*
Offline Offline

Posts: 1714698122

View Profile Personal Message (Offline)

Ignore
1714698122
Reply with quote  #2

1714698122
Report to moderator
1714698122
Hero Member
*
Offline Offline

Posts: 1714698122

View Profile Personal Message (Offline)

Ignore
1714698122
Reply with quote  #2

1714698122
Report to moderator
1714698122
Hero Member
*
Offline Offline

Posts: 1714698122

View Profile Personal Message (Offline)

Ignore
1714698122
Reply with quote  #2

1714698122
Report to moderator
Bit_Happy
Legendary
*
Offline Offline

Activity: 2100
Merit: 1040


A Great Time to Start Something!


View Profile
October 19, 2017, 07:41:11 AM
Last edit: October 23, 2017, 04:45:31 PM by Bit_Happy
 #2

The main question: Answer == 99.999% = Yes
Smart contracts are powerful and I am eager/hungry to learn more.

During initial "talks" with a "hopefully qualified individual", he repeatedly answered like this:
(For example)    {My question regarding smart contract "extra options / special features, etc"} >  "I ask: Is this possible, and is it easy for the general public" >> At least 3 times he would answer { Difficult with a simple wallet & easy with dApp }

Having no idea what he was talking about, I wanted to learn, and here is a great start:

Quote
DApp is an abbreviated form for decentralized application.

A DApp has its backend code running on a decentralized peer-to-peer network. Contrast this with an app where the backend code is running on centralized servers.

A DApp can have frontend code and user interfaces written in any language (just like an app) that can make calls to its backend. Furthermore, its frontend can be hosted on decentralized storage such as Swarm or IPFS.

If an app=frontend+server, since Ethereum contracts are code that runs on the global Ethereum decentralized peer-to-peer network, then: ....

https://ethereum.stackexchange.com/questions/383/what-is-a-dapp


Bitcoinmeetups.org (OP)
Hero Member
*****
Offline Offline

Activity: 976
Merit: 1002


Bitcoinmeetups.org


View Profile WWW
October 21, 2017, 04:24:15 AM
 #3

It's nice that you are replying but this is a thread about writing a specific smart contract together.

Bitcoinmeetups.org: Writing, Blockchain and AI Project Development.
Telegram: Apply to join us here: https://t.me/joinchat/KU7ltBBaG59499AJ0Az4nw
Web: http://www.bitcoinmeetups.org
Cryptoland
Full Member
***
Offline Offline

Activity: 198
Merit: 100


View Profile
November 17, 2017, 09:35:51 PM
 #4

Yes you can, but why would you when projects like Crowd Machine will do all of that for you with out the fee.  They create decentralized apps and smart contracts without code  https://bitcointalk.org/index.php?topic=2398960.new#new
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!