Commit 3a23ff08 authored by Robin Freyler's avatar Robin Freyler

[cli] fix bugs in the template

parent 098b5a4d
Pipeline #56360 failed with stages
in 1 minute and 13 seconds
......@@ -11,6 +11,6 @@ path = "main.rs"
[dependencies]
contract = { path = "../..", package = "{{name}}", default-features = false, features = ["ink-generate-abi"] }
ink_lang2 = { path = "../../../../../lang2", default-features = false, features = ["ink-generate-abi"] }
ink_lang2 = { git = "https://github.com/paritytech/ink", package = "ink_lang2", default-features = false, features = ["ink-generate-abi"] }
serde = "1.0"
serde_json = "1.0"
[package]
name = {{name}}
name = "{{name}}"
version = "0.1.0"
authors = ["[your_name] <[your_email]>"]
edition = "2018"
[dependencies]
ink_abi = { path = "../../../abi", default-features = false, features = ["derive"], optional = true }
ink_core = { path = "../../../core", default-features = false }
ink_lang2 = { path = "../../../lang2", default-features = false }
ink_abi = { git = "https://github.com/paritytech/ink", package = "ink_abi", default-features = false, features = ["derive"], optional = true }
ink_core = { git = "https://github.com/paritytech/ink", package = "ink_core", default-features = false }
ink_lang2 = { git = "https://github.com/paritytech/ink", package = "ink_lang2", default-features = false }
scale = { package = "parity-scale-codec", version = "1.0", default-features = false, features = ["derive"] }
type-metadata = { git = "https://github.com/type-metadata/type-metadata.git", default-features = false, features = ["derive"], optional = true }
[lib]
name = {{name}}
name = "{{name}}"
path = "lib.rs"
crate-type = [
# Used for normal contract Wasm blobs.
"cdylib",
......
......@@ -56,10 +56,10 @@ mod {{name}} {
/// We test if the default constructor does its job.
#[test]
fn default_works() {
/// Note that even though we defined our `#[ink(constructor)]`
/// above as `&mut self` functions that return nothing we can call
/// them in test code as if they were normal Rust constructors
/// that take no `self` argument but return `Self`.
// Note that even though we defined our `#[ink(constructor)]`
// above as `&mut self` functions that return nothing we can call
// them in test code as if they were normal Rust constructors
// that take no `self` argument but return `Self`.
let {{name}} = {{camel_name}}::default();
assert_eq!({{name}}.get(), false);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment