MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / new

Method new

fendermint/eth/api/src/state.rs:77–103  ·  view source on GitHub ↗
(
        client: C,
        filter_timeout: Duration,
        cache_capacity: usize,
        max_nonce_gap: Nonce,
        gas_opt: GasOpt,
    )

Source from the content-addressed store, hash-verified

75 C: Client + Send + Sync + Clone,
76{
77 pub fn new(
78 client: C,
79 filter_timeout: Duration,
80 cache_capacity: usize,
81 max_nonce_gap: Nonce,
82 gas_opt: GasOpt,
83 ) -> Self {
84 let client = FendermintClient::new(client);
85 let addr_cache = AddressCache::new(client.clone(), cache_capacity);
86 let tx_cache = Cache::new_with_ttl(cache_capacity, Duration::from_secs(TX_CACHE_TTL_SECS));
87 let tx_buffer = TransactionBuffer(Cache::new_with_ttl(
88 cache_capacity,
89 Duration::from_secs(TX_CACHE_TTL_SECS),
90 ));
91 Self {
92 client,
93 addr_cache,
94 tx_cache,
95 tx_buffer,
96 filter_timeout,
97 filters: Default::default(),
98 next_web_socket_id: Default::default(),
99 web_sockets: Default::default(),
100 gas_opt,
101 max_nonce_gap,
102 }
103 }
104}
105
106impl<C> JsonRpcState<C> {

Callers

nothing calls this directly

Calls 1

TransactionBufferClass · 0.85

Tested by

no test coverage detected