Skip to main content

Crate cow_weiroll

Crate cow_weiroll 

Source
Expand description

cow-weiroll — Layer 2 Weiroll script builder for the CoW Protocol SDK.

Weiroll is a minimal VM for chaining arbitrary EVM calls into a single transaction. This crate provides the Rust types for building Weiroll scripts and encoding them as execute(bytes32[],bytes[]) calldata targeting the canonical Weiroll executor contract.

§Submodules

ModulePurpose
planner (private)WeirollPlanner builder for accumulating commands/state
typesWeirollCommand, WeirollScript, WeirollContractRef, factory functions

§Key items

ItemPurpose
WeirollPlannerBuilder: add_commandadd_state_slotplan()
WeirollCommandA single 32-byte packed instruction
WeirollScriptFinalised script (commands + state)
WeirollContractRefContract address + ABI + default call flags
create_weiroll_contractFactory for CALL-mode contracts
create_weiroll_libraryFactory for DELEGATECALL-mode libraries
create_weiroll_delegate_callBuild a complete execute(...) EvmCall

Re-exports§

pub use types::WEIROLL_ADDRESS;
pub use types::WeirollCommand;
pub use types::WeirollCommandFlags;
pub use types::WeirollContractRef;
pub use types::WeirollScript;
pub use types::create_weiroll_contract;
pub use types::create_weiroll_delegate_call;
pub use types::create_weiroll_library;
pub use types::define_read_only;
pub use types::get_static;

Modules§

types
Weiroll script types, command encoding, and contract reference factories.

Structs§

WeirollPlanner
Builder that accumulates commands and state slots into a Weiroll script.