New answers tagged

0 votes

Converting between Alloy Primitive and Storage Types

You would use from() or into(). The SDK uses Alloy's primitives behind the scenes. That being said, it's rare that you have to do this conversion yourself, because the Stylus team has made sure that ...
alexfertel's user avatar
0 votes
Accepted

Where is the constructor of a stylus contract defined?

There is currently no support for constructors in Stylus. The suggested approach is to call an init function after deployment.
alexfertel's user avatar
0 votes
Accepted

Why do I use extern crate for alloc instead of `use std::alloc`?

In Edition 2015 of Rust, extern crate was used to import crates. However, that is no longer necessary. The "sysroot" crates are an exception though, and alloc is one of them. That is why you ...
alexfertel's user avatar

Top 50 recent answers are included