From f09d00422d0ddad14b11bbe0ebd30925fcf94f61 Mon Sep 17 00:00:00 2001
From: Hugo Trentesaux <hugo@trentesaux.fr>
Date: Wed, 29 Jan 2025 00:55:12 +0100
Subject: [PATCH] do not rename codec package

---
 Cargo.toml                 | 2 +-
 src/commands/collective.rs | 2 +-
 src/main.rs                | 2 +-
 src/runtime_config.rs      | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index efb44d9..9487a8e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -27,7 +27,7 @@ sp-runtime = { git = "https://github.com/duniter/duniter-polkadot-sdk.git", bran
 # crates.io dependencies
 anyhow = "^1.0"
 clap = { version = "^4.5.19", features = ["derive"] }
-codec = { package = "parity-scale-codec", version = "^3.6.12" }
+parity-scale-codec = { version = "^3.6.12" }
 env_logger = "^0.10"
 futures = "^0.3.30"
 graphql_client = { version = "^0.13.0", features = ["reqwest-rustls"] }
diff --git a/src/commands/collective.rs b/src/commands/collective.rs
index 1481c79..2ded107 100644
--- a/src/commands/collective.rs
+++ b/src/commands/collective.rs
@@ -137,7 +137,7 @@ pub async fn technical_committee_vote(
 /// can be generated with `subxt explore` for example
 pub async fn technical_committee_propose(data: &Data, proposal: &str) -> Result<(), subxt::Error> {
 	let raw_call = hex::decode(proposal).expect("invalid hex");
-	let call = codec::decode_from_bytes(raw_call.into()).expect("invalid call");
+	let call = parity_scale_codec::decode_from_bytes(raw_call.into()).expect("invalid call");
 	let payload = runtime::tx().technical_committee().propose(5, call, 100);
 
 	submit_call_and_look_event::<
diff --git a/src/main.rs b/src/main.rs
index ba4857a..9252d09 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -10,11 +10,11 @@ mod utils;
 use anyhow::anyhow;
 use clap::builder::OsStr;
 use clap::Parser;
-use codec::Encode;
 use colored::Colorize;
 use data::*;
 use display::DisplayEvent;
 use keys::*;
+use parity_scale_codec::Encode;
 use runtime_config::*;
 use serde::{Deserialize, Serialize};
 use std::str::FromStr;
diff --git a/src/runtime_config.rs b/src/runtime_config.rs
index 2ce602d..e7b915a 100644
--- a/src/runtime_config.rs
+++ b/src/runtime_config.rs
@@ -32,7 +32,7 @@ impl subxt::config::Config for Runtime {
 }
 
 // Tip for transaction fee
-#[derive(Copy, Clone, Debug, Default, codec::Encode)]
+#[derive(Copy, Clone, Debug, Default, parity_scale_codec::Encode)]
 pub struct Tip {
 	#[codec(compact)]
 	tip: u64,
-- 
GitLab