Resources for Rust secret contracts


#1

Hi,

Are there any recommended resources that would help me prepare to write secret contracts in Rust for the upcoming Discovery testnet? I’ve been looking through the Oasis Labs guide to get an idea of what it may look like (mainly the “Defining Contract Methods and State” section). I was wondering if the general approach to writing secret contracts for Enigma would be similar.


#2

Hey @crypto_mentions – thanks for the question. We will definitely release with enough dev resources so people understand what’s new for secret contracts / rust. We’re also planning to have some examples that compare a sample contract (say the millionaire’s problem) as it is written for MVT, and how it will be written for Discovery. Hopefully that will be a good jumping off point for people, but if you do find additional resources for rust-contracts I’d be happy to take a look. We may want to include a list of helpful resources in documentation as well.


#3

One tool shared by our dev team that can be helpful w/ Rust: https://play.rust-lang.org/


#4

Ainsley,

Thanks for the link! I’m looking forward to the release documentation, what you’ve described sounds like a good starting point.

I’m new to Rust, so I’ve been reading the book, mainly to learn about ownership and traits. Other than the Oasis tutorials, I have also been looking into pwasm-ethereum and its tutorial, though I have no idea if Enigma is planning to use a similar library for interacting with Ethereum primitives in Rust.


#5

Awesome-- I know the Rust book is also what our team used to get up to speed. If you want, you can fill out our developer interest form. We’ll use this as a way to get feedback about our documentation-- you’ll be able to get an early look, and we’ll benefit from your feedback!


#6

I appreciate the heads up, I’ll definitely fill that out!


#7

hey @crypto_mentions – as promised, our first getting-started guide!
This is only about how to create the millionaire’s problem using Rust-- not about how to create a secret contract with Enigma-specific functionality (coming soon!).

https://forum.enigma.co/t/getting-started-with-discovery-the-rust-programming-language/651/2


#8

Ainsley, thank you for the link! I missed this and I can’t wait to go through it properly. You guys are doing an awesome job with the guides, I didn’t expect to find so much helpful information about writing Rust in general.