diff --git a/.rusty-hook.toml b/.rusty-hook.toml
new file mode 100644
index 0000000000000000000000000000000000000000..36953ed9a603654f09f73df4e934ad96a81fa2ac
--- /dev/null
+++ b/.rusty-hook.toml
@@ -0,0 +1,5 @@
+[hooks]
+pre-commit = "cargo fmt -- --check"
+
+[logging]
+verbose = true
diff --git a/Cargo.lock b/Cargo.lock
index 9dab97d188e284348895e2c263aee55d758ededa..c7d6a348fbb5252a66e25980262d3e402ef0c48e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -753,6 +753,15 @@ dependencies = [
  "winapi 0.3.9",
 ]
 
+[[package]]
+name = "ci_info"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24f638c70e8c5753795cc9a8c07c44da91554a09e4cf11a7326e8161b0a3c45e"
+dependencies = [
+ "envmnt",
+]
+
 [[package]]
 name = "cid"
 version = "0.6.1"
@@ -1244,6 +1253,7 @@ dependencies = [
  "pallet-grandpa",
  "pallet-transaction-payment-rpc",
  "pallet-transaction-payment-rpc-runtime-api",
+ "rusty-hook",
  "sc-basic-authorship",
  "sc-chain-spec",
  "sc-cli",
@@ -1395,6 +1405,16 @@ version = "1.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797"
 
+[[package]]
+name = "envmnt"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2d328fc287c61314c4a61af7cfdcbd7e678e39778488c7cb13ec133ce0f4059"
+dependencies = [
+ "fsio",
+ "indexmap",
+]
+
 [[package]]
 name = "event-listener"
 version = "2.5.1"
@@ -1706,6 +1726,12 @@ dependencies = [
  "winapi 0.3.9",
 ]
 
+[[package]]
+name = "fsio"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1fd087255f739f4f1aeea69f11b72f8080e9c2e7645cd06955dad4a178a49e3"
+
 [[package]]
 name = "fuchsia-zircon"
 version = "0.3.3"
@@ -1992,6 +2018,15 @@ dependencies = [
  "version_check",
 ]
 
+[[package]]
+name = "getopts"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5"
+dependencies = [
+ "unicode-width",
+]
+
 [[package]]
 name = "getrandom"
 version = "0.1.16"
@@ -3934,6 +3969,12 @@ dependencies = [
  "winapi 0.3.9",
 ]
 
+[[package]]
+name = "nias"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab250442c86f1850815b5d268639dff018c0627022bc1940eb2d642ca1ce12f0"
+
 [[package]]
 name = "nodrop"
 version = "0.1.14"
@@ -5474,6 +5515,18 @@ dependencies = [
  "base64",
 ]
 
+[[package]]
+name = "rusty-hook"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96cee9be61be7e1cbadd851e58ed7449c29c620f00b23df937cb9cbc04ac21a3"
+dependencies = [
+ "ci_info",
+ "getopts",
+ "nias",
+ "toml",
+]
+
 [[package]]
 name = "rw-stream-sink"
 version = "0.2.1"
diff --git a/Cargo.toml b/Cargo.toml
index 21c3818fa290e6dc50929f8b079995c6dc95e46c..cc47fe186fc08d25a111bc47d2e4fd2ddff471e8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -34,6 +34,9 @@ runtime-benchmarks = [
 [build-dependencies]
 substrate-build-script-utils = { git = 'https://github.com/librelois/substrate.git', branch = 'duniter-monthly-2022-01' }
 
+[dev-dependencies]
+rusty-hook = "^0.11.2"
+
 [dependencies]
 
 # local dependencies