Skip to content

Commit ce7212a

Browse files
committed
chore: remove HasIBC2EntryPoints
1 parent 14287eb commit ce7212a

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

packages/vm/src/cache.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use crate::instance::{Instance, InstanceOptions};
1919
use crate::modules::{CachedModule, FileSystemCache, InMemoryCache, PinnedMemoryCache};
2020
use crate::parsed_wasm::ParsedWasm;
2121
use crate::size::Size;
22-
use crate::static_analysis::{Entrypoint, ExportInfo, REQUIRED_IBC2_EXPORT, REQUIRED_IBC_EXPORTS};
22+
use crate::static_analysis::{Entrypoint, ExportInfo, REQUIRED_IBC_EXPORTS};
2323
use crate::wasm_backend::{compile, make_compiling_engine};
2424

2525
const STATE_DIR: &str = "state";
@@ -100,9 +100,6 @@ pub struct AnalysisReport {
100100
/// `true` if and only if all [`REQUIRED_IBC_EXPORTS`] exist as exported functions.
101101
/// This does not guarantee they are functional or even have the correct signatures.
102102
pub has_ibc_entry_points: bool,
103-
/// `true` if and only if all [`REQUIRED_IBC2_EXPORT`] exist as exported functions.
104-
/// This does not guarantee they are functional or even have the correct signatures.
105-
pub has_ibc2_entry_points: bool,
106103
/// A set of all entrypoints that are exported by the contract.
107104
pub entrypoints: BTreeSet<Entrypoint>,
108105
/// The set of capabilities the contract requires.
@@ -340,9 +337,6 @@ where
340337
has_ibc_entry_points: REQUIRED_IBC_EXPORTS
341338
.iter()
342339
.all(|required| exports.contains(required.as_ref())),
343-
has_ibc2_entry_points: REQUIRED_IBC2_EXPORT
344-
.iter()
345-
.all(|required| exports.contains(required.as_ref())),
346340
entrypoints,
347341
required_capabilities: required_capabilities_from_module(&module)
348342
.into_iter()
@@ -1473,7 +1467,6 @@ mod tests {
14731467
report1,
14741468
AnalysisReport {
14751469
has_ibc_entry_points: false,
1476-
has_ibc2_entry_points: false,
14771470
entrypoints: BTreeSet::from([
14781471
E::Instantiate,
14791472
E::Migrate,
@@ -1504,7 +1497,6 @@ mod tests {
15041497
report2,
15051498
AnalysisReport {
15061499
has_ibc_entry_points: true,
1507-
has_ibc2_entry_points: false,
15081500
entrypoints: ibc_contract_entrypoints,
15091501
required_capabilities: BTreeSet::from_iter([
15101502
"cosmwasm_1_1".to_string(),
@@ -1528,7 +1520,6 @@ mod tests {
15281520
report3,
15291521
AnalysisReport {
15301522
has_ibc_entry_points: false,
1531-
has_ibc2_entry_points: false,
15321523
entrypoints: BTreeSet::new(),
15331524
required_capabilities: BTreeSet::from(["iterator".to_string()]),
15341525
contract_migrate_version: None,
@@ -1548,7 +1539,6 @@ mod tests {
15481539
report4,
15491540
AnalysisReport {
15501541
has_ibc_entry_points: false,
1551-
has_ibc2_entry_points: false,
15521542
entrypoints: BTreeSet::new(),
15531543
required_capabilities: BTreeSet::from(["iterator".to_string()]),
15541544
contract_migrate_version: Some(21),
@@ -1559,13 +1549,11 @@ mod tests {
15591549
unsafe { Cache::new(make_ibc2_testing_options()).unwrap() };
15601550
let checksum5 = cache.store_code(IBC2, true, true).unwrap();
15611551
let report5 = cache.analyze(&checksum5).unwrap();
1562-
let mut ibc2_contract_entrypoints = BTreeSet::from([E::Instantiate, E::Query]);
1563-
ibc2_contract_entrypoints.extend(REQUIRED_IBC2_EXPORT);
1552+
let ibc2_contract_entrypoints = BTreeSet::from([E::Instantiate, E::Query, E::Ibc2PacketReceive, E::Ibc2PacketTimeout]);
15641553
assert_eq!(
15651554
report5,
15661555
AnalysisReport {
15671556
has_ibc_entry_points: false,
1568-
has_ibc2_entry_points: true,
15691557
entrypoints: ibc2_contract_entrypoints,
15701558
required_capabilities: BTreeSet::from_iter([
15711559
"iterator".to_string(),

packages/vm/src/static_analysis.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ pub const REQUIRED_IBC_EXPORTS: &[Entrypoint] = &[
6464
Entrypoint::IbcPacketTimeout,
6565
];
6666

67-
pub const REQUIRED_IBC2_EXPORT: &[Entrypoint] =
68-
&[Entrypoint::Ibc2PacketReceive, Entrypoint::Ibc2PacketTimeout];
69-
7067
/// A trait that allows accessing shared functionality of `parity_wasm::elements::Module`
7168
/// and `wasmer::Module` in a shared fashion.
7269
pub trait ExportInfo {

0 commit comments

Comments
 (0)