diff --git a/crates/build/templates/new/_Cargo.toml b/crates/build/templates/new/_Cargo.toml index 295c46171..e69d3c89d 100644 --- a/crates/build/templates/new/_Cargo.toml +++ b/crates/build/templates/new/_Cargo.toml @@ -5,7 +5,8 @@ authors = ["[your_name] <[your_email]>"] edition = "2021" [dependencies] -ink = { version = "5.0.0", default-features = false } +ink = { git = "https://github.com/r0gue-io/ink", branch = "sub0", default-features = false } +polkavm-derive = "0.11.0" [dev-dependencies] ink_e2e = { version = "5.0.0" } diff --git a/crates/build/templates/new/lib.rs b/crates/build/templates/new/lib.rs index 039340ee0..5ed596260 100644 --- a/crates/build/templates/new/lib.rs +++ b/crates/build/templates/new/lib.rs @@ -15,6 +15,7 @@ mod {{name}} { impl {{camel_name}} { /// Constructor that initializes the `bool` value to the given `init_value`. #[ink(constructor)] + #[ink(payable)] pub fn new(init_value: bool) -> Self { Self { value: init_value } } @@ -31,12 +32,14 @@ mod {{name}} { /// This one flips the value of the stored `bool` from `true` /// to `false` and vice versa. #[ink(message)] + #[ink(payable)] pub fn flip(&mut self) { self.value = !self.value; } /// Simply returns the current value of our `bool`. #[ink(message)] + #[ink(payable)] pub fn get(&self) -> bool { self.value }