#[allow(clippy::too_many_arguments, unused_attributes)]
mod escrow_inner {
use alloy::sol;
sol! {
#[sol(rpc, abi)]
interface HandleEscrow {
function initialize(address owner_, address registry_) external;
function deposit(
bytes32 platformId,
bytes32 handleHash,
address token,
uint256 amount,
address refundTo
) external payable;
function claim(bytes32 handleNode, address[] calldata tokens, address recipient) external;
function refund(bytes32 handleNode, address token, address recipient) external;
function escrowed(bytes32 handleNode, address token) external view returns (uint256);
function refundable(bytes32 handleNode, address token, address refundTo) external view returns (uint256);
function registry() external view returns (address);
function NATIVE() external view returns (address);
function owner() external view returns (address);
function pendingOwner() external view returns (address);
function transferOwnership(address newOwner) external;
function acceptOwnership() external;
function renounceOwnership() external pure;
event Deposited(
bytes32 indexed handleNode,
address indexed token,
address indexed refundTo,
address depositor,
bytes32 platformId,
uint256 round,
uint256 amount
);
event Forwarded(
bytes32 indexed handleNode,
address indexed token,
address indexed depositor,
address holder,
bytes32 platformId,
uint256 amount,
uint256 received
);
event Claimed(
bytes32 indexed handleNode,
address indexed token,
address indexed claimer,
address recipient,
uint256 round,
uint256 released,
uint256 received
);
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Refunded(
bytes32 indexed handleNode,
address indexed token,
address indexed refundTo,
address recipient,
uint256 round,
uint256 released,
uint256 received
);
error ZeroAmount();
error PayingYourself(address holder);
error ValueMismatch(uint256 expected, uint256 provided);
error NothingHeld(bytes32 handleNode);
error NotTheHolder(address holder, address caller);
error NothingToRefund(bytes32 handleNode, address token, address refundTo);
error BadRefundTo(address refundTo);
error BadRecipient(address recipient);
error PlatformAcceptsNoBindings(bytes32 platformId);
error NativeTransferFailed(address recipient, uint256 amount);
error OverDebited(address token, uint256 booked, uint256 debited);
error NoRegistry();
error RegistryLacks(address registry, bytes4 selector);
error RenounceDisabled();
error OwnableUnauthorizedAccount(address account);
error OwnableInvalidOwner(address owner);
error ReentrancyGuardReentrantCall();
error SafeERC20FailedOperation(address token);
}
}
}
pub use escrow_inner::HandleEscrow;
#[cfg(test)]
mod tests {
use super::escrow_inner::HandleEscrow;
use crate::bindings::drift::assert_binding_matches_artifact;
const OMITTED: &[&str] = &[
"error AddressEmptyCode(address)",
"error ERC1967InvalidImplementation(address)",
"error ERC1967NonPayable()",
"error FailedCall()",
"error InvalidInitialization()",
"error NotInitializing()",
"error UUPSUnauthorizedCallContext()",
"error UUPSUnsupportedProxiableUUID(bytes32)",
"event Initialized(uint64)",
"event Upgraded(address)",
"function UPGRADE_INTERFACE_VERSION()",
"function proxiableUUID()",
"function upgradeToAndCall(address,bytes)",
];
#[test]
fn the_binding_matches_the_artifact_abi() {
assert_binding_matches_artifact(
"HandleEscrow",
"HandleEscrow",
&HandleEscrow::abi::contract(),
OMITTED,
);
}
}