Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
ink
Commits
c7411dac
Unverified
Commit
c7411dac
authored
Nov 09, 2019
by
Hero Bird
Committed by
GitHub
Nov 09, 2019
Browse files
[cli] fix bugs in the template (#224)
parent
098b5a4d
Pipeline
#56400
failed with stages
in 25 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cli/template/.ink/abi_gen/Cargo.toml
View file @
c7411dac
...
...
@@ -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"
cli/template/Cargo.toml
View file @
c7411dac
[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"
,
...
...
cli/template/lib.rs
View file @
c7411dac
...
...
@@ -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
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment