libid_contracts/bindings/proxy.rs
1//! Proxy plumbing shared by every proxied contract: the ERC1967 proxy constructor and
2//! the UUPS upgrade entrypoint.
3
4#[allow(clippy::too_many_arguments, unused_attributes)]
5mod inner {
6 use alloy::sol;
7
8 sol! {
9 /// OpenZeppelin `ERC1967Proxy` — deployed with the implementation
10 /// address and the ABI-encoded initializer calldata.
11 #[sol(rpc)]
12 contract ERC1967Proxy {
13 constructor(address implementation, bytes memory _data);
14 }
15 }
16
17 sol! {
18 /// The UUPS upgrade surface every proxied contract here exposes.
19 #[sol(rpc)]
20 interface IUUPSUpgradeable {
21 function upgradeToAndCall(address newImplementation, bytes calldata data) external;
22 }
23 }
24}
25
26pub use inner::{
27 ERC1967Proxy,
28 IUUPSUpgradeable,
29};