From f1bd34642e15ac437e0b59af66aaa0ce29e3b1d2 Mon Sep 17 00:00:00 2001 From: bonedaddy Date: Thu, 4 Aug 2022 13:31:09 -0700 Subject: [PATCH] add missing feature flag, add withdraw_vault deprecated ix, add profile --- Cargo.lock | 2 +- Cargo.toml | 6 +++++- db/Cargo.toml | 2 +- db/src/lib.rs | 5 +++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dd2dcdf..1e08cb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -153,7 +153,7 @@ dependencies = [ [[package]] name = "sighashdb" -version = "0.1.35" +version = "0.1.36" dependencies = [ "data-encoding", "hex", diff --git a/Cargo.toml b/Cargo.toml index 6810f40..89439d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,4 +2,8 @@ members = [ "cli", "db" -] \ No newline at end of file +] +[profile.release] +opt-level = 3 +incremental = false +codegen-units = 1 \ No newline at end of file diff --git a/db/Cargo.toml b/db/Cargo.toml index 943fc4b..0fa1115 100644 --- a/db/Cargo.toml +++ b/db/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sighashdb" -version = "0.1.35" +version = "0.1.36" edition = "2021" authors = ["Tulip Protocol"] description = "sighashdb is a collection of anchor instruction sighashes commonly seen acrossa variety of anchor based programs" diff --git a/db/src/lib.rs b/db/src/lib.rs index b254d34..5f43b30 100644 --- a/db/src/lib.rs +++ b/db/src/lib.rs @@ -319,6 +319,7 @@ impl GlobalSighashDB { } /// looks up the corresponding instruction sighash for the given instruction name /// using the anchor v6 for backwards compatability + #[cfg(feature = "reverse-get")] #[inline(always)] pub fn get_deprecated(&self, val: &str) -> Option<[u8; 8]> { match val { @@ -343,7 +344,7 @@ impl GlobalSighashDB { "close_position_info_account" => Some([44, 205, 56, 239, 135, 45, 94, 116]), "create_user_farm" => Some([229, 49, 30, 92, 43, 69, 49, 220]), "set_price_extra" => Some([209, 65, 58, 32, 52, 135, 176, 148]), - + "withdraw_vault" => Some([89, 194, 163, 143, 0, 167, 190, 12]), _ => None, } } @@ -384,7 +385,7 @@ impl GlobalSighashDB { [44, 205, 56, 239, 135, 45, 94, 116] => Some("close_position_info_account".to_string()), [229, 49, 30, 92, 43, 69, 49, 220] => Some("create_user_farm".to_string()), [209, 65, 58, 32, 52, 135, 176, 148] => Some("set_price_extra".to_string()), - + [89, 194, 163, 143, 0, 167, 190, 12] => Some("withdraw_vault".to_string()), _ => None, } }