Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
85333ff
JetBrains IDE .gitignore addition
dolled-possum Aug 18, 2025
088332f
first step of bypermap binding caching
dolled-possum Aug 21, 2025
8b6c2e5
new .wit adding binding-cacher interface
dolled-possum Aug 25, 2025
f18eb71
First inclusion in the new bindings support
dolled-possum Aug 25, 2025
6e1091e
binding-cacher supports bootstrapping
dolled-possum Aug 25, 2025
e11d17c
Format Rust code using rustfmt
github-actions[bot] Aug 25, 2025
3f69276
Merge branch 'develop' into dw/hmap-binding-cacher
dolled-possum Aug 29, 2025
131ba1f
Merge branch 'develop' into dw/hmap-binding-cacher
dolled-possum Oct 7, 2025
78a6a7e
Production addresses and starting blocks
dolled-possum Oct 8, 2025
ac36caf
Merge branch 'develop' into dw/hmap-binding-cacher
dolled-possum Oct 9, 2025
0d1ac83
skipping validation of log_cache
dolled-possum Oct 13, 2025
e95ff8d
Format Rust code using rustfmt
github-actions[bot] Oct 13, 2025
a420cc2
Merge branch 'develop' into dw/hmap-binding-cacher
dolled-possum Nov 4, 2025
9e15803
bindings.rs cleanup
dolled-possum Nov 10, 2025
491ebbd
Format Rust code using rustfmt
github-actions[bot] Nov 10, 2025
9d373bd
Initial support for tokenregistry calls
dolled-possum Nov 10, 2025
5d53f9b
Helper structs
dolled-possum Nov 10, 2025
0e41df0
Support for building transactions for writes
dolled-possum Nov 10, 2025
2e3e473
new event filters
dolled-possum Nov 10, 2025
5717ea7
tiny change in doc
dolled-possum Nov 10, 2025
8c4a427
additional support functions
dolled-possum Nov 12, 2025
009fb7b
Questionable changes to process_lib?
dolled-possum Nov 14, 2025
77e5014
Format Rust code using rustfmt
github-actions[bot] Nov 14, 2025
bd5b6b0
new duration preview function
Nov 18, 2025
a46ad34
working our way backwards computation
Nov 18, 2025
48b6715
Format Rust code using rustfmt
github-actions[bot] Nov 18, 2025
4b3e4ae
Merge branch 'develop' into dw/hmap-binding-cacher
dolled-possum Nov 21, 2025
26565b9
removing obsolete comment
dolled-possum Nov 21, 2025
b40a832
Add DAO support
dolled-possum Dec 1, 2025
f409607
Merge branch 'develop' into dw/hmap-binding-cacher
dolled-possum Dec 1, 2025
1c463af
Format Rust code using rustfmt
github-actions[bot] Dec 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
target
*.swp
.vscode
/.idea
.DS_Store
83 changes: 0 additions & 83 deletions hyperware-wit/hypermap-cacher-sys-v0.wit

This file was deleted.

162 changes: 162 additions & 0 deletions hyperware-wit/hypermap-cacher-sys-v1.wit
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
interface binding-cacher {
// Metadata associated with a batch of Ethereum logs.
record binding-logs-metadata {
chain-id: string,
from-block: string,
to-block: string,
time-created: string,
created-by: string,
signature: string,
}

// Represents an item in the manifest, detailing a single log cache file.
record binding-manifest-item {
metadata: binding-logs-metadata,
is-empty: bool,
file-hash: string,
file-name: string,
}

// The main manifest structure, listing all available log cache files.
// WIT does not support direct map types, so a list of key-value tuples is used.
record binding-manifest {
// The key is the filename of the log cache.
items: list<tuple<string, binding-manifest-item>>,
manifest-filename: string,
chain-id: string,
protocol-version: string,
}

record binding-get-logs-by-range-request {
from-block: u64,
to-block: option<u64>, // If None, signifies to the latest available/relevant cached block.
}

variant binding-get-logs-by-range-ok-response {
logs(tuple<u64, string>),
latest(u64),
}

// Defines the types of requests that can be sent to the Hypermap Cacher process.
variant binding-cacher-request {
get-manifest,
get-log-cache-content(string),
get-status,
get-logs-by-range(binding-get-logs-by-range-request),
reset(option<list<string>>),
start-providing,
stop-providing,
set-nodes(list<string>),
}

// Represents the operational status of the cacher.
record binding-cacher-status {
last-cached-block: u64,
chain-id: string,
protocol-version: string,
next-cache-attempt-in-seconds: option<u64>,
manifest-filename: string,
log-files-count: u32,
our-address: string,
is-providing: bool,
}

// Defines the types of responses the Hypermap Cacher process can send.
variant binding-cacher-response {
get-manifest(option<binding-manifest>),
get-log-cache-content(result<option<string>, string>),
get-status(binding-cacher-status),
get-logs-by-range(result<binding-get-logs-by-range-ok-response, string>),
start-providing(result<string, string>),
stop-providing(result<string, string>),
set-nodes(result<string, string>),
reset(result<string, string>),
rejected,
is-starting,
}
}

interface hypermap-cacher {
// Metadata associated with a batch of Ethereum logs.
record logs-metadata {
chain-id: string,
from-block: string,
to-block: string,
time-created: string,
created-by: string,
signature: string,
}

// Represents an item in the manifest, detailing a single log cache file.
record manifest-item {
metadata: logs-metadata,
is-empty: bool,
file-hash: string,
file-name: string,
}

// The main manifest structure, listing all available log cache files.
// WIT does not support direct map types, so a list of key-value tuples is used.
record manifest {
// The key is the filename of the log cache.
items: list<tuple<string, manifest-item>>,
manifest-filename: string,
chain-id: string,
protocol-version: string,
}

record get-logs-by-range-request {
from-block: u64,
to-block: option<u64>, // If None, signifies to the latest available/relevant cached block.
}

variant get-logs-by-range-ok-response {
logs(tuple<u64, string>),
latest(u64),
}

// Defines the types of requests that can be sent to the Hypermap Cacher process.
variant cacher-request {
get-manifest,
get-log-cache-content(string),
get-status,
get-logs-by-range(get-logs-by-range-request),
reset(option<list<string>>),
start-providing,
stop-providing,
set-nodes(list<string>),
}

// Represents the operational status of the cacher.
record cacher-status {
last-cached-block: u64,
chain-id: string,
protocol-version: string,
next-cache-attempt-in-seconds: option<u64>,
manifest-filename: string,
log-files-count: u32,
our-address: string,
is-providing: bool,
}

// Defines the types of responses the Hypermap Cacher process can send.
variant cacher-response {
get-manifest(option<manifest>),
get-log-cache-content(result<option<string>, string>),
get-status(cacher-status),
get-logs-by-range(result<get-logs-by-range-ok-response, string>),
start-providing(result<string, string>),
stop-providing(result<string, string>),
set-nodes(result<string, string>),
reset(result<string, string>),
rejected,
is-starting,
}
}

world hypermap-cacher-sys-v1 {
import sign;
import binding-cacher;
import hypermap-cacher;
include process-v1;
}
2 changes: 2 additions & 0 deletions src/bindings.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// Hypermap binding deployment address on base
pub const HYPERMAP_BINDING_ADDRESS: &'static str = "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318";
2 changes: 1 addition & 1 deletion src/hypermap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use std::str::FromStr;

/// hypermap deployment address on base
pub const HYPERMAP_ADDRESS: &'static str = "0x000000000044C6B8Cb4d8f0F889a3E47664EAeda";
/// base chain id

#[cfg(not(feature = "simulation-mode"))]
pub const HYPERMAP_CHAIN_ID: u64 = 8453; // base
#[cfg(feature = "simulation-mode")]
Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ wit_bindgen::generate!({
generate_unused_types: true,
});

/// Interact with the tokenregistry contract data
pub mod bindings;
/// Currently nothing in here except for the contract address.

/// Interact with the eth provider module.
pub mod eth;
/// Your process must have the [`Capability`] to message
Expand Down Expand Up @@ -91,6 +95,7 @@ pub mod scripting;
pub mod hyperwallet_client;

mod types;

pub use types::{
address::{Address, AddressParseError},
capability::Capability,
Expand Down