Bitcoin Forum
November 16, 2024, 06:52:16 AM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Escrow exhange contract for ethereum tokens  (Read 270 times)
Fundaria (OP)
Full Member
***
Offline Offline

Activity: 153
Merit: 100


Every business idea desires a chance


View Profile WWW
July 07, 2017, 08:23:58 AM
Last edit: July 07, 2017, 11:41:15 PM by Fundaria
 #1

One guy asked in Reddit about simple ethereum contract which can serve as escrow exchange for any tokens. I accepted the challange and created it in little more then in one hour.
Now everyone can use this contract to safelly escrowed sell their tokens to anyone.
Here are simple steps to sell tokens:
0) Be sure that's all OK reading source code of contract here https://etherscan.io/address/0x03a6290b5c0875313422ee003bd323979c8d1ac2#code
1) Run function approve(address _spender, uint256 _value) in the contract with your tokens setting maximum value of tokens for sale to EscrowExhange contract address
2) Run function setTokenForSale(uint course, address tokenContractAddress) in the contract 0x03a6290b5c0875313422ee003bd323979c8d1ac2 , setting the course in wei and the address of contract with your tokens. Course means the number of wei for 1 token. For example if you estimate cost of tokens 100 tokens for 1 ETHER course will be 10000000000000000 (16 zeroes) wei.
3) Send information to token buyer about your deal with your address under which your tokens are holded in tokens contract (this address is necessary information but buyer also need to know the mentioned course of course). Or post such information somewhere if you want anyone will see that you declare your tokens for sale.
4) Buyer should simply execute function buyToken(address sellerAddress) of the EscrowExhange contract mentioning your address (that exact address under which your tokens are mapped in tokens contract) abd sending ETH for desired tokens which will be transfered to token seller.
Voila!
I'm not sure if this solution is original and appeared earlier, but I did not see any relevant search result in this branch of the forum for keywords "escrow exhange token contract".

bounty · whitepaper · team · advantages · roadmap · telegram  · twitter  · facebook
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!