You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(alternatively, maybe we could force them to annotate lib.rs with #![contract]. Then we could do something like add a #![contract(bindings_struct = StructName)] where StructName is simply a syn::Ident.
With this we could use cfg directives to specify the #![crate_type = "cdylib"] or #![crate_type = "lib"] depending on whether we're compiling with the bindings feature (the latter for bindings).
Then we could store that struct name in global-state inside sdk-macros and write multiple impl blocks such that using the bindings as a dependency would look something like this (constructor arguments subject to change):
use counter::Counter;let counter = Counter::new(address, external_call_context);let val = counter.inc(alice);
The text was updated successfully, but these errors were encountered:
(alternatively, maybe we could force them to annotate
lib.rs
with#![contract]
. Then we could do something like add a#![contract(bindings_struct = StructName)]
whereStructName
is simply asyn::Ident
.With this we could use
cfg
directives to specify the#![crate_type = "cdylib"]
or#![crate_type = "lib"]
depending on whether we're compiling with the bindings feature (the latter for bindings).Then we could store that struct name in global-state inside
sdk-macros
and write multipleimpl
blocks such that using the bindings as a dependency would look something like this (constructor arguments subject to change):The text was updated successfully, but these errors were encountered: