Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I write smart contracts of ethereum in C#

I am a C# developer but want to explore blockchain especially ethereum.

Is it possible to write ethereum smart contracts in C#

How would I get started on it? I also explored pluralsight but nothing has been suggested on it. Any pointers are helpful

like image 664
Tim Liberty Avatar asked Dec 10 '25 12:12

Tim Liberty


2 Answers

According to this ethereum.stackexchange.com answer, there are only three official languages to write smart contracts in. Solidity, Serpent and LLL(Lisp Like Language)

However, here is a an open source project to allow developers to build smart contrats in C#, EthSharp

And here is a Medium article discussing EthSharp, Ethereum Smart Contracts in C# - Introducing EthSharp

I went back and noticed that this project is deprecated

Here is a .NET library to interact with Ethereum blockchain, however I do not believe you can write smart contracts in C# using this library, Nethereum

Otherwise, Solidity seems to be the most popular language to write smart contracts in.

like image 133
DFord Avatar answered Dec 12 '25 02:12

DFord


If you are looking for Smart contracts in C#, Stratis is doing a great job of that so far. I have written a couple and tested on their test net.

They have documentation for their first example, an auction smart contract: http://stratis-smart-contracts.readthedocs.io/en/latest/

And the Stratis Development foundation has some walk-throughs to help get you going: http://stratisdevelopmentfoundation.com/create_sc/

Their smart contract dev sites ethereum infrastructure often. It could be what you are looking for.

like image 33
Brucester Avatar answered Dec 12 '25 04:12

Brucester