Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,25 +94,25 @@ incremental = false

[workspace.dependencies]
# tempo (from upstream)
tempo-alloy = { git = "https://github.com/tempoxyz/tempo", rev = "436f6cf069a0c8aafa9a3a197ffa17488b5f1e81" }
tempo-chainspec = { git = "https://github.com/tempoxyz/tempo", rev = "436f6cf069a0c8aafa9a3a197ffa17488b5f1e81", default-features = false }
tempo-consensus = { git = "https://github.com/tempoxyz/tempo", rev = "436f6cf069a0c8aafa9a3a197ffa17488b5f1e81", default-features = false }
tempo-contracts = { git = "https://github.com/tempoxyz/tempo", rev = "436f6cf069a0c8aafa9a3a197ffa17488b5f1e81", default-features = false, features = [
tempo-alloy = { git = "https://github.com/tempoxyz/tempo", rev = "f9e3bbe6e06ec31ce3bb2adaf04e7b04d565b5fd" }
tempo-chainspec = { git = "https://github.com/tempoxyz/tempo", rev = "f9e3bbe6e06ec31ce3bb2adaf04e7b04d565b5fd", default-features = false }
tempo-consensus = { git = "https://github.com/tempoxyz/tempo", rev = "f9e3bbe6e06ec31ce3bb2adaf04e7b04d565b5fd", default-features = false }
tempo-contracts = { git = "https://github.com/tempoxyz/tempo", rev = "f9e3bbe6e06ec31ce3bb2adaf04e7b04d565b5fd", default-features = false, features = [
"serde",
] }
tempo-evm = { git = "https://github.com/tempoxyz/tempo", rev = "436f6cf069a0c8aafa9a3a197ffa17488b5f1e81", default-features = false }
tempo-node = { git = "https://github.com/tempoxyz/tempo", rev = "436f6cf069a0c8aafa9a3a197ffa17488b5f1e81" }
tempo-payload-types = { git = "https://github.com/tempoxyz/tempo", rev = "436f6cf069a0c8aafa9a3a197ffa17488b5f1e81", default-features = false }
tempo-precompiles = { git = "https://github.com/tempoxyz/tempo", rev = "436f6cf069a0c8aafa9a3a197ffa17488b5f1e81", default-features = false }
tempo-precompiles-macros = { git = "https://github.com/tempoxyz/tempo", rev = "436f6cf069a0c8aafa9a3a197ffa17488b5f1e81" }
tempo-primitives = { git = "https://github.com/tempoxyz/tempo", rev = "436f6cf069a0c8aafa9a3a197ffa17488b5f1e81", default-features = false, features = [
tempo-evm = { git = "https://github.com/tempoxyz/tempo", rev = "f9e3bbe6e06ec31ce3bb2adaf04e7b04d565b5fd", default-features = false }
tempo-node = { git = "https://github.com/tempoxyz/tempo", rev = "f9e3bbe6e06ec31ce3bb2adaf04e7b04d565b5fd" }
tempo-payload-types = { git = "https://github.com/tempoxyz/tempo", rev = "f9e3bbe6e06ec31ce3bb2adaf04e7b04d565b5fd", default-features = false }
tempo-precompiles = { git = "https://github.com/tempoxyz/tempo", rev = "f9e3bbe6e06ec31ce3bb2adaf04e7b04d565b5fd", default-features = false }
tempo-precompiles-macros = { git = "https://github.com/tempoxyz/tempo", rev = "f9e3bbe6e06ec31ce3bb2adaf04e7b04d565b5fd" }
tempo-primitives = { git = "https://github.com/tempoxyz/tempo", rev = "f9e3bbe6e06ec31ce3bb2adaf04e7b04d565b5fd", default-features = false, features = [
"reth",
"serde",
"serde-bincode-compat",
"reth-codec",
] }
tempo-revm = { git = "https://github.com/tempoxyz/tempo", rev = "436f6cf069a0c8aafa9a3a197ffa17488b5f1e81", default-features = false }
tempo-transaction-pool = { git = "https://github.com/tempoxyz/tempo", rev = "436f6cf069a0c8aafa9a3a197ffa17488b5f1e81", default-features = false }
tempo-revm = { git = "https://github.com/tempoxyz/tempo", rev = "f9e3bbe6e06ec31ce3bb2adaf04e7b04d565b5fd", default-features = false }
tempo-transaction-pool = { git = "https://github.com/tempoxyz/tempo", rev = "f9e3bbe6e06ec31ce3bb2adaf04e7b04d565b5fd", default-features = false }

# zones
tempo-zone-contracts = { path = "crates/contracts", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//! accepts batch proofs, and processes withdrawals back to L1 recipients.
//! - **ZoneOutbox** — deployed on the Zone L2. Collects user withdrawal requests, builds
//! withdrawal hash chains, and exposes `LastBatch` state for proof generation.
//! - **ZoneInbox**, **TempoState**, **ZoneTxContext** — Zone L2 predeploys.
//! - **ZoneInbox**, **TempoState**, **ZoneTxContext**, **ZoneFeeManager** — Zone L2 system contracts and precompiles.
//! - **ZoneFactory**, **SwapAndDepositRouter** — deployed on Tempo L1.

#![cfg_attr(not(feature = "std"), no_std)]
Expand Down
7 changes: 5 additions & 2 deletions crates/contracts/src/precompiles/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pub mod common;
pub mod swap_and_deposit_router;
pub mod tempo_state;
pub mod zone_factory;
pub mod zone_fee_manager;
pub mod zone_inbox;
pub mod zone_outbox;
pub mod zone_portal;
Expand All @@ -11,6 +12,7 @@ pub use common::*;
pub use swap_and_deposit_router::*;
pub use tempo_state::*;
pub use zone_factory::*;
pub use zone_fee_manager::*;
pub use zone_inbox::*;
pub use zone_outbox::*;
pub use zone_portal::*;
Expand All @@ -21,6 +23,7 @@ pub use zone_tx_context::*;
// contracts crate, e.g. `tempo_zone_contracts::TEMPO_STATE_ADDRESS`.
pub use zone_primitives::constants::{
EMPTY_SENTINEL, MAX_WITHDRAWAL_GAS_LIMIT, NO_QUEUE_INDEX, PORTAL_ADMIN_SLOT,
PORTAL_PENDING_SEQUENCER_SLOT, PORTAL_SEQUENCER_SLOT, TEMPO_STATE_ADDRESS, ZONE_CONFIG_ADDRESS,
ZONE_INBOX_ADDRESS, ZONE_OUTBOX_ADDRESS, ZONE_TOKEN_ADDRESS, ZONE_TX_CONTEXT_ADDRESS,
PORTAL_PENDING_SEQUENCER_SLOT, PORTAL_SEQUENCER_SLOT, PORTAL_TOKEN_CONFIGS_SLOT,
TEMPO_STATE_ADDRESS, ZONE_CONFIG_ADDRESS, ZONE_FEE_MANAGER_ADDRESS, ZONE_INBOX_ADDRESS,
ZONE_OUTBOX_ADDRESS, ZONE_TOKEN_ADDRESS, ZONE_TX_CONTEXT_ADDRESS,
};
15 changes: 15 additions & 0 deletions crates/contracts/src/precompiles/zone_fee_manager.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//! `ZoneFeeManager` — Zone L2 protocol fee manager.

crate::sol! {
#[derive(Debug)]
contract IZoneFeeManager {
event UserTokenSet(address indexed user, address indexed token);
event FeesDistributed(address indexed sequencer, address indexed token, uint256 amount);

function userTokens(address user) external view returns (address);
function collectedFees(address sequencer, address token) external view returns (uint256);
function setUserToken(address token) external;
function distributeFees(address sequencer, address token) external;
function isEnabledToken(address token) external view returns (bool);
}
}
Loading
Loading