Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
I
ink
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
parity
ink
Commits
c7411dac
Unverified
Commit
c7411dac
authored
Nov 09, 2019
by
Hero Bird
Committed by
GitHub
Nov 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[cli] fix bugs in the template (#224)
parent
098b5a4d
Pipeline
#56400
failed with stages
in 25 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
cli/template/.ink/abi_gen/Cargo.toml
cli/template/.ink/abi_gen/Cargo.toml
+1
-1
cli/template/Cargo.toml
cli/template/Cargo.toml
+6
-5
cli/template/lib.rs
cli/template/lib.rs
+4
-4
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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