Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adds bundle helper ABI #66

Merged
merged 2 commits into from
Dec 19, 2024
Merged
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
184 changes: 184 additions & 0 deletions abi/BundleHelper.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
17 changes: 14 additions & 3 deletions src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -425,11 +423,24 @@ 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::*;

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;
}
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading