diff --git a/abi/BundleHelper.json b/abi/BundleHelper.json new file mode 100644 index 0000000..7d35d1b --- /dev/null +++ b/abi/BundleHelper.json @@ -0,0 +1,184 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "_zenith", + "type": "address", + "internalType": "address" + }, + { + "name": "_orders", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "orders", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract HostOrders" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "submit", + "inputs": [ + { + "name": "fills", + "type": "tuple[]", + "internalType": "struct BundleHelper.FillPermit2[]", + "components": [ + { + "name": "outputs", + "type": "tuple[]", + "internalType": "struct IOrders.Output[]", + "components": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "permit2", + "type": "tuple", + "internalType": "struct UsesPermit2.Permit2Batch", + "components": [ + { + "name": "permit", + "type": "tuple", + "internalType": "struct ISignatureTransfer.PermitBatchTransferFrom", + "components": [ + { + "name": "permitted", + "type": "tuple[]", + "internalType": "struct ISignatureTransfer.TokenPermissions[]", + "components": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "signature", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "header", + "type": "tuple", + "internalType": "struct Zenith.BlockHeader", + "components": [ + { + "name": "rollupChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "hostBlockNumber", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "gasLimit", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rewardAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "blockDataHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "zenith", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract Zenith" + } + ], + "stateMutability": "view" + } + ] \ No newline at end of file diff --git a/src/bindings.rs b/src/bindings.rs index ea3c20c..bf4f90c 100644 --- a/src/bindings.rs +++ b/src/bindings.rs @@ -412,8 +412,6 @@ pub mod HostOrders { pub use super::orders::Orders::OrdersInstance as HostOrdersInstance; } -// contra - /// Contract Bindings for the Passage contract. #[allow(non_snake_case)] pub mod Passage { @@ -425,7 +423,7 @@ pub mod Passage { pub use transactor::Transactor; -/// Contrract Bindings for the RollupPassage contract. +/// Contract Bindings for the RollupPassage contract. #[allow(non_snake_case)] pub mod RollupPassage { pub use super::rollup_passage::RollupPassage::*; @@ -433,3 +431,16 @@ pub mod RollupPassage { pub use super::rollup_passage::ISignatureTransfer::*; pub use super::rollup_passage::UsesPermit2::*; } + +pub mod bundle_helper { + //! Bundle Helper contract bindings + alloy_sol_types::sol!( + #[derive(Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] + #[sol(rpc)] + BundleHelper, + "abi/BundleHelper.json" + ); + + pub use super::bundle_helper::BundleHelper::{new, submitCall, FillPermit2}; + pub use super::bundle_helper::Zenith::BlockHeader; +} diff --git a/src/lib.rs b/src/lib.rs index 6458d22..2ef5fcd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,7 +13,7 @@ mod bindings; pub use bindings::{ - mintCall, HostOrders, Passage, RollupOrders, RollupPassage, Transactor, Zenith, + bundle_helper, mintCall, HostOrders, Passage, RollupOrders, RollupPassage, Transactor, Zenith, }; mod block;