I am trying to couple substrate node-template to frame support in order to use trait currency. Link to github link
Error -
error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/data/substrate-node-template/runtime)`
Caused by:
process didn't exit successfully: `/data/substrate-node-template/target/release/build/node-template-runtime-55554732df6f82a1/build-script-build` (exit status: 1)
--- stdout
Information that should be included in a bug report.
Executing build command: "rustup" "run" "nightly" "cargo" "rustc" "--target=wasm32-unknown-unknown" "--manifest-path=/data/substrate-node-template/target/release/wbuild/node-template-runtime/Cargo.toml" "--color=always" "--profile" "release"
Using rustc version: rustc 1.65.0-nightly (02654a084 2022-08-30)
--- stderr
Compiling node-template-runtime v4.0.0-dev (/data/substrate-node-template/runtime)
warning: unused import: `frame_support::traits::Currency`
--> /data/substrate-node-template/runtime/src/lib.rs:9:5
|
9 | use frame_support::traits::Currency;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error[E0277]: the trait bound `u128: Currency<AccountId32>` is not satisfied
--> /data/substrate-node-template/runtime/src/lib.rs:272:19
|
272 | type Currency = Balance;
| ^^^^^^^ the trait `Currency<AccountId32>` is not implemented for `u128`
|
= help: the trait `Currency<<T as frame_system::Config>::AccountId>` is implemented for `pallet_balances::Pallet<T, I>`
note: required by a bound in `pallet_template::Config::Currency`
--> /data/substrate-node-template/pallets/template/src/lib.rs:36:18
|
36 | type Currency: Currency<Self::AccountId>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `pallet_template::Config::Currency`
For more information about this error, try `rustc --explain E0277`.
warning: `node-template-runtime` (lib) generated 1 warning
error: could not compile `node-template-runtime` due to previous error; 1 warning
emittedenter code here